L4 vehicle message front-end platform one-way real-time receiving method based on Server-Sent Events
By adopting Server-Sent Events-based method in the L4-level autonomous driving system, using the improved Gihonov regularization algorithm and stream compression algorithm, the vehicle messages are processed and the delay evaluation function is established, which solves the problem of inefficiency of the traditional polling method and realizes efficient and stable real-time transmission of vehicle messages.
Patent Information
- Application Number
- CN202411857550.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-28
AI Technical Summary
传统的轮询或长轮询方式在L4级别自动驾驶系统中用于车辆报文实时传输时,存在效率低下和资源消耗大的问题。
Using Server-Sent Events-based method, the improved Gihonnov regularization algorithm and stream compression algorithm are used to regularize and compress vehicle messages, and a data stream delay evaluation function is established to realize one-way real-time data push from the server to the client.
Reduces resource consumption caused by frequent connection establishment and closing, reduces network load, improves transmission efficiency, and achieves lightweight, efficient and stable data streaming.
Smart Images

Figure CN119729408A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of L4 vehicle message reception, and in particular to a method for one-way real-time reception of an L4 vehicle message front-end platform based on Server-SentEvents. Background Art
[0002] At present, with the rapid development of autonomous driving technology, L4 autonomous driving systems have gradually become a hot topic in research and application. In L4 autonomous driving systems, the front-end client needs to receive a large amount of message data in real time to ensure safe and efficient driving and the display of real-time information on the front-end page. Traditional polling or long polling methods have problems such as low efficiency and high resource consumption, so how to achieve real-time transmission of vehicle messages has become a key issue. Summary of the invention
[0003] In view of the above problems, the present invention provides a method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events, which can not only reduce the resource consumption caused by frequent establishment and closing of connections, but also realize the function of pushing data from the server to the client without the need for the client to initiate additional requests, thereby achieving the purpose of one-way communication, while reducing network load and improving transmission efficiency.
[0004] In order to achieve the above-mentioned purpose and other related purposes, the technical solution provided by the present invention is as follows:
[0005] A method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events, the method comprising:
[0006] U1. The autonomous driving vehicle is driving on the road, and the data information of the vehicle's message is obtained in real time. The data of the vehicle's message is time-stamped and divided into data streams of different time periods, and the data information of the data streams of the vehicle's message in different time periods is obtained;
[0007] U2. Based on the data information of the data stream of the vehicle's message in different time periods, the improved Tikhonov regularization algorithm is used to regularize the vehicle's message in different time periods to obtain the processed data information of the vehicle's message data stream in different time periods;
[0008] U3. Based on the data information of the data stream of the vehicle message in different time periods after the processing, the data stream of the vehicle message is compressed using an improved streaming compression algorithm to obtain the compressed data information of the vehicle message data stream;
[0009] U4. Based on the data information of the compressed vehicle message data stream, establish a vehicle message data stream delay evaluation function G, evaluate the receiving delay of the vehicle message data stream, and obtain data information of the delay evaluation of the vehicle message data stream.
[0010] Furthermore, in step U2, the regularization processing of vehicle messages in different time periods by using the improved Tikhonov regularization algorithm includes:
[0011] U21. Based on the data information of the data flow of the vehicle's message in different time periods, a matrix of the data flow of the vehicle's message in different time periods is constructed in time series to obtain the data information of the matrix of the vehicle's message data flow;
[0012] U22. Based on the data information of the matrix of the data flow of the vehicle's message, establish the Tikhonov regularization function Q of the vehicle's message,
[0013]
[0014] Wherein, x is the data information of the matrix of the data flow of the vehicle message, α1, α2 and α3 are the regularization factors of the data flow of the vehicle message;
[0015] U23. Based on the Tikhonov regularization function Q of the vehicle's message, regularization processing is performed on the vehicle's messages in different time periods to obtain data information of the data stream of the vehicle's messages in different time periods after processing.
[0016] Furthermore, the regularization factors α1, α2 and α3 of the data stream of the vehicle message are,
[0017]
[0018] Among them, x is the data information of the matrix of the data flow of the vehicle's message.
[0019] Furthermore, in step U3, the use of an improved stream compression algorithm to compress the data stream of the vehicle message includes:
[0020] U31. Based on the processed data information of the data stream of the vehicle's message in different time periods, establish a correlation function W of the vehicle's message in different time periods,
[0021]
[0022] Among them, y is the data information of the data flow of the vehicle messages in different time periods after processing, β1, β2 and β3 are the weight factors of the vehicle messages in different time periods, and the correlation of the vehicle messages in different time periods is characterized to obtain the data information of the correlation of the vehicle messages in different time periods;
[0023] U32. Based on the data information of the correlation of the vehicle's messages in different time periods, a compression function R of the data stream of the vehicle message is established,
[0024]
[0025] Wherein, z is the data information of the correlation of the messages of the vehicles in different time periods, and δ1, δ2 and δ3 are the compression factors of the data stream of the vehicle messages;
[0026] U33. Based on the compression function R of the data stream of the vehicle message, the data stream of the vehicle message is compressed to obtain data information of the compressed data stream of the vehicle message.
[0027] Furthermore, the constraint function f of the compression factors δ1, δ2 and δ3 of the data stream of the vehicle message is,
[0028]
[0029] The value range of the constraint function f is (0,1).
[0030] Furthermore, the constraints of the weight factors β1, β2 and β3 of the messages of vehicles in different time periods are:
[0031]
[0032] Furthermore, the method further comprises:
[0033] U5. Based on the data information of the delay evaluation of the data flow of the vehicle's message, a preset threshold is set. If the data information of the delay evaluation of the data flow of the vehicle's message is less than the preset threshold, the requirement is met. The platform receives the data flow of the vehicle's message in real time. If the data information of the delay evaluation of the data flow of the vehicle's message is greater than the preset threshold, the requirement is not met, and the platform returns to step U2.
[0034] Furthermore, the data flow delay evaluation function G of the vehicle's message is,
[0035]
[0036] Wherein, r is the data information of the compressed data flow of the vehicle message, and γ1, γ2 and γ3 are delay evaluation factors of the data flow of the vehicle message.
[0037] In order to achieve the above-mentioned purpose and other related purposes, the present invention also provides a system for one-way real-time reception of L4 vehicle message front-end platform based on Server-SentEvents, including a computer device, which is programmed or configured to execute any one of the steps of the method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events.
[0038] In order to achieve the above-mentioned purpose and other related purposes, the present invention also provides a computer-readable storage medium, which stores a computer program programmed or configured to execute any one of the methods for one-way real-time reception of L4 vehicle message front-end platforms based on Server-SentEvents.
[0039] The present invention has the following positive effects:
[0040] 1. The present invention uses an improved Tikhonov regularization algorithm to regularize vehicle messages in different time periods, and combines it with an improved streaming compression algorithm to compress the data stream of vehicle messages. This not only helps to reduce the load of the front-end platform and is suitable for real-time display of vehicle data, but also can realize the function of pushing data from the server to the client without the need for the client to initiate additional requests, thereby achieving the purpose of one-way communication, while reducing network load and improving transmission efficiency.
[0041] 2. The present invention evaluates the reception delay of the data stream of the vehicle's message by establishing a data stream delay evaluation function G of the vehicle's message. Not only does the server not need to process requests as frequently as under the polling mechanism, it can reduce resource consumption caused by frequent establishment and closing of connections, but also realizes lightweight, efficient and stable data stream transmission, ensuring that the front-end system can smoothly and reliably receive data from L4 autonomous driving vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0043] Figure 2 A schematic diagram of the flow chart of the improved Tikhonov regularization algorithm of the present invention;
[0044] Figure 3 It is a flowchart of the improved streaming compression algorithm of the present invention. DETAILED DESCRIPTION
[0045] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0046] Example 1: Figure 1 As shown, a method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events, the method comprising:
[0047] U1. The autonomous driving vehicle is driving on the road, and the data information of the vehicle's message is obtained in real time. The data of the vehicle's message is time-stamped and divided into data streams of different time periods, and the data information of the data streams of the vehicle's message in different time periods is obtained;
[0048] U2. Based on the data information of the data stream of the vehicle's message in different time periods, the improved Tikhonov regularization algorithm is used to regularize the vehicle's message in different time periods to obtain the processed data information of the vehicle's message data stream in different time periods;
[0049] U3. Based on the data information of the data stream of the vehicle message in different time periods after the processing, the data stream of the vehicle message is compressed using an improved streaming compression algorithm to obtain the compressed data information of the vehicle message data stream;
[0050] U4. Based on the data information of the compressed vehicle message data stream, establish a vehicle message data stream delay evaluation function G, evaluate the receiving delay of the vehicle message data stream, and obtain data information of the delay evaluation of the vehicle message data stream.
[0051] In this embodiment, if Figure 2 As shown, in step U2, the regularization processing of vehicle messages in different time periods using the improved Tikhonov regularization algorithm includes:
[0052] U21. Based on the data information of the data flow of the vehicle's message in different time periods, a matrix of the data flow of the vehicle's message in different time periods is constructed in time series to obtain the data information of the matrix of the vehicle's message data flow;
[0053] U22. Based on the data information of the matrix of the data flow of the vehicle's message, establish the Tikhonov regularization function Q of the vehicle's message,
[0054]
[0055] Wherein, x is the data information of the matrix of the data flow of the vehicle message, α1, α2 and α3 are the regularization factors of the data flow of the vehicle message;
[0056] U23. Based on the Tikhonov regularization function Q of the vehicle's message, regularization processing is performed on the vehicle's messages in different time periods to obtain data information of the data stream of the vehicle's messages in different time periods after processing.
[0057] In this embodiment, the regularization factors α1, α2 and α3 of the data stream of the vehicle message are,
[0058]
[0059] Among them, x is the data information of the matrix of the data flow of the vehicle's message.
[0060] In this embodiment, if Figure 3 As shown, in step U3, the use of an improved stream compression algorithm to compress the data stream of the vehicle message includes:
[0061] U31. Based on the processed data information of the data stream of the vehicle's message in different time periods, establish a correlation function W of the vehicle's message in different time periods,
[0062]
[0063] Among them, y is the data information of the data flow of the vehicle messages in different time periods after processing, β1, β2 and β3 are the weight factors of the vehicle messages in different time periods, and the correlation of the vehicle messages in different time periods is characterized to obtain the data information of the correlation of the vehicle messages in different time periods;
[0064] U32. Based on the data information of the correlation of the vehicle's messages in different time periods, a compression function R of the data stream of the vehicle message is established,
[0065]
[0066] Wherein, z is the data information of the correlation of the messages of the vehicles in different time periods, and δ1, δ2 and δ3 are the compression factors of the data stream of the vehicle messages;
[0067] U33. Based on the compression function R of the data stream of the vehicle message, the data stream of the vehicle message is compressed to obtain data information of the compressed data stream of the vehicle message.
[0068] In this embodiment, the constraint function f of the compression factors δ1, δ2 and δ3 of the data stream of the vehicle message is,
[0069]
[0070] The value range of the constraint function f is (0,1).
[0071] In this embodiment, the constraints of the weight factors β1, β2 and β3 of the messages of vehicles in different time periods are:
[0072]
[0073] Example 2: Based on the method of one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events in Example 1, the present invention is further illustrated and described below.
[0074] like Figure 1 As shown, a method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events, the method comprising:
[0075] U1. The autonomous driving vehicle is driving on the road, and the data information of the vehicle's message is obtained in real time. The data of the vehicle's message is time-stamped and divided into data streams of different time periods, and the data information of the data streams of the vehicle's message in different time periods is obtained;
[0076] U2. Based on the data information of the data stream of the vehicle's message in different time periods, the improved Tikhonov regularization algorithm is used to regularize the vehicle's message in different time periods to obtain the processed data information of the vehicle's message data stream in different time periods;
[0077] U3. Based on the data information of the data stream of the vehicle message in different time periods after the processing, the data stream of the vehicle message is compressed using an improved streaming compression algorithm to obtain the compressed data information of the vehicle message data stream;
[0078] U4. Based on the data information of the compressed vehicle message data stream, establish a vehicle message data stream delay evaluation function G, evaluate the receiving delay of the vehicle message data stream, and obtain data information of the delay evaluation of the vehicle message data stream.
[0079] In this embodiment, the method further includes:
[0080] U5. Based on the data information of the delay evaluation of the data flow of the vehicle's message, a preset threshold is set. If the data information of the delay evaluation of the data flow of the vehicle's message is less than the preset threshold, the requirement is met. The platform receives the data flow of the vehicle's message in real time. If the data information of the delay evaluation of the data flow of the vehicle's message is greater than the preset threshold, the requirement is not met, and the platform returns to step U2.
[0081] In this embodiment, the data flow delay evaluation function G of the vehicle's message is:
[0082]
[0083]
[0084] Wherein, r is the data information of the compressed data flow of the vehicle message, and γ1, γ2 and γ3 are delay evaluation factors of the data flow of the vehicle message.
[0085] In this embodiment, the present invention provides a system for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events, including a computer device, which is programmed or configured to execute any one of the steps of the method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events.
[0086] In this embodiment, a system for unidirectional real-time reception of L4 vehicle message front-end platform based on Server-Sent Events includes a data partitioning module for acquiring data information of vehicle messages in real time, and performing timestamp calibration on the data of vehicle messages and partitioning the data into data streams of different time periods, thereby obtaining data information of data streams of vehicle messages of different time periods;
[0087] A data regularization processing module, connected to the data acquisition module, is used to perform regularization processing on the messages of vehicles in different time periods using an improved Tikhonov regularization algorithm to obtain data information of the data stream of the messages of vehicles in different time periods after processing;
[0088] A data compression module, connected to the data regularization processing module, is used to compress the data stream of the vehicle message using an improved stream compression algorithm to obtain data information of the compressed data stream of the vehicle message;
[0089] A threshold judgment module, connected to the data compression module, is used to establish a data flow delay evaluation function G of the vehicle's message, evaluate the receiving delay of the data flow of the vehicle's message, and obtain data information of the delay evaluation of the data flow of the vehicle's message;
[0090] The data display module is connected to the threshold judgment module and is used to display the data transmission process in real time.
[0091] In this embodiment, the present invention also provides a computer-readable storage medium, which stores a computer program programmed or configured to execute any one of the methods for one-way real-time reception of L4 vehicle message front-end platforms based on Server-Sent Events.
[0092] In this embodiment, after receiving data from the vehicle, the SSE server is responsible for performing the following tasks:
[0093] Event Stream Settings:
[0094] The server needs to set the response header Content-Type:text / event-stream, specify the use of the SSE protocol, and enable long connections. Disable caching and use Cache-Control:no-cache to ensure data real-time and prevent data delays.
[0095] Data formatting:
[0096] Convert the messages generated by the vehicle into JSON format to ensure the readability and consistency of the data structure. Add a unique identifier id and timestamp field to each piece of data to avoid the front end receiving duplicate data multiple times, which is convenient for front end processing.
[0097] Push mechanism:
[0098] Use the server-side event trigger mechanism or timer (such as setInterval in Node.js) to regularly push vehicle status data to the front end. Adjust the frequency of data transmission as needed, usually once per second, to ensure that the front end obtains near real-time data.
[0099] Front-end reception and processing
[0100] The front end establishes a connection with the SSE server through the JavaScript EventSource interface and receives the L4 vehicle data stream in real time. The front end instantiates the EventSource object and creates a connection by specifying the URL of the SSE server. Data parsing and display: Use the onmessage event processing function to receive and parse the data pushed by SSE. The parsed JSON data is displayed through the interface, such as the map showing the vehicle location and the dashboard showing the speed. Automatic reconnection and error handling: Configure the onerror event handler to automatically reconnect when the network fluctuates or the SSE server fails to ensure the continuity of the data stream.
[0101] Any reference to memory, storage, database or other media used in the embodiments provided in the present application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM).
[0102] In summary, the present invention can not only reduce the resource consumption caused by frequent establishment and closing of connections, but also realize the function of pushing data from the server to the client without the need for the client to initiate additional requests, thereby achieving the purpose of one-way communication, while reducing network load and improving transmission efficiency.
[0103] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events, characterized in that: The method comprises: U1. The autonomous driving vehicle is driving on the road, and the data information of the vehicle's message is obtained in real time. The data of the vehicle's message is time-stamped and divided into data streams of different time periods, and the data information of the data streams of the vehicle's message in different time periods is obtained; U2. Based on the data information of the data stream of the vehicle's message in different time periods, the improved Tikhonov regularization algorithm is used to regularize the vehicle's message in different time periods to obtain the processed data information of the vehicle's message data stream in different time periods; U3. Based on the data information of the data stream of the vehicle message in different time periods after the processing, the data stream of the vehicle message is compressed using an improved streaming compression algorithm to obtain the compressed data information of the vehicle message data stream; U4. Based on the data information of the compressed vehicle message data stream, establish a vehicle message data stream delay evaluation function G, evaluate the receiving delay of the vehicle message data stream, and obtain data information of the delay evaluation of the vehicle message data stream.
2. The method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events according to claim 1 is characterized in that: In step U2, the regularization processing of vehicle messages in different time periods by using the improved Tikhonov regularization algorithm includes: U21. Based on the data information of the data flow of the vehicle's message in different time periods, a matrix of the data flow of the vehicle's message in different time periods is constructed in time series to obtain the data information of the matrix of the vehicle's message data flow; U22. Based on the data information of the matrix of the data flow of the vehicle's message, establish the Tikhonov regularization function Q of the vehicle's message, Wherein, x is the data information of the matrix of the data flow of the vehicle message, α1, α2 and α3 are the regularization factors of the data flow of the vehicle message; U23. Based on the Tikhonov regularization function Q of the vehicle's message, regularization processing is performed on the vehicle's messages in different time periods to obtain data information of the data stream of the vehicle's messages in different time periods after processing.
3. The method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events according to claim 2 is characterized by: The regularization factors α1, α2 and α3 of the data stream of the vehicle's message are, Wherein, x is the matrix data information of the data flow of the vehicle's message.
4. The method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events according to claim 1 is characterized in that: In step U3, the use of an improved stream compression algorithm to compress the data stream of the vehicle message includes: U31. Based on the data information of the data stream of the vehicle's message in different time periods after the processing, establish the correlation function W of the vehicle's message in different time periods, Among them, y is the data information of the data flow of the vehicle messages in different time periods after processing, β1, β2 and β3 are the weight factors of the vehicle messages in different time periods, and the correlation of the vehicle messages in different time periods is characterized to obtain the data information of the correlation of the vehicle messages in different time periods; U32. Based on the data information of the correlation of the vehicle's messages in different time periods, a compression function R of the data stream of the vehicle message is established, Wherein, z is the data information of the correlation of vehicle messages in different time periods, δ1, δ2 and δ3 are the compression factors of the data stream of vehicle messages; U33. Based on the compression function R of the data stream of the vehicle message, the data stream of the vehicle message is compressed to obtain data information of the compressed data stream of the vehicle message.
5. The method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events according to claim 4 is characterized by: The constraint function f of the compression factors δ1, δ2 and δ3 of the data stream of the vehicle message is, The value range of the constraint function f is (0,1).
6. The method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events according to claim 4 is characterized by: The constraints of the weight factors β1, β2 and β3 of the messages of vehicles in different time periods are:
7. The method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events according to claim 1 is characterized in that: The method further comprises: U5. Based on the data information of the delay evaluation of the data flow of the vehicle's message, a preset threshold is set. If the data information of the delay evaluation of the data flow of the vehicle's message is less than the preset threshold, the requirement is met. The platform receives the data flow of the vehicle's message in real time. If the data information of the delay evaluation of the data flow of the vehicle's message is greater than the preset threshold, the requirement is not met, and the platform returns to step U2.
8. The method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events according to claim 1, characterized in that: The data flow delay evaluation function G of the vehicle's message is, Wherein, r is the data information of the compressed data flow of the vehicle message, and γ1, γ2 and γ3 are delay evaluation factors of the data flow of the vehicle message.
9. A system for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events, including computer equipment, characterized in that: The computer device is programmed or configured to execute the steps of the method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that is programmed or configured to execute the method for one-way real-time reception of L4 vehicle message front-end platform based on Server-Sent Events as described in any one of claims 1 to 8.