Disclosure of Invention
The invention mainly aims to provide a train group control method and device based on an ad hoc network, wherein the train ad hoc network is constructed by regarding a train track as a network link, then the train is considered as an information flow, so that the abstraction of the train ad hoc network is realized, and then a network control model is used in the abstracted train ad hoc network to control the train based on a control command, so that the control efficiency is obviously improved, and meanwhile, compared with the traditional method for constructing the ad hoc network and then controlling, the control accuracy is also improved.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the train group control method based on the ad hoc network comprises the following steps:
step 1: taking the train track as a network link, and constructing a train ad hoc network; the train is regarded as the information flow transmitted by the fixed length, speed and acceleration on the network link, and each information flow is numbered;
step 2: randomly setting a plurality of information nodes on a network link in a train ad hoc network;
and step 3: acquiring the number, the fixed length, the speed and the acceleration of each information flow in the train ad hoc network in real time;
and 4, step 4: counting the number of information flows passing through the information nodes in unit time, taking the number as the flow of the information nodes, and recording the number of the information flows of the result information nodes;
and 5: randomly grouping information nodes in a network link to obtain a plurality of random information node groups; each information node group at least comprises 2 information nodes; randomly selecting two information machine nodes in the information node group, wherein one of the two information machine nodes is used as an inlet node, and the other one of the two information machine nodes is used as an outlet node; regarding each information node group as a train group;
step 6: when each control command is sent to the train ad hoc network, firstly, based on target train information carried in the control command, finding out the number of an information flow corresponding to the target train information in the train ad hoc network, and further finding out an information node network where the information flow corresponding to the number of the information flow is located; and then the control command enters from an entrance node in the information node network, then the information node network generates a network control model based on the control command, and controls the operation of the information flow based on the generated network control model and the fixed length, the speed and the acceleration of each information flow so as to complete the control of the train.
Further, the method for randomly grouping the information nodes in the network link in step 5 to obtain a plurality of random information node groups includes: acquiring data information of a plurality of preset grouped information nodes in a network link, wherein the data information of the information nodes comprises: at least one control factor and the number of current grouped information nodes under a plurality of horizontal parameter types corresponding to each control factor; constructing a first parameter matrix according to the number of the current grouped information nodes under each horizontal parameter category; acquiring basic information of information nodes, and sequentially dividing the information nodes into the horizontal parameter categories corresponding to the preset groups according to the basic information; respectively constructing a second parameter matrix corresponding to each preset group according to the number of the currently grouped information nodes under each horizontal parameter category after the information nodes are added; and obtaining a division probability result of the information nodes according to the first parameter matrix and each second parameter matrix.
Further, the dividing the information node into the corresponding horizontal parameter category in the preset group according to the basic information includes: acquiring each horizontal parameter value corresponding to each horizontal parameter type from the basic information; determining each horizontal parameter category corresponding to each horizontal parameter value according to a preset dividing condition of each horizontal parameter category; and dividing the information nodes into the horizontal parameter categories meeting the preset dividing conditions.
Further, the method for controlling the train by the information node network in step 6 includes generating a network control model based on the control command, and controlling the operation of the information flow based on the generated network control model and the fixed length, speed and acceleration of each information flow, and includes: acquiring a topological structure of an information node network; acquiring the flow of an inlet node and the flow of an outlet node according to the topological structure; generating a network control model according to the flow of the inlet node and the outlet node; calculating and acquiring node controller information according to a network control model; after receiving a control command, an entry node judges and determines a corresponding node controller according to the control command; obtaining corresponding cache nodes in the controller according to the node controller information and the control command; and forwarding the control command to a cache node in the controller, and returning the content if the content of the control command is stored in the cache node in the controller.
Further, the network control model is expressed by the following formula:
wherein, in the step (A),
first node controller information generated for the network control model,
second node controller information generated for the network control model,
third node controller information generated for the network control model;
in order to be an acceleration of the information flow,
to be the speed of the information stream,
for the length of the information stream,
the value range is a first adjustment coefficient: 1-5;
the value range is a second adjustment coefficient: 3 to 6.
Further, the obtaining node controller information according to the network control model includes: and calculating to obtain node controller information by adopting a simulated annealing algorithm according to the network control model, wherein the node controller information comprises the number of the node controllers and the node information of each node controller.
Further, the obtaining the corresponding cache node in the controller according to the node controller information and the control command includes: and obtaining the corresponding cache nodes in the controller by adopting a hash function according to the node controller information and the control command.
Further, the method also comprises the following steps: and forwarding the control command to the cache node in the controller, and if the cache node in the controller does not have the requested content, continuing forwarding to the exit node.
Further, the type of the topology structure of the information node network includes: a chain network topology, a star network topology, a tree network topology, a ring network topology, and a mesh network topology.
A train group control device based on ad hoc network.
The train group control method and device based on the ad hoc network have the following beneficial effects: the train ad hoc network is constructed by regarding the train track as a network link, then the train is considered as an information flow, so that the abstraction of the train ad hoc network is realized, and the train is controlled by using a network control model in the abstracted train ad hoc network based on a control command, so that the control efficiency is remarkably improved, and meanwhile, compared with the traditional method for constructing the ad hoc network and then controlling, the control accuracy is also improved. The method is mainly realized by the following steps: 1. abstraction of the ad hoc network: the train self-organizing network is constructed by taking the train track as a network link; the train is regarded as the information flow with fixed length, speed and acceleration transmission on the network link so as to realize the abstraction of the ad hoc network, and the efficiency of the abstracted ad hoc network is far higher than that of the ad hoc network in the prior art when the abstracted ad hoc network is analyzed and controlled; meanwhile, the abstracted train is regarded as an information flow, so that the running of the train is more easily and effectively monitored; 2. random grouping of information nodes: the information nodes are randomly grouped to ensure that the control command can be distributed to each information node with equal opportunity after entering the ad hoc network, so that the condition that the ad hoc network control efficiency of some trains is low and the ad hoc network control efficiency of some trains is high is avoided, and the averaging of the ad hoc network control efficiency of the trains is ensured; the averaged control efficiency is fairer, and the condition that the efficiency is extremely poor and great can be avoided, so that the stability of the control system is reduced; 3. establishing a network control model: the invention controls each information flow based on the control command entering the information node network by establishing a network control model, and has two advantages, namely, the control efficiency can be obviously improved by the model, and because the controller can be generated according to the operation parameters of each information flow under the control of the model, the control of the information flow is carried out, so as to complete the control of the train; secondly, the error caused by artificial control can be avoided in such a way, because the generation of the control command is based on real-time data.
Detailed Description
The technical solution of the present invention is further described in detail below with reference to the following detailed description and the accompanying drawings:
example 1
As shown in fig. 1, the method for controlling a train group based on ad hoc network comprises the following steps:
step 1: taking the train track as a network link, and constructing a train ad hoc network; the train is regarded as the information flow transmitted by the fixed length, speed and acceleration on the network link, and each information flow is numbered;
step 2: randomly setting a plurality of information nodes on a network link in a train ad hoc network;
and step 3: acquiring the number, the fixed length, the speed and the acceleration of each information flow in the train ad hoc network in real time;
and 4, step 4: counting the number of information flows passing through the information nodes in unit time, taking the number as the flow of the information nodes, and recording the number of the information flows of the result information nodes;
and 5: randomly grouping information nodes in a network link to obtain a plurality of random information node groups; each information node group at least comprises 2 information nodes; randomly selecting two information machine nodes in the information node group, wherein one of the two information machine nodes is used as an inlet node, and the other one of the two information machine nodes is used as an outlet node; regarding each information node group as a train group;
step 6: when each control command is sent to the train ad hoc network, firstly, based on target train information carried in the control command, finding out the number of an information flow corresponding to the target train information in the train ad hoc network, and further finding out an information node network where the information flow corresponding to the number of the information flow is located; and then the control command enters from an entrance node in the information node network, then the information node network generates a network control model based on the control command, and controls the operation of the information flow based on the generated network control model and the fixed length, the speed and the acceleration of each information flow so as to complete the control of the train.
Specifically, the train ad hoc network is constructed by regarding the train track as a network link, then the train is considered as an information flow, so that the abstraction of the train ad hoc network is realized, and then the train is controlled by using a network control model in the abstracted train ad hoc network based on a control command, so that the control efficiency is obviously improved, and meanwhile, compared with the traditional method for constructing the ad hoc network and then controlling, the control accuracy is also improved. The method is mainly realized by the following steps: 1. abstraction of the ad hoc network: the train self-organizing network is constructed by taking the train track as a network link; the train is regarded as the information flow with fixed length, speed and acceleration transmission on the network link so as to realize the abstraction of the ad hoc network, and the efficiency of the abstracted ad hoc network is far higher than that of the ad hoc network in the prior art when the abstracted ad hoc network is analyzed and controlled; meanwhile, the abstracted train is regarded as an information flow, so that the running of the train is more easily and effectively monitored; 2. random grouping of information nodes: the information nodes are randomly grouped to ensure that the control command can be distributed to each information node with equal opportunity after entering the ad hoc network, so that the condition that the ad hoc network control efficiency of some trains is low and the ad hoc network control efficiency of some trains is high is avoided, and the averaging of the ad hoc network control efficiency of the trains is ensured; the averaged control efficiency is fairer, and the condition that the efficiency is extremely poor and great can be avoided, so that the stability of the control system is reduced; 3. establishing a network control model: the invention controls each information flow based on the control command entering the information node network by establishing a network control model, and has two advantages, namely, the control efficiency can be obviously improved by the model, and because the controller can be generated according to the operation parameters of each information flow under the control of the model, the control of the information flow is carried out, so as to complete the control of the train; secondly, the error caused by artificial control can be avoided in such a way, because the generation of the control command is based on real-time data.
Example 2
On the basis of the previous embodiment, the method for randomly grouping the information nodes in the network link in step 5 to obtain a plurality of random information node groups includes: acquiring data information of a plurality of preset grouped information nodes in a network link, wherein the data information of the information nodes comprises: at least one control factor and the number of current grouped information nodes under a plurality of horizontal parameter types corresponding to each control factor; constructing a first parameter matrix according to the number of the current grouped information nodes under each horizontal parameter category; acquiring basic information of information nodes, and sequentially dividing the information nodes into the horizontal parameter categories corresponding to the preset groups according to the basic information; respectively constructing a second parameter matrix corresponding to each preset group according to the number of the currently grouped information nodes under each horizontal parameter category after the information nodes are added; and obtaining a division probability result of the information nodes according to the first parameter matrix and each second parameter matrix.
In particular, communication links are more broadly contemplated than data links.
Data links, in telecommunications terminology, are tools and media used offsite to send and receive data. It may also be a system consisting of a communication terminal and a connection circuit, the specific communication being controlled by a specially designed protocol.
Meanwhile, the data link is a special link system, which is different from a general communication system. The essence of a data link is a link sum formed by taking data transmission as a medium, including links, link nodes and link relations.
Data links include the physical medium of transmission, the link protocol, related devices, and related computer programs. But does not include the functional device that provides the data (i.e., the data source) and the functional device that receives the data. The data links are developed according to different purposes and specific requirements, and different data links have corresponding standards and numbers, for example, links 11, links 16, links 22 and other data links.
Example 3
On the basis of the above embodiment, the classifying the information node into the horizontal parameter category corresponding to the preset packet according to the basic information includes: acquiring each horizontal parameter value corresponding to each horizontal parameter type from the basic information; determining each horizontal parameter category corresponding to each horizontal parameter value according to a preset dividing condition of each horizontal parameter category; and dividing the information nodes into the horizontal parameter categories meeting the preset dividing conditions.
In particular, the method comprises the following steps of,
example 4
On the basis of the previous embodiment, the method for controlling the train by the information node network in step 6 to generate the network control model based on the control command, and controlling the operation of the information flow based on the generated network control model and the fixed length, speed and acceleration of each information flow includes: acquiring a topological structure of an information node network; acquiring the flow of an inlet node and the flow of an outlet node according to the topological structure; generating a network control model according to the flow of the inlet node and the outlet node; calculating and acquiring node controller information according to a network control model; after receiving a control command, an entry node judges and determines a corresponding node controller according to the control command; obtaining corresponding cache nodes in the controller according to the node controller information and the control command; and forwarding the control command to a cache node in the controller, and returning the content if the content of the control command is stored in the cache node in the controller.
In particular, a network topology refers to the physical layout of various devices interconnected by a transmission medium. To achieve interconnection, computers in a network need to be connected in a certain structural manner, which is called "topology structure", and colloquially, how these network devices are connected together. Common network topologies are mainly: bus-type structures, ring-type structures, star-shaped structures, tree-shaped structures, mesh structures, and the like.
Example 5
On the basis of the above embodiment, wherein the network control model is expressed by using the following formula:
wherein, in the step (A),
first node controller information generated for the network control model,
second node controller information generated for the network control model,
third node controller information generated for the network control model;
in order to be an acceleration of the information flow,
to be the speed of the information stream,
for the length of the information stream,
the value range is a first adjustment coefficient: 1-5;
the value range is a second adjustment coefficient: 3 to 6.
Specifically, in the mobile ad hoc network, due to the influence of the comprehensive factors such as random movement of the user terminal, power-on and power-off of the nodes at any time, change of the transmission power of the wireless transmission device, mutual interference between wireless channels, terrain and the like, the network topology structure formed by the wireless channels between the mobile terminals may change at any time, and the changing mode and speed are unpredictable.
Example 6
On the basis of the above embodiment, the calculating and obtaining node controller information according to a network control model includes: and calculating to obtain node controller information by adopting a simulated annealing algorithm according to the network control model, wherein the node controller information comprises the number of the node controllers and the node information of each node controller.
Specifically, the simulated annealing algorithm is based on the solid annealing principle, is a probability-based algorithm, heats the solid to be sufficiently high, and then slowly cools the solid, wherein during heating, the particles in the solid become disordered along with the temperature rise, the internal energy is increased, while during slow cooling, the particles gradually get orderly, reach an equilibrium state at each temperature, and finally reach a ground state at normal temperature, and the internal energy is reduced to the minimum.
Example 7
On the basis of the above embodiment, the obtaining a corresponding cache node in a controller according to node controller information and a control command includes: and obtaining the corresponding cache nodes in the controller by adopting a hash function according to the node controller information and the control command.
Specifically, the cache is a memory capable of high-speed data exchange, and exchanges data with the CPU before the memory, so that the speed is high. L1 Cache (level one Cache) is the CPU level one Cache. The capacity and structure of the built-in L1 cache have a great influence on the performance of the CPU, but the cache memory is composed of static RAM, the structure is complex, and the capacity of the L1 level cache cannot be made too large under the condition that the die area of the CPU cannot be too large. The typical L1 cache size is typically 32-256 KB. The L2 Cache (level two Cache) is the second level Cache of the CPU, divided into internal and external chips. The operation speed of the internal chip secondary cache is the same as the main frequency, and the external secondary cache is only half of the main frequency. The L2 cache capacity also affects CPU performance, the principle being that the larger the better, the L2 cache for ordinary desktop CPUs is typically 128KB to 2MB or higher, and the L2 cache for CPUs used on notebooks, servers, and workstations can be up to 1MB-3 MB. Since the higher the speed of the cache memory, the more expensive the cache memory, there are computer systems in which two or more levels of cache memory are provided. The first level cache memory, which is in close proximity to the memory, is highest in speed and smallest in size, and the second level cache memory is slightly larger in size and slightly lower in speed.
Example 8
On the basis of the above embodiment, the method further includes: and forwarding the control command to the cache node in the controller, and if the cache node in the controller does not have the requested content, continuing forwarding to the exit node.
Example 9
On the basis of the above embodiment, the types of the topology structure of the information node network include: a chain network topology, a star network topology, a tree network topology, a ring network topology, and a mesh network topology.
Example 10
A train group control device based on ad hoc network.
The above description is only an embodiment of the present invention, but not intended to limit the scope of the present invention, and any structural changes made according to the present invention should be considered as being limited within the scope of the present invention without departing from the spirit of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and related description of the system described above may refer to the corresponding process in the foregoing method embodiments, and will not be described herein again.
It should be noted that, the system provided in the foregoing embodiment is only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the modules or steps in the embodiment of the present invention are further decomposed or combined, for example, the modules in the foregoing embodiment may be combined into one module, or may be further split into multiple sub-modules, so as to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps, and are not to be construed as unduly limiting the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes and related descriptions of the storage device and the processing device described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Those of skill in the art would appreciate that the various illustrative modules, method steps, and modules described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that programs corresponding to the software modules, method steps may be located in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. To clearly illustrate this interchangeability of electronic hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as electronic hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The terms "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing or implying a particular order or sequence.
The terms "comprises," "comprising," or any other similar term are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.