CN111601285A - Communication method, apparatus, system, and computer-readable storage medium - Google Patents

Communication method, apparatus, system, and computer-readable storage medium Download PDF

Info

Publication number
CN111601285A
CN111601285A CN202010423417.4A CN202010423417A CN111601285A CN 111601285 A CN111601285 A CN 111601285A CN 202010423417 A CN202010423417 A CN 202010423417A CN 111601285 A CN111601285 A CN 111601285A
Authority
CN
China
Prior art keywords
message
data
sent
communication protocol
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010423417.4A
Other languages
Chinese (zh)
Other versions
CN111601285B (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.)
Jiangsu XCMG Construction Machinery Institute Co Ltd
Original Assignee
Jiangsu XCMG Construction Machinery Institute 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 Jiangsu XCMG Construction Machinery Institute Co Ltd filed Critical Jiangsu XCMG Construction Machinery Institute Co Ltd
Priority to CN202010423417.4A priority Critical patent/CN111601285B/en
Publication of CN111601285A publication Critical patent/CN111601285A/en
Application granted granted Critical
Publication of CN111601285B publication Critical patent/CN111601285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/46Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for vehicle-to-vehicle communication [V2V]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1803Stop-and-wait protocols
    • 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
    • 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/165Combined use of TCP and UDP protocols; selection criteria therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/04Error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/44Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for communication between vehicles and infrastructures, e.g. vehicle-to-cloud [V2C] or vehicle-to-home [V2H]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • H04W80/06Transport layer protocols, e.g. TCP [Transport Control Protocol] over wireless

Landscapes

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

Abstract

The disclosure relates to a communication method, a communication device, a communication system and a computer readable storage medium, and relates to the technical field of communication. The method of the present disclosure comprises: determining a communication protocol and a sending port according to at least one of the type of data to be sent and the type of a receiving end; packaging data to be transmitted according to the determined communication protocol to generate a message to be transmitted; sending a message to be sent to a receiving end through a determined sending end port; wherein, the type of the receiving end includes: at least one of a communication device and a server of the other vehicle.

Description

Communication method, apparatus, system, and computer-readable storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a communication method, apparatus, system, and computer-readable storage medium.
Background
The outdoor mine at home and abroad is remote, the environment is severe, the aging trend of drivers for the operation of transport vehicles in mining areas is obvious, safety accidents caused by negligence of the transport drivers are frequent, the economic burden of the mining areas in the aspects of production safety, personnel investment and the like is increased day by day, and the unmanned transport solution of the outdoor mine begins to show the corner completely under the urgent needs of the mining areas and the promotion of the development of modern science and technology.
However, due to the particularity and complexity of operation management of the surface mine, the implementation of the unmanned transportation system of the surface mine faces many technical challenges, and among them, real-time and reliable mass data communication is one of the most fundamental technical problems for implementing the system landing application.
Disclosure of Invention
The inventor finds that: the unmanned vehicle not only needs to communicate with the server, but also needs to communicate with other unmanned vehicles, the communication requirements of different data are different, and how to realize efficient communication is realized, so that the whole surface mine unmanned transportation system can normally and efficiently operate, and the problem needs to be solved at present.
One technical problem to be solved by the present disclosure is: a communication method of vehicles in an unmanned transportation system of a surface mine is designed, and communication efficiency is improved.
According to some embodiments of the present disclosure, there is provided a communication method, wherein the communication method is performed by a communication device of a vehicle, comprising: determining a communication protocol and a sending port according to at least one of the type of data to be sent and the type of a receiving end; packaging data to be transmitted according to the determined communication protocol to generate a message to be transmitted; sending a message to be sent to a receiving end through a determined sending end port; wherein, the type of the receiving end includes: at least one of a communication device and a server of the other vehicle.
In some embodiments, encapsulating data to be transmitted according to the determined communication protocol includes: under the condition that the data to be transmitted comprise broadcast data, packaging the data to be transmitted by adopting a preset beacon frame structure to generate beacon data; the beacon data is used as a data part of a message to be sent, and the data to be sent is packaged according to a determined communication protocol; wherein, presetting the beacon frame structure includes: a first field corresponding to the timestamp, a second field corresponding to the IP address of the communication device of the vehicle, a third field corresponding to the information of the vehicle, and a fourth field corresponding to the broadcast data.
In some embodiments, the broadcast data includes operating state information of the vehicle, the operating state information of the vehicle including: at least one of the geographic position, speed, course, load, oil mass and fault information of the vehicle; the information of the vehicle includes: at least one of type, identification, size of the vehicle.
In some embodiments, the communication protocol comprises: a transmission control protocol TCP, a user datagram protocol UDP, a super user datagram protocol SUDP; the step of encapsulating the data to be transmitted according to the determined communication protocol comprises the following steps: under the condition that the determined communication protocol is the SUDP, determining a message sequence number of data to be sent; and adding a message serial number and a message ID on the basis of the UDP message header, and packaging the data to be sent as a data part of the message.
In some embodiments, sending the message to be sent to the receiving end through the determined sending port includes: identifying the message serial number of a message to be sent; and sending the message to be sent to a receiving end through the determined sending end port according to the sequence of the message serial numbers.
In some embodiments, the method further comprises: under the condition that the determined communication protocol is the SUDP, after a message to be sent is sent out through the determined sending port, a response message sent by a receiving end is received; and analyzing the response message to determine that the message to be sent is received.
In some embodiments, the method further comprises: under the condition that the determined communication protocol is the SUDP, after a message to be sent is sent out through the determined sending port, a retransmission timer is started; under the condition that the retransmission timer is stopped, determining whether a response message of a receiving end is received; under the condition of receiving the response message, analyzing the response message to determine that the message to be sent is received; determining whether a preset retransmission frequency is reached or not under the condition that the response message is not received; under the condition that the preset retransmission times are not reached, the message to be sent is retransmitted, and the retransmission timer is restarted; and under the condition that the preset retransmission times are reached, discarding the data to be sent.
In some embodiments, the response message is encapsulated by the SUDP, and the header of the response message includes: message ID, receiving end IP address and message sequence number; acquiring a message ID and a message sequence number from a message received by a receiving end; analyzing the response message to determine that the message to be sent has been received comprises: analyzing the response message to obtain a message ID, a receiving end IP address and a message serial number; and comparing the acquired message ID, the receiving end IP address and the message serial number with the message ID, the receiving end address and the message serial number in the message to be sent, and determining that the message to be sent is received under the condition of consistent comparison.
In some embodiments, the data to be sent is stored in a data buffer; the resending of the message to be sent includes: calling a sending function to read data to be sent from the data buffer area, and encapsulating the data to be sent into a message to be sent by adopting the SUDP again and sending the message; discarding data to be sent includes: the data to be transmitted is deleted from the data buffer.
In some embodiments, the method further comprises: adopting the SUDP to package the heartbeat message; and sending the heartbeat message to a server at preset time intervals.
In some embodiments, determining the communication protocol based on at least one of a type of data to be transmitted and a type of the receiving end comprises: determining that a communication protocol is UDP or SUDP under the condition that data to be transmitted comprises broadcast data and a receiving end is a server; or, under the condition that the data to be transmitted comprises broadcast data and the receiving end is a communication device of other vehicles, determining that the communication protocol is UDP; or, under the condition that the receiving end is a communication device of other vehicles, determining that the communication protocol is UDP; or, determining that the communication protocol is TCP when the data amount of the data to be transmitted is greater than the preset data amount and the receiving end is the server.
In some embodiments, determining the communication protocol based on at least one of a type of data to be transmitted and a type of the receiving end comprises: when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a first time delay grade, determining that a communication protocol is TCP; determining that the communication protocol is UDP under the condition that the reliability requirement of the data to be sent is a second reliability grade and the time delay requirement is a second time delay grade; when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a second time delay grade, determining that the communication protocol is the SUDP; the first reliability grade is higher than the reliability corresponding to the second reliability grade, and the second time delay grade is lower than the time delay corresponding to the first time delay grade.
In some embodiments, the method further comprises: receiving a message sent by a sending end; determining a communication protocol for encapsulating the message according to a receiving port of the message; and decapsulating the message according to the communication protocol of the encapsulated message, and acquiring data in the message.
According to still other embodiments of the present disclosure, there is provided a communication device, wherein the communication device is provided on a vehicle, including: the determining module is used for determining a communication protocol and a sending port according to at least one of the type of data to be sent and the type of a receiving end; the message generating module is used for packaging data to be sent according to the determined communication protocol and generating a message to be sent; the sending module is used for sending the message to be sent to the receiving end through the determined sending port; wherein, the type of the receiving end includes: at least one of a communication device and a server of the other vehicle.
In some embodiments, the message generating module is configured to package data to be transmitted by using a preset beacon frame structure to generate beacon data when the data to be transmitted includes broadcast data; the beacon data is used as a data part of a message to be sent, and the data to be sent is packaged according to a determined communication protocol; wherein, presetting the beacon frame structure includes: a first field corresponding to the timestamp, a second field corresponding to the IP address of the communication device of the vehicle, a third field corresponding to the information of the vehicle, and a fourth field corresponding to the broadcast data.
In some embodiments, the broadcast data includes operating state information of the vehicle, the operating state information of the vehicle including: at least one of the geographic position, speed, course, load, oil mass and fault information of the vehicle; the information of the vehicle includes: at least one of type, identification, size of the vehicle.
In some embodiments, the communication protocol comprises: a transmission control protocol TCP, a user datagram protocol UDP, a super user datagram protocol SUDP; the message generation module is used for determining the message serial number of the data to be sent under the condition that the determined communication protocol is the SUDP; and adding a message serial number and a message ID on the basis of the UDP message header, and packaging the data to be sent as a data part of the message.
In some embodiments, the sending module is configured to identify a message sequence number of a message to be sent; and sending the message to be sent to a receiving end through the determined sending end port according to the sequence of the message serial numbers.
In some embodiments, the apparatus further comprises: the receiving module is used for receiving a response message sent by a receiving terminal after sending a message to be sent through a determined sending port under the condition that the determined communication protocol is the SUDP; and analyzing the response message to determine that the message to be sent is received.
In some embodiments, the apparatus further comprises: the receiving module is used for starting a retransmission timer after a message to be sent is sent out through a determined sending port under the condition that the determined communication protocol is the SUDP; under the condition that the retransmission timer is stopped, determining whether a response message of a receiving end is received; under the condition of receiving the response message, analyzing the response message to determine that the message to be sent is received; determining whether a preset retransmission frequency is reached or not under the condition that the response message is not received; under the condition that the preset retransmission times are not reached, triggering a sending module to resend the message to be sent, and restarting a retransmission timer; and under the condition that the preset retransmission times are reached, discarding the data to be sent.
In some embodiments, the response message is encapsulated by the SUDP, and the header of the response message includes: message ID, receiving end IP address and message sequence number; acquiring a message ID and a message sequence number from a message received by a receiving end; the receiving module is used for analyzing the response message to acquire a message ID, a receiving end IP address and a message serial number; and comparing the acquired message ID, the receiving end IP address and the message serial number with the message ID, the receiving end address and the message serial number in the message to be sent, and determining that the message to be sent is received under the condition of consistent comparison.
In some embodiments, the sending module is configured to call a sending function to read data to be sent from the data buffer, and package the data to be sent into a message to be sent by using the SUDP again and send the message; the data to be transmitted is deleted from the data buffer.
In some embodiments, the message generating module is further configured to encapsulate the heartbeat message with a SUDP; the sending module is further configured to send the heartbeat message to the server at preset intervals.
In some embodiments, the determining module is configured to determine that the communication protocol is UDP or SUDP when the data to be sent includes broadcast data and the receiving end is a server; or, under the condition that the data to be transmitted comprises broadcast data and the receiving end is a communication device of other vehicles, determining that the communication protocol is UDP; or, under the condition that the receiving end is a communication device of other vehicles, determining that the communication protocol is UDP; or, determining that the communication protocol is TCP when the data amount of the data to be transmitted is greater than the preset data amount and the receiving end is the server.
In some embodiments, the determining module is configured to determine that the communication protocol is TCP when the reliability requirement of the data to be sent is a first reliability level and the delay requirement is a first delay level; determining that the communication protocol is UDP under the condition that the reliability requirement of the data to be sent is a second reliability grade and the time delay requirement is a second time delay grade; when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a second time delay grade, determining that the communication protocol is the SUDP; the first reliability grade is higher than the reliability corresponding to the second reliability grade, and the second time delay grade is lower than the time delay corresponding to the first time delay grade.
In some embodiments, the receiving module is further configured to receive a message sent by a sending end; determining a communication protocol for encapsulating the message according to a receiving port of the message; and decapsulating the message according to the communication protocol of the encapsulated message, and acquiring data in the message.
According to still other embodiments of the present disclosure, there is provided a communication apparatus including: a processor; and a memory coupled to the processor for storing instructions that, when executed by the processor, cause the processor to perform a method of communication as in any of the preceding embodiments.
According to still further embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the steps of any of the foregoing embodiment communication methods.
According to still further embodiments of the present disclosure, there is provided a communication system including: the communication device of any of the preceding embodiments; and a server for receiving the message sent by the communication device; determining a communication protocol for encapsulating the message according to a receiving port of the message; and decapsulating the message according to the communication protocol of the encapsulated message, and acquiring data in the message.
In some embodiments, the server is configured to determine a communication protocol and a sending port according to a type of data to be sent; packaging data to be transmitted according to the determined communication protocol to generate a message to be transmitted; sending a message to be sent to a communication device through a determined sending port; the communication protocol comprises: transmission control protocol TCP, user datagram protocol UDP, super user datagram protocol SUDP.
In some embodiments, when the reliability requirement of the data to be sent is a first reliability level and the delay requirement is a first delay level, determining that the communication protocol is TCP; determining that the communication protocol is UDP under the condition that the reliability requirement of the data to be sent is a second reliability grade and the time delay requirement is a second time delay grade; when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a second time delay grade, determining that the communication protocol is the SUDP; the first reliability grade is higher than the reliability corresponding to the second reliability grade, and the second time delay grade is lower than the time delay corresponding to the first time delay grade.
The vehicle is provided with a communication device, and a communication protocol and a sending port are determined according to at least one of the type of data to be sent and the type of a receiving end; and packaging the data to be transmitted by adopting a determined communication protocol to obtain a message to be transmitted and transmitting the message to be transmitted through a determined transmitting port. The method is suitable for the unmanned transport system of the surface mine, and the communication device of the vehicle can transmit by adopting different protocols and ports according to different receiving ends and different types of data to be transmitted, so that the communication efficiency is improved, and the whole unmanned transport system of the surface mine can normally and efficiently operate.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 illustrates a flow diagram of a communication method of some embodiments of the present disclosure.
Fig. 2 shows a schematic diagram of a Beacon frame structure of some embodiments of the present disclosure.
Fig. 3 shows a flow diagram of a communication method of further embodiments of the present disclosure.
Fig. 4 shows a flow diagram of a communication method of further embodiments of the present disclosure.
Fig. 5 illustrates an architectural schematic of a communication system of some embodiments of the present disclosure.
Fig. 6 illustrates a schematic structural diagram of a communication device of some embodiments of the present disclosure.
Fig. 7 shows a schematic structural diagram of a communication device of further embodiments of the present disclosure.
Fig. 8 shows a schematic structural diagram of a communication device according to further embodiments of the present disclosure.
Fig. 9 illustrates a structural schematic diagram of a communication system of some embodiments of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the 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 derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The present disclosure proposes a communication method, which is described below in conjunction with fig. 1.
Fig. 1 is a flow chart of some embodiments of the disclosed communication method. As shown in fig. 1, the method of this embodiment includes: steps S102 to S106 may be executed by a communication device of the vehicle, which may be provided in a control system of the vehicle, or may be a mobile terminal (e.g., a mobile phone or a tablet computer) detachably mounted on the vehicle, and the like, but are not limited to these examples.
In step S102, a communication protocol and a transmission port are determined according to at least one of a type of data to be transmitted and a type of a receiving end.
Communication protocols include, for example: TCP (Transmission Control Protocol), UDP (User Datagram Protocol), and SUDP (Super User Datagram Protocol). SUDP is a communication protocol that is improved over UDP in the present disclosure. The SUDP adds a mechanism for improving transmission reliability on the basis of retaining the UDP mechanism, and can improve reliability on the basis of ensuring low-delay transmission, which will be described in detail later. TCP belongs to a connection-oriented protocol, UDP and SUDP belong to a connectionless-oriented protocol. The communication protocol library file including the above various protocols can be set in a client system of a communication device of a vehicle, and by calling a functional interface of the communication protocol library file, messages of different protocols can be packaged and sent to other vehicles or servers, and messages of different protocols sent by other vehicles or servers can be received and analyzed.
In some embodiments, the correspondence between at least one of the type of the data to be transmitted and the type of the receiving end and the communication protocol and the transmitting port is preset, that is, at least one of the type of the data to be transmitted and the type of the receiving end, which are respectively corresponding to TCP, UDP, and SUDP, may be respectively set, so as to determine the communication protocol and the transmitting port according to the correspondence. The type of data to be transmitted may be determined according to the service type, for example, the type of data to be transmitted may be divided into broadcast data such as running state information of a vehicle, request data of remote upgrade data, request data of map data, alarm or fault data, response data of vehicle control data (e.g., approach, departure, and emergency stop), and the like, and is not limited to the illustrated examples. Different services generate different data to be sent corresponding to different communication protocols. Further, the communication protocols corresponding to different receiving terminals may be different, for example, the types of data to be sent are the same, and the communication protocols are different in the case that the receiving terminals are servers and communication devices of other vehicles. The communication protocol and the transmission port may be determined in conjunction with both the type of data to be transmitted and the type of the receiving end.
For example, when the data to be transmitted includes broadcast data and the receiving end is a server, it is determined that the communication protocol is UDP or SUDP; or, in the case where the data to be transmitted includes broadcast data and the receiving end is a communication device of another vehicle, it is determined that the communication protocol is UDP. The broadcast data may include the operating state information of the vehicle, and when the receiving end is a server, the requirement for the reliability of the transmission of the broadcast data is higher, and SUDP transmission may be adopted. Alternatively, when the data to be transmitted includes failure information or alarm information, etc., SUDP transmission may be employed. The failure information or the alarm information may be included in the broadcast data, and the vehicle control data or the like that the server interacts with the control device of the vehicle may employ SUDP.
Alternatively, when the receiving side is a communication device of another vehicle, the communication protocol is determined to be UDP. The communication between vehicles is mainly broadcast data, UDP protocol can be adopted, and the transmission delay is lower. Or, determining that the communication protocol is TCP when the data amount of the data to be transmitted is greater than the preset data amount and the receiving end is the server. In general, the amount of uplink data transmitted from the vehicle communication device is less than the preset amount of data, and the amount of downlink data transmitted from the server to the vehicle communication device is more than the preset amount of data, for example, transmission of data having a large amount of data such as remote upgrade, map data, and update settings. Therefore, when the data amount of the data transmitted from the server to the communication device of the vehicle is larger than the preset data amount, the communication protocol is determined to be TCP. And the data to be sent is request information of data with the data volume larger than the preset data volume, and the communication protocol is determined to be TCP.
Based on the characteristics of different communication protocols, the types of data to be sent corresponding to the different communication protocols can be set. TCP has the characteristics of high reliability, suitability for mass data transmission and high time delay. UDP has the characteristics of low latency, but low reliability. The SUDP has the characteristics of low time delay, high reliability and suitability for small amount of data transmission. Thus, the type of data to be transmitted may be determined according to at least one of the data volume, the reliability requirements and the latency requirements of the data to be transmitted. For example, different reliability levels and delay levels may be divided, and a preset data amount may be configured to distinguish different types of data to be sent, which is not limited to the illustrated example.
In some embodiments, when the reliability requirement of the data to be sent is a first reliability level and the delay requirement is a first delay level, determining that the communication protocol is TCP; determining that the communication protocol is UDP under the condition that the reliability requirement of the data to be sent is a second reliability grade and the time delay requirement is a second time delay grade; when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a second time delay grade, determining that the communication protocol is the SUDP; the first reliability grade is higher than the reliability corresponding to the second reliability grade, and the second time delay grade is lower than the time delay corresponding to the first time delay grade.
For example, the reliability requirements of the request data of the remote upgrade data, the request data of the map data, the update set request data, and the like are a first reliability level, and the delay requirement is a first delay level; the reliability requirements of the running state information, the fault or alarm information of the vehicle, the response data of the vehicle control data and the like sent to the server are a first reliability grade, and the time delay requirement is a second time delay grade; the reliability requirement of the vehicle operation state information and the like transmitted to the communication device of the other vehicle is a second reliability level, and the delay requirement is a second delay level.
In the actual application process, the corresponding relationship between the type of the data to be transmitted and the type of the receiving end and the communication protocol may be configured according to the characteristics of different protocols, and is not limited to the illustrated example. The communication protocol and the transmission port may be set in a one-to-one correspondence manner.
In step S104, the data to be transmitted is encapsulated according to the determined communication protocol, and a message to be transmitted is generated.
The encapsulation method of TCP and UDP belongs to the prior art, and is not described herein again. In some embodiments, in the case that the determined communication protocol is SUDP, determining a message sequence number of data to be sent; and adding a message serial number and a message ID on the basis of the UDP message header, and packaging the data to be sent as a data part of the message. The sequence numbers of the data to be sent can be determined in sequence. The message sequence number may also be used by a subsequent receiving end to determine whether to receive and reply to the reply message, as will be described in detail later.
The message ID is used to uniquely identify a piece of data to be sent, for example, the message ID occupies 4 bytes, the message sequence number occupies 4 bytes, for example, and the UDP-based protocol header may further include a source address, a destination address, a length, a check value, and the like. The data to be transmitted is used as the data part of the message to be transmitted.
The SUDP can also have function expansibility, the SUDP data frame structure supports data bodies of any types and any lengths to add an SUDP message header, the data bodies are transmitted through an SUDP communication channel, the SUDP is independent of the type and the length of data to be transmitted, and the data to be transmitted only needs to be changed when a new function is added, so that the universality and the expansibility of a protocol are realized.
The present disclosure also provides a Beacon (Beacon) broadcast protocol, which is used to encapsulate data to be sent, and the encapsulated data to be sent is used as a data part in a message to be sent. The Beacon broadcast protocol is a communication function protocol which is realized based on UDP and SUDP protocols and can periodically broadcast vehicle real-time data and receive real-time data broadcast by other equipment according to a specified communication data frame structure.
In some embodiments, when the data to be transmitted includes broadcast data, encapsulating the data to be transmitted by using a preset beacon frame structure to generate beacon data; the beacon data is used as a data part of a message to be sent, and the data to be sent is packaged according to a determined communication protocol; the preset beacon frame structure includes: a first field corresponding to the timestamp, a second field corresponding to the IP address of the communication device of the vehicle, a third field corresponding to the information of the vehicle, and a fourth field corresponding to the broadcast data.
The broadcast data includes, for example, running state information of the vehicle including: at least one of the geographic position, speed, course, load, oil mass and fault information of the vehicle; the information of the vehicle includes, for example: at least one of type, identification, size of the vehicle. As shown in fig. 2, the preset Beacon frame structure includes a time stamp (time), an IP address (IP) of a communication device of the vehicle, information (Machine _ Info) of the vehicle, and running state information (states) of the vehicle. The Beacon frame structure may include information required by each receiver, wherein the operation state information of the vehicle may include data attributes that may be generated by all types of vehicles. The receiving end receives the information needed by itself.
The Beacon broadcast protocol is suitable for low-delay, flexible and extensible data transmission. Meanwhile, two communication protocols of UDP and SUDP can be combined, wherein UDP can be used for V2V (Vehicle-To-Vehicle) communication, the running state information of the Vehicle is broadcasted To surrounding vehicles in real time, and the running state information of other vehicles is received and analyzed. The SUDP may be used for V2S (Vehicle To Server) communication, and report the Vehicle operating status information To the Server in real time. The Beacon frame structure may be used for both UDP and SUDP data transmission.
After the vehicle is powered on, the broadcasting service can automatically run, after the IP address is obtained, the vehicle running state information is encapsulated by adopting a Beacon frame structure, and after the information is encapsulated into a message by adopting UDP (user Datagram protocol) or SUDP (Sudpad), the broadcasting is started, and a corresponding port is opened to receive the broadcasting data of other equipment.
In step S106, the message to be sent is sent to the receiving end through the determined sending port.
In some embodiments, a message sequence number of a message to be sent is identified; and sending the message to be sent to a receiving end through the determined sending end port according to the sequence of the message serial numbers. And a sequential sending mechanism is added on the basis of UDP (user datagram protocol) in the SUDP, so that the data sequentiality is ensured.
In the method of the embodiment, a communication device is arranged on a vehicle, and a communication protocol and a sending port are determined according to at least one of the type of data to be sent and the type of a receiving end; and packaging the data to be transmitted by adopting a determined communication protocol to obtain a message to be transmitted and transmitting the message to be transmitted through a determined transmitting port. The method of the embodiment is suitable for the unmanned transport system of the surface mine, and the communication device of the vehicle can transmit the data by adopting different protocols and ports according to different receiving ends and different types of the data to be transmitted, so that the communication efficiency is improved, and the whole unmanned transport system of the surface mine can normally and efficiently operate.
The SUDP protocol of the present disclosure improves the header of the packet in addition to being based on the UDP protocol. And a mechanism for sending the response message under the condition that the receiving end receives the SUDP message is added, so that the reliability of data transmission is ensured. In some embodiments, when the determined communication protocol is SUDP, after sending a message to be sent through the determined sending port, receiving a response message sent by a receiving end; and analyzing the response message to determine that the message to be sent is received.
Further, the SUDP may also add a timeout retransmission based on UDP to guarantee the reachability of data, which is described below with reference to fig. 3.
Fig. 3 is a flow chart of further embodiments of the communication method of the present disclosure. As shown in fig. 3, the method of this embodiment includes: step S302 to step S308.
In step S302, when the determined communication protocol is SUDP, after the message to be sent is sent through the determined sending port, a retransmission timer is started.
In step S304, in the case where the retransmission timer is stopped, it is determined whether or not a response message of the receiving end is received. If so, step S305 is performed, otherwise step S306 is performed.
In step S305, the reply message is parsed to determine that the message to be sent has been received.
In some embodiments, the response message is encapsulated by the SUDP, and the header of the response message includes: message ID, receiving end IP address and message sequence number; and the message ID and the message sequence number are obtained from the message received by the receiving end. Namely, after receiving the message, the receiving end extracts the message ID and the message serial number from the message to generate a response message. The communication device of the vehicle is used as a sending end to analyze the response message to acquire a message ID, a receiving end IP address and a message serial number; and comparing the acquired message ID, the receiving end IP address and the message serial number with the message ID, the receiving end address and the message serial number in the message to be sent, and determining that the message to be sent is received under the condition of consistent comparison.
In step S306, it is determined whether a preset number of retransmissions is reached, and if so, step S307 is performed, otherwise step S308 is performed.
In step S307, the data to be transmitted is discarded.
In step S308, the message to be sent is retransmitted, and the retransmission timer is restarted. Return to step S304 to resume execution.
In some embodiments, the data to be transmitted may be buffered in a data buffer, and if a response message is received, the data to be transmitted is deleted from the data buffer. If the message to be sent needs to be sent again, calling a sending function to read data to be sent from the data buffer area, and encapsulating the data to be sent into the message to be sent by adopting the SUDP again and sending the message; and deleting the data to be transmitted from the data buffer area under the condition that the preset retransmission times are reached.
In some embodiments, the SUDP further adds a heartbeat mechanism on the basis of UDP, and sends heartbeat packet data to the server system at a certain frequency by establishing a heartbeat thread, so as to monitor whether the communication of the vehicle is normal. For example, a heartbeat message is encapsulated by using a SUDP; and sending the heartbeat message to a server at preset time intervals. When the heartbeat packet fails to be sent, a connection state feedback program is automatically triggered, and alarm information of the vehicle disconnection is reported. The alarm information may be encapsulated and then transmitted by the SUDP as in the previous embodiment.
The above embodiments describe how the communication device of the vehicle transmits data to be transmitted, and how the communication device of the vehicle receives messages transmitted by the communication devices or servers of other vehicles is described below with reference to fig. 4.
Fig. 4 is a flow chart of still other embodiments of the communication methods of the present disclosure. As shown in fig. 4, the method of this embodiment includes: step S402 to step S406.
In step S402, a message sent by a sending end is received.
In step S404, a communication protocol for encapsulating the packet is determined according to the receiving port of the packet.
Since different communication protocols correspond to different receiving ports, the communication protocol can be determined according to the receiving port.
In step S406, the packet is decapsulated according to the communication protocol of the encapsulated packet, and the data in the packet is obtained.
The data structure based on various communication protocols can perform corresponding analysis on the message to obtain the data carried therein, which is not described herein any more
The above embodiments describe how the communication device of the vehicle transmits and receives messages, and similar to the communication device of the vehicle, the server may encapsulate data sent by the server to the communication device of the vehicle by using different protocols such as TCP, UDP, and SUDP. For example, the server determines a communication protocol and a sending port according to the type of data to be sent; packaging data to be transmitted according to the determined communication protocol to generate a message to be transmitted; and sending the message to be sent to a communication device of the vehicle through the determined sending port. Since the server mainly transmits a message to the communication device of the vehicle, the server only needs to determine the communication protocol and the transmission port according to the type of the transmission data.
For example, when the reliability requirement of the data to be sent is a first reliability level and the delay requirement is a first delay level, determining that the communication protocol is TCP; determining that the communication protocol is UDP under the condition that the reliability requirement of the data to be sent is a second reliability grade and the time delay requirement is a second time delay grade; when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a second time delay grade, determining that the communication protocol is the SUDP; the first reliability grade is higher than the reliability corresponding to the second reliability grade, and the second time delay grade is lower than the time delay corresponding to the first time delay grade.
For example, data with high reliability requirements, large data volume but low latency requirements may be packaged according to TCP, for example, remote upgrade data, map data, update settings, and the like. Data with higher reliability requirements and higher delay requirements (i.e., lower delay) may be packaged according to the SUDP, for example, response data of vehicle control data (e.g., approach, departure, and sudden stop), and the like.
The process of sending data to be sent by the server according to the SUDP is similar to that of a communication device of a vehicle, including a response mechanism, a retransmission mechanism, an improvement of a message header, and the like, and is not described herein again.
The disclosure provides a communication method suitable for an unmanned transportation system of a surface mine, which comprises a selection and design method of a plurality of communication protocols. The various communication protocols include TCP, UDP, SUDP, Beacon broadcast protocol. And selecting different communication protocols according to different requirements of different services on data interaction real-time performance, reliability, sequence performance and the like. The data transmission service with low delay, high reliability and higher importance uses the SUDP communication protocol; the broadcast data transmission service with low delay and low reliability requirement uses UDP communication protocol; the data transmission service with large data volume, low requirement on time delay and high requirement on reliability uses a TCP communication protocol; the low-delay, flexible and expandable data transmission service uses Beacon broadcast protocol. On the basis of a UDP mode, message response confirmation is added to the SUDP, and the reliability of data transmission is ensured; an overtime retransmission and sequence sending mechanism is added to ensure the accessibility and the sequence of the data; and a heartbeat mechanism is added, and heartbeat packet data is sent to a server system at a certain frequency by establishing a heartbeat thread so as to monitor whether the communication of the vehicle is normal. The Beacon broadcast protocol provides two communication protocols of UDP and SUDP aiming at different communication objects and unifies the data frame structure. The communication protocols can be packaged into a library form to be installed and deployed on a communication device of a server or a vehicle for being called by each application program.
The whole communication system comprises a plurality of communication devices of vehicles and a server, and mainly realizes data interaction of V2V, V2S and V2X (Vehicle to event). A client system may be deployed on the communications device side of the vehicle and a server system may be deployed on the server side. The client system comprises a functional interface capable of calling the communication protocol library file, and can encapsulate and send messages of different protocols to other vehicles or servers, and receive and analyze messages of different protocols sent by other vehicles or servers. The service end system comprises a functional interface capable of calling a communication protocol library file, receives and analyzes TCP, UDP and SUDP messages sent by the communication device of the vehicle, packages and sends the TCP, UDP and SUDP messages to the communication device of the remote vehicle.
As shown in fig. 5, the client system may establish communication channels of various communication protocols, encode and decode data, and transmit and receive data. Specifically, the program may include a V2C program, a V2V program, and a V2S program. The server may contain a V2S program.
The V2C communication program runs on a single thread and acquires messages of a lower-layer system through a data interface of a lower-layer control system program of the vehicle; and data transmission is carried out with a lower layer system in a mode of writing data to a lower layer data interface. For example, the ROS (robot system) nodes subscribe the operating state information of the vehicle, collect the operating state information of the vehicle through various sensors of the vehicle, and then send the operating state information to the V2C communication program, and the V2C communication program receives the operating state information of the vehicle sent by the ROS of the vehicle, and can transmit the operating state information to the V2V program and the V2S program through corresponding sending interfaces.
The V2V communication program encodes the messages of the lower layer system acquired by the V2C program according to the Beacon frame format, and broadcasts the messages to the communication devices of other vehicles through the UDP communication channel, and meanwhile, acquires the data broadcasted by other vehicles, decodes and stores the data for application by other programs.
The V2S communication program encodes the messages of the lower layer system acquired by the V2C program according to the Beacon frame format, and can send the messages to the server through the SUDP or UDP communication channel, and at the same time, receive the data sent by the server, decode and store the data.
The V2S communication program of the server side can package the control command of the vehicle into a SUDP message and send the SUDP message to the vehicle; packaging the upgrading data, the map data and the like into TCP messages and sending the TCP messages to the vehicle; and receiving data reported by the vehicle, wherein the data comprises an SUDP message, Beacon broadcast data and the like. Data interaction is carried out through a unified communication protocol and a data frame format, so that vehicles can be added or reduced at will without influencing the communication function of the original system.
The corresponding programs and services of the operating vehicles and the servers in the unmanned transport system of the open mine are normally powered on and started, and after the unmanned transport system is formally operated, message messages are packaged among the systems through a communication service program according to a predefined data frame structure to carry out data interaction. The system and the method solve the requirements of real-time performance, reliability, stability and expandability of vehicle-to-vehicle communication and vehicle-to-server communication, and realize efficient and timely collection, analysis, processing and storage of mass data by the unmanned transportation system. The high-efficiency, stable and reliable operation of the unmanned transportation system of the surface mine is ensured, and the unmanned transportation system of the mine is applied to the ground as soon as possible.
The communication network may include, but is not limited to, WIFI, 4G, 5G communication networks. By taking a WIFI MESH (wireless MESH network) as an example, the positions of roadside wireless nodes of the open-pit mine can be reasonably distributed, and corresponding MESH routing roadside node equipment is installed. For example, the highest point of the surface mine is searched, MESH routing center node equipment is installed, MESH mobile node equipment is installed on all mine operation vehicles and service vehicles, and a wireless MESH network capable of covering the whole surface mine is formed together.
The present disclosure also provides a communication device, described below in conjunction with fig. 6.
Fig. 6 is a block diagram of some embodiments of a communication device of the present disclosure. As shown in fig. 6, the apparatus 60 of this embodiment may be provided on a vehicle, including: a determining module 610, a message generating module 620 and a sending module 630.
The determining module 610 is configured to determine a communication protocol and a transmitting port according to at least one of a type of data to be transmitted and a type of a receiving end.
In some embodiments, the determining module 610 is configured to determine that the communication protocol is UDP or SUDP when the data to be sent includes broadcast data and the receiving end is a server; or, under the condition that the data to be transmitted comprises broadcast data and the receiving end is a communication device of other vehicles, determining that the communication protocol is UDP; or, under the condition that the receiving end is a communication device of other vehicles, determining that the communication protocol is UDP; or, determining that the communication protocol is TCP when the data amount of the data to be transmitted is greater than the preset data amount and the receiving end is the server.
In some embodiments, the determining module 610 is configured to determine that the communication protocol is TCP when the reliability requirement of the data to be sent is a first reliability level and the delay requirement is a first delay level; determining that the communication protocol is UDP under the condition that the reliability requirement of the data to be sent is a second reliability grade and the time delay requirement is a second time delay grade; when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a second time delay grade, determining that the communication protocol is the SUDP; the first reliability grade is higher than the reliability corresponding to the second reliability grade, and the second time delay grade is lower than the time delay corresponding to the first time delay grade.
The message generating module 620 is configured to encapsulate data to be sent according to the determined communication protocol, and generate a message to be sent.
In some embodiments, the message generating module 620 is configured to, when the data to be sent includes broadcast data, package the data to be sent by using a preset beacon frame structure, and generate beacon data; the beacon data is used as a data part of a message to be sent, and the data to be sent is packaged according to a determined communication protocol; wherein, presetting the beacon frame structure includes: a first field corresponding to the timestamp, a second field corresponding to the IP address of the communication device of the vehicle, a third field corresponding to the information of the vehicle, and a fourth field corresponding to the broadcast data.
In some embodiments, the broadcast data includes operating state information of the vehicle, the operating state information of the vehicle including: at least one of the geographic position, speed, course, load, oil mass and fault information of the vehicle; the information of the vehicle includes: at least one of type, identification, size of the vehicle.
In some embodiments, the communication protocol comprises: a transmission control protocol TCP, a user datagram protocol UDP, a super user datagram protocol SUDP; the message generating module 620 is configured to determine a message sequence number of data to be sent when the determined communication protocol is SUDP; and adding a message serial number and a message ID on the basis of the UDP message header, and packaging the data to be sent as a data part of the message.
In some embodiments, the message generating module 620 is further configured to encapsulate the heartbeat message with the SUDP; the sending module is further configured to send the heartbeat message to the server at preset intervals.
The sending module 630 is configured to send a message to be sent to a receiving end through a determined sending port; wherein, the type of the receiving end includes: at least one of a communication device and a server of the other vehicle.
In some embodiments, the sending module 630 is configured to identify a message sequence number of a message to be sent; and sending the message to be sent to a receiving end through the determined sending end port according to the sequence of the message serial numbers.
In some embodiments, the apparatus 60 further comprises: a receiving module 640, configured to receive a response message sent by a receiving end after sending a message to be sent through a determined sending port when the determined communication protocol is SUDP; and analyzing the response message to determine that the message to be sent is received.
In some embodiments, the receiving module 640 is configured to, when the determined communication protocol is the SUDP, start a retransmission timer after sending a message to be sent through the determined sending port; under the condition that the retransmission timer is stopped, determining whether a response message of a receiving end is received; under the condition of receiving the response message, analyzing the response message to determine that the message to be sent is received; determining whether a preset retransmission frequency is reached or not under the condition that the response message is not received; under the condition that the preset retransmission times are not reached, triggering a sending module to resend the message to be sent, and restarting a retransmission timer; and under the condition that the preset retransmission times are reached, discarding the data to be sent.
In some embodiments, the response message is encapsulated by the SUDP, and the header of the response message includes: message ID, receiving end IP address and message sequence number; acquiring a message ID and a message sequence number from a message received by a receiving end; the receiving module 640 is configured to parse the response message to obtain a message ID, a receiving end IP address, and a message sequence number; and comparing the acquired message ID, the receiving end IP address and the message serial number with the message ID, the receiving end address and the message serial number in the message to be sent, and determining that the message to be sent is received under the condition of consistent comparison.
In some embodiments, the sending module 630 is configured to call a sending function to read data to be sent from the data buffer, package the data to be sent into a message to be sent by using the SUDP again, and send the message; the data to be transmitted is deleted from the data buffer.
In some embodiments, the receiving module 640 is further configured to receive a message sent by a sending end; determining a communication protocol for encapsulating the message according to a receiving port of the message; and decapsulating the message according to the communication protocol of the encapsulated message, and acquiring data in the message.
The communication apparatus in the embodiments of the present disclosure may be implemented by various computing devices or computer systems, which are described below in conjunction with fig. 7 and 8.
Fig. 7 is a block diagram of some embodiments of a communication device of the present disclosure. As shown in fig. 7, the apparatus 70 of this embodiment includes: a memory 710 and a processor 720 coupled to the memory 710, the processor 720 configured to perform a communication method in any of the embodiments of the present disclosure based on instructions stored in the memory 710.
Memory 710 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), a database, and other programs.
Fig. 8 is a block diagram of further embodiments of the communication device of the present disclosure. As shown in fig. 8, the apparatus 80 of this embodiment includes: memory 810 and processor 820 are similar to memory 710 and processor 720, respectively. An input output interface 830, a network interface 840, a storage interface 850, and the like may also be included. These interfaces 830, 840, 850 and the memory 810 and the processor 820 may be connected, for example, by a bus 860. The input/output interface 830 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 840 provides a connection interface for various networked devices, such as a database server or a cloud storage server. The storage interface 850 provides a connection interface for external storage devices such as an SD card and a usb disk.
The present disclosure also provides a communication system, described below in conjunction with fig. 9.
Fig. 9 is a block diagram of some embodiments of the communication system of the present disclosure. As shown in fig. 9, the system 9 of this embodiment includes: the communication device 60/70/80 of any of the preceding embodiments; and a server 92.
The server 92 is configured to receive a message sent by the communication device 60/70/80; determining a communication protocol for encapsulating the message according to a receiving port of the message; and decapsulating the message according to the communication protocol of the encapsulated message, and acquiring data in the message.
In some embodiments, the server 92 is configured to determine a communication protocol and a transmission port according to a type of data to be transmitted; packaging data to be transmitted according to the determined communication protocol to generate a message to be transmitted; sending the message to be sent to the communication device 60/70/80 through the determined sending port; the communication protocol comprises: transmission control protocol TCP, user datagram protocol UDP, super user datagram protocol SUDP.
In some embodiments, when the reliability requirement of the data to be sent is a first reliability level and the delay requirement is a first delay level, determining that the communication protocol is TCP; determining that the communication protocol is UDP under the condition that the reliability requirement of the data to be sent is a second reliability grade and the time delay requirement is a second time delay grade; when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a second time delay grade, determining that the communication protocol is the SUDP; the first reliability grade is higher than the reliability corresponding to the second reliability grade, and the second time delay grade is lower than the time delay corresponding to the first time delay grade.
The server 92 may be implemented by various computing devices or computer systems, and may be implemented in the same or similar manner as the communication device 70/80 in the previous embodiment, and will not be described in detail herein.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 above description is only exemplary of the present disclosure and is not intended to limit the present disclosure, so that any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (25)

1. A communication method, wherein the communication method is performed by a communication device of a vehicle, comprising:
determining a communication protocol and a sending port according to at least one of the type of data to be sent and the type of a receiving end;
packaging the data to be sent according to the determined communication protocol to generate a message to be sent;
sending the message to be sent to the receiving end through the determined sending end port;
wherein the type of the receiving end comprises: at least one of a communication device and a server of the other vehicle.
2. The communication method according to claim 1, wherein the encapsulating the data to be transmitted according to the determined communication protocol comprises:
under the condition that the data to be sent comprises broadcast data, packaging the data to be sent by adopting a preset beacon frame structure to generate beacon data;
the beacon data is used as a data part of a message to be sent, and the data to be sent is packaged according to a determined communication protocol;
wherein the preset beacon frame structure comprises: a first field corresponding to a timestamp, a second field corresponding to an IP address of a communication device of the vehicle, a third field corresponding to information of the vehicle, and a fourth field corresponding to the broadcast data.
3. The communication method according to claim 2,
the broadcast data includes running state information of a vehicle, the running state information of the vehicle including: at least one of the geographic position, the speed, the course, the load, the oil mass and the fault information of the vehicle;
the information of the vehicle includes: at least one of a type, an identification, and a size of the vehicle.
4. The communication method of claim 1, wherein the communication protocol comprises: a transmission control protocol TCP, a user datagram protocol UDP, a super user datagram protocol SUDP;
the encapsulating the data to be transmitted according to the determined communication protocol includes:
under the condition that the determined communication protocol is the SUDP, determining a message sequence number of the data to be sent;
and increasing the message serial number and the message ID on the basis of the UDP message header, and packaging the data to be sent as the data part of the message.
5. The communication method according to claim 4, wherein the sending the message to be sent to a receiving end through the determined sending port comprises:
identifying the message serial number of the message to be sent;
and sending the message to be sent to a receiving end through a determined sending end port according to the sequence of the message serial numbers.
6. The communication method of claim 4, further comprising:
under the condition that the determined communication protocol is the SUDP, after the message to be sent is sent out through the determined sending port, receiving a response message sent by the receiving end;
and analyzing the response message to determine that the message to be sent is received.
7. The communication method of claim 4, further comprising:
under the condition that the determined communication protocol is the SUDP, after the message to be sent is sent out through the determined sending port, a retransmission timer is started;
under the condition that the retransmission timer is stopped, determining whether a response message of the receiving end is received;
under the condition of receiving the response message, analyzing the response message to determine that the message to be sent is received;
determining whether a preset retransmission number is reached or not under the condition that the response message is not received;
under the condition that the preset retransmission times are not reached, the message to be sent is retransmitted, and the retransmission timer is restarted;
and under the condition that the preset retransmission times are reached, discarding the data to be sent.
8. The communication method according to claim 6 or 7,
the response message is encapsulated by the SUDP, and a message header of the response message includes: a message ID, the receiving end IP address and a message sequence number; the message ID and the message sequence number are obtained from the message received by the receiving end;
the analyzing the response message to determine that the message to be sent has been received includes:
analyzing the response message to obtain a message ID, the IP address of the receiving end and a message serial number;
and comparing the acquired message ID, the receiving end IP address and the message serial number with the message ID, the receiving end address and the message serial number in the message to be sent, and determining that the message to be sent is received under the condition of consistent comparison.
9. The communication method according to claim 7, wherein the data to be transmitted is stored in a data buffer;
the resending the message to be sent comprises:
calling a sending function to read the data to be sent from the data buffer area, and encapsulating the data to be sent into a message to be sent by adopting the SUDP again and sending the message;
the discarding the data to be sent includes:
and deleting the data to be transmitted from the data buffer.
10. The communication method of claim 4, further comprising:
packaging the heartbeat message by adopting the SUDP;
and sending the heartbeat message to a server at preset intervals.
11. The communication method according to claim 4, wherein the determining a communication protocol according to at least one of a type of data to be transmitted and a type of a receiving end comprises:
determining that a communication protocol is UDP or SUDP under the condition that the data to be sent comprises broadcast data and the receiving end is a server;
or, determining that the communication protocol is UDP under the condition that the data to be transmitted includes broadcast data and the receiving end is a communication device of another vehicle;
or, under the condition that the receiving end is a communication device of other vehicles, determining that the communication protocol is UDP;
or, determining that the communication protocol is TCP when the data amount of the data to be transmitted is greater than a preset data amount and the receiving end is a server.
12. The communication method according to claim 1, wherein the determining a communication protocol according to at least one of a type of data to be transmitted and a type of a receiving end comprises:
when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a first time delay grade, determining that a communication protocol is TCP;
determining that the communication protocol is UDP under the condition that the reliability requirement of the data to be sent is a second reliability grade and the time delay requirement is a second time delay grade;
when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a second time delay grade, determining that a communication protocol is a SUDP;
and the first reliability grade is higher than the reliability corresponding to the second reliability grade, and the second time delay grade is lower than the time delay corresponding to the first time delay grade.
13. The communication method of claim 1, further comprising:
receiving a message sent by a sending end;
determining a communication protocol for packaging the message according to the receiving port of the message;
and decapsulating the message according to the communication protocol encapsulating the message, and acquiring data in the message.
14. A communication device, wherein the communication device is provided on a vehicle, comprising:
the determining module is used for determining a communication protocol and a sending port according to at least one of the type of data to be sent and the type of a receiving end;
the message generation module is used for packaging the data to be sent according to the determined communication protocol to generate a message to be sent;
the sending module is used for sending the message to be sent to the receiving end through the determined sending port;
wherein the type of the receiving end comprises: at least one of a communication device and a server of the other vehicle.
15. The communication device of claim 14,
the message generation module is used for packaging the data to be sent by adopting a preset beacon frame structure to generate beacon data under the condition that the data to be sent comprises broadcast data; the beacon data is used as a data part of a message to be sent, and the data to be sent is packaged according to a determined communication protocol;
wherein the preset beacon frame structure comprises: a first field corresponding to a timestamp, a second field corresponding to an IP address of a communication device of the vehicle, a third field corresponding to information of the vehicle, and a fourth field corresponding to the broadcast data.
16. The communication device of claim 14, wherein the communication protocol comprises: a transmission control protocol TCP, a user datagram protocol UDP, a super user datagram protocol SUDP;
the message generation module is used for determining the message serial number of the data to be sent under the condition that the determined communication protocol is the SUDP; and increasing the message serial number and the message ID on the basis of the UDP message header, and packaging the data to be sent as the data part of the message.
17. The communications apparatus of claim 16, further comprising:
the receiving module is used for starting a retransmission timer after the message to be sent is sent out through the determined sending port under the condition that the determined communication protocol is the SUDP; under the condition that the retransmission timer is stopped, determining whether a response message of the receiving end is received; under the condition of receiving the response message, analyzing the response message to determine that the message to be sent is received; determining whether a preset retransmission number is reached or not under the condition that the response message is not received; under the condition that the preset retransmission times are not reached, triggering the sending module to resend the message to be sent, and restarting the retransmission timer; and under the condition that the preset retransmission times are reached, discarding the data to be sent.
18. The communication device of claim 17,
the response message is encapsulated by the SUDP, and a message header of the response message includes: a message ID, the receiving end IP address and a message sequence number; the message ID and the message sequence number are obtained from the message received by the receiving end;
the receiving module is used for analyzing the response message to acquire a message ID, the IP address of the receiving end and a message serial number; and comparing the acquired message ID, the receiving end IP address and the message serial number with the message ID, the receiving end address and the message serial number in the message to be sent, and determining that the message to be sent is received under the condition of consistent comparison.
19. The communication device of claim 16,
the message generation module is further configured to encapsulate the heartbeat message with the SUDP;
the sending module is further configured to send the heartbeat message to a server every preset time.
20. The communication device of claim 14,
the receiving module is also used for receiving the message sent by the sending end; determining a communication protocol for packaging the message according to the receiving port of the message; and decapsulating the message according to the communication protocol encapsulating the message, and acquiring data in the message.
21. A communication device, comprising:
a processor; and
a memory coupled to the processor for storing instructions that, when executed by the processor, cause the processor to perform the communication method of any of claims 1-13.
22. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the steps of the method of any one of claims 1-13.
23. A communication system, comprising: the communication device of any one of claims 14-21; and
the server is used for receiving the message sent by the communication device; determining a communication protocol for packaging the message according to the receiving port of the message; and decapsulating the message according to the communication protocol encapsulating the message, and acquiring data in the message.
24. The communication system of claim 23,
the server is used for determining a communication protocol and a sending port according to the type of data to be sent; packaging the data to be sent according to the determined communication protocol to generate a message to be sent; sending the message to be sent to the communication device through the determined sending port;
the communication protocol comprises: transmission control protocol TCP, user datagram protocol UDP, super user datagram protocol SUDP.
25. The communication system of claim 24,
when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a first time delay grade, determining that a communication protocol is TCP;
determining that the communication protocol is UDP under the condition that the reliability requirement of the data to be sent is a second reliability grade and the time delay requirement is a second time delay grade;
when the reliability requirement of the data to be sent is a first reliability grade and the time delay requirement is a second time delay grade, determining that a communication protocol is a SUDP;
and the first reliability grade is higher than the reliability corresponding to the second reliability grade, and the second time delay grade is lower than the time delay corresponding to the first time delay grade.
CN202010423417.4A 2020-05-19 2020-05-19 Communication method, apparatus, system, and computer-readable storage medium Active CN111601285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010423417.4A CN111601285B (en) 2020-05-19 2020-05-19 Communication method, apparatus, system, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010423417.4A CN111601285B (en) 2020-05-19 2020-05-19 Communication method, apparatus, system, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN111601285A true CN111601285A (en) 2020-08-28
CN111601285B CN111601285B (en) 2023-02-10

Family

ID=72191524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010423417.4A Active CN111601285B (en) 2020-05-19 2020-05-19 Communication method, apparatus, system, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111601285B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383619A (en) * 2020-11-13 2021-02-19 广联达科技股份有限公司 Data transmission method, system and electronic equipment
CN114567416A (en) * 2022-04-06 2022-05-31 西安羚控电子科技有限公司 TCP-based data transmission verification-free method and system
CN116388910A (en) * 2023-04-21 2023-07-04 广东保伦电子股份有限公司 Broadcasting system interaction method, terminal, electronic equipment and storage medium
CN116520815A (en) * 2023-07-03 2023-08-01 合众新能源汽车股份有限公司 Remote diagnosis method, device, computer equipment and storage medium
WO2024000214A1 (en) * 2022-06-29 2024-01-04 华为技术有限公司 Communication method in vehicle and related apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105519049A (en) * 2013-05-28 2016-04-20 华为技术有限公司 Message transmission method, device and system
CN109218261A (en) * 2017-07-03 2019-01-15 腾讯科技(深圳)有限公司 A kind of data processing method and data processing equipment
CN109302372A (en) * 2017-07-24 2019-02-01 华为技术有限公司 A kind of communication means, equipment and storage medium
CN110868336A (en) * 2019-11-11 2020-03-06 北京明略软件系统有限公司 Data management method, device and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105519049A (en) * 2013-05-28 2016-04-20 华为技术有限公司 Message transmission method, device and system
CN109218261A (en) * 2017-07-03 2019-01-15 腾讯科技(深圳)有限公司 A kind of data processing method and data processing equipment
CN109302372A (en) * 2017-07-24 2019-02-01 华为技术有限公司 A kind of communication means, equipment and storage medium
CN110868336A (en) * 2019-11-11 2020-03-06 北京明略软件系统有限公司 Data management method, device and computer readable storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383619A (en) * 2020-11-13 2021-02-19 广联达科技股份有限公司 Data transmission method, system and electronic equipment
CN112383619B (en) * 2020-11-13 2024-05-17 广联达科技股份有限公司 Data transmission method, system and electronic equipment
CN114567416A (en) * 2022-04-06 2022-05-31 西安羚控电子科技有限公司 TCP-based data transmission verification-free method and system
CN114567416B (en) * 2022-04-06 2024-06-07 西安羚控电子科技有限公司 TCP-based data transmission verification-free method and system
WO2024000214A1 (en) * 2022-06-29 2024-01-04 华为技术有限公司 Communication method in vehicle and related apparatus
CN116388910A (en) * 2023-04-21 2023-07-04 广东保伦电子股份有限公司 Broadcasting system interaction method, terminal, electronic equipment and storage medium
CN116388910B (en) * 2023-04-21 2024-05-14 广东保伦电子股份有限公司 Broadcasting system interaction method, terminal, electronic equipment and storage medium
CN116520815A (en) * 2023-07-03 2023-08-01 合众新能源汽车股份有限公司 Remote diagnosis method, device, computer equipment and storage medium
CN116520815B (en) * 2023-07-03 2023-10-17 合众新能源汽车股份有限公司 Remote diagnosis method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111601285B (en) 2023-02-10

Similar Documents

Publication Publication Date Title
CN111601285B (en) Communication method, apparatus, system, and computer-readable storage medium
CN112769938B (en) Kubernets cloud side communication system and method based on QUIC
US11032739B2 (en) Dynamic header compression for constrained networks
EP3043530B1 (en) Method and apparatus for implementing subscription notification
CN111050361B (en) Message transmission method, device and system
CN110381467B (en) Internet of vehicles emergency communication method, device and system
CA2921075C (en) System, method and apparatus for transmitting electrical quantity data based on beidou satellite communication
CN110471692B (en) Over-the-air upgrading method, device, equipment and storage medium of terminal program
CN111683404A (en) Positioning control method and device for terminal of Internet of things and electronic equipment
CN103002049A (en) Network transmission system of large quantities of data
CN111435947A (en) Electronic message control
CN105100100A (en) UDP transmission method and system suitable for distributed network
EP3672189B1 (en) Data transmission method, device and system
US10645184B2 (en) Information transmission method, gateway, and controller
CN113396600B (en) Information verification method, device, equipment and storage medium
CN101888343B (en) Service data transmission method and system
EP2477437B1 (en) Method and device for operating and managing memory
CN114915555B (en) Gateway drive communication method, device, equipment and storage medium
Li et al. Efficient oneM2M protocol conversion platform based on NB-IoT access
CN114143729B (en) Apparatus, method and computer readable storage medium for data transceiving with IoT devices
CN109600837B (en) System information generation method and device
KR20140121716A (en) Method and Apparatus for Push service provided using the integration of the mobile device operating system conversion
CN114827188B (en) Platform equipment management method, system, terminal and storage medium
CN114070806B (en) Unmanned aerial vehicle system based on variable message format data chain and communication method
WO2023056812A1 (en) Data processing method and device, and computer readable storage medium

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