CN108847988B - Dynamic topology maintaining method, device and equipment - Google Patents
Dynamic topology maintaining method, device and equipment Download PDFInfo
- Publication number
- CN108847988B CN108847988B CN201810701609.XA CN201810701609A CN108847988B CN 108847988 B CN108847988 B CN 108847988B CN 201810701609 A CN201810701609 A CN 201810701609A CN 108847988 B CN108847988 B CN 108847988B
- Authority
- CN
- China
- Prior art keywords
- message
- node
- communication
- type
- communication node
- 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.)
- Active
Links
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/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention provides a kind of dynamic topology maintaining method, device and equipment, method of the invention, it is that the communication node being newly added distributes the first process according to configuration file, it controls the first process and the location information of the process and type of message is sent to other second processes in domain, it controls the second process and the topology information of the communication node to match in domain with the type of message of the first process is sent to the first process, the communication node being newly added is added in the first process;The topology information for the communication node being newly added is distributed to the second process, so that the first process and the second process maintain the topology information including all communication nodes to match with this process message type, when any communication node needs in existing communication topology are communicated with other communication nodes, it can directly be established and other communication nodes by corresponding local topology information, the stability and timeliness of pilotless automobile communication system are improved, to improve the safety of Unmanned Systems.
Description
Technical field
The present invention relates to field of communication technology more particularly to a kind of dynamic topology maintaining methods, device and equipment.
Background technique
In pilotless automobile field, it is real that multiple functional modules needs of unmanned communication system are in communication with each other cooperation
Now vehicle is unmanned.Unmanned communication system includes vehicle control module, locating module, radar module, sensor die
Block, navigation module, shooting module and picture recognition module etc., can be logical using the corresponding software module of functional module as one
Believe module (also referred to as Node), each communication module includes at least one communication node, communication node may include publisher node,
Subscribe to node, requesting node and service node.
Currently, topological structure following two mode of communication node: one is based on traditional Client/Server system
Structure, two communication nodes being in communication with each other are established respectively as client node and service end node by central server
One-to-one communication connection;Another kind is to be based on robot operating system (Robot Operating System, abbreviation ROS),
By the topology information of a host node (also referred to as Master node) maintenance whole system, between the communication node in addition to host node
Before being communicated, it is necessary to first obtain topology information from host node, then pass through the subject manner or request/sound of publish/subscribe
The method of service answered is communicated.
Above two communication mode, when being communicated between communication node, it is necessary to pass through central server or host node,
If intermediate server or host node break down, it will lead to and occur communication event in unmanned communication system between communication node
Barrier easily causes the pilotless automobile run at high speed that traffic accident occurs, and there are great security risks.
Summary of the invention
The present invention provides a kind of dynamic topology maintaining method, device and equipment, is led between communication node to solve
When letter, it is necessary to if perhaps host node intermediate server or host node break down by central server, will lead to nobody and drive
It sails and occurs communication failure in communication system between communication node, easily cause the pilotless automobile run at high speed that traffic thing occurs
Therefore there are problems that great security risk.
It is an aspect of the invention to provide a kind of dynamic topology maintaining methods, comprising:
Configuration file is obtained, includes the topology information and message class of the communication node being newly added in the configuration file
Type;
The first process is distributed for the communication node of the new addition;
It controls first process and the location information of the process and type of message is sent to other second processes in domain;
Second process is controlled by the communication node to match in the domain with the type of message of first process
Topology information is sent to first process;
The communication node of the new addition is added in the first process;
The topology information of the communication node of the new addition is distributed to second process.
Another aspect of the present invention is to provide a kind of dynamic topology maintenance device, comprising:
Module is obtained, includes the topology letter for the communication node being newly added for obtaining configuration file, in the configuration file
Breath and type of message;
Module is added in process, for distributing the first process for the communication node of the new addition;
The process is added module and is also used to control first process for the location information and type of message of the process
It is sent to other second processes in domain;
The process is added module and is also used to control second process for the message in the domain with first process
The topology information for the communication node that type matches is sent to first process;
Module is added in node, for adding the communication node of the new addition in the first process;
The node is added module and is also used to the topology information of the communication node of the new addition being distributed to described second
Process.
Another aspect of the present invention is to provide a kind of mobile unit, comprising:
Memory, processor, and it is stored in the computer journey that can be run on the memory and on the processor
Sequence,
The processor realizes above-mentioned dynamic topology maintaining method when running the computer program.
Another aspect of the present invention is to provide a kind of computer readable storage medium, is stored with computer program,
The computer program realizes above-mentioned dynamic topology maintaining method when being executed by processor.
Dynamic topology maintaining method, device and equipment provided by the invention, by according to configuration file be newly be added it is logical
Believe that node distributes the first process, the first process of control by the location information of the process and type of message be sent in domain other the
The topology information of the communication node to match in domain with the type of message of the first process is sent to by two processes, the second process of control
First process adds the communication node being newly added in the first process;The topology information for the communication node being newly added is distributed to
Second process, so that the first process can be by the communication sections to match with the first process message type all in existing communication topology
The topology information of point and the communication node in the first process is added in local topology information, and the second process can also be according to new
The topology information of the communication node of addition updates local topology information, so that the first process and the second process are maintained including institute
There is the topology information of the communication node to match with this process message type, any communication node having in communication topology needs
When being communicated with other communication nodes, by corresponding local topology information can directly establish with other communication nodes, improve
The stability and timeliness of pilotless automobile communication system, to improve the safety of Unmanned Systems.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is the dynamic topology maintaining method flow chart that the embodiment of the present invention one provides;
Fig. 2 is the communication system schematic diagram that the embodiment of the present invention one provides;
Fig. 3 is dynamic topology maintaining method flow chart provided by Embodiment 2 of the present invention;
Fig. 4 is another dynamic topology maintaining method flow chart provided by Embodiment 2 of the present invention;
Fig. 5 is the structural schematic diagram for the dynamic topology maintenance device that the embodiment of the present invention three provides;
Fig. 6 is the structural schematic diagram for the mobile unit that the embodiment of the present invention five provides.
Through the above attached drawings, it has been shown that the specific embodiment of the present invention will be hereinafter described in more detail.These attached drawings
It is not intended to limit the scope of the inventive concept in any manner with verbal description, but is by referring to specific embodiments
Those skilled in the art illustrate idea of the invention.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended
The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Noun according to the present invention is explained first:
Robot operating system (Robot Operating System, abbreviation ROS): being robot software's platform,
It can provide the function of similar operations system for disparate computers cluster.ROS provides some standard operation system services, such as firmly
Part is abstract, and underlying device control, common function is realized, inter-process messages and data packet management.ROS is based on a kind of figure shape frame
Structure, so that the process of different communication node can subscribe to, publication polymerize various information and (such as senses, control, state, planning etc.
Deng).
Communication module (NODE): refer to the communication set for corresponding to a functional module in pilotless automobile communication system
Part, NODE are the minimum module units of communication system.Pilotless automobile communication system includes: that localization function module is corresponding fixed
Position NOED, the corresponding navigation NODE of navigation feature module, the corresponding shooting NODE of shooting function module for disturbance of perception object,
Radar NODE, corresponding control NODE of control function module for controlling vehicle driving etc..One NODE may include one
A or multiple communication nodes.
Domain (Domain): it is independently operated unit in window networking, is mutually accessed between domain, need to establish trust
Relationship (i.e. Trust Relation).
In addition, term " first ", " second " etc. are used for description purposes only, it is not understood to indicate or imply relatively important
Property or implicitly indicate the quantity of indicated technical characteristic.In the description of following embodiment, the meaning of " plurality " is two
More than a, unless otherwise specifically defined.
These specific embodiments can be combined with each other below, may be at certain for the same or similar concept or process
It is repeated no more in a little embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
The embodiment of the present invention is applied particularly in the communication system of pilotless automobile.Pilotless automobile, which refers to, passes through vehicle
It carries sensor-based system and positions this vehicle truck position, while perceiving the ambient enviroments such as road, vehicle and pedestrian, plan travel route automatically,
Driving speed, steering and the braking of vehicle are automatically controlled, avoidance actively can be carried out to barrier, the final vehicle that controls reaches purpose
The intelligent automobile on ground.Unmanned Systems include locating module, navigation module, sensor module, shooting for environment sensing
Module and radar module etc., the multiple functional modules of programmed decision-making module and control module etc..The each function of Unmanned Systems
Can intermodule real time communication and accurate cooperation be pilotless automobile the basis that travels of automatic safe ground, for running at high speed
In pilotless automobile, real-time communication difference between each functional module or break down (even failure of very short time)
Easily cause pilotless automobile and seriously traffic accident occurs, leads to casualties.Thus it is guaranteed that pilotless automobile is logical
The stability and real-time of letter system are particularly significant.
Embodiment one
Fig. 1 is the dynamic topology maintaining method flow chart that the embodiment of the present invention one provides;Fig. 2 is that the embodiment of the present invention one mentions
The communication system schematic diagram of confession.When the embodiment of the present invention between communication node in the prior art for being communicated, it is necessary to pass through
If perhaps host node intermediate server or host node break down central server, will lead in unmanned communication system
Occur communication failure between communication node, easily cause the pilotless automobile run at high speed that traffic accident occurs, exists greatly
The problem of security risk, provides dynamic topology maintaining method.The executing subject of the embodiment of the present invention can be applied to be loaded in
Equipment on vehicle, the mobile unit can be car running computer, OBU etc..In other embodiments, the dynamic topology maintaining method
Other equipment are applied also for, the present embodiment is schematically illustrated by taking the mobile unit in vehicle as an example.As shown in Figure 1, should
Specific step is as follows for method:
Step S101, configuration file is obtained, includes the topology information for the communication node being newly added in configuration file and disappears
Cease type.
Wherein, communication node comprises at least one of the following: publisher node subscribes to node, requesting node and service node.It is logical
The topology information of letter node includes affiliated communication module mark, the IP address of host, the port numbers of process and message content class
Type.
In addition, the port numbers of the process of communication node refer to the unique identification port numbers of communication node place process, if
One process has multiple port numbers, then refers to the port numbers uniquely with socket binding.
The type of message of communication node can be the theme message or service message, publisher node and the message for subscribing to node
Type is the theme message, and the type of message of requesting node and service node is service message.
In the present embodiment, the communication node being newly added includes all communication nodes of at least one NODE, can will be communicated
The topology information and type of message for the communication node for including in all NODE and NODE in system are previously recorded in one and match
It sets in file, in initialization communication system, when establishing communication topology, is divided the communication node of all NODE according to the configuration file
More wheels are added in communication topology, and every wheel adds one group of communication node into communication topology.
As shown in Fig. 2, communication system may include multiple NODE, each NODE may include one or more communication section
Point.All NODE are grouped in advance, each group of NODE corresponds to one for safeguarding all communication nodes in this group of NODE
Topology information process, the communication node which is safeguarded is known as the communication node in the process.
The grouping information of all NODE can be prestored in configuration file, and the communication node of a NODE belongs to same
Grouping.Optionally, a grouping can be corresponding with a NODE, all communication nodes including a NODE;Or one point
Group can correspond to multiple NODE, all communication nodes including multiple NODE.
The embodiment of the present invention is illustrated process of the wheel one group of communication node of addition into communication topology, every wheel addition
The step of process of one group of communication node into communication topology is identical, executes the present embodiment by circulation can be by all NODE's
Communication node is added in communication topology, completes the maintenance process of entire communication topology.
Step S102, the communication node to be newly added distributes the first process.
In the present embodiment, the communication node being newly added for each group distributes a process, in order to carry out area with other processes
Point, it is denoted as the first process here, the first process is used to safeguard the local topology information for the communication node being newly added.
Step S103, the first process of control by the location information of the process and type of message be sent in domain other second
Process.
Wherein, the location information of process includes the port numbers of process and the IP address of place host.
The type of message of process includes the type of message of the communication node in the process, and the type of message of process includes theme
At least one of message and service message.
Since the first process is the process being newly added, be also not added with communication node in the first process, in the step, first into
The type of message of journey includes the type of message for the communication node being newly added.
For example, it is assumed that the communication node in the first process includes publisher node and subscription node, the communication in the first process
The type of message of node is theme message, the message then type of message of the first process is the theme;Assuming that in the first process
Communication node includes publisher node, subscribes to node and service node, and the type of message of the communication node in the first process includes master
Message and service message are inscribed, then the type of message of the first process includes theme message and service message.
Second process refers to other processes in the domain of the first process place, for safeguarding existing communication topology.Second into
At least one communication node is had been added in journey, the maintenance of the second process has a local topology information, the local of the second process
Topology information includes the topology information of all communication nodes to match in existing communication topology with the type of message of the second process.
In the step, after the communication node to be newly added distributes the first process, the preferred position by the first process is believed
Breath and type of message are sent to the second process in other domains, so that the second process is by the location information of the first process and message class
Type is added in communication topology.
Step S104, the second process is controlled by the topology of the communication node to match in domain with the type of message of the first process
Information is sent to the first process.
It include all communication sections to match with the second process type of message in domain in second process local topology information
The topology information of point.
In the step, the second process according to the type of message of the first process, obtain in local topology information with the first process
The topology information of communication node that matches of type of message, and be sent to the first process.Since each second process can incite somebody to action
The topology information of the communication node to match in local topology information with the type of message of the first process is sent to the first process, the
The topology information that one process is sent by receiving each second process, can obtain in existing communication topology it is all with first into
The topology information for the communication node that the type of message of journey matches, namely it is that of obtaining all message with the first process in domain
The topology information for the communication node that type matches.
Step S105, the communication node being newly added is added in the first process.
After the first process is added to communication topology, the communication node being newly added is added to the first process.In this way,
It include having all in communication topology and the first process type of message to match in the local topology information of first process
The topology information of communication node and the communication node in the first process, the communication node in the first process are needing to communicate with other
When node is communicated, it can directly be established with other communication nodes by local topology information and communicate to connect and communicated.
Step S106, the topology information for the communication node being newly added is distributed to the second process.
The topology information for the communication node being newly added is distributed to the second process, so that the second process be enable to subscribe to newly
The topology information of the communication node of addition arrives in this way, the second process can update the topology information for the communication node being newly added
In local topology information, so that the communication node being newly added is added in existing topology.Due to by publish/subscribe mode into
Capable, so being a kind of reliable communication, it not will cause the loss of message.
The embodiment of the present invention by being that the communication node that is newly added distributes the first process according to configuration file, control first into
The location information of the process and type of message are sent to other second processes in domain by journey, the second process of control by domain with the
The topology information for the communication node that the type of message of one process matches is sent to the first process, and new add is added in the first process
The communication node entered;The topology information for the communication node being newly added is distributed to the second process, so that the first process can will
There are all communication nodes to match with the first process message type in communication topology and the communication node in the first process
Topology information is added in local topology information, and the second process can also be updated according to the topology information for the communication node being newly added
Local topology information leads to including all with what this process message type matched so that the first process and the second process are maintained
The topology information of node is believed, when any communication node needs in existing communication topology are communicated with other communication nodes, by right
The local topology information answered can directly establish with other communication nodes, improve the stability of pilotless automobile communication system
And timeliness, to improve the safety of Unmanned Systems.
Embodiment two
Fig. 3 is dynamic topology maintaining method flow chart provided by Embodiment 2 of the present invention;Fig. 4 is that the embodiment of the present invention two mentions
Another dynamic topology maintaining method flow chart supplied.On the basis of the above embodiment 1, logical by what is be newly added in the present embodiment
The topology information of letter node is distributed to after the second process, further includes: controls the communication section for having in the second process and being newly added
The third process of point type of message same node point subscribes to the first topological update message, carries new be added in the first topological update message
Communication node topology information and type of message;Third process is controlled according to the first topological update message, by what is be newly added
The topology information of communication node is added in local topology information.As shown in figure 3, specific step is as follows for this method:
Step S201, configuration file is obtained, includes the topology information for the communication node being newly added in configuration file and disappears
Cease type.
Wherein, communication node comprises at least one of the following: publisher node subscribes to node, requesting node and service node.It is logical
The topology information of letter node includes affiliated communication module mark, the IP address of host, the port numbers of process and message content class
Type.
The type of message of communication node can be the theme message or service message, publisher node and the message for subscribing to node
Type is the theme message, and the type of message of requesting node and service node is service message.
The step is consistent with above-mentioned steps S101, and details are not described herein again for the present embodiment.
Step S202, the communication node to be newly added distributes the first process.
In the present embodiment, the communication node being newly added for each group distributes a process, in order to carry out area with other processes
Point, it is denoted as the first process here, the first process is used to safeguard the local topology information for the communication node being newly added.
Optionally, the first process can realize that the local for the communication node that maintenance is newly added is opened up by registering communication singleton
Flutter information.
Step S203, the first process of control by the location information of the process and type of message be sent in domain other second
Process.
Wherein, the location information of process includes the port numbers of process and the IP address of place host.
The type of message of process includes the type of message of the communication node in the process, and the type of message of process includes theme
At least one of message and service message.
Since the first process is the process being newly added, be also not added with communication node in the first process, in the step, first into
The type of message of journey includes the type of message for the communication node being newly added.
Second process refers to other processes in the domain of the first process place, for safeguarding existing communication topology.Second into
At least one communication node is had been added in journey, the maintenance of the second process has a local topology information, the local of the second process
Topology information includes the topology information of all communication nodes to match in existing communication topology with the type of message of the second process.
It is preferred that communication topology is added in first process after the communication node to be newly added distributes the first process.
In the step, the first process of control by the location information of the process and type of message be sent in domain other second
Process can specifically be realized in the following way:
Control that the first process is broadcasted into domain or the new process of multicast is added message, new process be added message include first into
The location information and type of message of journey, such second process can receive the location information and message class of the first process
Type.
Optionally, the service that the first process utilizes middleware to provide by communication singleton, passes through multicast or the side of broadcast
Formula sends process into place domain and message is added, and the second process for equally having registered the communication singleton is allowed to monitor and receive
Message is added in the process.
Middleware can configure the domain where oneself, similar local area network where oneself in domain-functionalities;Middleware can be real
The communication between communication node between process in existing domain or in domain.For example, middleware can by multicast or broadcast to
Information is sent in entire domain;Broadcast or multicast information where may also receive from domain;It can also realize except multicast and wide
Other communication modes (such as mode of unicast) other than broadcasting are communicated.For example, middleware can be based on real time streaming transport protocol
(Real Time Streaming Protocol, RTPS) realizes the communication between communication node.
Step S204, the location information of the first process and type of message are added to local topology letter by the second process of control
In breath.
After message is added to intra-domain multicast or the process of broadcast in second process the first process of reception, process addition is disappeared
The location information and type of message of the first process carried in breath are added in local topology information, and realization adds the first process
Enter communication topology.
Step S205, the second process is controlled by the topology of the communication node to match in domain with the type of message of the first process
Information is sent to the first process.
Specifically, the second process can be opened up from local after receiving the location information and type of message of the first process
It flutters in information and filters out the topology information of the communication node to match with the type of message of the first process, by filter out and message
The topology information for the communication node that type matches is sent to the first process.
The communication that can will be matched in local topology information with the type of message of the first process due to each second process
The topology information of node is sent to the first process, the topology information that the first process is sent by receiving each second process, can be with
The topology information for obtaining the communication node that all type of messages with the first process match in existing communication topology, that is to say
Obtain the topology information for the communication node that all type of messages with the first process match in domain.
Due to all local topology informations for or not second process that the second process is sent to the first process, with first
The topology information for the communication node that the type of message of process matches is the subset of the local topology information of the second process, can be with
It avoids sending its unwanted topology information bring network expense to the first process.
Preferably, the second process is by the way of unicast by the communication node to match with the type of message of the first process
Topology information is sent to the first process, can further decrease network expense.
Optionally, since type of message includes theme message and service message two types, the type of message of the second process
It include matching with the type of message of the process in any one second process including theme message and/or service message
The topology information of all communication nodes.Therefore, the first process can receive any one or the transmission of multiple second processes
The communication node to match with the type of message of the first process topology information after, can no longer receive other second processes
The topology information of transmission, so as to further decrease network expense.
For example, the type of message of the first process includes theme message, then, the first process receive any one second
After the topology information for the communication node to match with theme message that process is sent, it can be obtained in existing topology information and own
The topology information of the communication node to match with theme message, that is to say to have obtained in domain it is all match with theme message it is logical
Believe that the topology information of node, the first process no longer receive the topology information of other second processes transmission.
Step S206, the first process is controlled by the communication node to match with the type of message of the first process received
Topology information is added in local topology information.
First process, will after the topology information for receiving the communication node to match with the type of message of the first process
The topology information of the communication node to match with the type of message of the first process is added in ontology topology information.So far, first
It include the topology information (position including the first process of the first process in the local topology information of process and the second all processes
Confidence breath and type of message), it completes and the first process is added in existing communication topology.
It, can by step S207-S210 after communication topology is added in the first process by S202-S206 through the above steps
Communication topology is added in the communication node being newly added.
Step S207, the communication node being newly added is added in the first process.
After the first process is added to communication topology, the first process will match with the type of message of the first process
The topology information of communication node is added in local topology information, so that the communication node being newly added is added to the first process
In.
Step S208, the first process of control issues the first topological update message into domain, takes in the first topological update message
The topology information and type of message for the communication node that band is newly added.
In the embodiment of the present invention, at the beginning of being used to safeguard the first process and the second process by the topology information of node
Begin to turn to including one for safeguarding the default NODE of topology information, includes at least one group of publisher node in the default NODE, orders
Read node, requesting node and service node.
Specifically, the first process includes the communication node being newly added by presetting the publisher node of NODE and issuing into domain
The topological update message of the first of topology information allows the second process for having subscribed the theme message to subscribe to the first topology and updates
Message.
Step S209, the second process of control subscribes to the first topological update message, updates this according to the first topological update message
Ground topology information.
A kind of feasible embodiment of the step:
It controls all second processes and subscribes to the first topological update message, control the second process according to the communication node being newly added
Type of message, the topology information of the communication node being newly added to match with the type of message of the second process is added to local
In topology information.
Additionally, it is possible to the second process having does not have communication node identical with the communication node type of message being newly added,
The topology information for not needing the communication node that will be newly added is added in local topology information, then these second processes subscribe to the
One topological update message will increase network expense.
Specifically, the feasible embodiment of another kind of the step:
It controls to have in the second process and subscribes to the with the third process of communication node type of message same node point being newly added
One topological update message;Third process is controlled according to the first topological update message, by the topology information for the communication node being newly added
It is added in local topology information.
Optionally, when third process updates local topology information according to the first topological update message, will disappear with the process
The topology information for the communication node being newly added that breath type matches is added in local topology information.
In the present embodiment, after it will add the communication node that is newly added in the first process, it is real to pass through step S208-S209
The topology information for the communication node being newly added now is distributed to the second process, the first process is by the topology for the communication node being newly added
Information has been added in local topology information, the second all processes by with being newly added of matching of the process message type
The topology information of communication node has been added in local topology information, logical so as to complete the communication node being newly added to be added to
In letter topology, completes a wheel and add the process that one group of communication node being newly added is added in communication topology.
In another embodiment of the present embodiment, the dynamic topology maintaining method further include whether have in real-time detection domain it is logical
Letter node exits, and when detecting that any communication node exits in domain, updates communication topology.As shown in figure 4, this method further includes
Following steps:
If step S301, detecting, any communication node is exited in domain, and the corresponding 4th process publication of node is exited in control
Second topological update message, the second topological update message includes the topology information and type of message that exit node.
Wherein, the 4th process is the process for safeguarding the topology information of the communication node exited.
Optionally, it can detect whether each communication node has moved back in real time using heartbeat detecting method by middleware
Out.
Step S302, other 5th processes subscribe to the second topology change message in control domain.
5th process refers to other processes of the topology information for safeguarding communication node in domain in addition to the 4th process.
Since the 5th process having does not have communication node identical with the communication node type of message exited, local topology
Do not include the topology information of the communication node exited in information, updates local topology information without exiting communication node for this.
Optionally, control, which has, subscribes to the second topology change message with the 5th process for exiting node type same node point.
Step S303, the 5th process of control changes message according to the second topology, will move out the topology information of node from local
It is deleted in topology information.
In this way under distributed scene, when thering is new communication node to be added and thering is communication node to exit, can it synchronize more
Local topology information in new each process, ensure that the communication topology in each process be it is newest, ensure that distribution
Unanimously, in later debugging scenarios, it is only necessary to retrieve the corresponding topology letter of local all theme messages or service message
The topology information for all communication nodes that type of message is corresponded in communication topology can be obtained in breath, greatly reduces debugging cost.
In another embodiment of the present embodiment, any two communication node can be direct according to local topology information in domain
It establishes and communicates to connect and communicated.
Optionally, for any two communication node after foundation is led to and connect, the topology information according to two communication nodes is true
The topological relation of fixed two communication nodes to be communicated, topological relation include: same process, the different processes of same host or
Different hosts;According to the topological relation between two communication nodes to be communicated, controls two communication nodes uses and open up
The corresponding communication mode of relationship is flutterred to be communicated.
Specifically, controlling two communication nodes if the topological relation of two communication nodes is same process and using
The communication mode of intra process communication is communicated.For example, can realize same intra process communication by way of pointer.
If the topological relation of two communication nodes is the different processes of same host, two communication nodes are controlled
It is communicated using the communication mode of interprocess communication.For example, can realize same host by way of shared drive
Communication between the process of different processes.
If the topological relation of two communication nodes is different host, controls two communication nodes and use across place
The communication mode of main-machine communication is communicated.For example, can realize across host communication by socket communication mode.
The embodiment of the present invention is to the mistake for dynamically maintaining communication topology when having new communications nodes addition and communication node to exit
Cheng Jinhang is explained in detail, by the second process by the topology information of the communication node to match with the first process message type
It is sent to the first process with mode of unicast, reduces unnecessary data transmission, reduces network overhead, there is new communication section
Point is added and when having communication node to exit, can local topology information in each process of synchronized update, ensure that each process
Interior communication topology be all it is newest, ensure that distributed consistent.
Embodiment three
Fig. 5 is the structural schematic diagram for the dynamic topology maintenance device that the embodiment of the present invention three provides.The embodiment of the present invention mentions
The dynamic topology maintenance device of confession can execute the process flow of dynamic topology maintaining method embodiment offer.As shown in figure 5, should
Device 40 includes: to obtain module 401, and module 402 is added in process and module 403 is added in node.
Specifically, module 401 is obtained for obtaining configuration file, includes opening up for the communication node being newly added in configuration file
Flutter information and type of message.
Process is added module 402 and is used to distribute the first process for the communication node being newly added.
Process addition module 402 is also used to control the first process and is sent to the location information of the process and type of message
Other second processes in domain.
It is logical by what is matched in domain with the type of message of the first process that process addition module 402 is also used to control the second process
The topology information of letter node is sent to the first process.
Module 403 is added for adding the communication node being newly added in the first process in node.
The topology information that the communication node that module 403 is also used to newly to be added is added in node is distributed to the second process.
In the present embodiment, communication node is comprised at least one of the following: publisher node subscribes to node, requesting node and service
Node.
The topology information of communication node include belonging to communication module mark, the IP address of host, the port numbers of process and
Message content types.
The location information of first process includes the port numbers of the first process and the IP address of place host.
Type of message includes at least one of theme message and service message.
Publisher node and the type of message for subscribing to node are the theme message, and the type of message of requesting node and service node is
Service message.
The type of message of first process includes the type of message for the communication node being newly added.
Device provided in an embodiment of the present invention can be specifically used for executing embodiment of the method provided by above-described embodiment one,
Details are not described herein again for concrete function.
The embodiment of the present invention by being that the communication node that is newly added distributes the first process according to configuration file, control first into
The location information of the process and type of message are sent to other second processes in domain by journey, the second process of control by domain with the
The topology information for the communication node that the type of message of one process matches is sent to the first process, and new add is added in the first process
The communication node entered;The topology information for the communication node being newly added is distributed to the second process, so that the first process can will
There are all communication nodes to match with the first process message type in communication topology and the communication node in the first process
Topology information is added in local topology information, and the second process can also be updated according to the topology information for the communication node being newly added
Local topology information leads to including all with what this process message type matched so that the first process and the second process are maintained
The topology information of node is believed, when any communication node needs in existing communication topology are communicated with other communication nodes, by right
The local topology information answered can directly establish with other communication nodes, improve the stability of pilotless automobile communication system
And timeliness, to improve the safety of Unmanned Systems.
Example IV
On the basis of above-described embodiment three, in the present embodiment, node is added module and is also used to:
It controls to have in the second process and subscribes to the with the third process of communication node type of message same node point being newly added
One topological update message carries the topology information and type of message of the communication node being newly added in the first topological update message;
Third process is controlled according to the first topological update message, the topology information for the communication node being newly added is added to local topology letter
In breath.
Optionally, process is added module and is also used to:
The first process is controlled by the topology information of the communication node to match with the type of message of the first process received
It is added in local topology information.
Optionally, process is added module and is also used to:
Control that the first process is broadcasted into domain or the new process of multicast is added message, new process be added message include first into
The location information and type of message of journey.
In the present embodiment, which can also include: that node exits module.
Node exits module and is used for: if detecting, any communication node is exited in domain, and node the corresponding 4th is exited in control
The topological update message of process publication second, the second topological update message includes the topology information and type of message that exit node.
Optionally, node exits module and is also used to:
It controls to have and subscribes to the second topology change message with the 5th process for exiting node type same node point;Control the 5th
Process changes message according to the second topology, and the topology information that will move out node is deleted from local topology information.
Optionally, which can also include: communication mode control module.
Communication mode control module is used for:
Determine that the topological relation between any two communication node to be communicated in domain, topological relation include: same process,
The different processes of same host or different hosts;According to the topological relation between two communication nodes to be communicated, control
Two communication nodes are made to be communicated using the corresponding communication mode of topological relation.
Device provided in an embodiment of the present invention can be specifically used for executing embodiment of the method provided by above-described embodiment two,
Details are not described herein again for concrete function.
The embodiment of the present invention is to the mistake for dynamically maintaining communication topology when having new communications nodes addition and communication node to exit
Cheng Jinhang is explained in detail, by the second process by the topology information of the communication node to match with the first process message type
It is sent to the first process with mode of unicast, reduces unnecessary data transmission, reduces network overhead, there is new communication section
Point is added and when having communication node to exit, can local topology information in each process of synchronized update, ensure that each process
Interior communication topology be all it is newest, ensure that distributed consistent.
Embodiment five
Fig. 6 is the structural schematic diagram for the mobile unit that the embodiment of the present invention five provides.As shown in fig. 6, the equipment 50 includes:
Processor 501, memory 502, and it is stored in the computer program that can be executed on memory 502 and by processor 501.
Processor 501 realizes any of the above-described embodiment of the method when executing and storing in the computer program on memory 502
The dynamic topology maintaining method of offer.
The embodiment of the present invention by being that the communication node that is newly added distributes the first process according to configuration file, control first into
The location information of the process and type of message are sent to other second processes in domain by journey, the second process of control by domain with the
The topology information for the communication node that the type of message of one process matches is sent to the first process, and new add is added in the first process
The communication node entered;The topology information for the communication node being newly added is distributed to the second process, so that the first process can will
There are all communication nodes to match with the first process message type in communication topology and the communication node in the first process
Topology information is added in local topology information, and the second process can also be updated according to the topology information for the communication node being newly added
Local topology information leads to including all with what this process message type matched so that the first process and the second process are maintained
The topology information of node is believed, when any communication node needs in existing communication topology are communicated with other communication nodes, by right
The local topology information answered can directly establish with other communication nodes, improve the stability of pilotless automobile communication system
And timeliness, to improve the safety of Unmanned Systems.
In addition, the embodiment of the present invention also provides a kind of computer readable storage medium, it is stored with computer program, the meter
Calculation machine program realizes the dynamic topology maintaining method that any of the above-described embodiment of the method provides when being executed by processor.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied
Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed
Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit
Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention
The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various
It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module
Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules
At the internal structure of device being divided into different functional modules, to complete all or part of the functions described above.On
The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.The present invention is directed to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claims are pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is only limited by appended claims
System.
Claims (18)
1. a kind of dynamic topology maintaining method characterized by comprising
Configuration file is obtained, includes the topology information and type of message of the communication node being newly added in the configuration file;
The first process is distributed for the communication node of the new addition;
It controls first process and the location information of the process and type of message is sent to the second process in domain;
Second process is controlled by the topology of the communication node to match in the domain with the type of message of first process
Information is sent to first process;
The communication node of the new addition is added in the first process;
The topology information of the communication node of the new addition is distributed to second process;
It is described to control second process for the communication node to match in the domain with the type of message of first process
Topology information is sent to after first process, further includes:
First process is controlled by the topology of the communication node to match with the type of message of first process received
Information is added in local topology information.
2. the method according to claim 1, wherein the topology information of the communication node by the new addition
It is distributed to after second process, further includes:
Control the third process in second process with node identical with the communication node type of message of the new addition
The first topological update message is subscribed to, the topology information of the communication node of the new addition is carried in the described first topological update message
And type of message;
The third process is controlled according to the described first topological update message, by the topology information of the communication node of the new addition
It is added in local topology information.
3. the method according to claim 1, wherein the method also includes:
If detecting, any communication node is exited in the domain, and control exits corresponding the second topology of 4th process publication of node more
New information, the described second topological update message includes the topology information and type of message that exit node.
4. according to the method described in claim 3, it is characterized in that, node corresponding 4th process publication the is exited in the control
After two topological update messages, further includes:
It controls to have and subscribes to the described second topological update message with the 5th process for exiting the identical node of node type;
The 5th process is controlled according to the described second topological update message, the topology information for exiting node is opened up from local
It flutters in information and deletes.
5. method according to claim 1-4, which is characterized in that the method also includes:
Determine that the topological relation between any two communication node to be communicated in the domain, the topological relation include: same
Process, the different processes of same host or different hosts;
According to the topological relation between two communication nodes to be communicated, it is corresponding using topological relation to control two communication nodes
Communication mode communicated.
6. the method according to claim 1, wherein control first process believes the position of the process
Breath and type of message are sent to other second processes in domain, comprising:
Control that first process is broadcasted into the domain or message is added in the new process of multicast, message package is added in the new process
Include the location information and type of message of first process.
7. the method according to claim 1, wherein the communication node comprises at least one of the following: publication section
Point subscribes to node, requesting node and service node;
The topology information of the communication node include belonging to communication module mark, the IP address of host, the port numbers of process and
Message content types;
The location information of first process includes the port numbers of first process and the IP address of place host.
8. the method according to the description of claim 7 is characterized in that the type of message includes in theme message and service message
At least one;
The publisher node and the type of message for subscribing to node are the theme message, the message class of the requesting node and service node
Type is service message;
The type of message of first process includes the type of message of the communication node of the new addition.
9. a kind of dynamic topology maintenance device characterized by comprising
Obtain module, include the topology information for the communication node being newly added for obtaining configuration file, in the configuration file with
And type of message;
Module is added in process, for distributing the first process for the communication node of the new addition;
The process is added module and is also used to control first process for the location information of the process and type of message transmission
To the second process in domain;
The process is added module and is also used to control second process for the type of message in the domain with first process
The topology information of the communication node to match is sent to first process;
Module is added in node, for adding the communication node of the new addition in the first process;
The node is added module and is also used to the topology information of the communication node of the new addition being distributed to second process;
The process is added module and is also used to:
First process is controlled by the topology of the communication node to match with the type of message of first process received
Information is added in local topology information.
10. device according to claim 9, which is characterized in that the node is added module and is also used to:
Control the third process in second process with node identical with the communication node type of message of the new addition
The first topological update message is subscribed to, the topology information of the communication node of the new addition is carried in the described first topological update message
And type of message;
The third process is controlled according to the described first topological update message, by the topology information of the communication node of the new addition
It is added in local topology information.
11. device according to claim 9, which is characterized in that further include:
Node exits module, if any communication node exits in the domain for detecting, node the corresponding 4th is exited in control
The topological update message of process publication second, the described second topological update message includes the topology information and message class that exit node
Type.
12. device according to claim 11, which is characterized in that the node exits module and is also used to:
It controls to have and subscribes to the described second topological update message with the 5th process for exiting the identical node of node type;
The 5th process is controlled according to the described second topological update message, the topology information for exiting node is opened up from local
It flutters in information and deletes.
13. according to the described in any item devices of claim 9-12, which is characterized in that further include: communication mode control module,
The communication mode control module is used for:
Determine that the topological relation between any two communication node to be communicated in the domain, the topological relation include: same
Process, the different processes of same host or different hosts;
According to the topological relation between two communication nodes to be communicated, it is corresponding using topological relation to control two communication nodes
Communication mode communicated.
14. device according to claim 9, which is characterized in that the process is added module and is also used to:
Control that first process is broadcasted into the domain or message is added in the new process of multicast, message package is added in the new process
Include the location information and type of message of first process.
15. device according to claim 9, which is characterized in that the communication node comprises at least one of the following: publication section
Point subscribes to node, requesting node and service node;
The topology information of the communication node include belonging to communication module mark, the IP address of host, the port numbers of process and
Message content types;
The location information of first process includes the port numbers of first process and the IP address of place host.
16. device according to claim 15, which is characterized in that the type of message includes theme message and service message
At least one of;
The publisher node and the type of message for subscribing to node are the theme message, the message class of the requesting node and service node
Type is service message;
The type of message of first process includes the type of message of the communication node of the new addition.
17. a kind of mobile unit characterized by comprising
Memory, processor, and it is stored in the computer program that can be run on the memory and on the processor,
The processor realizes such as method of any of claims 1-8 when running the computer program.
18. a kind of computer readable storage medium, which is characterized in that it is stored with computer program,
Such as method of any of claims 1-8 is realized when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810701609.XA CN108847988B (en) | 2018-06-29 | 2018-06-29 | Dynamic topology maintaining method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810701609.XA CN108847988B (en) | 2018-06-29 | 2018-06-29 | Dynamic topology maintaining method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108847988A CN108847988A (en) | 2018-11-20 |
CN108847988B true CN108847988B (en) | 2019-09-17 |
Family
ID=64201020
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810701609.XA Active CN108847988B (en) | 2018-06-29 | 2018-06-29 | Dynamic topology maintaining method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108847988B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110311753B (en) * | 2019-06-21 | 2022-04-15 | 杭州飞步科技有限公司 | Communication method, communication device, communication node, communication storage medium and communication system |
CN112905331B (en) * | 2019-11-19 | 2024-06-07 | 上海商汤智能科技有限公司 | Task processing system, method and device, electronic equipment and storage medium |
CN112995095B (en) * | 2019-12-13 | 2023-05-30 | 北京京东乾石科技有限公司 | Data processing method, device and computer readable storage medium |
CN113296967B (en) * | 2020-02-21 | 2024-06-04 | 西安诺瓦星云科技股份有限公司 | Process management method, device and system based on embedded operating system |
CN114138519B (en) * | 2021-09-28 | 2024-05-03 | 天津大学 | Communication mode representation method and device of parallel program based on DAG |
CN114567665A (en) * | 2022-01-26 | 2022-05-31 | 阿波罗智能技术(北京)有限公司 | Method, device, equipment and medium for communication between nodes and automatic driving vehicle |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103765835A (en) * | 2011-08-30 | 2014-04-30 | 高通股份有限公司 | Topology discovery in a hybrid network |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102624621A (en) * | 2012-03-11 | 2012-08-01 | 上海宜云物联科技有限公司 | Heterogeneous network adaptive data communication method and sensor network multi-protocol gateway |
CN104994166B (en) * | 2015-07-10 | 2016-10-12 | 李德毅 | Intelligent vehicle distributed process virtual switch communication means |
KR101686073B1 (en) * | 2015-07-22 | 2016-12-28 | 재단법인 실감교류인체감응솔루션연구단 | Method, management server and computer-readable recording medium for allowing client terminal to be provided with services by converting network topology adaptively according to characteristics of the services |
-
2018
- 2018-06-29 CN CN201810701609.XA patent/CN108847988B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103765835A (en) * | 2011-08-30 | 2014-04-30 | 高通股份有限公司 | Topology discovery in a hybrid network |
Also Published As
Publication number | Publication date |
---|---|
CN108847988A (en) | 2018-11-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108847988B (en) | Dynamic topology maintaining method, device and equipment | |
Ji et al. | Survey on the internet of vehicles: Network architectures and applications | |
US10609528B2 (en) | Vehicle communication system and method | |
KR20210130213A (en) | Vehicle-road cooperation apparatus and method, electronic device and storage medium | |
WO2019085846A1 (en) | Planning method for express lane and unit | |
RU2569123C1 (en) | Device to generate command of data flow control and sensor control device | |
US20170205825A1 (en) | System and method for negotiating an intersection traversal by an automated vehicle | |
KR20190103265A (en) | Detection of additional cluster vehicles in or near cluster member vehicles | |
US10725473B2 (en) | Systems and methods for changing a destination of an autonomous vehicle in real-time | |
KR20210022181A (en) | Method and apparatus for receiving of driving data in platooning in autonomous driving system | |
CN101004861A (en) | System for monitoring moving target on place of aerodrome | |
US20170124871A1 (en) | System and method for vehicle data communication | |
CN107464430A (en) | A kind of green ripple speed bootstrap technique in lamp control crossing and system based on cloud service | |
WO2018010083A1 (en) | Vehicle external communication method, device and terminal | |
CN107464436A (en) | Information processing method and device based on vehicle sub-clustering | |
JP7388690B2 (en) | Gateway device, sensor node, data collection method, data transmission method and program | |
Bogdoll et al. | Kiglis: smart networks for smart cities | |
Khan et al. | Fully connected travelling: A step towards smart cities | |
WO2022125357A3 (en) | Unmanned aerial vehicle and controller communication | |
CN203825819U (en) | Real-time remote vehicle safety monitoring device, server, and system | |
JP7338866B2 (en) | Gateway device, sensor node, data collection method, data transmission method and program | |
CN204810436U (en) | Information interactive system based on position | |
Sharma | Big data for autonomous vehicles | |
CN116189418A (en) | Vehicle-road cooperative system, control method thereof and storage medium | |
CN104869040A (en) | High-capacity internet of things communication system and realization method of real-time communication between things |
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 |