An intelligence optimization method based on crowd intelligence for IoT devices

Purpose – The rapid development of 5G technology brings the expansion of the internet of things (IoT). A large number of devices in the IoT work independently, leading to dif ﬁ culties in management. This study aims tooptimizethemember structure of theIoT so themembers in itcan work more ef ﬁ ciently. Design/methodology/approach – In this paper, the authors consider from the perspective of crowd science, combining genetic algorithms and crowd intelligence together to optimize the total intelligence of the IoT. Computing, caching and communication capacity are used as the basis of the intelligence according to the related work, and the device correlation and distance factors are used to measure the improvement level of theintelligence. Finally, they use geneticalgorithm to selecta collaborative statefortheIoT devices. Findings – Experimental results demonstrate that the intelligence optimization method in this paper can improve the IoT intelligence level upto ten timesthan originallevel. Originality/value – This paper is the ﬁ rst study that solves the problem of device collaboration in the IoT scenario based on the scienti ﬁ c background of crowd intelligence. The intelligence optimization method workswell intheIoTscenario, anditalso haspotentialin otherscenariosof crowd network.


Introduction
The internet of things (IoT) is a concept that people have been longing for since the information transmission technology came into fast development in the 21st century.The builders of internet hope to realize the connection among everything and everyone, then the IoT members can get information sharing and real-time interaction by the connection.
IoT is defined as an information carrier, which uses various equipment such as information sensors, radio frequency identification tags, global positioning system to get real-time information collection from the members on the network.Through the use of information and communication technology, people can promote the intelligent services of urban administration, education, health care and transportation (Gubbi et al., 2013).Figure 1 shows a schematic diagram of the IoT.The development of the fifth-generation mobile communication technology is entering a new stage.What 5G pursues are high data transmission rate, reduced latency, energy savings, cost reduction, increased system capacity and large-scale device connections.The ITUIMT-2020 specification requires an information transmission speed of up to 20Gbps, which can achieve wide channel bandwidth and large capacity MIMO (Xu, 2018).All the advantages 5G has make it easier for IoT to achieve the goal of interconnection.
However, how to get rid of the chaotic state of devices and improve the total performance of the IoT has become an intractable problem.With the development of the IoT, the scale of the IoT has gradually expanded.Large-scale interconnection of heterogeneous devices means the emergence of network management.The current research on the collaborative work of IoT devices is mostly focused on low-rate narrowband IoT communication technology (Cai, 2017), cross-technology communication for IoT heterogeneous devices (Chen et al., 2019), resource allocation (Gai and Qiu, 2018), IoT structure, etc.Most research studies regard the entire IoT as a whole and devote themselves to studying how to achieve high-speed and effective communication between devices or how to realize the interconnection and intercommunication of the entire network.Before the collaboration of all the devices in the IoT is realized, it is necessary to find a method to help the devices to choose, which device to work with.The problem can be solved by combining genetic algorithm and crowd intelligence together.Crows science is a newly developed theory that focuses on the intelligence level of intelligent networks.This paper use crowd intelligence from it to measure the performance of the IoT.Genetic algorithm is well-known for group intelligence optimization.Genetic algorithm is used to optimize the intelligence through searching the different collaborative states of the IoT members.The final state of the network is a collaborative state with high intelligence in which the IoT devices can work together to provide better service for people.
The contribution of our work is shown as follow: This work is the first, to think about the improvement of the intelligence of the IoT from the perspective of crowd intelligence.According to the characteristics of devices in the IoT, correlation and distance are chosen as factors to optimize the collaboration state, which are considered by few research studies;  (2019) proposed a workflow-net-based framework for agent cooperation, their work focused on the cooperation between fog computing devices.There are also other works about the resource allocation in IoT.Pilloni et al. (2017) proposed a resource allocation algorithm, which is based on a consensus approach to deploy distribute applications.Fortino et al.
(2020) consider the collaboration of IoT devices from a novel perspective of reliability.With respect to the migration of the devices in IoT, it is hard to find reliable partners, so Fortino et al. considered social capabilities as the basis for device collaboration.

Crowd science measurement
Crowd science is a doctrine that has emerged in recent years.The learning object of crowd science is the crowd network system, which is a system that connects the physical world, information world and consciousness world through the internet.There are still few works about it.The goal of Crowd Science and Engineering is: Take advantage of group intelligence to achieve efficient economic and social operations.Take effectively management and control group intelligence to avoid sudden economic and social disasters.

IJCS 5,3
Work together to enhance individual intelligence and continuously improve the group's innovation vitality.
The current research on crowd science has just started.Chen et al. (2019) introduced the concept and the research framework of the crowd science.Wang et al. (2019) proposed an adaptive information-sharing approach for crowd network, by which they could improve the intelligence of the crowd network.The work that is meaningful to our work is the measurement of intelligence.

The intelligence optimization algorithm for internet of things devices
Genetic algorithm simulates the natural selection process.It initializes a certain number of chromosomes first.Then it calculates the fitness of each chromosome in each iteration.According to the fitness, it retains a part of the chromosomes and eliminates the other chromosomes.As to the chromosomes with high fitness, the probability of survival in the next generation is high and chromosomes with low fitness are more likely to be eliminated in the process of natural selection.During each iteration, some genetic mutations will be generated to generate new chromosomes, which may prevent the algorithm from stuck in local optimal solution.The mechanism of genetic algorithm to search for the optimal solution by simulating the natural evolution process has strong flexibility, which makes it very suitable for the random and highly variable IoT scenarios.Its probabilistic natural elimination mechanism can save us from formulating rules in complex environments, so this article uses genetic algorithms as the basis for collaborative optimization of IoT devices.

Intelligence-based genetic algorithm concept
In the original state, each intelligent member in the IoT works independently.To collect and store the information of all agent members and achieve real-time interaction, the cost is very large and the management is very challenging.Therefore, this work envisage that the members of the IoT will be divided into different collaborations with reference to certain factors.The members of the unified collaboration can achieve complete exchange of information, and each collaboration can complete the transformation from a disorder state to an organized management.
In our settings, each member in the IoT corresponds to each gene of the chromosome in the genetic algorithm.The members are divided into different collaborations so the number of the collaboration that the member belongs to is the value of the genes.Because each member is an independent and effective individual, the positional arrangement of genes in the chromosome is meaningful.The collaboration numbers of each member are arranged to form a "chromosome" and one chromosome represents one cooperative state of the entire

Crowd intelligence for
IoT devices intelligent network.As different members have different parameters, when some members are added to a collaboration, the interconnection of members of the collaboration will bring the improvement of its intelligence.Liang et al.(2018) calculated the intelligence of the intelligent agent using communication capabilities, storage capabilities and computing capabilities as the basic measurement parameters of intelligence.This work refers to this measurement method and use these three parameters as the basis for intelligent calculation of the original state.In addition, this work uses the correlation and distance parameters between different members to measure the level of improvement of the overall intelligence of the collaborations, which is used in the algorithm of the fitness calculation of the genetic algorithm.The fitness of the chromosome is the total intelligence of the collaborations of the IoT.The schematic diagram of the algorithm is shown in Figure 2.
3.2 Intelligence-based evolutionary schemes 3.2.1 Fitness calculation and selection.First, generate a set of feasible solutions randomly, that is to say, allocate random collaboration numbers for each member.All this numbers make up a chromosome and all the chromosomes make up the first generation.Then, calculate the intelligence of the collaboration network according to the fitness.The algorithm calculate the fitness of each collaboration and sum them together as the intelligence of the entire IoT.The calculation of fitness is shown in equation ( 1): where f is the fitness; coNum is the number of collaborations, which can be set according to the scene; a is the intelligent agent bonus parameter, whose size is also set according to the scene; c r is the correlation parameter, whose value is based on the importance of equipment correlation in the scene; r i is the relevance of the i-th collaboration, r min is the minimum value of the correlation of all collaborations.The calculation of r i is shown in equation ( 2); c d is the distance parameter.d i is the average distance from each member in the i-th collaboration to its physical center, it is calculated as shown in equation ( 3); cach i is the average storage capacity of the members in the i-th collaboration; comp i is the average computing capacity of the members in the i-th collaboration; comm i is the average communication capacity of the members in the i-th collaboration: where member i is the number of members of the i-th collaboration; r mn is the correlation between the m-th an n-th device type; num mi and num ni are the number of the device types m and n that the i-th collaboration has: where (x i , y i ) is the coordinate of device j in the i-th collaboration and x; y ð Þis the coordinate of the center of the i-th collaboration.
Set cach i *comp i *comm i , a, c r and c d as fixed values, and a graph can be drawn to see the relationship between correlation and distance parameters in Figure 3.
From the image, it can be seen that when the correlation approaches zero and the distance approaches 1, the intelligence of the cooperation approaches the initial intelligence value of the non-cooperative state.When the correlation approaches one and the distance approaches zero, the intelligence of the cooperation approaches a limit value.As the distance increases, the intelligence of the collaborative body continues to decline.As the degree of relevance increases, the intelligence of the collaborative body continues to rise.This is in line with the reality.
The natural selection probability corresponding to each chromosome is the proportion of its fitness in the sum of the fitness of the same generation of chromosomes: where p i is the probability for chromosome i to be selected to survive in the next generation.N is the total number of the chromosomes.

Crowd intelligence for
IoT devices By retaining chromosomes with higher intelligence and eliminating chromosomes with lower intelligence, the quality of the chromosome set will become higher and higher after several iterations, thereby realizing the evolution of the cooperative network.3.2.2Crossover and mutation.In each iteration of evolution, a new generation of chromosomes must be generated.It is necessary to select the parent chromosomes of the previous generation and choose a certain position to cut each one and match them together to generate new chromosomes.The selection of the parent chromosomes is done by using the roulette algorithm.The chromosomes with high fitness are more likely to be selected.According to the elimination rate set by the algorithm, some of the chromosomes should be eliminated while the better chromosomes should be kept.The exact proportion of highintelligence chromosomes in the previous generation are directly copied to the next generation, and only the remaining chromosomes of the elimination rate proportion are cross-mutated.
It is not enough to cross-splice the chromosomes.It is also necessary to mutate the chromosomes after crossover.Randomly select several agent devices on the new chromosome, and randomly modify the numbers of the collaborations they belong to, so as to generate new genes into the current chromosome, which helps the algorithm avoid local optimization.
This algorithm is an iterative process, after the above process, a new round of iteration will be carried out until the intelligence of the collaborative network does not change anymore or reaches a satisfying value.

Experiments and results analysis
Our algorithm of this experiment has been programmed in JavaScript, which is running under the browser of the official 64-bit version of Google Chrome 87.0.4280.88.The simulation parameters of device are shown in Table 1.We simulate a scene of intelligent transportation.Cars, surveillance cameras, personal computers (PC) and mobile phones are chosen as the IoT devices.The parameters of mobile phones are set according to the work of Sheng et al.(2019).The parameters of car are obtained from the work of Zhang et al. (2020).So do the camera parameters from the work of Wang et al. (2017).The parameters of the PC are set to the regular household level.
The parameters of genetic algorithm need to be adjusted to make the algorithm converge to a satisfactory value at a faster speed.The parameters are initialized to a lower level (He et al., 2005), and are gradually increased to select the appropriate value for the algorithm according to the intelligence results.The original parameters are shown in Table 2.
Where IN is the number of generations, CN is the number of chromosomes in one generation, ER is the rate of which the chromosomes will be eliminated in each generation and MR is the mute rate of the chromosomes in each generation.
Because the genetic algorithm is inherently unstable (He et al., 2005), for each value condition of every parameter, the algorithm runs 100 times, then the average value of the intelligence results of all conditions is calculated, counting the occurrence frequency of intelligence that is higher than the average value for each condition.Finally, the results in a  4. Select the parameters with the highest proportion of high intelligence as the parameters of the algorithm.As it can be seen from Figure 4, IN is 2,000, CN is 20, ER is 0.9 and MR is 0.4.Finally, all the parameters of the genetic algorithm itself should be selected.The rest parameters c r , c d and a used in the calculation of fitness, represent the intelligence level of the scene and influence the result of the collaborations allocation.They do not affect the

Crowd intelligence for
IoT devices convergence speed of the algorithm.When the scene pays more attention to relevance, the value of c r should be increased appropriately, and when the distance cost is large, the value of c d should be increased.a is set according to the level of intelligence corresponding to the scene.When the collaboration can bring higher intelligence to the IoT, a larger value can be set for a.In the experiment, c r is set to one and a, c d are set to two.The city-level quantitative distribution of related devices is obtained from the National Bureau of Statistics.This work simulates different quantity level of IoT devices from 50 to 400.The proportion of the various devices in our simulation is consistent with the real situation.Finally, this paper counts the intelligence of the IoT after using the intelligence enhancement algorithm and the intelligence of the original network under different scales of IoT devices.As is shown in Figure 5, the intelligence of the network tends to be stable when the device number is more than 150.The figure shows that intelligence of the network optimized by our algorithm is always higher than that of the original network, and the intelligence level has been improved to about 15 times stably.This means the collaborative intelligence optimization algorithm can perform well in IoT at different device scales.

Conclusions
The huge scale and complex changes of the IoT make the current communication technology, storage and computing capacity unable to solve the management problems of the devices in the IoT.The chaotic state limits the overall intelligence of the IoT and cannot provide a good service experience.To rationally arrange the current collaborative management of IoT devices, the natural elimination process of genetic algorithm is used to find a reasonable collaborative state of IoT devices.The communication-computing-caching model is applied to calculate the intelligence level of collaborations in the IoT.This measurement method has good versatility.The correlation and distance parameters are taken into consideration to measure the level of intelligence improvement.The collaboration status of the devices is considered from a macro perspective, so even if the scene changes, this method still works well by modifying some of the device parameters.Experiments have proved that this method can greatly improve the intelligence level of the Crowd Network in the IoT scenario, which can help the IoT improve the intelligent service and improve the service experience.In the future, more research on Crowd Intelligence should be conducted to help the future world to be a real "Intelligent World." Figure 2. Algorithm diagram.Members are coded as 1, . .., n, different colors of the gene in the chromosome means the different collaborations the members belong to Figure 3. 3-D graph of correlation-distanceintelligence relationship Figure 5.Comparison between origin network and the collaboration network This job uses genetic algorithm to construct collaborations for the IoT devices to work in.The algorithm considers the correlation and distance of the IoT devices to search the highest intelligence, which does not completely depend on the basic Khan et al. (2018)applied cooperative reinforcement learning for the resource allocation.Kotb et al.
Ji et al. (2020)))ed business entropy, which represents the professional categories of intelligent subjects in crowd intelligence network to measure the intelligence level.Yang and Ji (2020)focused on the uncertainty between different factors, using meta-analysis for intelligence measurement.Liu et al. (2018)took three parameters of the intelligent agents in crowd network: quality, time and complexity as a universal measurement for intelligence level.The intelligent devices in IoT need the ability of communication, computing and caching to complete information collection, data storage and interaction between intelligent devices.Ji et al. (2020)used the integration of communication-computing-caching to calculate the intelligence level, which is suitable for IoT intelligence calculating.So the communication-computingcaching integration is applied in the algorithm of this paper to help represent the intelligence level of IoT.