Data transmission method, device and equipment and computer storage medium
By performing feature extraction and dynamic selection compression algorithms on vehicle communication data, the problem of low efficiency in vehicle communication data transmission in the prior art is solved, and more efficient and reliable data transmission is achieved, ensuring the real-timeness of vehicle control.
Patent Information
- Application Number
- CN202411792547.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-07
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-12-07
AI Technical Summary
The existing vehicle communication data transmission technology has challenges in data transmission efficiency and reliability, especially due to data diversity and variability, the existing fixed compression algorithm cannot effectively improve transmission efficiency.
By extracting the original data of vehicle communication data, data feature values are obtained, and the most suitable compression algorithm is determined based on these feature values, and dynamically adjusting to adapt to the diversity and variability of the data, thereby achieving more efficient data transmission.
By dynamically selecting a compression algorithm suitable for the current data characteristic value, the transmission efficiency of vehicle communication data is significantly improved and the real-time and reliability of vehicle control is ensured.
Smart Images

Figure CN119520631A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle communication technology, and in particular to a data transmission method, device, equipment and computer storage medium. Background Art
[0002] In the field of vehicle control, data can be transmitted through communication protocols such as the CAN (Control Area Network) bus to achieve communication between various vehicle components and systems. With the rapid development of automotive electronic systems, the number of electronic control units and sensors inside the vehicle has increased dramatically, resulting in a significant increase in data traffic on the CAN bus. Therefore, existing in-vehicle network communication technologies face challenges in data transmission efficiency and reliability.
[0003] In order to improve the transmission performance of vehicle communication data, the inventors have come up with the idea of compressing the vehicle communication data before transmission. However, the existing data compression field generally uses a specific fixed compression algorithm for data compression, which cannot address the diversity and variability of the data to be transmitted by the vehicle, and has a poor effect on improving the transmission efficiency of vehicle communication data.
[0004] Therefore, a vehicle communication data transmission solution with higher transmission efficiency is needed. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a data transmission method, device, equipment and computer storage medium, which can solve the problem of low transmission efficiency of existing vehicle communication data.
[0006] In a first aspect, an embodiment of the present application provides a data transmission method, the data transmission method comprising: Obtaining raw data to be transmitted from the target vehicle; Extracting features of the compression attributes of the original data to obtain data feature values of the original data; Determining mapping relationships of a plurality of preset candidate compression algorithms for the original data according to the data feature values; According to the historical compression performance of each candidate compression algorithm for the data characteristic value, the mapping relationship corresponding to each candidate compression algorithm is adjusted to obtain an adjusted mapping relationship; Determining a target compression algorithm corresponding to the original data from the multiple candidate compression algorithms according to the adjusted mapping relationship; Compressing the original data according to the target compression algorithm to obtain compressed data; The compressed data is transmitted.
[0007] By adopting the above technical solution, based on the diversity of vehicle communication data and according to the data characteristic values of the original data, the algorithm that best suits the data of the current data characteristic values is selected, thereby improving the compression effect of various types of vehicle communication data, which can improve the performance of vehicle communication and ensure the real-time and reliability of vehicle control.
[0008] In some embodiments, the method comprises: Performing data content identification on the original data to obtain data field content included in the original data; Feature extraction is performed on the data field content according to a preset compression attribute feature dimension to obtain the data feature value.
[0009] In some embodiments, the original data includes multiple data elements; the data feature value includes at least one of a data type, a data content feature, and a data timing feature; wherein the data content feature includes a distribution feature of the multiple data elements in the original data.
[0010] In some embodiments, the method includes: analyzing a plurality of the candidate compression algorithms respectively to obtain data characteristic values of compressible data of each candidate compression algorithm; the compressible data is data that can be compressed by the candidate compression algorithm; Matching the data characteristic value of the compressible data with the data characteristic value of the original data to obtain a characteristic matching result; The mapping relationship is determined according to the feature matching result.
[0011] In some embodiments, the method comprises: Analyze the historical compression performance according to a preset compression performance evaluation dimension to obtain a historical compression performance score of the candidate compression algorithm on the original data; The mapping relationship is dynamically adjusted according to the historical compression performance score.
[0012] In some embodiments, the process of determining the mapping relationship further includes: Obtaining the current network transmission performance of the target vehicle; Calculating the estimated transmission delay of the candidate compression algorithm for the original data according to the network transmission performance; The mapping relationship is adjusted according to the expected transmission delay.
[0013] In a second aspect, an embodiment of the present application further provides a data transmission device, including: An acquisition module, used for acquiring the original data to be transmitted of the target vehicle; An extraction module, used to extract data features of the original data to obtain data feature values of the original data; A determination module, used to determine a target compression algorithm corresponding to the original data according to the data characteristic value; A compression module, used to compress the original data according to the target compression algorithm to obtain compressed data; A transmission module is used to transmit the compressed data.
[0014] In a third aspect, an embodiment of the present application further provides a data transmission device, comprising a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the data transmission device executes the data transmission method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are executed on a processor, the processor executes the data transmission method as described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The present invention is a flowchart of a data transmission method according to an embodiment of the present invention.
[0017] Figure 2 The present invention is a flowchart of a sub-step of a data transmission method provided according to an embodiment of the present application.
[0018] Figure 3 The present invention is a flowchart of a sub-step of a data transmission method provided according to an embodiment of the present application.
[0019] Figure 4 The present invention is a flowchart of a sub-step of a data transmission method provided according to an embodiment of the present application.
[0020] Figure 5 The present invention is a flowchart of a sub-step of a data transmission method provided according to an embodiment of the present application.
[0021] Figure 6 The present invention is a flowchart of a sub-step of a data transmission method provided according to an embodiment of the present application.
[0022] Figure 7 It is a schematic diagram of the structure of a data transmission device provided according to an embodiment of the present application.
[0023] Figure 8 A schematic diagram of the structure of a data transmission device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that the implementation methods of the present application and the features in the implementation methods can be combined with each other without conflict.
[0025] In the following description, many specific details are set forth to facilitate a full understanding of the present application. The described implementations are only part of the implementations of the present application, rather than all the implementations.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0027] It should be further noted that, in this article, the terms "comprises", "includes" or any other variations 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 includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0028] In this application, "at least one" means one or more, and "more" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0029] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0030] Before describing the embodiments of the present invention, the prior art and the problems existing therein are further described: The various electronic control units on the vehicle work together through communication. The normal transmission of vehicle communication data plays an important role in vehicle control. At present, the transmission network of vehicles is generally based on CAN bus. CAN Bus is a serial communication protocol that enables reliable and efficient data transmission between devices. It is a multi-master, multi-slave, half-duplex, fault-tolerant protocol that is very suitable for the needs of the automotive field. CAN Bus provides a unified access point for all electronic control units in the vehicle, which is convenient for connection and diagnosis. The CAN bus network is used for data transmission between multiple electronic control units in the vehicle system. Therefore, the performance of data transmission on the CAN bus is very important for the normal control of the vehicle.
[0031] The inventor found that the real-time and accuracy requirements of vehicle control are both strong, and the amount of data on the CAN bus may be large, so it is necessary to efficiently transmit the vehicle communication data to ensure the performance of vehicle control based on vehicle communication. Based on this, the inventor thought of compressing the communication data of the CAN bus before transmission, thereby reducing the transmission pressure of vehicle communication data and improving the communication performance and reliability of the CAN bus.
[0032] Based on this, the inventor further discovered that vehicle communication data has the characteristic of data diversity, wherein the data diversity includes that the data transmitted on the vehicle communication bus may include sensor data, control command data, diagnostic data, multimedia data, and status information of each electronic control unit, etc., which are quite different. However, the existing data compression field generally adopts a fixed compression method for data compression, and the fixed compression algorithm is obviously not well adapted to the above-mentioned characteristics of the diversity of vehicle communication data. For example, the fixed compression method may perform better when processing highly redundant text data, but the compression efficiency is greatly reduced when processing low-redundancy or non-redundant data. Therefore, the existing fixed algorithm compression mode is not very effective in improving the transmission efficiency of vehicle communication data when it is applied to the transmission of vehicle communication data.
[0033] It can be seen from the above that the existing vehicle-based data solutions have the problem of low data transmission efficiency.
[0034] In view of this, the embodiments of the present application provide a data transmission method, device, equipment and computer storage medium, which can improve the transmission efficiency of vehicle communication. The embodiments of the present application can be executed based on a preset computer data processing device.
[0035] See also Figure 1 , is a flowchart of the steps of a data transmission method provided by another embodiment of the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0036] See also Figure 1 As shown, the data transmission method may include the following steps: Step 101: Acquire the original data to be transmitted of the target vehicle.
[0037] Among them, the data transmission request sent by each electronic control unit of the target vehicle is detected and intercepted to obtain the original data. Specifically, based on the analysis of the operation process of the vehicle-mounted system of the target vehicle, it can be known that the types of original data can be diverse, such as the original data can include at least one of the data types: 1. Sensor data, such as temperature, speed, fuel and other data packets regularly sent by various sensors on the target vehicle. 2. Control command: command data issued by the main control unit to control various vehicle systems such as braking and steering. 3. Diagnostic data: including error diagnostic codes and maintenance information. 4. Image and multimedia data: such as image and video data of reversing cameras and entertainment systems. 5. Status information: status information of various electronic controls of the vehicle, such as system startup, sleep, etc. Among them, according to the communication protocol of the target vehicle, the original data can be transmitted in the form of data packets. In order to avoid the stability of data communication being affected by switching the compression algorithm during data transmission, the embodiment of the present invention executes the steps of the data transmission method in units of data packets.
[0038] Step 102: extracting data features of the original data to obtain data feature values of the original data.
[0039] In order to improve the transmission efficiency of vehicle communication data, the embodiment of the present invention compresses the original data and then transmits the compressed data, thereby reducing the volume of the data to be transmitted. In combination with the example of the content type of the original data in step 101, it can be seen that the data type of the original data is diverse. Therefore, in order to make the extracted data feature value more accurately guide the selection of the compression algorithm, the embodiment of the present invention extracts the features of the original data based on the preset compression attribute feature dimension to obtain the data feature value of the original data. Among them, the compression attribute feature dimension is the attribute that affects the compressibility of the data, such as the data type, the degree of repetition of the data, the degree of disorder, the length of the data, the time series characteristics of the data, etc. Among them, the degree of repetition of the data can be measured by the redundancy of the data, and the degree of disorder of the data can be measured by the information entropy of the data. The time series characteristics of the data characterize the changes in the current received original data compared with the historical transmission data of the target vehicle. The time series characteristics of the data have a great reference significance when determining whether to select a compression algorithm based on a prediction algorithm or a time series model.
[0040] In some embodiments, in order to improve the recognition efficiency of data feature values, such as Figure 2 As shown, step 102 also includes: Step 1021: Perform data content identification on the original data to obtain data field content included in the original data.
[0041] Among them, the data field content is the field value under the data field. The data field is used to represent the field in the original data that corresponds to the field actually used to control the target vehicle. For example, in addition to the vehicle control-related data content that actually needs to be transmitted, the communication data of the target vehicle also includes other fields for controlling and recording the transmission process, such as a check code field, an error field, etc.
[0042] Specifically, when the target vehicle uses CAN bus communication, the data structure of the original data can be identified according to the preset message format corresponding to the CAN bus, and the standard data frame in the original data can be identified, and the data field content can be identified from the standard data frame.
[0043] Among them, the preset message format corresponding to the CAN bus fixes the message formats corresponding to the data frames of various functional types in the CAN bus. For example, the data frames can be divided according to the functional type and include: standard data frame, remote frame, error frame, overload frame. Among them, after analyzing the message format, it is found that the standard data frame includes 0 to 8 bytes of actual data, the remote frame is used to request a node to send a data frame and does not contain a data field. The error frame is used to indicate a detected bus error and does not contain a data field. The overload frame is used to indicate a bus overload and does not contain a data field.
[0044] Considering that bus data with different functions have different message formats, data compression is necessary only for raw data containing actual data content. Therefore, according to the data structure of the standard data frame message specified by the CAN bus, the raw data is identified for data structure and the standard data frame in the raw data is identified.
[0045] Furthermore, the format of the standard data frame may include fields such as frame start, identifier, control field, data field and check code. Considering that the data field includes actual data, the field content under the data field in the standard data frame is read to obtain the data field content in the standard data frame.
[0046] Step 1022: Extract features of the data field content according to a preset compression attribute feature dimension to obtain the data feature value.
[0047] The compression attribute feature dimension is the attribute that affects the compressibility of the data, such as data type, data repetition degree, disorder degree, data length, data time series characteristics, etc. The repetition degree of the data can be measured by the redundancy of the data, and the disorder degree of the data can be measured by the information entropy of the data. The time series characteristics of the data characterize the change of the currently received raw data compared with the historical transmission data of the target vehicle. The data time series characteristics are of great reference significance when determining whether to select a compression algorithm based on a prediction algorithm or a time series model.
[0048] Specifically, combined with the example of the content type of the original data in step 101, the influence of the data feature values under different compression attribute feature dimensions on the selection of the compression algorithm is explained: for the dimension of data length, considering that sensor data is usually short-length data, this type of short frame data may not significantly reduce the transmission pressure of vehicle communication before and after compression due to the small data volume, so an algorithm with lower computational complexity can be selected. Diagnostic data is usually a longer data frame, which is more suitable for a compression algorithm that performs better for long sequence data compression. For the dimension of data type, considering that the transmission frequency of control command data is high and the real-time requirements for transmission are high, the algorithm with the best compression performance should be selected. The data volume of image and multimedia data is large and has a certain degree of redundancy, so a data compression algorithm that can efficiently process repeated information can be selected. The data volume of status information is small and the data transmission frequency is low, and the corresponding compression algorithm selection can refer to sensor data.
[0049] Based on the compression modes of various existing data compression algorithms, in order to enable the data feature values to better guide the selection of the compression algorithm, the original data includes multiple data elements; the data feature values include at least one of the data type, data content features and data timing features; wherein the data content features include the distribution characteristics of the multiple data elements in the original data.
[0050] Among them, the data type is used to characterize the data format of the original data, such as text type, image type, binary data, etc. It can be understood that, on the one hand, the original data of different data types have different intrinsic characteristics. For example, the low entropy value of text data indicates that its structure is more orderly, while image data has a higher redundancy and the receiver of image data, such as the human eye, can tolerate a certain loss of data quality. Correspondingly, binary data is more orderly and has a medium redundancy. On the other hand, the data types adapted and supported by the compression algorithm are also specific. For example, JPEG (Joint Photographic Experts Group) is a lossy compression algorithm for images, which can greatly compress image data while ensuring image quality, but it is obvious that JPEG has low compression usability for non-image data.
[0051] The original data includes multiple data elements; wherein the data elements may be data structures such as characters, character strings, sequences, etc. It is understandable that the distribution characteristics of the multiple data elements in the original data may include the randomness of the appearance of the multiple data units in the original data and / or the repeated appearance of each data unit.
[0052] After analyzing the mainstream data compression algorithms, it can be seen that the existing mainstream data compression algorithms mainly include compression algorithms based on frequency statistics and symbol replacement, compression algorithms based on coding optimization, compression algorithms based on repeated pattern recognition, and algorithms based on statistics and prediction, etc. The above algorithms either analyze the frequency of occurrence of symbols in the data and replace common symbols with shorter codes, or use advanced coding technology to minimize the space occupied by data, or identify and compress repeated information in the data for data compression, or analyze data distribution or time series changes to predict future data, thereby reducing the amount of data. Therefore, by determining the above distribution characteristics, it is possible to match the compression algorithm that is best at processing the distribution characteristics of this type of data based on different distribution characteristics, thereby ensuring data compression performance.
[0053] Optionally, the data characteristic value may also include the data length of the original data. This is based on the principle that data of different lengths have different compressibility, and a more efficient compression algorithm is selected.
[0054] Step 103: Determine a target compression algorithm corresponding to the original data according to the data characteristic value.
[0055] Specifically, the target compression algorithm is one of a plurality of candidate compression algorithms. The process of selecting the target compression algorithm includes: determining the target compression algorithm according to a mapping relationship between a preset data feature value and a compression algorithm; wherein the mapping relationship is dynamically adjusted according to the historical compression performance of each candidate compression algorithm for the historical data; and the data feature value of the historical data is the same as the data feature value of the original data.
[0056] Among them, the mapping relationship includes the mapping strength between the compression algorithm and the data eigenvalue, and the mapping strength is used to characterize the compression effect of the candidate compression algorithm on the original data. The greater the mapping strength between a specific data eigenvalue and the compression algorithm, the better the compression effect of the candidate compression algorithm on the original data, and it is the recommended compression algorithm corresponding to the original data. The compression effect of each candidate compression algorithm on the data with the current data eigenvalue is evaluated by evaluating the historical compression performance of the historical data, and the mapping relationship between the candidate compression algorithm and the data eigenvalue is determined according to the compression effect. For example, for the original data whose data eigenvalue represents high information entropy, the corresponding target compression algorithm can be the Huffman coding compression algorithm.
[0057] It is understandable that the mapping relationship can also be preset based on expert experience. Optionally, the mapping relationship can also be preset based on big data technology and artificial intelligence models. Among them, the historical transmission data of the target vehicle is analyzed and the compression pattern is recognized based on big data technology to obtain the mapping relationship. Optionally, an artificial intelligence algorithm can be used to dynamically predict the optimal mapping relationship through a deep learning model, and the accuracy of the mapping relationship can be improved by combining big data technology and artificial intelligence models.
[0058] In some embodiments, Figure 3 As shown, the process of determining the mapping relationship includes: Step 1031: Analyze the plurality of candidate compression algorithms respectively to obtain data feature values of compressible data of each candidate compression algorithm; the compressible data is data that can be compressed by the candidate compression algorithm.
[0059] The compressible data includes data that can be identified and compressed based on the candidate compression algorithm. Data feature extraction is performed on the compressible data of each candidate compression algorithm according to the aforementioned preset compression attribute feature dimension to obtain data feature values of the compressible data of each candidate compression algorithm.
[0060] For example, for a lossless compression algorithm based on a dictionary or pattern matching, the compression mode characteristics of this algorithm include maintaining a dictionary, and the corresponding compressible data is data including recurring data fragments. Compression algorithms based on frequency statistics and symbol replacement analyze the frequency of occurrence of symbols in the data and replace common symbols with shorter codes, so their compressible data is data including symbols with a frequency greater than a preset frequency threshold. Correspondingly, compression algorithms based on coding optimization design codes of unequal length according to the frequency of occurrence of symbols, represent high-frequency symbols with shorter codes, and represent low-frequency symbols with longer codes, thereby achieving lossless compression. Compression algorithms based on repetitive pattern recognition identify and compress repetitive information in data. Algorithms based on statistics and prediction predict future data by analyzing data distribution or time series changes, thereby reducing the amount of data, so their corresponding compressible data is data whose change rate compared to historical transmission data is less than a preset threshold.
[0061] Step 1032: Match the data feature value of the compressible data with the data feature value of the original data to obtain a feature matching result.
[0062] Specifically, the data characteristic value of the compressible data is compared with the data characteristic value of the original data, and a characteristic value comparison result is obtained as a characteristic matching result.
[0063] In some embodiments, the distribution features include the occurrence frequency features of the multiple data elements and the repetition features of the multiple data elements; the data feature values of the original data include the compression potential feature values of the original data. Figure 4 As shown, the feature matching process also includes: Step 321: Perform weighted summation based on the occurrence frequency feature and the repetition feature to obtain the compression potential feature value of the original data.
[0064] Among them, the information entropy of the original data can be calculated according to the frequency of occurrence characteristics, and the redundancy of the original data can be calculated according to the repetition characteristics. Information entropy can characterize the degree of disorder of the data. It can be understood that the more ordered the data is, the more effectively it can be compressed. Correspondingly, data with high disorder is highly random and it is difficult to find a compression model for it to compress it. According to the information entropy and redundancy of the original data, weighted summation is performed to obtain the compression potential characteristics of the original data. Specifically, the greater the redundancy and the lower the information entropy, the greater the compression potential of the original data, that is, the stronger the compressibility. Correspondingly, the smaller the redundancy and the higher the information entropy, the smaller the compression potential of the original data, that is, the weaker the compressibility. By performing weighted summation according to the frequency of occurrence characteristics and the repetition characteristics, the accuracy of the compression algorithm selection can be further improved.
[0065] Step 322: Calculate the compression potential characteristic value of the compressible data corresponding to each candidate compression algorithm.
[0066] Among them, for the compressible data corresponding to each candidate compression algorithm, the occurrence frequency feature and the repetition feature of the compressible data are extracted, and the compression potential feature value of the compressible data is obtained by weighted summing according to the occurrence frequency feature and the repetition feature of the compressible data. Specifically, the information entropy of the compressible data can be calculated according to the occurrence frequency feature, and the redundancy of the compressible data can be calculated according to the repetition feature. The compression potential feature value of the compressible data is obtained by weighted summing according to the information entropy and redundancy of the compressible data.
[0067] Step 323: Match the compression potential feature value of the compressible data with the compression potential feature value of the original data to obtain the feature matching result.
[0068] The compression potential feature value of the compressible data is compared with the compression potential feature value of the original data, and the similarity between the compression potential feature value of the compressible data and the compression potential feature value of the original data is used as a feature matching result.
[0069] Step 1033: Determine the mapping relationship according to the feature matching result.
[0070] The mapping strength is determined according to the similarity of the data feature values, and the higher the similarity, the greater the mapping strength.
[0071] In some embodiments, considering the variable characteristics of vehicle communication data, the performance includes large fluctuations in data changes in the vehicle communication network, such as in the CAN network of the car, the data transmitted between different types of control units has obvious volatility. For example, sensor data will fluctuate significantly with changes in vehicle driving conditions, especially when the environment changes such as temperature changes, sudden acceleration or sudden braking. The existing data compression field generally uses a fixed compression method for data compression, and the fixed compression algorithm is obviously not well adapted to the variability and diversity of the above-mentioned vehicle communication data.
[0072] Specifically, considering that the data in the transmission network of the target vehicle fluctuates greatly, new data features or data with more complex mixed features may appear. Correspondingly, the mapping relationship may not take into account and cover the above changes when it is set, resulting in a low accuracy of the mapping relationship. Therefore, in some embodiments, the mapping relationship can also be adjusted to make it more adaptable to the changeable characteristics of vehicle communication data. Specifically, the historical compression performance of each of the candidate compression algorithms for historical data with the data feature value within a preset historical time interval can be monitored, and the mapping relationship can be adjusted according to each of the historical compression performances, so that the adjusted mapping relationship is more accurate and effective in guiding the selection of the compression algorithm for the current original data. Specifically, the candidate compression algorithm with the best historical compression performance is selected as the target compression algorithm.
[0073] The historical time interval may be a preset number of historical transmission periods before the current original data, thereby improving the adjustment frequency and timeliness of the mapping relationship.
[0074] In some embodiments, Figure 5 As shown, the adjustment process of the mapping relationship also includes: Step 1034: Analyze the historical compression performance according to a preset compression performance evaluation dimension to obtain a historical compression performance score of each candidate compression algorithm on the historical data.
[0075] The compression performance evaluation dimension is used to evaluate the compression process of the compression algorithm for historical data with the goal of making the compressed data smaller, the compression process faster, and the compression process occupying less computing resources. Specifically, the compression performance evaluation dimension may include compression ratio, compression cost, etc., wherein the compression cost may include the time cost and computing resource cost occupied by running the compression algorithm. The compression ratio is used to characterize the degree of reduction of the amount of compressed data relative to the amount of original data.
[0076] Optionally, when there are multiple compression performance evaluation dimensions, a weighted sum may be taken according to the performance values under each compression performance evaluation dimension to obtain a compression performance score of the candidate compression algorithm for data having the data characteristic value.
[0077] Step 1035: Adjust the mapping relationship according to the historical compression performance score.
[0078] Specifically, the compression performance score is proportional to the mapping strength. For example, after the above steps, it is calculated that for data with low information entropy, the compression rate of the Huffman coding algorithm is greater than the compression rate of the LZW algorithm. Therefore, the mapping strength of the Huffman coding algorithm with data feature values of low information entropy is adjusted to be greater than the mapping strength of the LZW algorithm.
[0079] In some embodiments, considering that the performance of the data transmission process is affected by the amount of original data on the one hand, and by the network transmission performance of the vehicle communication network such as the CAN bus on the other hand, and the volatility of the vehicle communication process is relatively large, which is reflected not only in the variability of data, but also in the variability of the network conditions of the vehicle communication network, therefore, in some embodiments, such as Figure 6 As shown, the process of determining the mapping relationship also includes: Step 1036: Obtain the current network transmission performance of the target vehicle.
[0080] The network transmission performance represents the network resources used by the target vehicle for data transmission. Specifically, the network transmission performance may include packet loss rate, network speed, transmission delay, etc.
[0081] Step 1037: Calculate the estimated transmission delay of the candidate compression algorithm for the original data based on the network transmission performance.
[0082] Specifically, the estimated transmission delay may be the sum of the estimated duration of the compression process and the estimated duration of the transmission process. Data having data characteristic values may be pre-compressed according to a candidate compression algorithm to obtain the estimated duration of the compression process and the pre-compressed data, and the estimated duration of the compression process may be calculated according to the network transmission performance and the pre-compressed data.
[0083] Step 1038: Adjust the mapping relationship according to the expected transmission delay, and use the adjusted mapping relationship as the mapping relationship.
[0084] Specifically, it is expected that the transmission delay is inversely proportional to the mapping intensity, that is, the smaller the transmission delay, the higher the mapping intensity. The impact of the current network transmission performance on the data transmission performance is considered on the basis of the compression property. When the data characteristics change and the network conditions change, the mapping relationship can be optimized in time to improve the communication performance of the target vehicle more comprehensively.
[0085] It should be noted that the compression algorithm is switched after the transmission of a data packet is completed, avoiding switching the compression algorithm during the data transmission process of a single data packet to ensure communication stability.
[0086] Step 104: compress the original data according to the target compression algorithm to obtain compressed data.
[0087] The original data is compressed through the target compression algorithm to reduce the amount of data to be transmitted and improve the transmission performance of vehicle communication data.
[0088] Step 105: Transmit the compressed data.
[0089] Specifically, the compressed data may be transmitted via a preset transmission network on the target vehicle, such as a CAN bus network.
[0090] By adopting the above technical solution, based on the diversity of vehicle communication data and according to the data characteristic values of the original data, the algorithm that best suits the data of the current data characteristic values is selected, thereby improving the compression effect of various types of vehicle communication data, which can improve the performance of vehicle communication and ensure the real-time and reliability of vehicle control. Optionally, considering the large volatility of vehicle communication data, the compression performance of a specific compression algorithm for changing data may vary in quality, therefore, the mapping relationship in this embodiment is dynamically adjusted according to the historical compression performance of each candidate compression algorithm.
[0091] Please refer to Figure 7 , is a schematic diagram of the structure of the data transmission device 201 provided in the embodiment of the present application. Figure 7 As shown, the data transmission device 201 includes: The acquisition module 2001 is used to acquire the original data to be transmitted of the target vehicle; An extraction module 2002 is used to extract data features of the original data to obtain data feature values of the original data; A determination module 2003, configured to determine a target compression algorithm corresponding to the original data according to the data characteristic value; A compression module 2004, used to compress the original data according to the target compression algorithm to obtain compressed data; The transmission module 2005 is used to transmit the compressed data.
[0092] Please refer to Figure 8 , is a schematic diagram of the hardware structure of the data transmission device 301 provided in the embodiment of the present application. Figure 8 As shown, the data transmission device 301 may include a processor 3001 and a memory 3002. The memory 3002 is used to store one or more computer programs 3003. The one or more computer programs 3003 are configured to be executed by the processor 3001. The one or more computer programs 3003 include instructions, and the above instructions can be used to implement the above data transmission method in the data transmission device 301.
[0093] It is understandable that the structure shown in this embodiment does not constitute a specific limitation on the data transmission device 301. In other embodiments, the data transmission device 301 may include more or fewer components than shown, or combine or split some components, or arrange the components differently.
[0094] The processor 3001 may include one or more processing units, for example, the processor 3001 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0095] The processor 3001 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 3001 is a cache memory. The memory may store instructions or data that the processor 3001 has just used or circulated. If the processor 3001 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 3001, and thus improves the efficiency of the system.
[0096] In some embodiments, the processor 3001 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface, etc.
[0097] In some embodiments, the processor 3001 is used to execute acceleration schemes such as single instruction multiple data (SIMD) and very long instruction word (VLIW).
[0098] In some embodiments, memory 3002 may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0099] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the instructions are executed on a processor, the processor executes the above-mentioned related method steps to implement the data transmission method in the above-mentioned embodiment.
[0100] Among them, the data transmission device and computer storage medium provided in this embodiment are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0101] In practical applications, the above functions can be distributed to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0102] In several embodiments provided in the present application, the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are schematic. For example, the division of the modules or units is a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0103] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
[0104] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute 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 (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0106] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.
Claims
1. A data transmission method, characterized in that: The data transmission method comprises: Obtaining raw data to be transmitted from the target vehicle; Extracting data features of the original data to obtain data feature values of the original data; Determining a target compression algorithm corresponding to the original data according to the data characteristic value; Compressing the original data according to the target compression algorithm to obtain compressed data; The compressed data is transmitted.
2. The method according to claim 1, characterized in that The target compression algorithm is one of a plurality of candidate compression algorithms; the process of determining the target compression algorithm includes: The target compression algorithm is determined based on a mapping relationship between preset data feature values and compression algorithms; wherein the mapping relationship is dynamically adjusted according to the historical compression performance of the historical data based on each candidate compression algorithm; and the data feature values of the historical data are the same as the data feature values of the original data.
3. The method according to claim 1, characterized in that The extracting the data features of the original data to obtain the data feature values of the original data includes: Performing data content identification on the original data to obtain data field content included in the original data; Feature extraction is performed on the data field content according to a preset compression attribute feature dimension to obtain the data feature value.
4. The method according to claim 3, characterized in that: The original data includes multiple data elements; the compression attribute feature dimension includes at least one of a data type feature, a data content feature, and a data timing feature; wherein the data content feature includes a distribution feature of the multiple data elements in the original data.
5. The method according to claim 2, characterized in that: in, The process of determining the mapping relationship includes: Analyze the plurality of candidate compression algorithms respectively to obtain data characteristic values of compressible data of each candidate compression algorithm; the compressible data is data that can be compressed by the candidate compression algorithm; Matching the data characteristic value of the compressible data with the data characteristic value of the original data to obtain a characteristic matching result; The mapping relationship is determined according to the feature matching result.
6. The method according to claim 2, characterized in that The mapping relationship adjustment process includes: Analyze the historical compression performance according to a preset compression performance evaluation dimension to obtain a historical compression performance score of each candidate compression algorithm on the historical data; The mapping relationship is dynamically adjusted according to the historical compression performance score.
7. The method according to claim 2, characterized in that The mapping relationship adjustment process further includes: Obtaining the current network transmission performance of the target vehicle; Calculate the estimated transmission delay of the original data by each of the candidate compression algorithms according to the network transmission performance; The mapping relationship is dynamically adjusted according to the expected transmission delay.
8. A data transmission device, characterized in that: The data transmission device comprises: An acquisition module, used for acquiring the original data to be transmitted of the target vehicle; An extraction module, used to extract data features of the original data to obtain data feature values of the original data; A determination module, used to determine a target compression algorithm corresponding to the original data according to the data characteristic value; A compression module, used for compressing the original data according to the target compression algorithm to obtain compressed data; A transmission module is used to transmit the compressed data.
9. A data transmission device, comprising a processor and a memory, characterized in that: The memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the data transmission device executes the data transmission method according to any one of claims 1 to claim 7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are executed on a processor, the processor is caused to perform the data transmission method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data compression method and device, computing equipment and storage system
CN115599757A
Hardware implementation method and system of adaptive compression algorithm based on configurable logic
CN116578542A
Internet of Vehicles data transmission method, apparatus and device, and medium
CN116800796A
Data stream compression method and system and storage medium
CN117879617A
Dynamic Compression of Systems Management Data
US20090157712A1
Cited By
Adaptive data compression method and system for controller area network (CAN)
CN121125015A