Vehicle time sequence data transmission method based on dynamic two-dimensional code
By diluting the vehicle timing data and LZ77 compression algorithm combined with dynamic QR code transmission, the problem of speed and capacity limitation in vehicle timing data transmission is solved, and efficient and stable data transmission is achieved.
Patent Information
- Application Number
- CN202510303879.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, dynamic QR codes have speed and data capacity limitations in vehicle timing data transmission, resulting in packet loss, untimely and repetitive transmission of timing data, affecting data analysis and increasing transmission costs.
By diluting the vehicle timing data, calculating the changed value to replace the data points, compressing the data using the LZ77 lossless compression algorithm, and generating a dynamic QR code for transmission, combining frame number detection and error correction algorithm to ensure data integrity.
It improves data compression rate and transmission stability, ensures the continuity and real-timeness of data transmission, reduces redundant information, and improves transmission efficiency and response speed.
Smart Images

Figure CN120342400A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data compression, and particularly to a method for transmitting vehicle time-series data based on a dynamic two-dimensional code. Background Art
[0002] Two-dimensional code technology is of great significance in the context of the rapid development of the Internet, especially playing a huge role in Internet of Things applications. As a matrix two-dimensional code, the Quick Response Code (QR) has the ability of quick response, can quickly read information, comprehensively obtain identification information, support various forms of information storage, and has the ability of data encryption.
[0003] In the application scenario of vehicle driving, it is necessary to transmit vehicle time-series data such as driving speed and driving state (constant speed or acceleration) to the data center for vehicle positioning. However, there are the following disadvantages in the process of time-series data transmission. First, when a large amount of time-series data is transmitted, it is more likely to have packet loss or untimely transmission. Since the time-series data itself has strong sequential correlation, the loss of data not only affects the current value but also affects the analysis and processing of subsequent data. Second, network fluctuations may lead to repeated data transmission, increasing the transmission cost. The repetition of time-series data will also affect subsequent data analysis and calculation. In order to meet the requirements of large-scale time-series data transmission, the transmission speed and data capacity of two-dimensional code transmission become key issues. Although the two-dimensional code transmission speed is relatively fast, its data volume is limited, and it is necessary to maximize the data volume that the two-dimensional code can carry. Summary of the Invention
[0004] The present invention provides a method for transmitting vehicle time-series data based on a dynamic two-dimensional code to overcome the defect that the transmission speed and data capacity of the dynamic two-dimensional code are limited when using the dynamic two-dimensional code to transmit vehicle time-series data in the prior art.
[0005] The present invention provides a method for transmitting vehicle time-series data based on a dynamic two-dimensional code, including: Obtaining the vehicle time-series data to be transmitted, and performing thinning processing on the constant-speed state data in the vehicle time-series data to obtain target time-series data; For each adjacent two time-series data points in the target time-series data, calculating the change value, and replacing the adjacent two time-series data points with the change value and the initial time-series data point, where the initial time-series data point is the time-series data point with earlier time among the adjacent two time-series data points, to obtain the time-series data to be compressed; Invoking the LZ77 lossless compression algorithm to perform data compression processing on the time-series data to be compressed to obtain compressed data; Generating a dynamic two-dimensional code based on the compressed data; The QR code data is obtained by reading the dynamic QR code, and the obtained QR code data is analyzed and processed to obtain the transmitted vehicle time-series data.
[0006] In some embodiments, performing downsampling processing on the uniform speed state data in the vehicle time-series data to obtain target time-series data includes: For the uniform speed state data in the vehicle time-series data, every five consecutive uniform speed state data points are determined; Four of the five uniform speed state data points are randomly removed to obtain the target time-series data.
[0007] In some embodiments, generating a dynamic QR code based on the compressed data includes: The compressed data is divided into multiple data frames in units of a preset number of bytes per frame, and each data frame is marked with a serial number; Multiple consecutive data frames are used to generate a dynamic QR code.
[0008] In some embodiments, before analyzing and processing the QR code data, the method further includes: Identifying the frame serial number in the QR code data, and determining the total frame sequence according to the frame serial number; Performing data frame missing detection on the QR code data according to the total frame sequence.
[0009] In some embodiments, performing data frame missing detection on the QR code data according to the total frame sequence includes: Determining the total number of data frame serial numbers marked when generating the dynamic QR code from the compressed data; Comparing the total number of data frame serial numbers with the total frame sequence in terms of the number of frames; When the result of the frame number comparison indicates that there are missing data frames in the QR code data, a request for obtaining the dynamic QR code of the missing data frame is sent to re-perform data transmission.
[0010] In some embodiments, analyzing and processing the QR code data to obtain the transmitted vehicle time-series data includes: Performing reverse decoding processing on the QR code data to obtain multiple decoded data; Sorting the multiple decoded data in sequence according to the data frame serial numbers marked when generating the dynamic QR code from the compressed data; Performing splicing processing on the decoded data obtained by sequential sorting to obtain the transmitted vehicle time-series data.
[0011] The present invention also provides a vehicle time-series data transmission device based on a dynamic QR code, including: An acquisition module, configured to acquire vehicle timing data to be transmitted, and perform thinning processing on the uniform state data in the vehicle timing data to obtain target timing data; A preprocessing module, configured to calculate a change value for every two adjacent timing data points in the target timing data, and replace the two adjacent timing data points with an initial timing data point and the change value to obtain timing data to be compressed, where the initial timing data point is the timing data point with an earlier timing among the two adjacent timing data points; A compression module, configured to call the LZ77 lossless compression algorithm to perform data compression processing on the timing data to be compressed to obtain compressed data; A generation module, configured to generate a dynamic two-dimensional code based on the compressed data; An analysis module, configured to obtain two-dimensional code data by reading the dynamic two-dimensional code, and perform analysis processing on the two-dimensional code data to obtain the transmitted vehicle timing data.
[0012] The present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for transmitting vehicle timing data based on a dynamic two-dimensional code as described in any one of the above is implemented.
[0013] The present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for transmitting vehicle timing data based on a dynamic two-dimensional code as described in any one of the above is implemented.
[0014] The present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the method for transmitting vehicle timing data based on a dynamic two-dimensional code as described in any one of the above is implemented.
[0015] The method for transmitting vehicle timing data based on a dynamic two-dimensional code provided by the present invention combines the periodic characteristics and change trend extraction of target timing data to ensure that the compression ratio of the timing data is increased, and at the same time, the transmission stability under a high compression ratio is ensured. Furthermore, the LZ77 lossless compression algorithm is used to perform compression of the timing data, which can identify and remove redundant information, further improving the compression efficiency and the response speed of data transmission. Finally, the dynamic two-dimensional code is used to implement data transmission of the compressed data. The dynamic two-dimensional code adapts to the changes of vehicle timing data and also ensures the continuity and real-time nature of data transmission. Description of the Drawings
[0016] To more clearly illustrate the technical solutions in the present invention or the prior art, the accompanying drawings required for the description of the embodiments or the prior art will be briefly introduced one by one below. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings can be obtained based on these drawings without creative efforts.
[0017] Figure 1 It is a schematic flowchart of the method for transmitting vehicle time-series data based on a dynamic two-dimensional code provided by the present invention.
[0018] Figure 2 It is a schematic structural diagram of the device for transmitting vehicle time-series data based on a dynamic two-dimensional code provided by the present invention.
[0019] Figure 3 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners
[0020] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.
[0021] The method for transmitting vehicle time-series data based on a dynamic two-dimensional code of the present invention will be described below with reference to the accompanying drawings. Figure 1 It is a schematic flowchart of the method for transmitting vehicle time-series data based on a dynamic two-dimensional code provided by the present invention. As Figure 1 shown, the method includes the following steps 101 to 105, which will be specifically described below.
[0022] Step 101: Obtain the vehicle time-series data to be transmitted, and perform thinning processing on the uniform state data in the vehicle time-series data to obtain the target time-series data.
[0023] In some embodiments, after the vehicle time-series data is collected in real time at the in-vehicle center, the vehicle time-series data to be transmitted is obtained in real time. The vehicle time-series data includes vehicle driving state data, vehicle positioning data, driving environment data, and so on. The vehicle driving state data includes speed data of the vehicle in six different states: turning, accelerating, decelerating, moving at a constant speed, starting, and stopping. The vehicle positioning data includes the position information of the vehicle during driving, such as longitude, latitude, or area coordinates, etc. The driving environment data includes temperature, humidity, weather, air temperature, and so on. Before transmission, the six different state data of the vehicle, namely turning, accelerating, decelerating, moving at a constant speed, starting, and stopping, are identified through an algorithm. Here, the vehicle time-series data is generally in-vehicle GPS time-series data. By identifying the content of the time-series data, the state of the vehicle during driving can be determined. When the vehicle is driving, the in-vehicle GPS records the position information every 5 seconds. Therefore, the interval of the identified state data is also 5 seconds. Since the constant-speed state accounts for the majority during the vehicle driving process and the constant-speed state data is mostly continuous, the thinning process can be performed on the majority of the constant-speed state data. The thinning process is to remove a large number of duplicate and redundant constant-speed state data. The remaining five state data account for a small part and are not continuous, so they are retained without processing. Finally, the thinned constant-speed data and the remaining five state data are combined into the target time-series data, that is, the time-series data that needs to be transmitted in real time.
[0024] Step 102: For each adjacent pair of time-series data points in the target time-series data, calculate the change value, and replace the adjacent two time-series data points with the change value and the initial time-series data point to obtain the time-series data to be compressed.
[0025] Since the target time-series data may have periodic characteristics or there is a certain change trend, resulting in a certain fluctuation range of the target time-series data. In order to make the data difference between adjacent time points easier to be compressed and retained, the preprocessing of the time-series data also needs to be performed when the data compression is executed in the embodiments of the present invention. The preprocessing process here is the process of storing the Delta difference between two points.
[0026] Specifically, first, for each adjacent pair of time-series data points in the target time-series data, calculate the change value, which is also to calculate the difference between the two. Then, replace the adjacent two time-series data points with the change value and the initial time-series data point, and the initial time-series data point is the time-series data point with an earlier time sequence among the adjacent two time-series data points. It should be noted that the adjacent here refers to adjacent time points.
[0027] For example, a certain time series data point in the target time series data is 100.22, and the next adjacent time series data point is 100.23. At this time, the change value calculated between the two is 0.01, and the initial time series data point is the earlier time series data point 100.22. At this time, in the target time series data, use the initial time series data point 100.22 and the change value 0.01 to replace the time series data point 100.22 and the next adjacent time series data point 100.23.
[0028] For every two adjacent time series data points in the target time series data, perform the above Delta difference calculation and replacement process. Finally, the time series data to be compressed is obtained. In this way, the fluctuation range of the time series data can be reduced, and the data storage amount of the change value is small. According to the change value, the original data points can be restored at any time.
[0029] Step 103: Call the LZ77 lossless compression algorithm to perform data compression processing on the time series data to be compressed, and obtain compressed data.
[0030] After the data preprocessing in step 103, the data compression process can be executed next. Here, call the LZ77 lossless compression algorithm to perform data compression processing on the time series data to be compressed, and obtain compressed data for data transmission.
[0031] Step 104: Generate a dynamic QR code based on the compressed data.
[0032] Here, data transmission is realized through a dynamic QR code. Generate a dynamic QR code according to the compressed data. The generation process can be realized through Dynamsoft Barcode Reader technology, which will not be elaborated here.
[0033] Step 105: Obtain the QR code data by reading the dynamic QR code, and perform parsing processing on the QR code data to obtain the transmitted vehicle time series data.
[0034] When it is necessary to obtain the transmitted vehicle time series data, use a device such as a mobile terminal to read the dynamic QR code. At this time, obtain the QR code data by reading the dynamic QR code, and then perform parsing processing on the QR code data to obtain the transmitted vehicle time series data. The parsing processing can call the Reed - Solomon error correction algorithm to perform reverse decoding on the QR code data to obtain the corresponding decoded data, and then splice the decoded data into the corresponding vehicle time series data according to the time sequence to ensure the continuity of the vehicle time series data.
[0035] In the embodiments of the present invention, the data transmission of vehicle time-series data is realized through dynamic two-dimensional codes. The dynamic two-dimensional codes are used to adapt to the changes in vehicle time-series data, ensuring the continuity and real-time nature of data transmission. The LZ77 lossless compression algorithm is used to compress the time-series data, which can identify and remove redundant information, further improving the compression efficiency and the response speed of data transmission. In addition, by combining the periodic characteristics and change trends of the target time-series data extraction, the compression of the time-series data is further improved, while ensuring the transmission stability at a high compression ratio.
[0036] In some embodiments, thinning processing is performed on the uniform-speed state data in the vehicle time-series data to obtain target time-series data, including: For the uniform-speed state data in the vehicle time-series data, every five consecutive uniform-speed state data points are determined, and four of the five uniform-speed state data points are randomly removed to obtain the target time-series data.
[0037] Here, there are a large number of repeated and consecutive data points in the uniform-speed state data. First, every five consecutive uniform-speed state data points are determined from the uniform-speed state data, and then four of the five uniform-speed state data points are randomly selected and removed. For the last few uniform-speed state data points less than five, if the number is one, it is directly retained; if the number is more than one, one is randomly selected and retained, and the rest are removed.
[0038] In the embodiments of the present invention, by performing thinning processing on the uniform-speed state data in the vehicle time-series data, a large number of repeated and irrelevant data points can be removed, thereby retaining the information of the key data points and greatly reducing the data transmission volume, facilitating subsequent data compression and reducing the burden of data transmission.
[0039] In some embodiments, generating a dynamic two-dimensional code based on the compressed data includes: dividing the compressed data into multiple data frames in units of a preset number of bytes, and marking the serial numbers of each data frame; generating a dynamic two-dimensional code from multiple consecutive data frames.
[0040] Here, a dynamic QR code is generated based on compressed data. To ensure the continuity of time-series data and avoid time-series chaos, before generating the dynamic QR code in the embodiments of the present invention, a byte count is preset first, and then, with the preset byte count as one frame of data and as a segmentation unit, the compressed data is segmented into multiple data frames. The preset byte count can be 2000 bytes, and the number of data frames meets the maximum storage capacity supported by the QR code. Therefore, the compressed data is segmented into multiple data frames with 2000 bytes as one frame here. In addition, each data frame needs to be marked with a serial number so that each data frame has a strict order in the original compressed data, and the risk of data loss can be effectively avoided. Finally, the Dynamsoft BarcodeReader technology can be used to generate the dynamic QR code.
[0041] In the embodiments of the present invention, after the target time-series data is compressed, the corresponding dynamic QR code is generated to perform data transmission, so that the dynamic QR code can meet the data volume of time-series data transmission. At the same time, due to the real-time and dynamic nature of the dynamic QR code, the vehicle time-series data can timely reflect the latest changes. When the vehicle time-series data changes, the dynamic QR code will be immediately updated and regenerated, which not only ensures the timeliness of the data but also solves the problem that the static QR code can only transmit fixed data, ensuring the continuity and real-time nature of data transmission. Moreover, the independence and small data volume characteristics of the QR code enable the time-series data to be transmitted relatively quickly even in a network environment with low bandwidth.
[0042] In some embodiments, before parsing and processing the QR code data, it further includes: identifying the frame serial number in the QR code data and determining the total frame sequence according to the frame serial number; detecting the missing data frames of the QR code data according to the total frame sequence.
[0043] Here, before parsing and processing the QR code data, the frame serial number in the obtained QR code data is first identified. This frame serial number is pre-marked for each data frame when the compressed data generates the dynamic QR code. Further, the total frame sequence is determined according to the frame serial number, that is, the total number of pre-marked data frames is counted. In this way, the missing data frames of the QR code data can be detected according to the total number of data frames, so as to judge the integrity of the dynamic QR code when transmitting data.
[0044] In the embodiments of the present invention, the data frame serial number is marked when the compressed data generates the dynamic QR code, and after the QR code data is read, the total frame sequence of the data frames is counted, so as to realize the detection of missing data frames of the QR code data, which can effectively avoid the risk of data loss and ensure the integrity of time-series data transmission.
[0045] Based on the above embodiments, data frame loss detection is performed on the two-dimensional code data according to the total frame sequence, including: determining the total number of data frame serial numbers marked when generating the dynamic two-dimensional code from the compressed data; comparing the total number of data frame serial numbers with the total frame sequence in terms of the number of frames; when the result of the frame number comparison indicates that there is a data frame loss in the two-dimensional code data, sending a request to obtain the dynamic two-dimensional code of the missing data frame to re-perform data transmission.
[0046] Here, when performing data frame loss detection, first determine the total number of data frame serial numbers marked when generating the dynamic two-dimensional code from the compressed data, that is, when generating the dynamic two-dimensional code, count the serial numbers marked for each data frame to obtain the corresponding total number of data frame serial numbers. Then compare the total number of data frame serial numbers with the total frame sequence in the two-dimensional code data in terms of the number of frames, so that it can be clearly determined whether there is a data frame loss. When the result of the frame number comparison indicates that there is a data frame loss in the two-dimensional code data, send a request to obtain the dynamic two-dimensional code of the missing data frame to re-obtain the dynamic two-dimensional code of the missing data frame. At this time, continue to generate the corresponding dynamic two-dimensional code according to the missing data frame in the compressed data, and finally complete the data transmission of the missing data frame by reading the dynamic two-dimensional code and obtaining the two-dimensional code data, so as to ensure that each data frame in the compressed data can complete data transmission through the dynamic two-dimensional code.
[0047] When the result of the frame number comparison indicates that there is no data frame loss in the two-dimensional code data, the subsequent data parsing process can be normally entered.
[0048] In the embodiment of the present invention, when parsing the two-dimensional code data, the total number of frame serial numbers of the compressed data and the total frame sequence of the two-dimensional code data are used for verification to determine whether there is a frame loss in the two-dimensional code data, so as to ensure the data integrity when the timing data is transmitted through the dynamic two-dimensional code. When there is a data frame loss, by re-sending a request for the dynamic two-dimensional code of the missing data frame, the data transmission of the missing data frame is realized, avoiding the interruption of the data chain.
[0049] In some embodiments, parsing and processing the two-dimensional code data to obtain the transmitted vehicle timing data includes: performing reverse decoding processing on the two-dimensional code data to obtain a plurality of decoded data; sorting the plurality of decoded data in sequence according to the data frame serial numbers marked when generating the dynamic two-dimensional code from the compressed data; splicing the decoded data obtained by the sequential sorting to obtain the transmitted vehicle timing data.
[0050] When parsing and processing the two-dimensional code data, the embodiment of the present invention uses the Reed-Solomon error correction algorithm to perform reverse decoding on the two-dimensional code data to obtain a corresponding plurality of decoded data. At this time, when generating a dynamic two-dimensional code based on the compressed data, the data frame sequence numbers marked are used to sort the plurality of decoded data in sequence to restore the temporal continuity of the temporal sequence data. Finally, the decoded data obtained by the sequential sorting is spliced to obtain the transmitted vehicle temporal sequence data, thus completing the transmission process of the vehicle temporal sequence data.
[0051] Here, for the status data in the vehicle temporal sequence data (i.e., the six status data of turning, accelerating, decelerating, moving at a constant speed, starting, and stopping), it can be directly spliced according to the sorted temporal sequence. For other non-status data, such as vehicle positioning data (including the position information where the vehicle travels, longitude, latitude, or regional coordinates, etc.) and driving environment data (including temperature, humidity, weather, air temperature, etc.), they can be directly obtained in sequence according to the temporal sequence without re-sorting and splicing. In this way, the parsing process of the two-dimensional code data is completed, and the data transmission process of the vehicle temporal sequence data is also completed.
[0052] In the embodiment of the present invention, when parsing to obtain the transmitted vehicle temporal sequence data, sorting and splicing are still performed in temporal sequence, which can ensure the continuity of the temporal sequence data and avoid the chaos of the self-sequence correlation of the temporal sequence data.
[0053] Next, the vehicle temporal sequence data transmission device based on the dynamic two-dimensional code provided by the present invention will be described. The vehicle temporal sequence data transmission device based on the dynamic two-dimensional code described below can be correspondingly referred to the vehicle temporal sequence data transmission method based on the dynamic two-dimensional code described above.
[0054] See Figure 2 , the vehicle temporal sequence data transmission device based on the dynamic two-dimensional code includes: an acquisition module 201, configured to acquire the vehicle temporal sequence data to be transmitted, and perform thinning processing on the constant speed status data in the vehicle temporal sequence data to obtain target temporal sequence data; a preprocessing module 202, configured to calculate a change value for every two adjacent temporal sequence data points in the target temporal sequence data, and replace the two adjacent temporal sequence data points with the initial temporal sequence data point and the change value to obtain the temporal sequence data to be compressed, where the initial temporal sequence data point is the temporal sequence data point with an earlier time sequence among the two adjacent temporal sequence data points; a compression module 203, configured to call the LZ77 lossless compression algorithm to perform data compression processing on the temporal sequence data to be compressed to obtain compressed data; a generation module 204, configured to generate a dynamic two-dimensional code based on the compressed data; and an analysis module 205, configured to obtain two-dimensional code data by reading the dynamic two-dimensional code, and perform parsing processing on the two-dimensional code data to obtain the transmitted vehicle temporal sequence data.
[0055] It should be noted that the beneficial effects of the vehicle timing data transmission device based on the dynamic two-dimensional code here correspond to those of the vehicle timing data transmission method based on the dynamic two-dimensional code in the above text. Therefore, the beneficial effects of the vehicle timing data transmission device based on the dynamic two-dimensional code will not be elaborated here.
[0056] Figure 3 An example of the physical structure diagram of an electronic device is as Figure 3 shown. The electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340. Among them, the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 can call the logical instructions in the memory 330 to execute the vehicle timing data transmission method based on the dynamic two-dimensional code. The method includes: obtaining the vehicle timing data to be transmitted, and performing thinning processing on the uniform state data in the vehicle timing data to obtain target timing data; for every two adjacent timing data points in the target timing data, calculating a change value, and replacing the two adjacent timing data points with the change value and the initial timing data point, where the initial timing data point is the timing data point with earlier timing among the two adjacent timing data points, to obtain the timing data to be compressed; calling the LZ77 lossless compression algorithm to perform data compression processing on the timing data to be compressed to obtain compressed data; generating a dynamic two-dimensional code based on the compressed data; obtaining two-dimensional code data by reading the dynamic two-dimensional code, and performing parsing processing on the two-dimensional code data to obtain the transmitted vehicle timing data.
[0057] In addition, when the logical instructions in the above-mentioned memory 330 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.
[0058] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the vehicle timing data transmission method based on a dynamic two-dimensional code provided by each of the above methods. The method includes: obtaining vehicle timing data to be transmitted, and performing thinning processing on the uniform state data in the vehicle timing data to obtain target timing data; for each adjacent pair of timing data points in the target timing data, calculating a change value, and replacing the adjacent two timing data points with the change value and the initial timing data point to obtain timing data to be compressed, where the initial timing data point is the timing data point with an earlier timing among the adjacent two timing data points; calling the LZ77 lossless compression algorithm to perform data compression processing on the timing data to be compressed to obtain compressed data; generating a dynamic two-dimensional code based on the compressed data; obtaining two-dimensional code data by reading the dynamic two-dimensional code, and performing parsing processing on the two-dimensional code data to obtain the transmitted vehicle timing data.
[0059] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the vehicle timing data transmission method based on a dynamic two-dimensional code provided by each of the above methods. The method includes: obtaining vehicle timing data to be transmitted, and performing thinning processing on the uniform state data in the vehicle timing data to obtain target timing data; for each adjacent pair of timing data points in the target timing data, calculating a change value, and replacing the adjacent two timing data points with the change value and the initial timing data point to obtain timing data to be compressed, where the initial timing data point is the timing data point with an earlier timing among the adjacent two timing data points; calling the LZ77 lossless compression algorithm to perform data compression processing on the timing data to be compressed to obtain compressed data; generating a dynamic two-dimensional code based on the compressed data; obtaining two-dimensional code data by reading the dynamic two-dimensional code, and performing parsing processing on the two-dimensional code data to obtain the transmitted vehicle timing data.
[0060] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.
[0061] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for transmitting vehicle time-series data based on dynamic two-dimensional codes, characterized in that, Including: Obtain the vehicle time-series data to be transmitted, and perform thinning processing on the uniform motion state data in the vehicle time-series data to obtain target time-series data; For every two adjacent time-series data points in the target time-series data, calculate the change value, and replace the two adjacent time-series data points with the initial time-series data point and the change value to obtain the time-series data to be compressed, where the initial time-series data point is the time-series data point with an earlier time among the two adjacent time-series data points; Call the LZ77 lossless compression algorithm to perform data compression processing on the time-series data to be compressed to obtain compressed data; Generate a dynamic two-dimensional code based on the compressed data; Obtain the two-dimensional code data by reading the dynamic two-dimensional code, and perform parsing processing on the two-dimensional code data to obtain the transmitted vehicle time-series data.
2. The method for transmitting vehicle timing data based on a dynamic two-dimensional code according to claim 1, wherein The performing thinning processing on the uniform motion state data in the vehicle time-series data to obtain target time-series data includes: For the uniform motion state data in the vehicle time-series data, determine every five consecutive uniform motion state data points; Randomly remove four of the five uniform motion state data points to obtain target time-series data.
3. The method for transmitting vehicle time-series data based on a dynamic two-dimensional code according to claim 1, wherein The generating a dynamic two-dimensional code based on the compressed data includes: Divide the compressed data into multiple data frames in units of a preset number of bytes, and mark the serial number for each data frame; Generate a dynamic two-dimensional code from multiple consecutive data frames.
4. The method for transmitting vehicle timing data based on a dynamic two-dimensional code according to claim 1, wherein Before performing the parsing processing on the two-dimensional code data, the method further includes: Identify the frame serial number in the two-dimensional code data, and determine the total frame sequence according to the frame serial number; Perform data frame missing detection on the two-dimensional code data according to the total frame sequence.
5. The method for transmitting vehicle time-series data based on a dynamic QR code according to claim 4, wherein The performing data frame missing detection on the two-dimensional code data according to the total frame sequence includes: Determine the total number of data frame serial numbers marked when generating the dynamic two-dimensional code from the compressed data; Compare the total number of data frame serial numbers with the total frame sequence in terms of the number of frames; When the result of the frame number comparison indicates that there is a missing data frame in the two-dimensional code data, send a request to obtain the dynamic two-dimensional code of the missing data frame to re-perform data transmission.
6. The method for transmitting vehicle time-series data based on a dynamic two-dimensional code according to claim 1, wherein The performing parsing processing on the two-dimensional code data to obtain the transmitted vehicle time-series data includes: Perform reverse decoding processing on the two-dimensional code data to obtain multiple decoded data; Sort the multiple decoded data in order according to the data frame serial numbers marked when generating the dynamic two-dimensional code from the compressed data; Perform splicing processing on the decoded data sorted in order to obtain the transmitted vehicle time-series data.
7. A vehicle time-series data transmission device based on a dynamic two-dimensional code, characterized in that Including: An acquisition module, configured to obtain the vehicle time-series data to be transmitted, and perform thinning processing on the uniform motion state data in the vehicle time-series data to obtain target time-series data; A preprocessing module, configured to calculate the change value for every two adjacent time-series data points in the target time-series data, and replace the two adjacent time-series data points with the initial time-series data point and the change value to obtain the time-series data to be compressed, where the initial time-series data point is the time-series data point with an earlier time among the two adjacent time-series data points; A compression module, configured to call the LZ77 lossless compression algorithm to perform data compression processing on the time-series data to be compressed to obtain compressed data; A generation module, configured to generate a dynamic two-dimensional code based on the compressed data; An analysis module, configured to obtain two-dimensional code data by reading the dynamic two-dimensional code, and perform analysis processing on the two-dimensional code data to obtain the transmitted vehicle time-series data.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, the method for transmitting vehicle time-series data based on a dynamic two-dimensional code according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the method for transmitting vehicle time-series data based on a dynamic two-dimensional code according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the method for transmitting vehicle time-series data based on a dynamic two-dimensional code according to any one of claims 1 to 6 is implemented.