Research on Optimization of Adaptive Positioning and Routing Algorithm for Industrial Internet of Things Engineering Based on Improved Neural Network

The Internet of Things is one of the key technologies leading the development of modern industry. There is great uncertainty in the industrial production process, which causes great difficulties in the process of node perception and information transmission. Therefore, based on the improved neural network, this study designed the industrial Internet of Things engineering adaptive positioning and routing algorithm optimization methods. Based on the analysis of industrial IoT wireless sensor network node type, on the basis of exploring the advantages of back propagation neural network for the shortcomings of slow convergence speed and so on, we establish a discrete time Markov chain, determine its transition probability and the matrix, through interval differentiate, and calculate the estimate step error correction neural network. Then, training samples are selected to build an adaptive positioning model to obtain the absolute position of engineering nodes. Then, the shortest path constraints are set and independent variables are selected. After establishing the matrix form of the two-layer recursive neural network, the route traffic is updated by calculating the connection weight, so as to complete the routing optimization. The experimental results show that this method has high positioning accuracy and low overhead, and the optimized routing algorithm has a higher transmission success rate.


Introduction
e Internet of ings is considered to be another innovation in the eld of information following computers and the Internet, among which the Industrial Internet of ings takes the key technologies of the fourth industrial revolution as the basis, which breaks through the limitations of the existing industrial system in information collection, control, human-computer interaction, and other aspects of poor collaborative ability. By means of sensing devices distributed in the industrial environment, it promotes production e ciency, enhances product quality, improves the business process of enterprises, and reduces production costs and energy consumption.
e Internet of ings engineering refers to the ubiquitous devices and facilities, which mainly includes sensors, mobile terminals, industrial systems, etc. In the Internet of things environment, the functions such as online monitoring, remote control, command, and scheduling are provided through certain information security mechanism. However, due to some uncertain factors within the process of industrial production, including dynamic movement of materials, mutation of industrial equipment and change of production parameters, and the obstacles like electromagnetic interference have seriously impeded the progress of Internet of things in industry. At present, China's Internet of ings technology as a whole develops well so that it has been applied in many Chinese industries. At the same time, the core technology development of China's Internet of ings technology is getting more abundant.
Industrial Internet of ings is a monitoring network oriented to industrial manufacturing. If the specific location of sensor nodes cannot be obtained, the data perceived by sensors will be meaningless for most applications. erefore, Zhang et al. [1] and others put forward a node location method based on distance optimization and improved particle swarm. In the stage of distance estimation, the average hop distance was corrected by the single-hop average error to achieve the purpose of distance estimation optimization; in the stage of position estimation, the improved particle swarm optimization algorithm was used to displace the maximum likelihood estimation method, and the inertia weight factor was adaptively adjusted by the success rate of particles to generate mutation operators to improve population diversity and achieve the purpose of positioning. Zhang et al. [2] and others used the fruit fly algorithm to locate the nodes of Internet of ings. In this method, the node location problem was transformed into a constrained optimization problem and then solved. In that process, the optimal range of fruit fly population was selected by dynamic step size mechanism. When the algorithm converged, the vibration optimization was carried out in the position closest to the optimal solution according to the ranging error, and the centroid of fruit fly population generated by optimization was located to obtain the final positioning result.
Although the overhead of the above traditional method was relatively small in the positioning process, the positioning accuracy could not always be kept in a high state. In order to further improve the performance of Industrial Internet of ings, I use the improved neural network method in this study to locate the Internet of ings engineering adaptively and optimize its routing algorithm. Markov is used to improve the slow convergence speed of neural network and other shortcomings and then combined with back propagation neuron network (BPNN) to build a ranging model to complete the node location. On the basis of determining the constraint relationship and independent variables, a recursive neural network is established to select the best route for transmission and realize the optimization of routing algorithm.

Composition of Wireless Sensor Network Nodes for Industrial Internet of ings.
e Internet of ings is a kind of network that uses temperature and humidity sensing, laser scanning, and other technical ways of nodes to unite massive objects through certain protocols to achieve the goals of object recognition, monitoring, and management. I study the application of Internet of ings in the industrial field in this paper, that is, Industrial Internet of ings.
Wireless sensor network (WSN) refers to a network in which nodes are connected with each other by means of wireless communication, and information is transmitted and exchanged simultaneously [3]. Wireless sensor node can communicate wirelessly, and it is an electronic device that can sense physical and chemical information and transmit it by signal. e nodes communicate and cooperate with each other to finish monitoring task of industrial production.
ere are lots of types of sensor nodes used in industrial production, which can be divided into the following types according to various functions: (1) Sensing node: it represents a node with sensing information collection and perception functions, which is generally setup in industrial devices and can be carried by personnel on-site; therefore, it is also called the terminal node. (2) Routing node: as an intermediate node, it is able to forward and process data. It uses the interactive protocol between routing nodes to send the data acquired by sensing nodes to gateway nodes. (3) Coordinator node [4]: it is the organization coordinator of the network, responsible for the address allocation of all kinds of nodes, the entry, and exit of new nodes, and also able to initialize the information in the entire Internet of ings. (4) Gateway node [5]: it is the center of wireless sensor network in industrial production, which can connect backbone network with wireless sensor network.

BP Neural Network Improvement Based on Markov
Chain. e BP algorithm is a back propagation learning algorithm which can be used in the forward multilayer network. Artificial neurons are connected with each other, by revising their weights constantly to change the input information into the desired output information. In the process of weight modification, the propagation difference of each layer in the reverse direction is used to determine how the connection weight will be modified.
e BP algorithm has the advantages of nonlinear mapping and can implement the mapping function from input to output. Meanwhile, the algorithm also has strong self-learning and self-adaptive abilities. It can save the learning content into the weight of the network through continuous learning. However, besides the above advantages, the convergence speed is slow and it is easy to fall into local minimum. Since the selection of network structure is not unique, it will cause oblivion of old samples. erefore, I used Markov chain to analyze and correct the error of the BP neural network in the process of node location in the Internet of ings project so as to realize adaptive location in this paper.
Markov can be expressed as follows: in the given state of the time point t k , the state of the process at the time t(t > t k ) only relies on the state of the time point t k and is irrelevant to the state before the time point t k .

Discrete Time Markov Chain.
It is assumed that the parameters X k , k ∈ T of the Markov process T � 0, 1, 2, ... { } represent discrete time sets, and the state .. composed of sets of possible values belongs to the discrete state sets. If the random process X k , k ∈ T is directed k ∈ T to the state set i 0 , i 1 , i 2 , ..., i k+1 , state transition may occur at any time [6]. In this case, assuming the state of the process at the moment m is expressed as i m , and it changes into a random state m + n at the moment i m+n . e probability is only related to the state at the time m and does not depend on the state at other states, expressed as (1)

Transition Probability and Matrix of Markov Chain.
Use p ij (m, m + n) to describe occurrence Markov chain of m at the time point X m � i, and the probability of m + n at the time point X m+n � j; then, Formula (2) is called the transition probability of the random process X k from the state m at the moment i to the state m + n at the moment j. is formula indicates that p ij (m, m + n) has a certain correlation between i, j, n, and m.
erefore, the n step state transition probability p ij (n) of Markov chain is defined as follows: e n step state transition matrix P(n) relative to the above formula is

e Process of Markov Chain Revising BP Network.
Step 1: interval division, calculate the relative error of the node distance d output by the BP network model and divide the error interval corresponding to the model estimation value into the k states, record as i 1 , i 2 , ..., i n , and the calculation formula of the relative state interval I i is In formula (5), I i min and I i max , respectively, represent the lower limit and the upper limit of the first state. e two are the closed interval and the open interval, respectively.
Step 2: establish the state transition matrix. e probability reached p ij (n) after the I i steps of the representative n by using I j : In formula (6), N ij (n) represents the number of times the state I i is transferred to n after I j steps, and N i represents the number of times the relative error reaches the state I i . en, calculate the n step state transition probability matrix by formula (4), which is able to reflect the transition status of different states in the system.
Step 3: the estimated value is determined. When the transition state I j occurs at an unknown time point, the relative transition probability p ij (n) and the relative error variation range [I i min , I j max ] of the predicted value of the BP neural network model will also be determined. At this time, the estimated value can be obtained. e expression is In formula (7), F(x) represents the final value after error correction and f(x) represents the output value of the neural network.

B-Markov Positioning Model Construction.
Use Markov chain to improve the neural network, combine the advantages of neural network nonlinear mapping, self-adaptability, etc. [7], to construct a B-Markov positioning model. In this model, the BP neural network is used to build an adaptive RSSI − d ranging model, and Markov chain is used to analyze the model errors to improve the accuracy of positioning and reduce energy consumption. e schematic diagram of the B-Markov positioning model is shown in Figure 1.
In the process of neural network model training, the old samples may be forgotten when learning new samples but the B-Markov model can make use of the uncertainty error generated by random interference in the later trend estimation to correct the model so as to get the positioning result with little node error [8].
e specific positioning implementation process of the B-Markov model is as follows: Step 1: the most stable measurement value is taken as the input and regarded as the training sample combining with the received signal strength indicator data in industrial field.
Step 2: iterate the training samples for several times to determine the parameters and obtain the adaptive BP neural network model with minimum error.

Mathematical Problems in Engineering
Step 3: acquire the relative error between the real distance value between various nodes and the neural.
Step 4: calculate the state transition matrix according to the division state of relative error.
Step 5: use Markov chain to correct the relative error to get the adaptive positioning model [9] which is eventually improved and optimized. e relative position of the nodes can be acquired through the positioning model above. e absolute position of the nodes can be calculated through linear transformation.

Routing Algorithm Optimization Based on Double-Layer Recursive Neural Networks
After the node adaptive positioning is completed, I introduce the shortest path constraint relationship and independent variables in this research and construct a bidirectional recursive neural network model to optimize the routing algorithm.

Constraints of the Shortest Path.
For a known oriented graph G (V, E), assume the number of the nodes is n ′ , the number of the edges is, and respectively represent the set of the nodes and edges. Select a random node as the reference node, then the relationship between the remaining nodes and branches can be described by the (n ′ − 1) × m ′ incidence matrix A: In formula (8), ϕ and φ represent the elements of row ϕ and column φ, respectively: a ϕφ 1, Ifϕandφare related, and, its direction deviates from this node, −1, Ifϕandφare related, and, its direction points to this node, 0, Ifϕandφare not related.
For the path s where the source point is d and the end point is ρ s d , it can be expressed by a certain set of decision variable values corresponding to m ′ branch, namely, v v 1 , v 2 , . . . , v m′ . (10) en, the shortest path problem can be expressed as In formula (11), c [c 1 , c 2 , . . . , c m′ ] represents the m ′ row vector of order, and each element is a nonnegative number, describing di erent branch lengths. e constraints are

Independent Variables.
In the process of independent variables selection, perform the following operations on branch numbers: (1) Select a random tree in the oriented graph, and set its number to 1 ∼ n ′ − 1; then, the branch variables (2) e remaining branches are called link branches [10], numbered as n ′ ∼ m ′ , and the corresponding link branches variable is According to the constraint conditions,

Routing Algorithm Optimized Implementation.
Combine constraints and independent variables to obtain the shortest path corresponding to the stable state of neural network: In formula (15), the function of the rst term is to ensure that in the condition of v ϕ ∈ 0, 1 { }, (ϕ 1, 2, . . . , m ′ ) is minimum. en, formula (15) is derived as follows: Obtained by gradient formula, e matrix form of the double-recursive neural network is expressed as

Analysis and Research of Simulation Experiment
In order to verify the feasibility of adaptive positioning and routing algorithm optimization method for Industrial Internet of ings engineering based on improved neural network designed above, the following simulation experiment is designed.
In the experiment of simulation, the nodes of Industrial Internet of ings are deployed in grid and randomly. e numbers of the nodes required by the two deployment schemes are 200 and 300, respectively, and the sizes of the deployment area are 8m × 8 m and 10 m × 10 m, respectively. Other simulation parameters are shown in Table 1.
In the adaptive positioning of Internet of ings engineering nodes, energy consumption and positioning accuracy are taken as evaluation indicators. Network nodes are usually mobile, which limits their own energy. If a node does not have energy, it will become a dead node and a ect the network enormously. erefore, energy consumption is a crucial evaluation index in the positioning algorithm. And it is closely related to the algorithm complexity and quality of communication. Another major indicator is positioning accuracy. Compare and analyze the method in this paper and that in literature [1] and literature [2] according to two comparison indicators.
Assume there are N * nodes in the Internet of ings, and the number of beacon nodes and location nodes are M * and N * − M * , respectively. e actual coordinates of the nodes X ' i′ are expressed as x ' i′ , and the coordinates calculated by the positioning algorithm are x ' i′ . Use the following formula to obtain the average positioning error of all nodes: e positioning overhead and accuracy of the three methods are shown in Figure 2 and Table 2, respectively.
It can be seen from Figure 2 and Table 2 that the method in this paper occupies an absolute advantage in both cost and accuracy of positioning. Although the method in literature [1] has a rather low positioning cost, it has poor accuracy of positioning. As the number of nodes increases, the positioning overhead in the literature [2] rises rapidly. e above simulation results show that the improved neural network positioning model in this paper is able to reduce the positioning error after multiple iterations. In the meantime, it converges quickly without consuming too much node energy. e indicator to measure the pros and cons of the routing algorithm is the data to reach power, which is the ratio of successfully received packets to all nodes transmitted packets. e test result of the data packet transmission success rate of the three methods is shown in Figure 3.
Analyzing Figure 3, it can be seen that compared to the two traditional methods, the optimized routing algorithm in this paper has a higher transmission success rate for data  packets. is is because the method in this paper takes the shortest path as a constraint, the shorter the path, the higher the success rate of transmission.

Conclusion
at expanded production scale of some Chinese industrial production factories has enriched both the number and variety of applied Internet of ings devices. is is similar to the transmission of network data within a larger local area network, where the increased number of network users in a local area network requires adding more network processing devices to ensure the transmission of network data. e application of Industrial Internet of ings needs the communication and management of industrial devices based on the Internet of ings network protocol, network equipment, and other elements. Meanwhile, the expansion of production scale in factories will make the communication and management of Internet of ings devices become more complex. In view of this situation, this article improves the BP neural network to reduce the node positioning error in this paper in order to optimize the routing algorithm as well as improve the accuracy of information collection and success rate of transmission. However, with the extensive use of sensors in industrial production, the collection amount of sensing terminals data has increased sharply. It will be the major work in the future to analyze and process these data quickly and then provide scienti c decision-making information for industrial production.
Data Availability e data used to support the ndings of this study are included within the article.

Conflicts of Interest
e author declares that there are no con icts of interest.