CN112995095B - Data processing method, device and computer readable storage medium - Google Patents

Data processing method, device and computer readable storage medium Download PDF

Info

Publication number
CN112995095B
CN112995095B CN201911281040.7A CN201911281040A CN112995095B CN 112995095 B CN112995095 B CN 112995095B CN 201911281040 A CN201911281040 A CN 201911281040A CN 112995095 B CN112995095 B CN 112995095B
Authority
CN
China
Prior art keywords
data
identification
sender
receiver
target
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
Application number
CN201911281040.7A
Other languages
Chinese (zh)
Other versions
CN112995095A (en
Inventor
庄立
徐皓原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Qianshi Technology Co Ltd
Original Assignee
Beijing Jingdong Qianshi Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Qianshi Technology Co Ltd filed Critical Beijing Jingdong Qianshi Technology Co Ltd
Priority to CN201911281040.7A priority Critical patent/CN112995095B/en
Publication of CN112995095A publication Critical patent/CN112995095A/en
Application granted granted Critical
Publication of CN112995095B publication Critical patent/CN112995095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The disclosure provides a data processing method, a data processing device and a computer readable storage medium, and relates to the technical field of unmanned vehicles. The data processing method comprises the following steps: broadcasting a first discovery message to a preset port of a local network by a data sending party, wherein the first discovery message comprises an identification of the data sending party, a network address of the data sending party, a process identification of the data sending party and a theme identification of the data sending party; broadcasting a second discovery message to a preset port of the local network by the data receiving party, wherein the second discovery message comprises an identification of the data receiving party, a network address of the data receiving party, a port address of a remote procedure call server of the data receiving party, a process identification of the data receiving party and a theme identification of the data receiving party; the local network monitors a preset port and stores a first discovery message and a second discovery message. The stability of the unmanned aerial vehicle communication system can be improved, and the resource consumption of the unmanned aerial vehicle communication system can be saved.

Description

Data processing method, device and computer readable storage medium
Technical Field
The disclosure relates to the technical field of unmanned vehicles, and in particular relates to a data processing method, a data processing device and a computer readable storage medium.
Background
Conventional unmanned vehicle communication systems employ ROS (Robotics Operating System, robotic operating system). ROS are UDP (User Datagram Protocol ) communications based on a server-client (master-client) network architecture.
The Master node hosts all relevant publish and subscribe information, and all messages need to be transmitted by the Master node. Therefore, once the master node is abnormal, the on-line communication system of the unmanned vehicle can stop running, so that the stability of the communication system of the unmanned vehicle is poor.
Meanwhile, since UDP is mainly real-time and high-efficiency, whether the transmitted data is successfully transmitted or not is not checked, and therefore the ROS system cannot ensure that the communication message can be successfully received. This results in the problem of packet loss in communication in an unmanned vehicle using ROS.
Furthermore, ROS systems are based on UDP, where all communications within the same station communicate over the network via UDP, consuming a significant amount of system resources.
With the solution of multiple master nodes, an on-line communication system of an unmanned vehicle is required to maintain multiple master nodes at the same time. Once the current master node is abnormal, it is replaced with a backup master node. The disadvantage of this solution is that maintaining multiple master nodes at the same time results in excessive consumption of system resources, as the master nodes themselves consume significant system resources.
Disclosure of Invention
One technical problem solved by the present disclosure is how to improve stability of an unmanned vehicle communication system and save resource consumption of the unmanned vehicle communication system.
According to an aspect of the embodiments of the present disclosure, there is provided a data processing method, including: broadcasting a first discovery message to a preset port of a local network by a data transmitting party, wherein the first discovery message comprises an identification of the data transmitting party, a network address of the data transmitting party, a process identification of the data transmitting party and a theme identification of the data transmitting party; broadcasting a second discovery message to a preset port of the local network by the data receiving party, wherein the second discovery message comprises an identification of the data receiving party, a network address of the data receiving party, a port address of a remote procedure call server of the data receiving party, a process identification of the data receiving party and a theme identification of the data receiving party; the data sender and the data sender are positioned at the same node or different nodes of the distributed unmanned vehicle communication system; the local network monitors a preset port and stores a first discovery message and a second discovery message.
In some embodiments, the data processing method further comprises: the data transmitter acquires a data transmitter, wherein the data transmitter comprises an intra-process data transmission interface, an inter-process data transmission interface and an inter-machine data transmission interface; the data receiver acquires a data receiver; the data receiver registers the theme identification of the data receiver and the callback function of the data receiver in the notification center.
In some embodiments, the data processing method further comprises: the data sender inputs the target data and the theme identification of the data sender into the data sender; the data transmitter queries a local network by using the topic identification of the data transmitter to acquire the network address and the process identification of the data receiver subscribed to the target data, and acquires the network address and the process identification of the data transmitter; the data transmitter transmits the target data and the theme identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed with the target data and the network address and the process identification of the data transmitter; the data receiver sends the theme identification of the data sender to the notification center; and triggering a callback function of the data receiver subscribed to the target data by the notification center by using the theme identification of the data sender so as to process the target data in the data receiver.
In some embodiments, the data transmitter transmitting the target data and the topic identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed to the target data, the network address and the process identification of the data transmitter, comprises: and under the condition that the network address of the data receiver subscribed to the target data is the same as the network address of the data sender, and the process identification of the data receiver subscribed to the target data is the same as the process identification of the data sender, the in-process data sending interface of the data sender sends the target data and the theme identification of the data sender to the data receiver of the current process.
In some embodiments, the data transmitter transmitting the target data and the topic identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed to the target data, the network address and the process identification of the data transmitter, comprises: under the condition that the network address of the data receiver subscribed to the target data is the same as the network address of the data sender, and the process identification of the data receiver subscribed to the target data is different from the process identification of the data sender, the inter-process data sending interface of the data sender writes the target data and the topic identification of the data sender into the dynamically allocated memory block, and sends the address of the memory block to the local network; the data receiving party receives the address of the memory block, reads the memory block to obtain target data and the theme identification of the data sending party; the data receiver sends the target data and the theme identification of the data sender to the data receiver.
In some embodiments, the data receiver transmitting the target data and the subject identification of the data sender to the data receiver comprises: after verifying that the theme identifier of the data receiver contains the theme identifier of the data sender, the data receiver sends the target data and the theme identifier of the data sender to the data receiver.
In some embodiments, when the data transmitter transmits the address of the memory block to the local network, the data transmitter also transmits a check code of the memory block; the data receiver transmitting the subject identification of the target data and the data sender to the data receiver comprises: the data receiving party receives the check code of the memory block and verifies the data in the memory block by using the check code of the memory block; after the verification is successful, the data receiver sends the target data and the theme identification of the data sender to the data receiver.
In some embodiments, the data transmitter transmitting the target data and the topic identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed to the target data, the network address and the process identification of the data transmitter, comprises: under the condition that the network address of the data receiver subscribed to the target data is different from the network address of the data sender, the inter-machine data sending interface of the data sender sends the target data and the theme identification of the data sender to a remote procedure call server through a remote procedure call client; the remote procedure call server transmits the target data and the subject identification of the data sender to the data receiver.
In some embodiments, the data transmitter transmitting the target data and the topic identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed to the target data, the network address and the process identification of the data transmitter further comprises: the data transmitter queries a local network by using the topic identification of the data transmitter to acquire the port address of a remote procedure call server of a data receiver subscribed to the target data; the data transmitter determines the address of the remote procedure call server by using the port address and the network address of the remote procedure call server of the data receiver subscribed to the target data.
According to another aspect of an embodiment of the present disclosure, there is provided a data processing apparatus including: a data sender configured to: broadcasting a first discovery message to a preset port of a local network, wherein the first discovery message comprises an identifier of a data sender, a network address of the data sender, a process identifier of the data sender and a theme identifier of the data sender; a data receiver configured to: broadcasting a second discovery message to a preset port of the local network, wherein the second discovery message comprises an identification of a data receiver, a network address of the data receiver, a port address of a remote procedure call server of the data receiver, a process identification of the data receiver and a theme identification of the data receiver; the data sender and the data sender are positioned at the same node or different nodes of the distributed unmanned vehicle communication system; the local network is configured to monitor a preset port and store a first discovery message and a second discovery message.
In some embodiments, the data processing apparatus further comprises a data transmitter, a data receiver, a notification center; the data sender is further configured to: the method comprises the steps of acquiring a data transmitter, wherein the data transmitter comprises an intra-process data transmission interface, an inter-process data transmission interface and an inter-machine data transmission interface; the data receiver is further configured to: acquiring a data receiver; registering the theme identification of the data receiver and the callback function of the data receiver in the notification center.
In some embodiments, the data sender is further configured to: acquiring a data transmitter, and inputting target data and a theme identification of a data transmitter into the data transmitter; the data transmitter is configured to: inquiring a local network by using the topic identification of the data sender to acquire the network address and the process identification of the data receiver subscribed to the target data, and acquiring the network address and the process identification of the data sender; according to the network address and the process identifier of the data receiver subscribed to the target data, the network address and the process identifier of the data sender, the target data and the theme identifier of the data sender are sent to the data receiver; the data receiver is configured to: the topic identification of the data sender is sent to a notification center; the notification center is configured to: and triggering a callback function of the data receiver subscribed to the target data by using the theme identification of the data sender so as to process the target data in the data receiver.
In some embodiments, the data transmitter is configured to: and under the condition that the network address of the data receiver subscribed to the target data is the same as the network address of the data sender, and the process identification of the data receiver subscribed to the target data is the same as the process identification of the data sender, the in-process data sending interface of the data sender sends the target data and the theme identification of the data sender to the data receiver of the current process.
In some embodiments, the data transmitter is configured to: under the condition that the network address of the data receiver subscribed to the target data is the same as the network address of the data sender, and the process identification of the data receiver subscribed to the target data is different from the process identification of the data sender, the inter-process data sending interface of the data sender writes the target data and the topic identification of the data sender into the dynamically allocated memory block, and sends the address of the memory block to the local network; the data receiver is further configured to: receiving an address of a memory block, and reading the memory block to obtain target data and a subject identifier of a data sender; and transmitting the target data and the subject identification of the data sender to a data receiver.
In some embodiments, the data receiver is configured to: after verifying that the topic identification of the data receiver contains the topic identification of the data sender, the target data and the topic identification of the data sender are sent to the data receiver.
In some embodiments, the data transmitter is configured to: when the address of the memory block is sent to the local network, the check code of the memory block is also sent; the data receiver is configured to: receiving the check code of the memory block, and verifying the data in the memory block by using the check code of the memory block; after the verification is successful, the target data and the subject identification of the data sender are sent to the data receiver.
In some embodiments, the data processing apparatus further comprises a remote procedure call server; the data transmitter is configured to: under the condition that the network address of the data receiver subscribed to the target data is different from the network address of the data sender, the inter-machine data sending interface of the data sender sends the target data and the theme identification of the data sender to a remote procedure call server through a remote procedure call client; the remote procedure call server transmits the target data and the subject identification of the data sender to the data receiver.
In some embodiments, the data transmitter is further configured to: querying a local network by using a topic identification of a data sender to acquire a remote procedure call server port address of a data receiver subscribed to target data; and determining the address of the remote procedure call server by using the port address and the network address of the remote procedure call server of the data receiver subscribed to the target data.
According to still another aspect of the embodiments of the present disclosure, there is provided still another data processing apparatus including: a memory; and a processor coupled to the memory, the processor configured to perform the aforementioned data processing method based on instructions stored in the memory.
According to yet another aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the foregoing data processing method.
The stability of the unmanned aerial vehicle communication system can be improved, and the resource consumption of the unmanned aerial vehicle communication system can be saved.
Other features of the present disclosure and its advantages will become apparent from the following detailed description of exemplary embodiments of the disclosure, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present disclosure, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 shows a schematic diagram of the connection of the individual machines.
Fig. 2 shows a message flow diagram of a process.
Fig. 3 illustrates a flow diagram of a data processing method of some embodiments of the present disclosure.
Fig. 4 shows a flow diagram of a data processing method of other embodiments of the present disclosure.
Fig. 5 illustrates a schematic diagram of a data processing apparatus according to some embodiments of the present disclosure.
Fig. 6 shows a schematic structural view of a data processing apparatus according to further embodiments of the present disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments in this disclosure without inventive faculty, are intended to fall within the scope of this disclosure.
To solve the above problems, the present disclosure provides an intelligent distributed communication system. The intelligent distributed communication system operates on each machine to run one or more processes on each machine, each process including one or more nodes. It will be appreciated by those skilled in the art that all threads of the same process share the memory of the process, and that the memories of different processes are independent of each other.
Fig. 1 shows a schematic diagram of the connection of the individual machines. As shown in fig. 1, there is a network connection between machine 1 and machine 2; machine 1 has a network address of 192.168.1.1 and runs process a and process B on machine 1; machine 2 has a network address of 192.168.1.2 and runs process C and process D on machine 2. Fig. 2 shows a message flow diagram of a process. As shown in fig. 2, the process a has a plurality of nodes, and a plurality of data transmitters and data receivers exist in each node. Each data sender corresponds to a topic and each data receiver corresponds to one or more topics. Messages of different subjects may have the same or different message types. Assuming that the theme 1 is a camera and the theme 2 is a graphical interface, the message types corresponding to the theme 1 and the theme 2 are pictures, and the message types are in one-to-one correspondence with the message transmitters. The message sender comprises an in-process message sending interface, an inter-process message sending interface and an inter-machine message sending interface. The in-process message sending interface is in signal connection with the message receiver, the in-process message sending interface is in signal connection with the memory allocator, and the machine-to-machine message sending interface is in signal connection with the remote procedure call client. The remote procedure call client may send a message to the local network and the remote procedure call server may receive the message from the local network and send it to the message receiver. The message receiver is in signal connection with a notification center, which is in signal connection with a message receiver. As can be seen from the figure, the intelligent distributed communication system provided by the present disclosure does not have a Master node.
Some embodiments of the disclosed data processing method are described below in conjunction with fig. 3 to introduce a data subscription process for an intelligent distributed communication system.
Fig. 3 illustrates a flow diagram of a data processing method of some embodiments of the present disclosure. As shown in fig. 3, the present embodiment includes steps S301 to S303.
In step S301, the data transmission broadcasts a first discovery message to a preset port M of the local network.
The first discovery message includes an identifier of the data sender, a network address of the data sender, a process identifier of the data sender, and a subject identifier of the data sender.
In step S302, the data reception broadcasts a second discovery message to the preset port M of the local network.
The second discovery message includes an identifier of the data receiver, a network address of the data receiver, a port address of a remote procedure call server of the data receiver, a process identifier of the data receiver, and a topic identifier of the data receiver.
Those skilled in the art will appreciate that the data sender and the data sender are located at the same node or at different nodes of the distributed drone communication system. The data sender may employ an RTPS (Real Time Publish Subscribe Protocol, real-time publish-subscribe protocol) when broadcasting the first discovery message and the data receiver broadcasts the second discovery message.
In step S303, the local network listens to the preset port M, and stores the first discovery message and the second discovery message.
Since there may be a plurality of data senders and a plurality of data receivers, the local network may receive a plurality of first discovery messages and a plurality of second discovery messages. The home network will hold all of these discovery messages that are heard.
The embodiment can autonomously discover the data sender and the data receiver, and realize the data subscription of the data receiver to the data sender. The UDP protocol is not adopted any more in the embodiment, so that the stability of the unmanned vehicle communication system can be improved, and the resource consumption of the unmanned vehicle communication system can be saved.
In some embodiments, the data processing method further includes steps S304 to S306.
In step S304, the data sender acquires a data sender.
If no data transmitter exists, the data transmitter may create the data transmitter. The data transmitter comprises an intra-process data transmission interface, an inter-process data transmission interface and an inter-machine data transmission interface.
In step S305, the data receiver acquires a data receiver.
If no data receiver is present, the data sender may create a data receiver.
In step S306, the data receiver registers the topic identification of the data receiver and the callback function of the data receiver in the notification center.
The notification center may store the registered callback function through a hash table. After the registration is successful, the notification center stores a key value relation between the theme identification of the data receiver and the callback function of the data receiver, wherein the key is a hash value of the theme identification of the data receiver, and the hash value is a pointer array of the callback function of the data receiver.
The embodiment realizes the acquisition work of the data transmitter and the data receiver, and registers the callback function in the notification center, so that the notification center is enabled to trigger the callback function after the subsequent data receiver receives the subscribed data, and the subscribed data is processed.
Further embodiments of the disclosed data processing method are described below in conjunction with fig. 4 to introduce a data transmission process for an intelligent distributed communication system.
Fig. 4 shows a flow diagram of a data processing method of other embodiments of the present disclosure. As shown in fig. 4, the present embodiment includes steps S401 to S405.
In step S401, the data sender inputs the target data and the subject identification of the data sender into the data sender.
For example, the data sender may call the data sender transmitter < T > and pass in the data tdata to be sent.
In step S402, the data transmitter queries the local network using the topic identification of the data transmitter to obtain the network address and the process identification of the data receiver subscribed to the target data, and obtains the network address and the process identification of the data transmitter.
In step S403, the data transmitter transmits the target data and the topic identifier of the data transmitter to the data receiver according to the network address and the process identifier of the data receiver subscribed to the target data, and the network address and the process identifier of the data transmitter.
the transmitter < T > may determine whether to specifically invoke intra-process communication, inter-process communication, or inter-machine communication according to a network address and a process identifier of a data receiver, a network address and a process identifier of a data sender, which have subscribed to the target data. Step S403 can be classified into three cases in particular.
Case one: in-process communication
In the case that the network address of the data receiver subscribed to the target data is the same as the network address of the data sender, and the process identifier of the data receiver subscribed to the target data is the same as the process identifier of the data sender, the in-process data sending interface of the data sender may call the data receiver < T > of the current process to send the target data and the topic identifier of the data sender to the data receiver < T > of the current process.
And a second case: inter-process communication
Under the condition that the network address of the data receiver subscribed to the target data is the same as the network address of the data sender, and the process identification of the data receiver subscribed to the target data is different from the process identification of the data sender, the data sender can actively allocate a section of memory block with a proper size through the inter-process data sending interface of the data sender, write the target data and the topic identification of the data sender into the dynamically allocated memory block, and send relevant information such as the address of the memory block to the local network. The data receiving party receives the address of the memory block, reads the memory block to obtain the target data and the theme identification of the data transmitting party, and transmits the target data and the theme identification of the data transmitting party to the data receiving party.
In some embodiments, before the data receiver sends the target data and the topic identifier of the data sender to the data receiver, the target data and the topic identifier of the data sender may be verified, and after verification is successful, the target data and the topic identifier of the data sender are sent to the data receiver.
For example, the data receiver may verify that the subject identifier of the data receiver includes the subject identifier of the data sender, and then send the target data and the subject identifier of the data sender to the data receiver.
For another example, when the data transmitter transmits the address of the memory block to the local network, the data transmitter also transmits the check code of the memory block. The data receiver can receive the check code of the memory block and verify the data in the memory block by using the check code of the memory block. After the verification is successful, the data receiver sends the target data and the theme identification of the data sender to the data receiver.
And a third case: inter-machine communication
In the case that the network address of the data receiver subscribed to the target data is different from the network address of the data sender, the inter-machine data sending interface of the data sender sends the data to the corresponding machine address through a remote procedure call. Specifically, an inter-machine data transmission interface of the data transmitter transmits target data and a subject identifier of a data transmitter to a remote procedure call server through a remote procedure call client; the remote procedure call server transmits the target data and the subject identification of the data sender to the data receiver.
The data sender may query the local network with the topic identification of the data sender to obtain the remote procedure call server port address of the data receiver subscribed to the target data. The data transmitter further determines an address of the remote procedure call server using the port address and the network address of the remote procedure call server of the data receiver subscribed to the target data.
In step S404, the data receiver transmits the subject identification of the data sender to the notification center.
In step S405, the notification center triggers a callback function of the data receiver subscribed to the target data by using the topic identification of the data sender, so as to process the target data in the data receiver.
For example, the notification center searches the topic identification of the same receiver by using the topic identification of the data sender, so as to trigger a callback function corresponding to the topic identification of the same receiver.
The embodiment provides a data transmission process of an intelligent distributed communication system, and can automatically select a corresponding communication mode according to actual conditions, so that the stability of the unmanned vehicle communication system is improved, and the resource consumption of the unmanned vehicle communication system is saved.
The data flow process in the present disclosure may use REST architecture and socket to communicate with the remote server and hardware layers, respectively. The intelligent distributed communication system in the present disclosure may also provide external API services using REST architecture, remote procedure calls. Meanwhile, the method and the device can also be provided with various functional modules so as to realize autonomous discovery of whether the running node is abnormal or not. The method specifically comprises the following steps:
(1) The daemon module is used for automatically restarting the node when the node dies;
(2) The safety module is used for continuously scanning each program module when running, automatically reporting the remote server when an abnormal event occurs, and actively taking braking operation on the unmanned vehicle when emergency occurs;
(3) And the external service module is provided with a basic system application program interface and is used for providing distributed system topological graph service and simulation time service for a remote user.
Some embodiments of the data processing apparatus of the present disclosure are described below in conjunction with fig. 5.
Fig. 5 illustrates a schematic diagram of a data processing apparatus according to some embodiments of the present disclosure. As shown in fig. 5, the data processing apparatus 50 in the present embodiment includes:
a data sender 501 configured to: broadcasting a first discovery message to a preset port of a local network, wherein the first discovery message comprises an identifier of a data sender, a network address of the data sender, a process identifier of the data sender and a theme identifier of the data sender; a data receiver 502 configured to: broadcasting a second discovery message to a preset port of the local network, wherein the second discovery message comprises an identification of a data receiver, a network address of the data receiver, a port address of a remote procedure call server of the data receiver, a process identification of the data receiver and a theme identification of the data receiver; the data sender and the data sender are positioned at the same node or different nodes of the distributed unmanned vehicle communication system; the local network 503 is configured to monitor the preset port and store the first discovery message and the second discovery message.
In some embodiments, the data processing apparatus 50 further comprises a data transmitter 504, a data receiver 505, a notification center 506; the data sender 501 is further configured to: a get data transmitter 504, the data transmitter 504 comprising an intra-process data transmission interface, an inter-process data transmission interface, and an inter-machine data transmission interface; the data receiver 501 is further configured to: acquiring a data receiver 505; registering the theme identification of the data receiver and the callback function of the data receiver in the notification center.
In some embodiments, the data sender 501 is further configured to: acquiring the data transmitter 504 and inputting the target data and the subject identification of the data transmitter 501 into the data transmitter 504; the data transmitter 504 is configured to: querying a local network 503 by using the topic identification of the data sender 501 to obtain the network address and the process identification of the data receiver 502 subscribed to the target data, and obtaining the network address and the process identification of the data sender 501; according to the network address and the process identifier of the data receiver 502 subscribed to the target data, the network address and the process identifier of the data sender 501, the target data and the topic identifier of the data sender 501 are sent to the data receiver 505; the data receiver 505 is configured to: transmitting the topic identification of the data transmitter 501 to the notification center 506; the notification center 506 is configured to: the callback function of the data receiver 502 subscribed to the target data is triggered to process the target data in the data receiver 505 using the topic identification of the data sender 501.
In some embodiments, the data transmitter 504 is configured to: in the case where the network address of the data receiver 502 subscribed to the target data is the same as the network address of the data sender 501, and the process identification of the data receiver 502 subscribed to the target data is the same as the process identification of the data sender 501, the in-process data transmission interface of the data sender 504 transmits the target data and the subject identification of the data sender 501 to the data receiver 505 of the current process.
In some embodiments, the data transmitter 504 is configured to: in the case that the network address of the data receiver 502 subscribed to the target data is the same as the network address of the data sender 501, and the process identifier of the data receiver 502 subscribed to the target data is different from the process identifier of the data sender 501, the inter-process data sending interface of the data sender 504 writes the target data and the topic identifier of the data sender 501 into the dynamically allocated memory block, and sends the address of the memory block to the local network 503; the data receiver 502 is further configured to: receiving the address of the memory block, and reading the memory block to obtain target data and the subject identifier of the data sender 501; the target data and the subject identification of the data sender 501 are sent to the data receiver 505.
In some embodiments, the data receiver 502 is configured to: after verifying that the subject identifier of the data receiver 502 includes the subject identifier of the data sender 501, the target data and the subject identifier of the data sender 501 are sent to the data receiver 505.
In some embodiments, the data transmitter 504 is configured to: when sending the address of the memory block to the local network 503, a check code of the memory block is also sent; the data receiver 502 is configured to: receiving the check code of the memory block, and verifying the data in the memory block by using the check code of the memory block; after the verification is successful, the target data and the subject identification of the data sender 501 are sent to the data receiver 505.
In some embodiments, data processing apparatus 50 further comprises a remote procedure call server; the data transmitter 504 is configured to: in the case that the network address of the data receiver 502 subscribed to the target data is different from the network address of the data sender 501, the inter-machine data sending interface of the data sender 504 sends the target data and the topic identification of the data sender 501 to the remote procedure call server through the remote procedure call client; the remote procedure call server transmits the target data and the subject identification of the data sender 501 to the data receiver 505.
In some embodiments, the data transmitter 504 is further configured to: querying the local network 503 with the topic identification of the data sender 501 to obtain a remote procedure call server port address of the data receiver 502 subscribed to the target data; the address of the remote procedure call server is determined using the remote procedure call server port address and the network address of the data recipient 502 subscribed to the target data.
According to the embodiment, the corresponding communication mode can be automatically selected according to actual conditions, so that the stability of the unmanned vehicle communication system is improved, and the resource consumption of the unmanned vehicle communication system is saved.
Further embodiments of the data processing apparatus of the present disclosure are described below in conjunction with fig. 6.
Fig. 6 shows a schematic structural view of a data processing apparatus according to further embodiments of the present disclosure. As shown in fig. 6, the data processing apparatus 60 of this embodiment includes: a memory 610 and a processor 620 coupled to the memory 610, the processor 620 being configured to perform the data processing method of any of the foregoing embodiments based on instructions stored in the memory 610.
The memory 610 may include, for example, system memory, fixed nonvolatile storage media, and the like. The system memory stores, for example, an operating system, application programs, boot Loader (Boot Loader), and other programs.
The data processing apparatus 60 may also include an input output interface 630, a network interface 640, a storage interface 650, and the like. These interfaces 630, 640, 650 and the memory 610 and processor 620 may be connected by, for example, a bus 660. The input/output interface 630 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. Network interface 640 provides a connection interface for various networking devices. The storage interface 650 provides a connection interface for external storage devices such as SD cards, U-discs, and the like.
The present disclosure also includes a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the data processing method of any of the previous embodiments.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the preferred embodiments of the present disclosure is not intended to limit the disclosure, but rather to enable any modification, equivalent replacement, improvement or the like, which fall within the spirit and principles of the present disclosure.

Claims (18)

1. A data processing method, comprising:
broadcasting a first discovery message to a preset port of a local network by a data transmitting party, wherein the first discovery message comprises an identification of the data transmitting party, a network address of the data transmitting party, a process identification of the data transmitting party and a theme identification of the data transmitting party;
Broadcasting a second discovery message to the preset port of the local network by the data receiving party, wherein the second discovery message comprises the identification of the data receiving party, the network address of the data receiving party, the port address of a remote procedure call server of the data receiving party, the process identification of the data receiving party and the theme identification of the data receiving party; the data sender and the data sender are positioned at the same node or different nodes of the distributed unmanned vehicle communication system;
the local network monitors the preset port and stores the first discovery message and the second discovery message;
the data sender inputs the target data and the theme identification of the data sender into the data sender, wherein different data senders correspond to different data types;
the data transmitter queries a local network by using the topic identification of the data transmitter to acquire the network address and the process identification of the data receiver subscribed to the target data, and acquires the network address and the process identification of the data transmitter;
the data transmitter transmits the target data and the theme identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed with the target data and the network address and the process identification of the data transmitter;
The data receiver sends the theme identification of the data sender to the notification center;
and triggering a callback function of the data receiver subscribed to the target data by the notification center by using the theme identification of the data sender so as to process the target data in the data receiver.
2. The data processing method as in claim 1, further comprising:
the data transmitter acquires a data transmitter, wherein the data transmitter comprises an intra-process data transmission interface, an inter-process data transmission interface and an inter-machine data transmission interface;
the data receiver acquires a data receiver;
the data receiver registers the theme identification of the data receiver and the callback function of the data receiver in the notification center.
3. The data processing method of claim 1, wherein the data transmitter transmitting the target data and the topic identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed to the target data, the network address and the process identification of the data transmitter, comprises:
and under the condition that the network address of the data receiver subscribed to the target data is the same as the network address of the data sender, and the process identification of the data receiver subscribed to the target data is the same as the process identification of the data sender, the in-process data sending interface of the data sender sends the target data and the theme identification of the data sender to the data receiver of the current process.
4. The data processing method of claim 1, wherein the data transmitter transmitting the target data and the topic identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed to the target data, the network address and the process identification of the data transmitter, comprises:
under the condition that the network address of a data receiver subscribed to target data is the same as the network address of a data sender, and the process identification of the data receiver subscribed to the target data is different from the process identification of the data sender, writing the target data and the topic identification of the data sender into a dynamically allocated memory block by an inter-process data sending interface of the data sender, and sending the address of the memory block to a local network;
the data receiving party receives the address of the memory block, reads the memory block to obtain target data and a subject identifier of the data sending party;
the data receiver sends the target data and the theme identification of the data sender to the data receiver.
5. The data processing method of claim 4, wherein the data receiver transmitting the target data and the subject identification of the data transmitter to the data receiver comprises:
After verifying that the theme identifier of the data receiver contains the theme identifier of the data sender, the data receiver sends the target data and the theme identifier of the data sender to the data receiver.
6. The data processing method as claimed in claim 4, wherein the data transmitter further transmits a check code of the memory block when transmitting the address of the memory block to the local network;
the data receiver transmitting the target data and the subject identification of the data sender to the data receiver comprises:
the data receiving party receives the check code of the memory block and verifies the data in the memory block by utilizing the check code of the memory block;
after the verification is successful, the data receiver sends the target data and the theme identification of the data sender to the data receiver.
7. The data processing method of claim 1, wherein the data transmitter transmitting the target data and the topic identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed to the target data, the network address and the process identification of the data transmitter, comprises:
under the condition that the network address of the data receiver subscribed to the target data is different from the network address of the data sender, the inter-machine data sending interface of the data sender sends the target data and the theme identification of the data sender to a remote procedure call server through a remote procedure call client; the remote procedure call server transmits the target data and the subject identification of the data sender to the data receiver.
8. The data processing method of claim 7, wherein the data transmitter transmitting the target data and the topic identification of the data transmitter to the data receiver according to the network address and the process identification of the data receiver subscribed to the target data, the network address and the process identification of the data transmitter, further comprises:
the data transmitter queries a local network by using the topic identification of the data transmitter to acquire the port address of a remote procedure call server of a data receiver subscribed to the target data;
the data transmitter determines the address of the remote procedure call server by using the port address and the network address of the remote procedure call server of the data receiver subscribed to the target data.
9. A data processing apparatus comprising:
a data sender configured to: broadcasting a first discovery message to a preset port of a local network, wherein the first discovery message comprises an identifier of a data sender, a network address of the data sender, a process identifier of the data sender and a theme identifier of the data sender;
a data receiver configured to: broadcasting a second discovery message to the preset port of the local network, wherein the second discovery message comprises the identification of the data receiver, the network address of the data receiver, the port address of a remote procedure call server of the data receiver, the process identification of the data receiver and the theme identification of the data receiver; the data sender and the data sender are positioned at the same node or different nodes of the distributed unmanned vehicle communication system;
The local network is configured to monitor the preset port and store the first discovery message and the second discovery message;
the data processing device further comprises a data transmitter, a data receiver and a notification center, wherein different data transmitters correspond to different data types;
the data sender is further configured to: acquiring a data transmitter, and inputting target data and a theme identification of a data transmitter into the data transmitter;
the data transmitter is configured to: inquiring a local network by using the topic identification of the data sender to acquire the network address and the process identification of the data receiver subscribed to the target data, and acquiring the network address and the process identification of the data sender; according to the network address and the process identifier of the data receiver subscribed to the target data, the network address and the process identifier of the data sender, the target data and the theme identifier of the data sender are sent to the data receiver;
the data receiver is configured to: the topic identification of the data sender is sent to a notification center;
the notification center is configured to: and triggering a callback function of the data receiver subscribed to the target data by using the theme identification of the data sender so as to process the target data in the data receiver.
10. The data processing apparatus as in claim 9, wherein,
the data sender is further configured to: the method comprises the steps of acquiring a data transmitter, wherein the data transmitter comprises an intra-process data transmission interface, an inter-process data transmission interface and an inter-machine data transmission interface;
the data receiver is further configured to: acquiring a data receiver; registering the theme identification of the data receiver and the callback function of the data receiver in the notification center.
11. The data processing apparatus of claim 9, wherein the data transmitter is configured to:
and under the condition that the network address of the data receiver subscribed to the target data is the same as the network address of the data sender, and the process identification of the data receiver subscribed to the target data is the same as the process identification of the data sender, the in-process data sending interface of the data sender sends the target data and the theme identification of the data sender to the data receiver of the current process.
12. The data processing apparatus of claim 9, wherein the data transmitter is configured to: under the condition that the network address of a data receiver subscribed to target data is the same as the network address of a data sender, and the process identification of the data receiver subscribed to the target data is different from the process identification of the data sender, writing the target data and the topic identification of the data sender into a dynamically allocated memory block by an inter-process data sending interface of the data sender, and sending the address of the memory block to a local network;
The data receiver is further configured to: receiving the address of the memory block, and reading the memory block to obtain target data and a subject identifier of a data sender; and transmitting the target data and the subject identification of the data sender to a data receiver.
13. The data processing apparatus of claim 12, wherein the data receiver is configured to: after verifying that the topic identification of the data receiver contains the topic identification of the data sender, the target data and the topic identification of the data sender are sent to the data receiver.
14. The data processing apparatus of claim 12, wherein the data transmitter is configured to: when the address of the memory block is sent to the local network, a check code of the memory block is also sent;
the data receiver is configured to: receiving the check code of the memory block, and verifying the data in the memory block by using the check code of the memory block; after the verification is successful, the target data and the subject identification of the data sender are sent to the data receiver.
15. The data processing apparatus of claim 9, further comprising a remote procedure call server;
the data transmitter is configured to: under the condition that the network address of the data receiver subscribed to the target data is different from the network address of the data sender, the inter-machine data sending interface of the data sender sends the target data and the theme identification of the data sender to a remote procedure call server through a remote procedure call client; the remote procedure call server transmits the target data and the subject identification of the data sender to the data receiver.
16. The data processing apparatus of claim 15, wherein the data transmitter is further configured to: querying a local network by using a topic identification of a data sender to acquire a remote procedure call server port address of a data receiver subscribed to target data; and determining the address of the remote procedure call server by using the port address and the network address of the remote procedure call server of the data receiver subscribed to the target data.
17. A data processing apparatus comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the data processing method of any of claims 1 to 8 based on instructions stored in the memory.
18. A computer readable storage medium storing computer instructions which, when executed by a processor, implement the data processing method of any one of claims 1 to 8.
CN201911281040.7A 2019-12-13 2019-12-13 Data processing method, device and computer readable storage medium Active CN112995095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911281040.7A CN112995095B (en) 2019-12-13 2019-12-13 Data processing method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911281040.7A CN112995095B (en) 2019-12-13 2019-12-13 Data processing method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112995095A CN112995095A (en) 2021-06-18
CN112995095B true CN112995095B (en) 2023-05-30

Family

ID=76332474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911281040.7A Active CN112995095B (en) 2019-12-13 2019-12-13 Data processing method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112995095B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11469890B2 (en) * 2020-02-06 2022-10-11 Google Llc Derived keys for connectionless network protocols

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8761008B2 (en) * 2009-10-29 2014-06-24 The Boeing Company System, apparatus, and method for communication in a tactical network
CN103455380A (en) * 2012-06-05 2013-12-18 上海斐讯数据通信技术有限公司 Multi-process communication system and establishment and communication method thereof
CN108847988B (en) * 2018-06-29 2019-09-17 百度在线网络技术(北京)有限公司 Dynamic topology maintaining method, device and equipment
CN109194736B (en) * 2018-08-30 2021-04-27 百度在线网络技术(北京)有限公司 Message duplicate removal method and device, electronic equipment, medium and unmanned vehicle
CN109151033B (en) * 2018-08-30 2022-02-22 百度在线网络技术(北京)有限公司 Communication method and device based on distributed system, electronic equipment and storage medium
CN109743142A (en) * 2018-09-30 2019-05-10 比亚迪股份有限公司 Information communication method and device

Also Published As

Publication number Publication date
CN112995095A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN107517438B (en) Method for requesting sharing of Bluetooth device, electronic device and computer storage medium
CN111800443B (en) Data processing system and method, device and electronic equipment
CN109246220B (en) Message pushing system and method
CN110611691B (en) Message pushing method, system and storage medium
US11108837B2 (en) Media downlink transmission control method and related device
CN108847976B (en) Distribution network control method, mobile terminal, device and computer readable storage medium
CN110740460A (en) device network access method, device, network device and storage medium
WO2021232197A1 (en) Method and apparatus for monitoring device state, device, and storage medium
CN105991412A (en) Method and device for pushing message
CN111263338A (en) Network distribution method of Bluetooth Mesh network and related network distribution equipment and system
CN114585026A (en) Frequency point switching method, terminal, base station and storage medium
CN113196721B (en) Method and device for discovering Internet of things equipment and terminal equipment
CN110912805B (en) Message reading state synchronization method, terminal, server and system
CN105812079A (en) Emergency broadcast state reporting method, device, emergency broadcast state receiving method and device
CN112995095B (en) Data processing method, device and computer readable storage medium
CN114884805B (en) Data transmission method, device, terminal and storage medium
CN113992740B (en) Middleware based on autonomous control and data transmission method
CN113660121B (en) Information management method and device based on distributed system and computer storage medium
CN106230878B (en) Equipment service calling method and device based on AllJoyn framework
CN112328417B (en) Embedded multi-program communication method and system
CN109309583B (en) Information acquisition method and device based on distributed system, electronic equipment and medium
CN107548025B (en) Position information sharing method and core network
CN111132311B (en) Base station monitoring method, device, electronic equipment and storage medium
CN114189384B (en) Service processing method, device, equipment and storage medium
KR20200003555A (en) Method and apparatus for processing notification message in event of nitification failture in m2m system

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