Data transmission method, electronic device, storage medium and program product
By using data transmission methods carrying identification and cyclic codes in the Internet of Vehicles, the risk of packet loss caused by network instability is solved, efficient and reliable data transmission is achieved, and the order and integrity of the data are ensured.
Patent Information
- Application Number
- CN202510143277.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-02-10
AI Technical Summary
In the Internet of Vehicles, there is a risk of packet loss when the network is unstable, and it is difficult for the existing technology to achieve efficient and reliable data transmission.
By sending real-time data carrying the first identifier and the loop code to the server on the vehicle end, and resending the blind spot data carrying the second identifier after the network is restored until the response from the server is received, the data is ensured in sequence and retransmission.
It significantly enhances the reliability of data transmission, avoids data loss and repeated transmission, and ensures real-time and completeness of data.
Smart Images

Figure CN119628800B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a data transmission method, electronic equipment, storage medium and program product. Background Art
[0002] In the Internet of Vehicles, Internet of Vehicles devices and servers use a send / reply mechanism to ensure complete information exchange. When a communication link fails, such as due to arrears in traffic or unstable signals, Internet of Vehicles devices rely on retransmission strategies to ensure data delivery. The server needs to reorganize the data in the order in which the data is actually sent to construct a correct historical trajectory. Blind spot data refers to location information that was not uploaded to the server in time due to network failure. The blind spot data will be temporarily stored on the vehicle side and retransmitted after communication is restored. Network interruption is determined by the protocol reply mechanism, that is, if the vehicle side does not receive a reply on time, it is deemed to be an interruption. In related technologies, although data can be transmitted and retransmitted in real time, there is a risk of packet loss when the network is unstable. Therefore, a more efficient and reliable data transmission method is needed. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a data transmission method, an electronic device, a storage medium and a program product to achieve the technical effect of efficient and reliable data transmission.
[0004] A first aspect of an embodiment of the present application provides a data transmission method, which is applied to a vehicle end; the vehicle end is communicatively connected with a service end; the method comprises:
[0005] Sending real-time data carrying a first identifier and a cyclic code to the server, wherein the first identifier is used to indicate the real-time type; the cyclic code is used to characterize the data sending order, and the real-time data is generated by the vehicle according to the current vehicle position; the real-time data is used to instruct the server to insert the real-time data into the end of the driving trajectory sequence sorted according to the cyclic code based on the first identifier;
[0006] Updating the first identifier in the real-time data to a second identifier, and obtaining blind area data carrying the second identifier; the second identifier is used to indicate the blind area type;
[0007] If the first response from the server to the real-time data is not received, the vehicle sends the blind spot data to the server when the communication connection between the vehicle and the server is restored until a second response from the server to the blind spot data is received; the blind spot data is used to instruct the server to insert the blind spot data into the target position of the driving trajectory sequence based on the second identifier and the cyclic code; the first response and the second response carry the cyclic code.
[0008] In the above implementation process, the vehicle sends real-time data to the server, and these data carry a first identifier indicating its real-time nature and a cyclic code reflecting the order of transmission. After the real-time data is sent, the vehicle will change the identifier of the data from the first identifier to the second identifier. If the server fails to respond to the real-time data, the vehicle will resend the blind spot data carrying the second identifier after the communication with the server is restored until the server responds to the blind spot data. By ensuring the sequential transmission of data and the retransmission of unresponsive data, the reliability of data transmission is significantly enhanced.
[0009] Further, after obtaining the blind area data carrying the second identifier, the method further includes:
[0010] storing the blind area data;
[0011] If the first response is received, the stored blind area data is deleted.
[0012] In the above implementation process, the real-time data sent out is stored as blind data, and the data is deleted when a response to the data is received, which effectively avoids repeated data transmission and ensures that data will not be lost in the event of a network interruption, further enhancing the reliability of data transmission.
[0013] Furthermore, the method further comprises:
[0014] When the vehicle side and the server side restore the communication connection, within the same time window, in response to the arrival of the first sending cycle, the blind spot data is sent to the server side, and in response to the arrival of the second sending cycle, the real-time data generated in real time is sent to the server side.
[0015] In the above implementation process, real-time data and blind spot data are sent at different frequencies in the same period, ensuring that both blind spot data and real-time data can be processed and sent in a timely manner, thereby ensuring the real-time and integrity of the data.
[0016] Furthermore, the first sending period is smaller than the second sending period.
[0017] In the above implementation process, considering the need to solve the data loss problem caused by the previous communication interruption as soon as possible, the blind area data will be sent more frequently than the real-time data.
[0018] A second aspect of an embodiment of the present application provides a data transmission method, which is applied to a server; the server is connected to a vehicle for communication; the method includes:
[0019] Receiving a data packet sent by the vehicle end;
[0020] If the data packet carries a first identifier, the data packet is determined to be real-time data, and the real-time data is inserted into the end of the driving trajectory sequence sorted according to the cyclic code; wherein the first identifier is used to indicate the real-time type; the real-time data is generated by the vehicle end according to the current vehicle position;
[0021] If the data packet carries a second identifier, the data packet is determined to be blind area data, and the blind area data is inserted into the target position of the driving trajectory sequence based on the cyclic code carried by the blind area data, wherein the second identifier is used to indicate the blind area type; the blind area data is data that has failed to be transmitted from the vehicle end to the server end in the past; and the cyclic code is used to characterize the order in which data is sent;
[0022] A response carrying the cyclic code is sent to the vehicle end.
[0023] In the above implementation process, the server can identify the type of data packet sent by the vehicle (real-time or blind zone), and select the data insertion method according to the data packet type. For real-time data, the insertion method is selected to directly insert the data into the end of the sequence, and for blind zone data, the method is selected to determine the target position of the blind zone data after traversing the sequence according to the cyclic code carried by the blind zone data. At the same time, the server ensures that the vehicle can confirm the successful reception and processing of the data by sending a response carrying the cyclic code, thus forming an efficient, closed-loop data transmission system.
[0024] Furthermore, the data packet is constructed and transmitted according to a preset protocol, and the format of the preset protocol includes a packet header, an identifier, a cyclic code, a data body, and a packet tail.
[0025] In the above implementation process, the data packet is constructed according to a preset protocol including an identification bit and a cyclic code. This protocol design greatly facilitates the server to parse and process the data when receiving it, so that the server can quickly and accurately identify the data type and determine its sending order.
[0026] Furthermore, the server stores the locations of multiple logistics sites; the driving trajectory sequence includes multiple positioning positions generated when the vehicle travels between the multiple logistics sites; the method also includes:
[0027] For each of the positioning positions in the driving trajectory sequence, when the current positioning position is the same as the position of any logistics site among the multiple logistics sites, and the number of target positioning positions associated with the current positioning position in the driving trajectory sequence meets a preset number condition, the current positioning position is determined to be the starting position; wherein the target positioning position is adjacent to the current positioning position and is the same as the position of the current logistics site;
[0028] One or more vehicle driving trajectories are generated according to each starting point position in the driving trajectory sequence.
[0029] In the above implementation process, by analyzing the driving trajectory sequence, the starting position of the vehicle between logistics sites is identified, and accurate driving trajectory segments are generated accordingly, which effectively improves the accuracy of logistics vehicle path tracking.
[0030] According to a third aspect of the present application, an electronic device is provided, the electronic device comprising:
[0031] processor;
[0032] a memory for storing processor-executable instructions;
[0033] Wherein, when the processor calls the executable instruction, any method described in the first aspect or the second aspect is implemented.
[0034] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed by a processor, the steps of any one of the methods described in the first aspect and the second aspect are implemented.
[0035] A fifth aspect of an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any one of the first and second aspects is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present application;
[0038] Figure 2 A flowchart of another data transmission method provided in an embodiment of the present application;
[0039] Figure 3 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0041] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0042] In the field of Internet of Vehicles, the communication between the device and the server follows a send / reply mechanism to ensure the integrity of information exchange. Under this mechanism, once a communication link fails, such as due to arrears of data, unstable signals, base station abnormalities, or server-side problems, the device needs to rely on a retransmission strategy to ensure that the data can be successfully delivered to the server after the communication is restored. When receiving this data, the server must ensure that it can be reorganized and applied according to the actual order in which the data was sent (rather than the actual reception time) to build an accurate historical trajectory record (such as a driving path with detailed coordinate information).
[0043] The so-called blind spot data refers to the data that cannot be successfully transmitted due to network failure (covering various situations such as traffic restrictions, signal loss, operator service interruption or server response problems) when the vehicle attempts to upload the heartbeat data containing location information to the server in real time. To ensure the integrity of the data, these data that cannot be uploaded immediately will be temporarily stored in the local memory of the vehicle and retransmitted to the server after the network communication is restored. Among them, the determination of network interruption depends on the protocol response mechanism, that is, after the vehicle sends each piece of data to the server, it is expected to receive the corresponding reply information. If the vehicle does not receive the expected reply within the preset time, it is regarded as a network interruption; on the contrary, once a reply to a piece of data is received, it indicates that the network status has been restored.
[0044] In the related art, the vehicle side transmits real-time data according to the Ministry Standard Location Information Protocol and retransmits blind spot data according to the Extended Transparent Transmission Protocol. In the event of a network interruption, newly generated heartbeat data that cannot be sent immediately will be cached in a preset memory. When the preset memory space is full, these data will be further saved to an external storage device. The vehicle side will continue to try to send the stored blind spot data to the server side through the extended transparent transmission protocol at preset time intervals until all data is successfully sent. However, using the Ministry Standard Location Information Protocol to transmit real-time data and the extended transparent transmission protocol to transmit blind spot data, it is impossible to clearly define the correspondence between the data transmitted and the response between the server side and the vehicle side, especially in scenarios where the network is unstable for a long time or frequently interrupted, resulting in a high risk of packet loss. Therefore, a more efficient and reliable data transmission method is urgently needed.
[0045] In response to any of the above-mentioned problems, the present application provides a data transmission method, referring to Figure 1 , Figure 1A flowchart of a data transmission method provided in an embodiment of the present application.
[0046] In this embodiment, the method is applied to a vehicle end; the vehicle end is connected to a service end for communication; the method includes:
[0047] Step S10: sending real-time data carrying a first identifier and a cyclic code to the server, wherein the first identifier is used to indicate the real-time type; the cyclic code is used to characterize the data transmission order, and the real-time data is generated by the vehicle according to the current vehicle position; the real-time data is used to instruct the server to insert the real-time data into the end of the driving trajectory sequence sorted according to the cyclic code based on the first identifier;
[0048] It should be noted that the vehicle side can be a vehicle, and the service side can be a cloud server.
[0049] The cyclic code is a digital index code that increases in sequence. It is generated by the vehicle end. The cyclic code of the first data after startup starts from 0. Whenever there is new data to be sent, the cyclic code increases by 1. When the cyclic code is added to the maximum value of the field, optionally, a double-byte cyclic code of 0~65535 is used, and the maximum value of the field is 65535. When the cyclic code reaches 65535, it returns to zero and accumulates again. When the vehicle end sends data with a cyclic code of n, the response of the server also uses the cyclic code n. At this time, the vehicle end can accurately determine which data is successfully received by the server based on the cyclic code carried in the response. In addition, when the server receives a blind area data with a cyclic code of m, it can use the cyclic code to traverse the sequence and correctly insert the blind area data into the existing sequence. For example, find the two data closest to m, mi, m+j, and after insertion, they are: mi, m, m+j. When the server receives real-time data, it does not need to use the cyclic code to traverse the sequence, but directly inserts it to the end of the value sequence.
[0050] The vehicle generates real-time data based on the current location information. The real-time data includes the current location of the vehicle and may also include the vehicle's speed, direction, etc.
[0051] A first identifier is added to the real-time data, which is used to indicate that the type of this data is real-time data. At the same time, a cyclic code is added to the real-time data to characterize the sending order of this data. The cyclic code is used to ensure that the server can integrate the data into the driving trajectory sequence according to the order in which the data is sent.
[0052] The vehicle sends real-time data carrying the first identifier and the cyclic code to the server. After receiving the real-time data, the server identifies it as real-time data based on the first identifier, thereby directly inserting the real-time data into the end of the driving trajectory sequence without judging the cyclic code.
[0053] Step S20: updating the first identifier in the real-time data to a second identifier, and obtaining blind spot data carrying the second identifier; the second identifier is used to indicate the blind spot type;
[0054] It should be noted that real-time data is data that is successfully sent to the server for the first time after being generated, while blind-zone data is data that is sent to the server for the first time but fails after being generated. Therefore, blind-zone data can essentially be regarded as real-time data that was not successfully sent for the first time.
[0055] As an example, before sending the real-time data, the identifier it carries is 1. After sending the real-time data, its identifier is changed to 2 and stored in the preset memory. The vehicle stores the data that has been sent but has not received a response from the server to ensure that even if the communication is interrupted and the server does not receive the real-time data and respond, the data will not be lost and can be resent when the communication is restored.
[0056] Step S30: If the first response from the server to the real-time data is not received, then when the vehicle and the server restore the communication connection, the blind spot data is sent to the server until a second response from the server to the blind spot data is received; the blind spot data is used to instruct the server to insert the blind spot data into the target position of the driving trajectory sequence based on the second identifier and the cyclic code; the first response and the second response carry the cyclic code.
[0057] It should be noted that the blind spot identification bit (which can be the first identification bit or the second identification bit) and the cyclic code are independent of each other. The main function of the blind spot identification bit is to inform the server that this is a blind spot data, which needs to be correctly inserted into the sequence through the cyclic code, or to inform the server that this is a real-time data, which needs to be inserted at the end of the sequence. There is no situation where the cyclic code or blind spot identification bit cannot be received, because they are all part of the data protocol. The protocol as a whole has encryption verification. If the cyclic code or blind spot identification bit is abnormal, it means that there is a problem with the integrity of the entire data. At this time, the verification must not pass, the data will be discarded by the server and will not be replied to the vehicle end. The vehicle end will resend this data. Blind spot identification bits and cyclic codes are introduced in the heartbeat protocol body. The combination of the two can effectively avoid invalid traffic and ensure that the blind spot data is retransmitted completely. The server can restore the complete vehicle trajectory. The protocol and retransmission mechanism of adding cyclic codes and blind spot identification effectively ensure that the system can still accurately upload the complete data set under complex changes in network connection status, with only delays and no losses, and can encode invalid traffic consumption.
[0058] It is understandable that when the communication connection between the vehicle and the server is restored, the vehicle will start trying to send the previously stored blind spot data. Specifically, the vehicle can send the blind spot data to the server in the same time window according to a preset sending cycle or strategy. After receiving the data, the server will identify it as blind spot data according to the second identifier, thereby determining the sequence insertion method of the data, that is, inserting it into the appropriate position of the driving trajectory sequence according to the cyclic code. At the same time, the vehicle will wait for the response of the server. Once the response of the server to the blind spot data is received, the vehicle will know that the blind spot data has been successfully received and processed, so that the blind spot data can be deleted from the memory.
[0059] In this embodiment, by generating and sending real-time data on the vehicle side, the server side can obtain the driving information of the vehicle in real time, wherein a first identifier and a cyclic code are added to the real-time data, the identifier is used to clarify the type of data, and the cyclic code is used to clarify the order in which the data is sent. When the server side fails to respond to the real-time data, the vehicle side will update the real-time data to blind spot data and store it for subsequent retransmission. This approach effectively solves the problem of data loss caused by network interruption or non-response from the server side. After sending the blind spot data, once the server side receives a response to the blind spot data, the vehicle side will delete the blind spot data from the memory to free up storage space and avoid repeated data transmission.
[0060] Based on any of the above embodiments, after obtaining the blind area data carrying the second identifier, the method further includes:
[0061] storing the blind area data;
[0062] If the first response is received, the stored blind area data is deleted.
[0063] It should be noted that in the case of unstable network or delayed processing on the server side, the data sent by the vehicle side may not be received by the server side in time. Therefore, if the data is not stored, once the network is restored or the server side has completed processing, the vehicle side will not be able to resend the data, resulting in data loss. Specifically, a dedicated storage space is allocated locally on the vehicle side to store blind spot data.
[0064] When the vehicle receives the first response from the server for the blind spot data, it means that the data has been successfully received and processed by the server. At this point, the vehicle can delete the stored blind spot data. Specifically, after receiving the first response carrying the cyclic code, the vehicle can traverse the blind spot data in the storage space, find the data corresponding to the cyclic code and delete it, to avoid missed or multiple transmissions caused by mismatches between the data sent by the vehicle and the response of the server. Missed transmission will result in incomplete data, and multiple transmissions will increase traffic and make the server's processing logic more complicated.
[0065] In this embodiment, unnecessary resource occupation is avoided by deleting the blind area data that has been successfully sent.
[0066] Based on any of the above embodiments, the method further includes:
[0067] When the vehicle side and the server side restore the communication connection, within the same time window, in response to the arrival of the first sending cycle, the blind spot data is sent to the server side, and in response to the arrival of the second sending cycle, the real-time data generated in real time is sent to the server side.
[0068] It should be noted that to ensure the integrity and continuity of the data, after the communication connection is restored, the vehicle will not send all the blind area data first and then start sending the real-time data; similarly, it will not send all the real-time data first and then send the blind area data. Instead, the vehicle will send these two types of data alternately according to the sending cycle.
[0069] The time window can be infinite, and the alternating transmission of real-time data and blind zone data is an ongoing process, and is not limited to being completed within a specific period of time.
[0070] This embodiment does not limit the length of the first sending cycle and the second sending cycle, as well as the length relationship between them. For example, if the communication connection between the vehicle end and the server end is restored at 10 am. Prior to this, due to network failure, the vehicle end has accumulated a number of blind spot data that failed to upload successfully. In order to resend these blind spot data as soon as possible, the vehicle end sets a first sending cycle, for example, sending blind spot data every 5 seconds. In this way, starting from 10 am, the vehicle end will send the blind spot data stored in the memory space in sequence at intervals of every 5 seconds. At the same time, the vehicle end is still continuously generating real-time data. In order to ensure that the server end can receive these real-time data in real time, the vehicle end sets a second sending cycle, for example, sending real-time data every 1 second. This means that regardless of whether the blind spot data is being sent, the vehicle end will send the newly generated real-time data to the server end at intervals of every 1 second. Blind spot data and real-time data are sent in an alternating manner. After sending a piece of blind spot data, the vehicle end will respond to the arrival of the second sending cycle and send a piece of real-time data. Before the first sending cycle arrives, the vehicle end will send multiple pieces of real-time data again according to the second sending cycle. This alternating sending method ensures the integrity and continuity of the data. After receiving these data, the server end will distinguish the type of data according to the identifier carried by the data. Specifically, if the data carries the first identifier, it indicates that the data is real-time data, and if the data carries the second identifier, it indicates that the data is blind spot data. The role of the identifier is to help the server end quickly and accurately identify the type of data, so as to determine the subsequent insertion method. For different types of data, the server end will adopt different insertion strategies. For blind spot data, the server end needs to traverse the current driving trajectory sequence and locate the position where it should be inserted based on the cyclic code contained in the blind spot data (the cyclic code is determined according to the first sending order of the data). This step ensures that the blind spot data can be correctly integrated into the driving trajectory sequence according to its original sending order. For real-time data, since it represents the latest location information of the vehicle, the server does not need to traverse the entire driving trajectory sequence or refer to the loop code, and can directly add the real-time data to the end of the driving trajectory sequence. This processing method simplifies the insertion process.
[0071] In this embodiment, by sending the blind area data and the real-time data in an orderly manner within the same time window, the efficiency of data transmission is improved and the integrity of the data is ensured.
[0072] Based on any of the foregoing embodiments, the first sending period is smaller than the second sending period.
[0073] It is understandable that during the communication process between the vehicle and the server, due to various reasons such as network instability and server processing delay, the data sent by the vehicle may not be received and responded to in time by the server. These data are marked as blind spot data and stored on the vehicle waiting to be resent. At the same time, the vehicle is constantly generating new real-time data, which reflects the current position of the vehicle. By setting the first sending cycle to be less than the second sending cycle, it can be ensured that the blind spot data is resent in a shorter time, so as to fill the missing part in the sequence as soon as possible and maintain the integrity of the data. At the same time, although the real-time data has a longer sending cycle, it can still be received and processed by the server within a reasonable time interval because it reflects the current state of the vehicle, meeting the needs of real-time monitoring and scheduling. For example, considering the processing capacity of the server, in order not to put pressure on the server processing, the real-time data is sent every 3 seconds, the blind spot data is sent every 2 seconds, and only one piece of data is sent at a time.
[0074] In the specific implementation, when a reply to a certain data is received (regardless of which data was sent in the past, as long as the reply response sent by the server is received, it can be determined that the network communication has been restored), the retransmission mechanism is started, and the preset retransmission time interval (for example, 3 seconds, the retransmission time interval must be less than the normal heartbeat interval) is used to scan the preset memory, find the earliest blind area data and retransmit it, and after receiving the reply, the above process is repeated until all blind area data are sent. In summary, the blind area data is retransmitted to the server at regular intervals, there is no scenario with instantaneous large data volume, and there is no large requirement for communication bandwidth. When the amount of blind area data is large, it takes a long time to complete the retransmission.
[0075] In this embodiment, different sending cycles are set to process blind area data and real-time data, so that both the integrity and real-time performance of the data can be ensured.
[0076] The present application also provides another data transmission method. Figure 2 , Figure 2 A flowchart of another data transmission method provided in an embodiment of the present application.
[0077] In this embodiment, the method is applied to a server; the server is connected to a vehicle for communication; the method includes:
[0078] Step S40: receiving a data packet sent by the vehicle end;
[0079] It should be understood that the server receives data packets from the vehicle, and these data packets may contain real-time data and may also contain blind spot data.
[0080] Step S50: if the data packet carries a first identifier, the data packet is determined to be real-time data, and the real-time data is inserted into the end of the driving trajectory sequence sorted according to the cyclic code; wherein the first identifier is used to indicate the real-time type; the real-time data is generated by the vehicle end according to the current vehicle position;
[0081] It is understandable that if the data packet carries the first identifier, the server determines that the data packet is real-time data, and inserts the real-time data into the end of the driving trajectory sequence sorted according to the cyclic code.
[0082] Step S60: if the data packet carries a second identifier, the data packet is determined to be blind spot data, and the blind spot data is inserted into the target position of the driving trajectory sequence based on the cyclic code carried by the blind spot data, wherein the second identifier is used to indicate the blind spot type; the blind spot data is data that has failed to be transmitted from the vehicle end to the server end in the past; and the cyclic code is used to characterize the data transmission order;
[0083] It is understandable that if the data packet carries the second identifier, the server determines that the data packet is blind area data, and inserts it into the target position in the sequence based on the cyclic code carried by the blind area data. The cyclic code is used to ensure that the missing blind area data can be correctly completed to its original position. Since each data item in the sequence is accompanied by a cyclic code, the target position where the blind area data should be completed can be determined by comparing the cyclic code carried by the currently received blind area data with the cyclic codes of other data items in the sequence.
[0084] Step S70: Send a response carrying the cyclic code to the vehicle end.
[0085] In the specific implementation, after processing the data packet, the server needs to send a response carrying a cyclic code to the vehicle. This response is a confirmation of the data packet sent by the vehicle, and also informs the vehicle that the data packet has been successfully received and processed.
[0086] In this embodiment, the server can identify the type of data packet sent by the vehicle (real-time or blind area), and select the data insertion method according to the data packet type. For real-time data, the insertion method is selected to directly insert the data into the end of the sequence, and for blind area data, the method is selected to determine the target position of the blind area data after traversing the sequence according to the cyclic code carried by the blind area data. At the same time, the server ensures that the vehicle can confirm the successful reception and processing of the data by sending a response carrying the cyclic code, thereby forming an efficient, closed-loop data transmission system.
[0087] Based on any of the above embodiments, the data packet is constructed and transmitted according to a preset protocol, and the format of the preset protocol includes a packet header, an identifier, a cyclic code, a data body, and a packet trailer.
[0088] It should be noted that in the related art, the vehicle end and the service end complete a communication in accordance with the send / reply mechanism. The vehicle end usually transmits real-time data according to the departmental standard location information protocol and transmits blind spot data according to the extended transparent transmission protocol. The format of the extended transparent transmission protocol is: packet header (7E) + transparent transmission information ID (such as 0900) + [optional nested protocol data (such as location information protocol data, whose format is 7D02 + original location information packet header 7E + location information content + original location information packet tail 7E escape form, that is, 7D02 replaces 7E, 7D01 replaces 7D) +] other transparent transmission content + packet tail (7E). However, these two protocols have a common problem: the response sent by the service end to the vehicle end lacks a clear identification, making it difficult for the vehicle end to accurately determine which specific data the response is for. This uncertainty greatly increases the risk of data loss because the vehicle end may be confused when receiving and processing the response. In order to effectively solve this problem, this embodiment proposes a private location information protocol (i.e., the preset protocol), which introduces a blind spot identifier and a cyclic code. Specifically, a cyclic code is introduced in the protocol body to match the sending and replying protocols. At the same time, a blind spot identifier is introduced to replace the original extended transparent transmission protocol. The blind spot identifier is used to clearly distinguish between real-time data and blind spot data, ensuring that the server can accurately identify the type of data packet. As a unique encoding method, the cyclic code can generate a unique identifier for each data packet. This identifier not only helps the server to sort the data packets, but also allows the vehicle to efficiently identify which specific data packet the response is for when receiving the response. By transmitting real-time data and blind spot data through this private location information protocol that introduces blind spot identifiers and cyclic codes, the vehicle can more accurately track the transmission status of the data packet, thereby greatly reducing the risk of data loss.
[0089] It should be understood that the packet header is located at the beginning of the data packet and is used to control the transmission of data. It contains metadata of the data packet, such as version information, length of the data packet, checksum, etc. This information helps the receiver to correctly parse and process the data packet.
[0090] The identifier is used to distinguish the type of data packet. Specifically, different identifiers are set to distinguish real-time data from blind area data.
[0091] Cyclic code is a code used to sort and uniquely identify data packets. It is determined based on the order in which the data packets are sent. The use of cyclic codes ensures the orderliness and uniqueness of the data packets, making it easier for the receiver to sort the data packets.
[0092] The data body is the core part of the data packet, which contains the actual transmitted data, including the location information content indicated by real-time data or blind area data.
[0093] The packet trailer is located at the end of the data packet and is used to mark the end of the data packet. It can contain some additional checksum information to ensure the integrity of the data packet.
[0094] Of course, the format of the preset protocol may include other parts besides the packet header, identifier, cyclic code, data body, and packet tail, and this embodiment does not limit this.
[0095] In this embodiment, the data packet is constructed according to a preset protocol including an identification bit and a cyclic code. This protocol design greatly facilitates the server to parse and process the data when receiving it, so that the server can quickly and accurately identify the data type and determine its sending order.
[0096] Based on any of the above embodiments, the server stores the locations of multiple logistics sites; the driving trajectory sequence includes multiple positioning positions generated by the vehicle during driving between the multiple logistics sites; the method also includes:
[0097] For each of the positioning positions in the driving trajectory sequence, when the current positioning position is the same as the position of any logistics site among the multiple logistics sites, and the number of target positioning positions associated with the current positioning position in the driving trajectory sequence meets a preset number condition, the current positioning position is determined to be the starting position; wherein the target positioning position is adjacent to the current positioning position and is the same as the position of the current logistics site;
[0098] One or more vehicle driving trajectories are generated according to each starting point position in the driving trajectory sequence.
[0099] It should be noted that the blind spot data and real-time data are transmitted through the protocol newly defined in the above embodiment that introduces identification and cyclic codes, ensuring that these data can be correctly integrated into the driving trajectory sequence, and obtaining an accurate driving trajectory sequence without data omissions that includes multiple positioning positions recorded when the vehicle travels between multiple logistics sites. It is known that the omission of any data in the driving trajectory sequence may cause the service end to misjudge that the vehicle’s stay time at a certain logistics site is insufficient, and then mistakenly exclude the possibility of it as the starting point of the route, ultimately affecting the accuracy of the generated vehicle driving trajectory. Therefore, through the data transmission and integration method proposed in the above embodiment, a complete driving trajectory sequence can be obtained, and then based on this sequence, an accurate vehicle driving trajectory can be generated using the method of this embodiment.
[0100] It should be understood that in the relevant technology, the tracking of vehicle transportation trajectories is often limited to the historical data records of vehicle travel. If the specific driving route is to be further determined, it is usually necessary to integrate with the customer's logistics and distribution system. However, this approach faces two major challenges. First, not all customers have the conditions for integration with the transportation system. Second, delivery orders in the logistics and distribution system often have problems such as temporary order changes and insufficient order timeliness. These problems make it difficult to restore route information through the logistics and distribution system. To solve the above problems, this embodiment proposes a method that does not rely on a third-party logistics and distribution system, aiming to form real and effective segmented route data. In this embodiment, the vehicle is taken as a logistics transportation vehicle for example. First, the real-time data and blind spot data sent by the vehicle end are used to determine the multiple positioning positions generated by the vehicle during driving, and these positioning positions constitute the vehicle's driving trajectory sequence. Next, each positioning position in the driving trajectory sequence is analyzed. When a certain positioning position matches any pre-stored logistics site position, and the target positioning position adjacent to the positioning position and also located at the logistics site meets the preset conditions, the positioning position is determined to be the starting point of the vehicle's driving route, wherein the driving trajectory sequence may include one or more vehicle driving routes, which means that the driving trajectory sequence may include one or more route starting points. Then, the determined one or more starting points are used as segment starting points, and the driving trajectory is divided into one or more segments, and the number of driving trajectory segments is related to the number of starting points. In this way, even without the support of a third-party logistics distribution system, real and effective segmented route information can be restored based on the vehicle's driving data.
[0101] It is understandable that in some cases, a vehicle will have multiple positioning positions in a logistics site, so there will be one or more target positioning positions in the driving trajectory sequence. A single positioning position may not be accurate enough due to factors such as errors and signal interference. However, if there are multiple adjacent and identically located target positioning positions, the possibility that they point to the same logistics site is greatly increased. Determining the target positioning position helps reduce misjudgments and improves the accuracy of starting point identification. This embodiment does not limit the preset quantity conditions.
[0102] In this embodiment, the identification of the vehicle starting position and the generation of the driving trajectory are achieved through the logistics site locations and the vehicle driving trajectory sequence stored on the server.
[0103] Based on the method described in any of the above embodiments, the present application also provides Figure 3 A schematic diagram of the structure of an electronic device is shown in FIG. Figure 3At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the methods described in the first to fifth embodiments or the methods described in the sixth to seventh embodiments.
[0104] Based on the method described in any of the above embodiments, the present application also provides a computer storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute the method described in any of the above embodiments.
[0105] Based on the method described in any of the above embodiments, the present application also provides a computer program product, which includes one or more computer programs or instructions. The computer program or instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0106] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0107] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0108] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0109] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0110] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0111] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A data transmission method, characterized in that: The method is applied to a vehicle end; the vehicle end is communicatively connected with a service end; The server stores the locations of multiple logistics sites; the method includes: Sending real-time data carrying a first identifier and a cyclic code to the server, wherein the first identifier is used to indicate the real-time type; the cyclic code is used to characterize the data sending order, and the real-time data is generated by the vehicle end according to the current vehicle position; the real-time data is used to instruct the server end to insert the real-time data into the end of the driving trajectory sequence sorted according to the cyclic code based on the first identifier; the driving trajectory sequence includes multiple positioning positions generated by the vehicle during the driving process between multiple logistics sites; Updating the first identifier in the real-time data to a second identifier, and obtaining blind area data carrying the second identifier; the second identifier is used to indicate the blind area type; If the first response of the server to the real-time data is not received, the vehicle sends the blind area data to the server when the communication connection between the vehicle and the server is restored until the second response of the server to the blind area data is received; the blind area data is used to instruct the server to insert the blind area data into the target position of the driving trajectory sequence based on the second identifier and the cyclic code, so that the server determines the current positioning position as the starting position for each positioning position in the driving trajectory sequence, and generates one or more vehicle driving trajectories according to each starting position in the driving trajectory sequence when the current positioning position is the same as the position of any logistics site among the multiple logistics sites and the number of target positioning positions associated with the current positioning position in the driving trajectory sequence meets the preset number condition; wherein the target positioning position is adjacent to the current positioning position and is the same as the position of the current logistics site; the first response and the second response carry the cyclic code; the real-time data and the blind area data are both data packets constructed according to a preset protocol; the format of the preset protocol includes a packet header, an identifier, a cyclic code, a data body, and a packet tail.
2. The method according to claim 1, characterized in that After obtaining the blind area data carrying the second identifier, the method further includes: storing the blind area data; If the first response is received, the stored blind area data is deleted.
3. The method according to claim 1, characterized in that The method further comprises: When the vehicle side and the server side restore the communication connection, within the same time window, in response to the arrival of the first sending cycle, the blind spot data is sent to the server side, and in response to the arrival of the second sending cycle, the real-time data generated in real time is sent to the server side.
4. The method according to claim 3, characterized in that The first sending period is shorter than the second sending period.
5. A data transmission method, characterized in that: The method is applied to the server; The server stores the locations of multiple logistics sites; the server is in communication connection with the vehicle; the method includes: receiving a data packet sent by the vehicle end; the data packet is constructed and transmitted according to a preset protocol, and the format of the preset protocol includes a packet header, an identifier, a cyclic code, a data body, and a packet tail; If the data packet carries a first identifier, the data packet is determined to be real-time data, and the real-time data is inserted into the end of the driving trajectory sequence sorted according to the cyclic code; wherein the first identifier is used to indicate the real-time type; the real-time data is generated by the vehicle end according to the current vehicle position; the driving trajectory sequence includes multiple positioning positions generated by the vehicle during driving between multiple logistics sites; If the data packet carries a second identifier, the data packet is determined to be blind area data, and the blind area data is inserted into the target position of the driving trajectory sequence based on the cyclic code carried by the blind area data, wherein the second identifier is used to indicate the blind area type; the blind area data is data that has failed to be transmitted from the vehicle end to the server end in the past; and the cyclic code is used to characterize the order in which data is sent; A response carrying the cyclic code is sent to the vehicle end; and for each of the positioning positions in the driving trajectory sequence, when the current positioning position is the same as the position of any logistics site among the multiple logistics sites, and the number of target positioning positions associated with the current positioning position in the driving trajectory sequence meets a preset quantity condition, the current positioning position is determined to be the starting position; wherein the target positioning position is adjacent to the current positioning position and is the same as the position of the current logistics site; and one or more vehicle driving trajectories are generated according to each starting position in the driving trajectory sequence.
6. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, when the processor calls the executable instruction, the method described in any one of claims 1-4 or 5 is implemented.
7. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the steps of any method described in claims 1-5 are implemented.
8. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Track playback method and system and electronic equipment
CN113660612A
Communication method and device for multi-bus resource cooperation intelligent terminal in bus area
CN113873474A