CN111600747A - Data link simulation model - Google Patents
Data link simulation model Download PDFInfo
- Publication number
- CN111600747A CN111600747A CN202010343280.1A CN202010343280A CN111600747A CN 111600747 A CN111600747 A CN 111600747A CN 202010343280 A CN202010343280 A CN 202010343280A CN 111600747 A CN111600747 A CN 111600747A
- Authority
- CN
- China
- Prior art keywords
- matrix
- connection matrix
- row
- hop
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/145—Network analysis or design involving simulating, designing, planning or modelling of a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a data link simulation model, which comprises a parameter setting module, a node connectivity calculation module, a data updating check module, a time delay calculation module and a data output check module, wherein the direct connection relation of nodes can be judged according to performance parameters and node state information of a data link, the hop count among nodes in a sub-network and the division condition of the sub-network are calculated, the time delay length of a data packet is calculated according to the hop count of the nodes, and the difference of transmission delay among the nodes is simulated. The invention can accurately reflect the time delay characteristic and the connectivity of the data chain, and can realize more real system simulation after being introduced into the system.
Description
Technical Field
The invention belongs to the technical field of data chains, and particularly relates to a data chain simulation model.
Background
In application scenarios such as unmanned aerial vehicle formation flight, internet of things construction, robot collaboration and the like, a data chain is a very important link and is a link for connecting various devices. From a system level, the introduction of the data chain provides conditions for communication between modules and provides more available information for devices. However, due to the connectivity and delay characteristics of the data chain, the use of the part of information is different from the use method of the information of the system, so that a data chain mathematical model needs to be established to analyze the characteristics of the whole networking system.
The existing data chain models mainly have two types:
one is a simulation model constructed by a data chain model based on a data chain principle, the construction of the model is related to working systems (such as TDMA and SPMA) of a data chain, and the data interaction characteristics among nodes can be accurately restored, but the construction process is complicated, the universality is not realized, the workload is large, and once different data chain systems are replaced, a new model needs to be reconstructed.
The other data chain model is a data chain model based on time delay, and the model does not build a model on the system level, but adds a time delay link in a simulation model of each device to serve as the data chain model. The data shared by the data chain is subjected to delay processing (namely, the data sent to the data chain can be received after a certain time), so as to simulate the characteristics of the data chain. The mathematical model has the advantages that the time delay characteristic of the data chain can be basically simulated, the construction mode is simple, and the universality is strong; however, the model is ideal in construction, the delay characteristics of all nodes are the same by default, the communication characteristic of the data chain cannot be reflected, the difference between the simulation result and the real data chain characteristic is large, and the real condition of the data chain work cannot be reflected well.
Therefore, it is significant to construct a mathematical model which can not only reflect the basic characteristics of the data chain, but also represent various data chain systems. The model can accurately reflect the characteristics of the data chain, can realize real system simulation after being introduced into a system, can reflect the characteristics of the whole system, realizes the adjustment and optimization of node parameters, and is convenient for proposing new technical requirements on the data chain link from the system level.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a data chain simulation model, which can accurately reflect the delay characteristic and the connectivity of a data chain and can realize real system simulation after being introduced into a system.
In order to solve the technical problem, the data chain simulation model provided by the invention adopts the following technical scheme:
the data chain simulation model comprises a parameter setting module, a node connectivity calculation module, a data updating inspection module, a time delay calculation module and a data output inspection module;
the parameter setting module acquires performance parameters and node state information of the data link from the system model, and sends the received parameters and information to the node connectivity calculation module and the time delay calculation module for calculating the connectivity and time delay of the data link;
the node connectivity calculation module judges the direct node connectivity relationship according to the performance parameters of the data link and the node state information, and calculates the hop count among the nodes in the subnet and the division condition of the subnet;
the data updating and checking module is used for checking the updating condition of the data packet at the input end. An alarm clock variable is set in the data packet, the alarm clock variable value of the data packet is defaulted to be-1, and the alarm clock variable value in the data packet sent to the data chain model by the node is 0. In each execution cycle of the data chain model, the data updating and checking module checks the input end, if updated data exist, namely a data packet with an alarm clock variable value of 0, the data of the input end is read into the input end for caching, and then the alarm clock variable value of the data packet at the input end is set to be-1;
the time delay calculation module calculates the time delay length of the data packet; after reading in the data packet of the input end cache, respectively calculating the delay time from the node to other nodes of the subnet, setting the alarm clock variable contained in the read data packet as the delay time and then sending the delay time to the corresponding output end cache, wherein the delay time is the product of the minimum hop count and the basic delay, and a plurality of packets of data can be stored in the output end cache;
and the data output checking module updates the values of the alarm clock variables of all the data packets in the output end cache of each node according to the data chain clock in each calling period of the data chain model, and sends the data packets to the output end of the node from the output end cache when the alarm clock variable value of one data packet in the output end cache of the node is not a positive number.
Further, the node connectivity calculation module judges the direct node connectivity relationship according to the performance parameters of the data chain and the node state information, establishes a direct connectivity matrix, and calculates a minimum hop matrix, thereby realizing the solution of the subnet partition array.
The method for solving the minimum hop count matrix according to the direct connection matrix comprises the following steps:
the number of nodes of the network is set to be m,
the direct connection matrix is represented by an m multiplied by m matrix, and if two nodes are directly connected, the element at the corresponding row and column is 1; if not directly connected, the corresponding element is-1; if the two nodes are the same node, the corresponding element is 0;
the minimum hop matrix is represented by an m multiplied by m matrix, the element corresponding to the row and column represents the minimum hop required by the communication of the two nodes, and if the two nodes are not connected with each other no matter how many times of forwarding, the corresponding element is-1; if the two nodes are the same node, the corresponding element is 0;
enabling the direct connection matrix to be a 1-hop connection matrix, and obtaining a k-hop connection matrix through a plurality of iterative algorithms, wherein k is 1, 2, …, k …, n and n + 1;
knowing the k-hop connection matrix, the calculation method for solving the k + 1-hop connection matrix is as follows:
initializing a k +1 hop connection matrix to be the same as the k hop connection matrix;
traversing all rows of the k-hop connection matrix for processing, operating the ith row, finding out all positive number elements of the ith row of the k-hop connection matrix, if the element belongs to the jth column, comparing the ith row with the jth row of the k-hop connection matrix, if the value of some element of the ith row is-1 and the value of the jth row corresponding element is positive, changing the value of the ith row of the k + 1-hop connection matrix as-1 into k +1, if no value of the corresponding element is positive, not modifying, and if the ith row of the k-hop connection matrix has no positive number element, skipping the row and continuing processing the next row;
after all rows in the k-hop connection matrix are processed, a new matrix which is a k + 1-hop connection matrix is obtained;
and by analogy, obtaining an n +1 hop connection matrix through a plurality of iterations, stopping the operation if the n +1 hop connection matrix is completely consistent with the n hop connection matrix, and finally obtaining the n hop connection matrix as a minimum hop matrix.
Given a k-hop connection matrix, another calculation method for solving a k + 1-hop connection matrix is as follows:
initializing a k +1 hop connection matrix to be the same as the k hop connection matrix;
traversing all rows of the k-jump connection matrix for processing, setting the row i for operation, finding out all elements with the value of-1 in the row i of the k-jump connection matrix, if the column number of the found element is j, comparing the row i with the row j of the k-jump connection matrix, if the corresponding element in the column j of the row j and the row i is positive, changing the element value of the row j of the row i of the k + 1-jump connection matrix to k +1, if no corresponding element is positive, not modifying, and if no element with the value of-1 in the row i of the k-jump connection matrix exists, skipping the row to continue processing the next row;
after all rows in the k-hop connection matrix are processed, a new matrix which is a k + 1-hop connection matrix is obtained;
further, the method for obtaining the subnet partition array comprises the following steps:
calculating a subnet division relation according to the minimum hop matrix, and setting a subnet division array as a row array comprising m elements, wherein the column number represents the node number, the elements represent the subnet number, and the columns with the same elements represent the nodes in the same subnet;
the method for solving the subnet division array comprises the following steps:
1) establishing a subnet division array with all 0, wherein the array column number is the same as the column number of the minimum hop count matrix and is m;
2) changing the non-1 element in the first row of the minimum hop matrix into 1 and copying the element to the corresponding position of the array to complete the first updating of the subnet partition array;
3) finding the first 0 element in the updated subnet partition array, if the corresponding column is j, finding all non-1 values in the jth row of the minimum hop count matrix, changing the values into 2, and then replacing the 0 element in the corresponding column in the subnet partition array to complete the second update of the subnet partition array;
4) then finding the first 0 element in the updated subnet partition array, if the corresponding column is p, finding all non-1 values in the p row of the minimum hop count matrix, changing the values into 3, and then replacing the 0 element in the corresponding column in the subnet partition array to complete the third update of the subnet partition array;
5) and analogizing in this way, increasing the value in the replacement array by 1 after each cycle until no 0 element exists in the array, and finally obtaining the array which is the subnet division array.
Compared with the prior art, the invention has the following beneficial effects:
1) the model provided by the invention can accurately reflect the delay characteristic of the data chain and simulate the difference of transmission delay among nodes. After the method is introduced into a system, relatively real system simulation can be realized, the characteristics of the whole system can be reflected, the adjustment and optimization of node parameters can be realized, and the method is convenient for providing new technical requirements for a data link from the system level.
2) The connectivity and the multi-hop characteristics of the system network are represented by using the direct connection matrix and the minimum hop count matrix, and the minimum hop count between the nodes can be efficiently solved by providing the calculation method of the minimum hop count matrix.
3) A representation and solving method for subnet division is provided, so that simulation of a plurality of independent subgroups in a large group can be realized, network access and network exit of nodes are supported, and the division condition of the subnets is calculated in real time.
Drawings
Fig. 1 is a schematic diagram of an operating principle of a data chain model according to an embodiment of the present invention.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments.
The data chain model is used in the simulation process of the system and aims to realize data interaction between nodes (like a WeChat group). The data link model is regarded as an independent module in the system and is parallel to the equipment of each node. The input and output ends of all the nodes are connected with the output and input ends of the data chain model through interfaces, all the nodes send data packets to the data chain model according to own time sequence, and the data chain model carries out time delay on each data packet for a certain time and then outputs the data packet from the output end of the corresponding node.
Because the main influence of the data link model on the whole system is two aspects of connectivity (connectivity indirectly influences the delay characteristic) and the delay characteristic, in the embodiment of the invention, the data link model mainly focuses on the connectivity and the delay characteristic among nodes, and further realizes the time sequence simulation of data transmission among the nodes.
The data link model is driven by an external simulation model and comprises a parameter setting module, a node connectivity calculation module, a data updating and checking module, a time delay calculation module and a data output and checking module.
The parameter setting module acquires performance parameters (such as a directional diagram, power and the like) and node state information (such as node distance, node relative position, whether shielding exists, basic delay and the like) of the data chain from the system model, and sends the received parameters and information to the node connectivity calculation module and the delay calculation module for calculating the connectivity and the delay of the data chain.
And the node connectivity calculation module judges the node connectivity relation according to the performance parameters of the data link and the node state information, and calculates the division condition of the subnet and the hop count among the nodes in the subnet.
The data updating and checking module is used for checking the updating condition of the data packet at the input end. An alarm clock variable (which is not present in a real data chain system) is set in the data packet so as to distinguish the old and new data and realize the transmission delay of the data packet. The alarm clock variable value of the data packet is defaulted to-1, and the alarm clock variable value in the data packet sent to the data chain model by the node is 0. In each execution cycle of the data chain model, the data updating and checking module checks the input end, if updated data (a data packet with an alarm clock variable value of 0) exists, the data at the input end is read into the input end for caching, and then the alarm clock variable value of the data packet at the input end is set to be-1.
And the time delay calculation module calculates the time delay length of the data packet. After reading in the data packet cached at the input end, respectively calculating the delay time from the node to other nodes of the subnet, setting the alarm clock variable of the read data packet as the delay time, and then sending the delay time to the corresponding output end cache. The output end cache can store a plurality of packets of data, and the delay time between the nodes is estimated according to the product of the node hop count and the calculated average delay, namely: the delay time is the hop count between nodes x the basic delay, and the hop count between nodes is represented by a minimum hop count matrix.
And the data output checking module is used for checking the alarm clock variable in the output end cache and outputting expiration data. And updating the values of the alarm clock variables of all the data packets in the output end cache of each node according to the data chain clock in each calling period of the data chain model. And when the alarm clock variable value of a certain data packet in the node output end cache is not positive, sending the data packet to the node output end from the output end cache.
The data chain model of the invention has the following working process:
the working principle of the data chain model is shown in fig. 1. Firstly, initializing a data chain model, forming interfaces and internal cache according to the upper limit of the number of data chain link points, and setting data chain parameters; calculating the networking state of the nodes, and outputting the data link state to the output end of each node; then the data chain model checks the input port of each node and reads the updated data packet into the cache; and calculating the time delay length of the data packet, and sending the data packet to the corresponding node output end in a time delay manner.
Further, as a specific embodiment of the present invention, the node connectivity calculating module calculates the hop count between nodes in the subnet and the division condition of the subnet according to the direct connectivity relationship between the nodes, including the following steps:
step 1, judging the direct connection relationship between every two nodes, and establishing a direct connection matrix.
Whether the nodes are directly connected or not is determined by objective conditions, and the direct connection relation between the nodes of the data link network can be obtained by comparing and calculating data link parameters and node state information.
The factors of direct communication between two nodes include: whether the data link communication directional diagram meets the posture and relative position relation of the current node or not; whether the power and the gain of the data link meet the current communication distance requirement or not; whether the nodes are shielded or not meets the sight distance requirement under the curvature of the earth or not. If all considerations are met, the two nodes are directly connected, otherwise the two nodes are not directly connected.
There are many direct connection relations among nodes, in this embodiment, a direct connection matrix is used to represent the direct connection relations among the nodes, if there are m nodes in the network, an m × m matrix is used to represent the direct connection relations among the nodes, if two nodes are directly connected, the corresponding row and column elements are 1, if not directly connected, the elements are-1, and if two nodes are the same node, the elements are 0.
Step 2, calculating a minimum hop count matrix based on the direct connection matrix
In a node network formed by nodes, not all nodes are directly connected, but the nodes which are not directly connected need to be realized through information forwarding of the nodes, information is sent out from one node and directly reaches a target node, so that the target node is called a single hop or a 1 hop, and the target node needs to be reached through the forwarding of one node, so that the target node is called a 2 hop, and the like.
In this embodiment, a minimum hop count matrix is used. If the number of the nodes of the network is m, an m multiplied by m matrix is used for representing the minimum hop number relation among the nodes, and the element corresponding to the row and the column represents the minimum hop number required by the communication between the two nodes. If two nodes are directly connected (1 hop), the element listed in the corresponding row is 1, two nodes need to be forwarded by one node to realize communication (2 hops), the element listed in the corresponding row is 2, if the two nodes are not connected regardless of the number of times of forwarding, the element is-1, and if the two nodes are the same node, the element is 0.
In this embodiment, two solving algorithms for the minimum hop count matrix are provided, and the minimum hop count matrix is obtained through several iteration algorithms according to the direct connection matrix.
Calculating a minimum hop count matrix recursive algorithm one:
enabling the direct connection matrix to be a 1-hop connection matrix, and obtaining a k-hop connection matrix through a plurality of iterative algorithms, wherein k is 1, 2, …, k …, n and n + 1;
knowing the k-hop connection matrix, the calculation method for solving the k + 1-hop connection matrix is as follows:
initializing a k +1 hop connection matrix to be the same as the k hop connection matrix;
traversing all rows of the k-hop connection matrix for processing, operating the ith row, finding out all positive number elements of the ith row of the k-hop connection matrix, if the element belongs to the jth column, comparing the ith row with the jth row of the k-hop connection matrix, if the value of some element of the ith row is-1 and the value of the jth row corresponding element is positive, changing the value of the ith row of the k + 1-hop connection matrix as-1 into k +1, if no value of the corresponding element is positive, not modifying, and if the ith row of the k-hop connection matrix has no positive number element, skipping the row and continuing processing the next row;
after all rows in the k-hop connection matrix are processed, a new matrix which is a k + 1-hop connection matrix is obtained;
and by analogy, obtaining an n +1 hop connection matrix through a plurality of iterations, stopping the operation if the n +1 hop connection matrix is completely consistent with the n hop connection matrix, and finally obtaining the n hop connection matrix as a minimum hop matrix.
Calculating a minimum hop count matrix recursive algorithm two:
enabling the direct connection matrix to be a 1-hop connection matrix, and obtaining a k-hop connection matrix through a plurality of iterative algorithms, wherein k is 1, 2, …, k, …, n and n + 1;
knowing the k-hop connection matrix, the calculation method for solving the k + 1-hop connection matrix is as follows:
initializing a k +1 hop connection matrix to be the same as the k hop connection matrix;
traversing all rows of the k-jump connection matrix for processing, setting the row i for operation, finding out all elements with the value of-1 in the row i of the k-jump connection matrix, if the column number of the found element is j, comparing the row i with the row j of the k-jump connection matrix, if the corresponding element in the column j of the row j and the row i is positive, changing the element value of the row j of the row i of the k + 1-jump connection matrix to k +1, if no corresponding element is positive, not modifying, and if no element with the value of-1 in the row i of the k-jump connection matrix exists, skipping the row to continue processing the next row;
after all rows in the k-hop connection matrix are processed, a new matrix which is a k + 1-hop connection matrix is obtained;
and by analogy, obtaining an n +1 hop connection matrix through a plurality of iterations, stopping the operation if the n +1 hop connection matrix is completely consistent with the n hop connection matrix, and finally obtaining the n hop connection matrix as a minimum hop matrix.
And 3, calculating the subnet division relation according to the minimum hop matrix.
In the embodiment of the invention, the node subnet division solving method comprises the following steps:
in consideration of the situations of chain breakage, reconnection and the like of a data chain, a large cluster networking may be divided into a plurality of sub-networks which are independent from each other, and the plurality of sub-networks may be combined into the same large network. Therefore, in the embodiment of the invention, the division condition of the subnets can be indirectly calculated according to the direct connectivity matrix.
If-1 item still exists in the minimum hop count matrix, the data link network has more than two (including two) subnets which are not communicated with each other. In the embodiment of the invention, a representation and solving method of subnet partition is adopted.
Let the subnet partition array be a row array containing m elements, where the column number indicates the node number, the elements indicate the subnet number, and the columns with the same elements indicate the nodes in the same subnet, for example: all nodes are in one subnet, then the elements in the array are all 1's.
The method for solving the subnet division array comprises the following steps:
1) establishing a subnet division array with all 0, wherein the array column number is the same as the column number of the minimum hop count matrix and is m;
2) changing the non-1 element in the first row of the minimum hop matrix into 1 and copying the element to the corresponding position of the array to complete the first updating of the subnet partition array;
3) finding the first 0 element in the updated subnet partition array, if the corresponding column is j, finding all non-1 values in the jth row of the minimum hop count matrix, changing the values into 2, and then replacing the 0 element in the corresponding column in the subnet partition array to complete the second update of the subnet partition array;
4) then finding the first 0 element in the updated subnet partition array, if the corresponding column is p, finding all non-1 values in the p row of the minimum hop count matrix, changing the values into 3, and then replacing the 0 element in the corresponding column in the subnet partition array to complete the third update of the subnet partition array;
5) and analogizing in this way, replacing the value +1 in the array after each cycle until no 0 element exists in the array, and finally obtaining the array as the subnet division array.
To further illustrate the minimum hop count matrix algorithm of the present invention, the following description is made with reference to the embodiments.
Recursive algorithm for calculating minimum hop count matrix
Given that the 1-hop connection matrix and the direct connection matrix are
And (3) enabling the direct connection matrix to be a 1-hop connection matrix, calculating a 2-hop connection matrix in the next step if the 1-hop connection matrix is known, and initializing the 2-hop connection matrix to be equal to the 1-hop connection matrix.
Operating the 1 st row of the 2-hop connection matrix, and finding out the 1 st row positive number element (3 rd element) of the 1-hop connection matrix
Comparing the 3 rd row and the 1 st row of the 1-hop connection matrix, finding out the element with the positive 3 rd row and the corresponding column of the 1 st row as-1, and changing the value of the element with the value of-1 in the 1 st row of the 2-hop connection matrix as 2 (2 is changed because the 2-hop matrix is currently calculated). [ column 2 ]
Operating the 2 nd row of the 2-hop connection matrix, and finding out all positive number elements (3 rd and 4 th elements) in the 2 nd row of the 1-hop connection matrix
Comparing the 3 rd row and the 2 nd row of the 1-hop connection matrix with the 4 nd row and the 2 nd row, finding out the elements which are positive in the 3 rd row or the 4 th row and have the value of-1 in the corresponding column of the 2 nd row, and changing the value of the element of the 2 nd row of the 2-hop connection matrix with the value of-1 to 2 (2 because the 2 nd-hop matrix is currently calculated). [ column 1 ]
Operating the 3 rd row of the 1-hop connection matrix to find out the 3 rd row positive number elements (1 st and 2 nd elements)
Comparing the 3 rd row and the 2 nd row of the 1-hop connection matrix with the 3 rd row and the 1 st row, finding out the elements which are positive in the 1 st row or the 2 nd row and have the 3 rd row corresponding to the column with one being-1, and changing the value of the element of the 2 rd row of the 2-hop connection matrix with the value of-1 to 2 (2 because the 2-hop matrix is currently calculated). [ column 4 ]
Operating the 4 th row of the 1-hop connection matrix to find out the 4 th row positive number element (2 nd element)
Comparing the 4 th row and the 2 nd row of the 1-hop connection matrix, finding out the elements which are positive in the 2 nd row and have the 4 th row corresponding column of-1, and changing the value of the element of the 2 nd-hop connection matrix with the value of-1 in the 4 th row to 2 (2 because the 2-hop connection matrix is currently calculated). [ column 3 ]
Obtaining a 2-hop connection matrix
Repeating the steps on the 2-hop connection matrix to obtain the 3-hop connection matrix
The 3-hop connection matrix is processed in the same way to obtain a 4-four-hop connection matrix, and the comparison shows that the 4-hop connection matrix is the same as the 3-hop connection matrix, so that the final minimum hop count matrix is
Calculating the minimum hop count matrix according to the second embodiment of the recursive algorithm.
Knowing a 1-hop connection matrix and a direct connection matrix, calculating a 2-hop connection matrix, and initializing the 2-hop connection matrix to be equal to the 1-hop connection matrix.
If the 1 st row of the 1-hop connection matrix is operated, all the elements with the value of-1 in the 1 st row, the second column and the fourth column are found
Comparing the 1 st row and the 2 nd row of the 1-hop connection matrix, and changing the value of the 2 nd element in the 1 st row of the 2-hop connection matrix into 2 if the two rows show that the elements of the two rows are positive columns (3 rd column); comparing the 1 st row and the 3 rd row of the 1-hop connection matrix, if no column is positive, not processing;
the above operation is performed on each row of the 1-hop connection matrix in the same manner, so as to obtain a 2-hop connection matrix.
And similarly, processing the 2-hop connection matrix to obtain a 3-hop connection matrix.
And similarly, processing the 3-hop connection matrix to obtain a 4-hop connection matrix.
The 4-hop connection matrix is identical to the 3-hop connection matrix, so the final minimum hop count matrix is
To further illustrate the subnet partition array algorithm of the present invention, the following description is made with reference to the embodiments.
If a certain minimum hop matrix is as follows
It can be seen that there are-1 entries in the matrix, so that there are at least two subnets in the matrix, in order to obtain subnet partitions
[0 0 0 0]
Changing the value of the first row non-1 of the minimum jump matrix into 1, and copying the value into an array
[1 0 1 0]
Finding the first 0 element in the array, changing the row non-zero value corresponding to the minimum jump matrix into 2, and then replacing the corresponding 0 element in the array;
[1 2 1 2]
until no 0 element exists in the array, a final 'subnet partition array' is obtained, which indicates that the nodes 1 and 3 are one subnet and the nodes 2 and 4 are the other subnet.
Claims (5)
1. A data link model is characterized by comprising a parameter setting module, a node connectivity calculation module, a data updating and checking module, a time delay calculation module and a data output checking module;
the parameter setting module acquires performance parameters and node state information of the data link from the system model, and sends the received parameters and information to the node connectivity calculation module and the time delay calculation module for calculating the connectivity and time delay of the data link;
the node connectivity calculation module judges the direct node connectivity relationship according to the performance parameters of the data link and the node state information, and calculates the hop count among the nodes in the subnet and the division condition of the subnet;
the data updating and checking module is used for checking the updating condition of a data packet at the input end, an alarm clock variable is set in the data packet, the alarm clock variable value of the data packet is default to-1, the alarm clock variable value in the data packet sent to the data chain model by the node is 0, the data updating and checking module checks the input end in each execution period of the data chain model, if updated data exist, namely the data packet with the alarm clock variable value of 0, the data at the input end is read into the input end for caching, and then the alarm clock variable value of the data packet at the input end is set to-1;
the time delay calculation module calculates the time delay length of the data packet; after reading in the data packet cached at the input end, respectively calculating the delay time from the node to other nodes of the subnet, setting the alarm clock variable contained in the read data packet as the delay time and then sending the delay time to the corresponding output end cache, wherein the delay time is the product of the minimum hop count and the basic delay;
and the data output checking module updates the values of the alarm clock variables of all the data packets in the output end cache of each node according to the data chain clock in each calling period of the data chain model, and sends the data packets to the output end of the node from the output end cache when the alarm clock variable value of one data packet in the output end cache of the node is not a positive number.
2. The data link model according to claim 1, wherein the node connectivity calculating module determines the direct connection relationship of the nodes according to the performance parameters of the data link and the node state information, establishes a direct connection matrix, and calculates a minimum hop matrix, thereby implementing the solution of the subnet partition array.
3. The data link model of claim 2, wherein the minimum hop count matrix is obtained from the direct connectivity matrix by the specific method of:
the number of nodes of the network is set to be m,
the direct connection matrix is represented by an m multiplied by m matrix, and if two nodes are directly connected, the element at the corresponding row and column is 1; if not directly connected, the corresponding element is-1; if the two nodes are the same node, the corresponding element is 0;
the minimum hop matrix is represented by an m multiplied by m matrix, the element corresponding to the row and column represents the minimum hop required by the communication of the two nodes, and if the two nodes are not connected with each other no matter how many times of forwarding, the corresponding element is-1; if the two nodes are the same node, the corresponding element is 0;
enabling the direct connection matrix to be a 1-hop connection matrix, and obtaining a k-hop connection matrix through a plurality of iterative algorithms, wherein k is 1, 2, …, k …, n and n + 1;
knowing the k-hop connection matrix, the calculation method for solving the k + 1-hop connection matrix is as follows:
initializing a k +1 hop connection matrix to be the same as the k hop connection matrix;
traversing all rows of the k-hop connection matrix for processing, setting the ith row for processing, finding out all positive number elements of the ith row of the k-hop connection matrix, if the element belongs to the jth column, comparing the corresponding columns of the ith row and the jth row of the k-hop connection matrix, if the value of some element of the ith row is-1 and the value of the corresponding element of the jth row is positive, changing the value of the element of the ith row of the k + 1-hop connection matrix into k +1, if no value of the corresponding element is positive, not modifying, and if the ith row of the k-hop connection matrix has no positive number element, skipping the row for continuously processing the next row;
after all rows in the k-hop connection matrix are processed, a new matrix which is a k + 1-hop connection matrix is obtained;
and by analogy, obtaining an n +1 hop connection matrix through a plurality of iterations, stopping the operation if the n +1 hop connection matrix is completely consistent with the n hop connection matrix, and finally obtaining the n hop connection matrix as a minimum hop matrix.
4. The data link model of claim 2, wherein the minimum hop count matrix is obtained from the direct connection matrix by a plurality of iterative algorithms, and the specific method is as follows:
the number of nodes of the network is set to be m,
the direct connection matrix is represented by a matrix of m multiplied by m, and if two nodes are directly connected, the corresponding row and column elements are 1; if not directly connected, the corresponding element is-1; if the two nodes are the same node, the corresponding element is 0;
the minimum hop matrix is represented by an m multiplied by m matrix, the element corresponding to the row and column represents the minimum hop required by the communication of the two nodes, and if the two nodes are not connected with each other no matter how many times of forwarding, the corresponding element is-1; if the two nodes are the same node, the corresponding element is 0;
enabling the direct connection matrix to be a 1-hop connection matrix, and obtaining a k-hop connection matrix through a plurality of iterative algorithms, wherein k is 1, 2, …, k, …, n and n + 1;
knowing the k-hop connection matrix, the calculation method for solving the k + 1-hop connection matrix is as follows:
initializing k +1 hop connection matrix to be identical to k hop connection matrix
Traversing all rows of the k-jump connection matrix for processing, setting the row i for operation, finding out all elements with the value of-1 in the row i of the k-jump connection matrix, if the column number of the found element is j, comparing the row i with the row j of the k-jump connection matrix, if the corresponding element in the column j of the row j and the row i is positive, changing the element value of the row j of the row i of the k + 1-jump connection matrix to k +1, if no corresponding element is positive, not modifying, and if no element with the value of-1 in the row i of the k-jump connection matrix exists, skipping the row to continue processing the next row;
after all rows in the k-hop connection matrix are processed, a new matrix which is a k + 1-hop connection matrix is obtained;
and by analogy, obtaining an n +1 hop connection matrix through a plurality of iterations, stopping the operation if the n +1 hop connection matrix is completely consistent with the n hop connection matrix, and finally obtaining the n hop connection matrix as a minimum hop matrix.
5. A data link model according to claim 3 or 4, characterized in that the subnet partition relationship is calculated according to the minimum hop matrix, the subnet partition array is set to a row array containing m elements, wherein the column number indicates the node number, the elements indicate the number of the subnet, and the columns with the same elements indicate the nodes in the same subnet;
the method for solving the subnet division array comprises the following steps:
1) establishing a subnet division array with all 0, wherein the array column number is the same as the column number of the minimum hop count matrix and is m;
2) changing the non-1 element in the first row of the minimum hop matrix into 1 and copying the element to the corresponding position of the array to complete the first updating of the subnet partition array;
3) finding the first 0 element in the updated subnet partition array, if the corresponding column is j, finding all non-1 values in the jth row of the minimum hop count matrix, changing the values into 2, and then replacing the 0 element in the corresponding column in the subnet partition array to complete the second update of the subnet partition array;
4) then finding the first 0 element in the updated subnet partition array, if the corresponding column is p, finding all non-1 values in the p row of the minimum hop count matrix, changing the values into 3, and then replacing the 0 element in the corresponding column in the subnet partition array to complete the third update of the subnet partition array;
5) and analogizing in this way, increasing the value in the replacement array by 1 after each cycle until no 0 element exists in the array, and finally obtaining the array which is the subnet division array.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010343280.1A CN111600747B (en) | 2020-04-27 | 2020-04-27 | Data link simulation model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010343280.1A CN111600747B (en) | 2020-04-27 | 2020-04-27 | Data link simulation model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111600747A true CN111600747A (en) | 2020-08-28 |
CN111600747B CN111600747B (en) | 2022-09-09 |
Family
ID=72192051
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010343280.1A Active CN111600747B (en) | 2020-04-27 | 2020-04-27 | Data link simulation model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111600747B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101276379A (en) * | 2007-11-16 | 2008-10-01 | 民航数据通信有限责任公司 | UAT data chain OPNET simulation model related to ADS-B |
US20100061264A1 (en) * | 2008-09-11 | 2010-03-11 | Verizon Business Network Services Inc. | Method and system for identifying network paths |
CN107426767A (en) * | 2017-06-15 | 2017-12-01 | 中国人民解放军理工大学 | A kind of dynamic network cut-in method suitable for business lack of balance |
-
2020
- 2020-04-27 CN CN202010343280.1A patent/CN111600747B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101276379A (en) * | 2007-11-16 | 2008-10-01 | 民航数据通信有限责任公司 | UAT data chain OPNET simulation model related to ADS-B |
US20100061264A1 (en) * | 2008-09-11 | 2010-03-11 | Verizon Business Network Services Inc. | Method and system for identifying network paths |
CN107426767A (en) * | 2017-06-15 | 2017-12-01 | 中国人民解放军理工大学 | A kind of dynamic network cut-in method suitable for business lack of balance |
Non-Patent Citations (1)
Title |
---|
任培 等: "基于OPNET 的战术数据链系统时延仿真分析", 《计算机科学》 * |
Also Published As
Publication number | Publication date |
---|---|
CN111600747B (en) | 2022-09-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8085672B2 (en) | Wireless routing implementation | |
Basu et al. | Movement control algorithms for realization of fault-tolerant ad hoc robot networks | |
Tsianos et al. | Distributed consensus and optimization under communication delays | |
Pajic et al. | The wireless control network: A new approach for control over networks | |
CN110414094B (en) | Method for configuring service importance between nodes of power communication network | |
CN114143264B (en) | Flow scheduling method based on reinforcement learning under SRv network | |
Pajic et al. | The wireless control network: Synthesis and robustness | |
CN108075975B (en) | Method and system for determining route transmission path in Internet of things environment | |
CN112817605A (en) | Software-defined satellite network controller deployment method, device and related equipment | |
CN116170327B (en) | Segmented routing network incremental deployment method based on graph neural network and reinforcement learning | |
CN112637087B (en) | Dynamic resource allocation method and system based on node importance | |
CN114895703B (en) | Distributed fault-tolerant time-varying formation control method and system based on topology optimization reconstruction | |
Marques et al. | A communication protocol for fog computing based on network coding applied to wireless sensors | |
CN111600747B (en) | Data link simulation model | |
Fedullo et al. | Adaptive LoRaWAN transmission exploiting reinforcement learning: The industrial case | |
CN113435567B (en) | Intelligent topology reconstruction method based on flow prediction, electronic equipment and storage medium | |
CN112954584B (en) | Unmanned aerial vehicle communication network route planning method based on quantum annealing algorithm | |
CN111210169B (en) | Non-island power distribution network generation method of loop-free network based on branch matrix | |
CN111160513B (en) | Energy optimization method for electric power distribution network | |
CN116862021A (en) | anti-Bayesian-busy attack decentralization learning method and system based on reputation evaluation | |
WO2016072838A1 (en) | A system and method for next hop selection in a wireless sensor network | |
CN116667910A (en) | Satellite network addressing method, device, electronic equipment and storage medium | |
Hu et al. | Improved reliability of free-space optical mesh networks through topology design | |
Raissi-Dehkordi et al. | UAV placement for enhanced connectivity in wireless ad-hoc networks | |
CN103347289B (en) | Utilize the single path method for routing of spectrum space reusability |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |