An efficient data transmission method and system for vehicle-mounted USB transmission
By screening and analyzing the characteristic differences between the on-board terminal and the historical event queue, the target hash sequence is constructed to improve the data block matching efficiency, solving the problem of low transmission efficiency in the on-board system, real-time data synchronization is achieved, and user experience and system security is improved. sex.
Patent Information
- Application Number
- CN202411124927.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-16
AI Technical Summary
The existing vehicle-mounted systems have problems with low transmission efficiency during data transmission, especially in scenarios where data volume is large and frequent transmissions, the traditional rsync data synchronization algorithm fails to effectively consider the order differences of data segments, resulting in slow matching speed. , affects the user experience.
By obtaining the current event queue of the on-board terminal and the same type of historical event queue, analyzing the proportion and differences of the number of feature dimensions, filtering out the comparison event queue with high similarity, and hash analysis of the data blocks to build the target hash Sequences to improve matching efficiency and achieve fast matching and synchronization of data blocks.
It improves the matching efficiency between the on-board terminal data and the mobile phone data, meets the real-time requirements of the on-board system, ensures that the navigation, entertainment and other systems can update data in a timely manner, and improves driving experience and safety.
Smart Images

Figure CN118656331B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data communication, and in particular to an efficient data transmission method and system for vehicle-mounted USB transmission. Background Art
[0002] In the in-vehicle information system, data transmission and synchronization is one of the key technical links. With the development of automobile intelligence, the demand for data transmission between in-vehicle terminals and mobile devices has gradually increased. Modern vehicles are usually equipped with multiple sensors, entertainment systems, navigation systems, etc. These systems need to frequently exchange data with mobile devices (such as smartphones) to achieve multimedia content transmission, real-time map updates, driving behavior analysis and other functions. Most of the data transmission technologies on the current market rely on traditional USB transmission protocols and wireless transmission protocols. Although these technologies can meet basic transmission needs, in scenarios with large data volumes and frequent transmissions, the existing transmission methods still have certain bottlenecks in terms of speed and efficiency.
[0003] In vehicle systems, many data transmissions have high real-time requirements. However, when processing large amounts of data, the traditional rsync data synchronization algorithm does not take into account the order of matching different data segments, resulting in a lower order of some data segments with a lower probability of change in the hash table, and a higher number of repeated matches of the same data segment, resulting in a slower matching speed and low overall data transmission efficiency, affecting user experience. Summary of the invention
[0004] In order to solve the problem of low transmission efficiency in the existing vehicle-mounted system when performing data transmission, the purpose of the present invention is to provide an efficient data transmission method and system for vehicle-mounted USB transmission. The technical solution adopted is as follows:
[0005] In a first aspect, the present invention provides an efficient data transmission method for vehicle-mounted USB transmission, the method comprising the following steps:
[0006] Get the current event queue corresponding to the vehicle terminal and the historical event queue of the same type as the current event queue;
[0007] Combining the proportion of the same feature dimension in the current event queue and the historical event queues of the same type, and the difference between the event information of the same feature dimension, the transmission similarity between the current event queue and each corresponding historical event queue is obtained, and the event queues are screened and compared using the transmission similarity;
[0008] Divide the data to be updated corresponding to the current event queue of the vehicle terminal and the data corresponding to the comparison event queue into data blocks, and obtain the hash value of each data block; analyze the difference between the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to the comparison event queue, and obtain the change probability of each data block corresponding to the current event queue;
[0009] Based on the relative size relationship of the change probability of each data block corresponding to the current event queue of the vehicle terminal, a target hash sequence is obtained; based on the target hash sequence, the data block of the vehicle terminal is matched with the data block of the mobile phone, and the vehicle terminal data and the mobile phone data are synchronized according to the matching result.
[0010] Preferably, the method combines the proportion of the number of the same feature dimensions in the current event queue and the historical event queues of the same type, and the difference between the event information of the same feature dimensions, to obtain the transmission similarity between the current event queue and each corresponding historical event queue, including:
[0011] Obtaining a maximum value between the number of feature dimensions included in the current event queue and the number of feature dimensions included in the candidate event queue; recording a ratio between the number of feature dimensions that are the same as the current event queue and the candidate event queue and the maximum value as a first quantity ratio;
[0012] According to the overall difference between the event information of the same feature dimension of the current event queue and the candidate event queue, and the first quantity ratio, the transmission similarity between the current event queue and the candidate event queue is obtained, the first quantity ratio is positively correlated with the transmission similarity, and the overall difference is negatively correlated with the transmission similarity;
[0013] The candidate event queue is any historical event queue of the same type as the current event queue.
[0014] Preferably, the use of the transmission similarity to screen and compare event queues includes:
[0015] The historical event queue whose transmission similarity is greater than a preset similarity threshold is determined as a comparison event queue.
[0016] Preferably, analyzing the difference between the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to the comparison event queue to obtain the change probability of each data block corresponding to the current event queue includes:
[0017] The minimum value of the difference between the hash value of the data block to be analyzed and the hash values of all data blocks corresponding to each comparison event queue is recorded as the hash difference corresponding to each comparison event queue;
[0018] Obtain the change probability of the data block to be analyzed according to the overall distribution of hash differences corresponding to all comparison event queues;
[0019] The data block to be analyzed is any data block corresponding to the current event queue.
[0020] Preferably, obtaining the difference between the hash values of two data blocks includes:
[0021] The Hamming distance between the hash values of two data blocks is taken as the difference between the hash values of the corresponding two data blocks.
[0022] Preferably, obtaining the change probability of the data block to be analyzed according to the overall distribution of hash differences corresponding to all comparison event queues includes:
[0023] The sum of the hash differences corresponding to all comparison event queues is used as the change probability of the data block to be analyzed.
[0024] Preferably, the step of obtaining the target hash sequence based on the relative size relationship of the probability of change of each data block corresponding to the current event queue of the vehicle terminal includes:
[0025] According to the order of the change probability of all data blocks corresponding to the current event queue of the vehicle terminal from small to large, the hash values of all data blocks corresponding to the current event queue of the vehicle terminal are sorted to obtain the target hash sequence.
[0026] Preferably, matching the data block of the vehicle terminal with the data block of the mobile phone based on the target hash sequence, and synchronizing the vehicle terminal data with the mobile phone data according to the matching result, includes:
[0027] According to the order of the elements in the target hash sequence from left to right, the hash value corresponding to the data block corresponding to each element in the target hash sequence is matched with the hash value of the data block on the mobile phone. If the match is successful, the vehicle terminal data will not be updated; if the match is unsuccessful, the vehicle terminal data will be updated according to the data of the data block on the mobile phone.
[0028] Preferably, obtaining the difference between the event information of the same characteristic dimension in the current event queue and the historical event queue of the same type includes:
[0029] The edit distance between the event information of each feature dimension that is the same between the current event queue and the candidate event queue is calculated as the difference between the event information of each feature dimension that is the same between the current event queue and the candidate event queue.
[0030] In a second aspect, the present invention provides an efficient data transmission system for vehicle-mounted USB transmission, the system comprising:
[0031] A data acquisition module is used to obtain the current event queue corresponding to the vehicle terminal and the historical event queue of the same type as the current event queue;
[0032] A comparison event queue screening module is used to obtain the transmission similarity between the current event queue and each corresponding historical event queue by combining the proportion of the number of the same feature dimensions and the difference between the event information of the same feature dimensions in the current event queue and the historical event queue of the same type, and screen the comparison event queue using the transmission similarity;
[0033] The change probability determination module is used to divide the to-be-updated data corresponding to the current event queue of the vehicle terminal and the data corresponding to the comparison event queue into data blocks, and obtain the hash value of each data block; analyze the difference between the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to the comparison event queue, and obtain the change probability of each data block corresponding to the current event queue;
[0034] The data synchronization module is used to obtain a target hash sequence based on the relative size relationship of the change probability of each data block corresponding to the current event queue of the vehicle terminal; match the data block of the vehicle terminal with the data block of the mobile phone based on the target hash sequence, and synchronize the vehicle terminal data with the mobile phone data according to the matching result.
[0035] The present invention has at least the following beneficial effects:
[0036] Taking into account that the existing methods have low matching efficiency when matching vehicle-mounted terminal data with mobile phone-end data, which in turn affects the real-time performance of data synchronization, the present invention first combines the current event queue and the historical event queues of the same type with the number of the same feature dimensions and the difference between the event information of the same feature dimensions, and selects a comparison event queue from the historical event queues of the same type as the current event queue. The comparison event queue has a higher similarity to the current event queue and is more meaningful for reference. The present invention divides the data to be updated corresponding to the current event queue of the vehicle-mounted terminal and the data corresponding to the comparison event queue into data blocks, and further compares the hash value of each data block corresponding to the current event queue with the hash value of the comparison event queue. The difference between the hash values of each data block corresponding to the event queue is analyzed, and the change probability of each data block corresponding to the current event queue is obtained. In order to improve the matching efficiency of the vehicle terminal data and the mobile phone data, a target hash sequence is constructed based on the relative size relationship of the data block change probability, and the data block of the vehicle terminal is matched with the data block of the mobile phone based on the element position in the target hash sequence, thereby realizing the synchronization of the vehicle terminal data and the mobile phone data. The optimized data transmission method provided by the present invention can complete data synchronization more quickly, meet the real-time requirements of the vehicle system, ensure that the navigation, entertainment and other systems can update data in time, and improve the driving experience and safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A flowchart of an efficient data transmission method for vehicle-mounted USB transmission provided by an embodiment of the present invention;
[0039] Figure 2 A flow chart of a method for obtaining a change probability provided by an embodiment of the present invention;
[0040] Figure 3 This is a structural block diagram of an efficient data transmission system for vehicle-mounted USB transmission provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of an efficient data transmission method and system for vehicle-mounted USB transmission proposed by the present invention in combination with the accompanying drawings and preferred embodiments.
[0042] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0043] The following is a detailed description of a specific scheme of an efficient data transmission method and system for vehicle-mounted USB transmission provided by the present invention in conjunction with the accompanying drawings. The present application can increase the rate of data transmission or update based on the USB transmission protocol. A communication handshake is required before data transmission or update, which will not be described here.
[0044] An embodiment of an efficient data transmission method for vehicle-mounted USB transmission:
[0045] The specific scenario targeted by this embodiment is: in order to ensure the synchronization of the vehicle terminal data and the mobile phone data, the data needs to be transmitted in real time. For the traditional rsync data synchronization algorithm, during the data synchronization transmission process, the matching of different data segments is only based on the hash value generated by its check code, without considering the probability of changes in different data segments. Based on the original algorithm, this embodiment uses the similarity between the data transmission corresponding to different events to re-order the hash values of each data block in the transmission process of the newly added event, and then matches the data blocks based on the order of the elements in the target hash sequence, so that the hash values of the data segments with a smaller probability of change are arranged in front in the hash table. When looking for matching data segments, the corresponding data segments can be found more quickly to speed up the matching of data blocks and achieve the purpose of quickly transmitting the data on the mobile phone to the vehicle terminal.
[0046] This embodiment proposes an efficient data transmission method for vehicle-mounted USB transmission, such as Figure 1 As shown, an efficient data transmission method for vehicle-mounted USB transmission in this embodiment includes the following steps:
[0047] Step S1, obtaining a current event queue corresponding to the vehicle-mounted terminal and a historical event queue of the same type as the current event queue.
[0048] First, the current event queue corresponding to the vehicle terminal is obtained from the vehicle system. Considering that there are many types of event information, such as navigation, playing music, etc., before the data transmission of the newly added event is performed, it is necessary to consider the similar features between the newly added event and multiple historical events, and then analyze whether each data segment can be obtained in the historical data during the data transmission corresponding to the current event, thereby reducing the transmission of redundant data and improving the data transmission efficiency. Therefore, the event queue of the same type as the current event queue has a certain reference significance, so multiple historical event queues of the same type as the current event queue in the historical time period are obtained from the vehicle system. In this embodiment, the historical time period is a set of all historical moments whose time interval with the current moment is less than or equal to the preset time length. The preset time length in this embodiment is one month. In specific applications, the implementer can set it according to the specific situation.
[0049] Event information mainly includes event information such as the regulation of some vehicle-mounted terminals, and also includes the data transmission between the vehicle-mounted terminal and the mobile phone. Events that require data transmission include: video data, navigation requires map data, music playback requires song data, physiological information data, etc.; for events such as vehicle-mounted environment control, for example: adjusting the temperature of the vehicle air-conditioning, adjusting the lights in the car, etc., these events are events that do not require data transmission. It should be noted that: the current event queue in this embodiment is an event queue that needs to be transmitted.
[0050] When an event requires data transmission, the vehicle terminal guides the smartphone to enter the USB large-capacity data transmission mode, the vehicle terminal sends a data request to the smartphone, and then the vehicle terminal is updated according to the data returned by the smartphone.
[0051] At this point, the current event queue corresponding to the vehicle terminal and the historical event queue of the same type as the current event queue are obtained.
[0052] Step S2, combining the proportion of the number of the same feature dimensions in the current event queue and the historical event queues of the same type, and the difference between the event information of the same feature dimensions, obtains the transmission similarity between the current event queue and each corresponding historical event queue, and uses the transmission similarity to screen and compare event queues.
[0053] Considering that an event mainly contains the following information: the type of event, the time when the event occurred, and the multi-dimensional features contained in the event, taking the playback of media as an example, it includes multi-dimensional data such as the path of the media file, the music title, the album name, and the duration of the media file. When two events have different content types, they are not comparable. For the same event type, the final transmission similarity of the two events can be obtained by analyzing the similarity between the data under the same feature dimension, and the event queue can be screened and compared from the acquired historical event queue based on the transmission similarity.
[0054] Specifically, a historical event queue is taken as an example for description, and other historical time queues can be processed using the method provided in this embodiment.
[0055] Any historical event queue of the same type as the current event queue is recorded as a candidate event queue. Obtain the maximum value between the number of feature dimensions contained in the current event queue and the number of feature dimensions contained in the candidate event queue; record the ratio between the number of feature dimensions that the current event queue and the candidate event queue have in common and the maximum value as the first quantity ratio. Based on the overall difference between the event information of the same feature dimension between the current event queue and the candidate event queue, and the first quantity ratio, the transmission similarity between the current event queue and the candidate event queue is obtained, the first quantity ratio is positively correlated with the transmission similarity, and the overall difference is negatively correlated with the transmission similarity.
[0056] The difference between the event information of the same feature dimension of the current event queue and the candidate event queue can be represented by a variety of indicators. In this embodiment, the edit distance is used to characterize the difference between the two event information.
[0057] A positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. The specific relationship can be a multiplication relationship, an addition relationship, or the power of an exponential function. A negative correlation means that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtraction relationship, a division relationship, etc., which is determined by actual application.
[0058] In this embodiment, a specific calculation formula for transmission similarity is given. The transmission similarity between the current event queue and the j-th historical event queue of the same type can be expressed as:
[0059]
[0060] in, represents the transmission similarity between the current event queue and the jth historical event queue of the same type, Indicates the number of feature dimensions contained in the current event queue. Indicates the number of feature dimensions contained in the current event queue and the j-th historical event queue of the same type. express and The maximum of the two, represents the edit distance between the event information of the current event queue and the jth historical event queue of the same type with the same rth feature dimension, represents the maximum value function, represents the preset first adjustment parameter, and norm() represents the normalization function.
[0061] In this embodiment, the preset first adjustment parameter is introduced into the calculation formula of transmission similarity in order to prevent the denominator from being 0. In this embodiment, the preset first adjustment parameter is 0.01. In specific applications, the implementer can set it according to specific circumstances. The first quantity proportion corresponding to the j-th historical event queue is characterized; the edit distance between the event information of the current event queue and the j-th historical event queue of the same type with the same r-th feature dimension is used to reflect the difference between the event information of the current event queue and the j-th historical event queue of the same type with the same r-th feature dimension. The larger the edit distance, the greater the difference between the two time information. The method for obtaining the edit distance is a prior art and will not be elaborated here.
[0062] The larger the proportion of the first quantity corresponding to the j-th historical event queue and the smaller the editing distance between the event information of the same feature dimension of the current event queue and the j-th historical event queue of the same type, the higher the similarity between the current event queue and the j-th historical event queue of the same type, that is, the greater the transmission similarity between the current event queue and the j-th historical event queue of the same type.
[0063] By adopting the above method, the transmission similarity between the current event queue and each corresponding historical event queue can be obtained. The historical event information with greater transmission similarity is more suitable as the reference event queue of the current event queue. Therefore, the historical event queue with transmission similarity greater than the preset similarity threshold is determined as the comparison event queue, that is, multiple comparison event queues are obtained. In this embodiment, the preset similarity threshold is 0.8. In specific applications, the implementer can set it according to the specific situation.
[0064] So far, all historical event queues have been screened using the method provided in this embodiment, and a plurality of comparison event queues have been screened out.
[0065] Step S3, divide the data to be updated corresponding to the current event queue of the vehicle terminal and the data corresponding to the comparison event queue into data blocks, and obtain the hash value of each data block; analyze the difference between the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to the comparison event queue, and obtain the change probability of each data block corresponding to the current event queue.
[0066] Some events require the vehicle terminal and the mobile phone to transfer data through the vehicle USB, and in the data transmission corresponding to these events, some data transmission is based on the original data, and the data is updated and synchronized, such as media library synchronization update, message synchronization update, application data synchronization update, etc.; for these data, some data already exists in multiple historical events. When synchronizing the data of the current event with the mobile phone, consider improving the transmission of the newly added event through the data transmission content corresponding to the historical event; and when there is no data transmission with the mobile phone at a time, the event is an event inside the vehicle terminal and is automatically processed according to the vehicle terminal system. Data update events are manual requests for data updates by users through the interface of the vehicle terminal, or requests for data updates by the system through the automatic data update system, such as clicking to update the navigation map, synchronizing contacts, obtaining the latest weather information, etc., and then adding the update time to the event queue of the vehicle terminal. When the previous data queue is processed, the vehicle terminal sends an update to the mobile phone.
[0067] Step S31 , dividing the data to be updated corresponding to the current event queue of the vehicle terminal and the data corresponding to the comparison event queue into data blocks, and obtaining a hash value of each data block.
[0068] For the data to be updated corresponding to the current event queue of the vehicle terminal, the traditional rsync data synchronization algorithm is first used to divide it into blocks, and the original data is divided into blocks with each 512 bytes as a data block to obtain multiple data blocks corresponding to the current event queue. In the subsequent data update and synchronization process, it is necessary to analyze the differences between the data of each data block and the data of the mobile phone, and then determine which data needs to be further transmitted. At the same time, the traditional rsync data synchronization algorithm is used to perform the same data block division on the data corresponding to each comparison event queue, and obtain multiple data blocks corresponding to each historical event queue, and then obtain the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to each historical event queue. The rsync data synchronization algorithm and the method for obtaining the hash value are both prior art and will not be described in detail here.
[0069] Step S32, analyzing the difference between the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to the comparison event queue, and obtaining the change probability of each data block corresponding to the current event queue.
[0070] The traditional rsync data synchronization algorithm does not take into account the correlation between the data transmitted by the historical event queue during the data synchronization transmission process. In the traditional data transmission process, the checksum of the data information of the vehicle terminal will cause the matching speed of its data segment to be slow after it reaches the mobile phone. The data matching process will spend a long time matching the same data, resulting in a slow data synchronization speed. This embodiment will determine the change probability of each data block corresponding to the current event queue based on the difference between the hash value of the data block corresponding to the current event queue and the hash value of the data block corresponding to the comparison event queue, and then construct a target hash sequence, determine the matching order of the data blocks based on the order of the target hash sequence elements, and improve the matching efficiency.
[0071] Next, a data block corresponding to the current event queue is taken as an example for description. The method provided in this embodiment can be used to process other data blocks corresponding to the current event queue.
[0072] Specifically, any data block corresponding to the current event queue is recorded as the data block to be analyzed, and the minimum value of the difference between the hash value of the data block to be analyzed and the hash values of all data blocks corresponding to each comparison event queue is recorded as the hash difference corresponding to each comparison event queue. By adopting this method, the hash difference corresponding to each comparison event queue can be obtained, and the sum of the hash differences corresponding to all comparison event queues can be used as the change probability of the data block to be analyzed.
[0073] The specific process of obtaining the difference between the hash values of the two data blocks is: taking the Hamming distance between the hash values of the two data blocks as the difference between the hash values of the corresponding two data blocks.
[0074] In this embodiment, a specific calculation formula for the change probability is given, and the change probability of the u-th data block corresponding to the current event queue can be expressed as:
[0075]
[0076] in, represents the change probability of the u-th data block corresponding to the current event queue, M represents the number of comparison events, Indicates the number of all data blocks corresponding to the k-th comparison event queue, Indicates the hash value of the u-th data block corresponding to the current event queue, Represents the hash value of the vth data block corresponding to the kth comparison event queue, represents a hash function, represents the Hamming distance function, Represents the minimum value function.
[0077] The Hamming distance between the hash value of the u-th data block corresponding to the current event queue and the hash value of the v-th data block corresponding to the k-th comparison event queue is used to reflect the difference between the hash values of the two data blocks. The larger the Hamming distance, the greater the difference between the hash codes of the two data blocks. The minimum value of the difference between the hash value of the u-th data block corresponding to the current event queue and the hash values of all data blocks corresponding to the k-th comparison event queue, that is, the hash difference corresponding to the k-th comparison event queue. The larger the hash difference corresponding to the comparison event queue, the larger the difference between the hash values of the u-th data block corresponding to the current event queue and the comparison event queue, that is, the greater the probability of change of the u-th data block corresponding to the current event queue.
[0078] By adopting the above method, the change probability of each data block corresponding to the current event queue can be obtained.
[0079] Step S4, obtaining a target hash sequence based on the relative size relationship of the change probability of each data block corresponding to the current event queue of the vehicle terminal; matching the data block of the vehicle terminal with the data block of the mobile phone based on the target hash sequence, and synchronizing the vehicle terminal data with the mobile phone data according to the matching result.
[0080] After the vehicle terminal divides the data to be updated corresponding to the current event queue into a series of fixed-size data blocks, it numbers the data blocks with chunk numbers and records the starting offset address and length of the data blocks. Two checksums are calculated for each data block based on its content: a 32-bit weak rolling checksum and a 128-bit MD4 strong checksum. All strong and weak checksums calculated for the file to be updated are added to the corresponding data block to form a checksum set, which is then sent to the mobile phone through the vehicle USB again.
[0081] After the strong and weak check codes corresponding to the data block to be updated corresponding to the current event queue arrive at the mobile phone, the traditional method is to use each check code in the check code set to calculate a 16-bit hash value, and put every 216 hash values into a hash table in hash order. Each hash entry in the hash table points to the check code corresponding to it in the check code set, and then the check code set is sorted according to the hash value, and then the check code and hash value are calculated for the data to be updated (such as map data) contained in the mobile phone, and the data block is rolled and matched according to the hash value. However, in the same hash table, the order corresponding to different data blocks depends only on the size of the hash value, and the change probability of different data blocks is not taken into account, which leads to low matching efficiency of data blocks. This embodiment will use the relative size relationship of the change probability of all data blocks corresponding to the current event queue of the vehicle terminal to sort the hash values of different data blocks, and then match them, improve the matching efficiency, and ensure the real-time and accuracy of data synchronization.
[0082] Because in the subsequent matching process, the hash corresponding to each data block needs to be compared when matching the data block that has actually changed, and for the data block that has not changed, its corresponding data block will be found under a certain hash value during the matching process, and further confirmation will be performed subsequently. In order to increase the matching speed, the hash values corresponding to the data blocks with lower probability values are placed in front, which can reduce the matching time of the unchanged data blocks. Therefore, after obtaining the hash value of each data block of the vehicle terminal, the hash values of all data blocks corresponding to the current event queue of the vehicle terminal are sorted in order from small to large according to the change probability of all data blocks corresponding to the current event queue of the vehicle terminal, and the sequence obtained at this time is recorded as the target hash sequence.
[0083] After obtaining the target hash sequence, the data to be transmitted on the mobile phone (such as map data) is divided into the same data blocks on the mobile phone, and then the hash values of the mobile phone data blocks and the vehicle terminal data blocks are matched. Since the data blocks with a lower probability of change are ranked earlier in the target hash sequence, the matching time for the data blocks with more changes is shorter, and the matching time for the data blocks that have actually changed will not increase.
[0084] Specifically, according to the order of elements in the target hash sequence from left to right, the hash value corresponding to the data block corresponding to each element in the target hash sequence is matched with the hash value of the data block on the mobile phone. If the match is successful, the vehicle terminal data will not be updated; if the match is unsuccessful, the changed data block will be marked on the mobile phone, and the changed data block will be transmitted through the vehicle USB. When the vehicle terminal receives each piece of data, it will immediately reorganize it into a temporary file. After the temporary file is successfully reorganized, the vehicle terminal will modify the attribute information of the temporary file, rename the file and overwrite the existing data file under the target path, that is, the path of the update file corresponding to the current event queue.
[0085] At this point, the method provided in this embodiment has been used to quickly transmit the mobile phone data to the vehicle-mounted terminal.
[0086] This embodiment takes into account that the existing methods have low matching efficiency when matching vehicle terminal data with mobile phone data, which in turn affects the real-time performance of data synchronization. This embodiment first combines the current event queue and the historical event queues of the same type with the number of the same feature dimensions and the difference between the event information of the same feature dimensions, and selects a comparison event queue from the historical event queues of the same type as the current event queue. The comparison event queue has a higher similarity to the current event queue and is more meaningful for reference. This embodiment divides the data to be updated corresponding to the current event queue of the vehicle terminal and the data corresponding to the comparison event queue into data blocks, and further compares the hash value of each data block corresponding to the current event queue with the comparison event queue. The differences between the hash values of each data block corresponding to the event queue are analyzed, and the change probability of each data block corresponding to the current event queue is obtained. In order to improve the matching efficiency of the vehicle terminal data and the mobile phone data, a target hash sequence is constructed based on the relative size relationship of the data block change probability, and the data block of the vehicle terminal is matched with the data block of the mobile phone based on the element position in the target hash sequence, thereby realizing the synchronization of the vehicle terminal data and the mobile phone data. The optimized data transmission method provided in this embodiment can complete data synchronization more quickly, meet the real-time requirements of the vehicle system, ensure that the navigation, entertainment and other systems can update data in time, and improve the driving experience and safety.
[0087] An embodiment of an efficient data transmission system for vehicle-mounted USB transmission:
[0088] See also Figure 3 , which shows a structural block diagram of an efficient data transmission system for vehicle-mounted USB transmission provided by an embodiment of the present invention. The system may include a data acquisition module, a comparison event queue screening module, a change probability determination module and a data synchronization module.
[0089] The data acquisition module is used to obtain the current event queue corresponding to the vehicle terminal and the historical event queue of the same type as the current event queue;
[0090] A comparison event queue screening module is used to obtain the transmission similarity between the current event queue and each corresponding historical event queue by combining the proportion of the number of the same feature dimensions and the difference between the event information of the same feature dimensions in the current event queue and the historical event queue of the same type, and screen the comparison event queue using the transmission similarity;
[0091] The change probability determination module is used to divide the to-be-updated data corresponding to the current event queue of the vehicle terminal and the data corresponding to the comparison event queue into data blocks, and obtain the hash value of each data block; analyze the difference between the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to the comparison event queue, and obtain the change probability of each data block corresponding to the current event queue;
[0092] The data synchronization module is used to obtain a target hash sequence based on the relative size relationship of the change probability of each data block corresponding to the current event queue of the vehicle terminal; match the data block of the vehicle terminal with the data block of the mobile phone based on the target hash sequence, and synchronize the vehicle terminal data with the mobile phone data according to the matching result.
[0093] It should be understood that the above data transmission system can use the efficient data transmission method for vehicle-mounted USB transmission in the above embodiment to realize data transmission; Figure 3 The structural block diagram of an efficient data transmission system for vehicle-mounted USB transmission and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art can understand that the above-mentioned method and system can be implemented using computer executable instructions and / or included in a processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The system and its modules of this specification can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software (for example, firmware).
[0094] For more details about the above modules, please refer to other places in this manual (for example Figure 1 , Figure 2 part and its related description), which will not be repeated here.
[0095] In other embodiments, a device is also provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the device executes the above-mentioned efficient data transmission method for vehicle-mounted USB transmission. The device can be specifically a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the above-mentioned efficient data transmission method for vehicle-mounted USB transmission provided in the above embodiment.
[0096] In other embodiments, a computer program product is also provided. When the computer program product is run on a computer, the computer executes the above-mentioned related steps to implement an efficient data transmission method for vehicle-mounted USB transmission provided by the above embodiment.
[0097] In other embodiments, a computer-readable storage medium is also provided, in which a computer program code is stored. When the computer program code is run on a computer, the computer executes the above-mentioned related method steps to implement an efficient data transmission method for vehicle-mounted USB transmission provided in the above embodiment.
[0098] Among them, the provided systems, devices, computer program products, and computer-readable storage media are all 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.
[0099] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An efficient data transmission method for vehicle-mounted USB transmission, characterized in that: The method comprises the following steps: Get the current event queue corresponding to the vehicle terminal and the historical event queue of the same type as the current event queue; Combining the proportion of the same feature dimension in the current event queue and the historical event queues of the same type, and the difference between the event information of the same feature dimension, the transmission similarity between the current event queue and each corresponding historical event queue is obtained, and the event queues are screened and compared using the transmission similarity; Divide the data to be updated corresponding to the current event queue of the vehicle terminal and the data corresponding to the comparison event queue into data blocks, and obtain the hash value of each data block; analyze the difference between the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to the comparison event queue, and obtain the change probability of each data block corresponding to the current event queue; Based on the relative size relationship of the change probability of each data block corresponding to the current event queue of the vehicle terminal, a target hash sequence is obtained; based on the target hash sequence, the data block of the vehicle terminal is matched with the data block of the mobile phone, and the vehicle terminal data is synchronized with the mobile phone data according to the matching result; The method combines the proportion of the number of the same feature dimensions in the current event queue and the historical event queues of the same type, and the difference between the event information of the same feature dimensions, to obtain the transmission similarity between the current event queue and each corresponding historical event queue, including: Obtaining a maximum value between the number of feature dimensions included in the current event queue and the number of feature dimensions included in the candidate event queue; recording a ratio between the number of feature dimensions that are the same as the current event queue and the candidate event queue and the maximum value as a first quantity ratio; According to the overall difference between the event information of the same feature dimension of the current event queue and the candidate event queue, and the first quantity ratio, the transmission similarity between the current event queue and the candidate event queue is obtained, the first quantity ratio is positively correlated with the transmission similarity, and the overall difference is negatively correlated with the transmission similarity; The candidate event queue is any historical event queue of the same type as the current event queue.
2. The efficient data transmission method for vehicle-mounted USB transmission according to claim 1, characterized in that: The using the transmission similarity to screen and compare event queues includes: The historical event queue whose transmission similarity is greater than a preset similarity threshold is determined as a comparison event queue.
3. The efficient data transmission method for vehicle-mounted USB transmission according to claim 1, characterized in that: The analyzing the difference between the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to the comparison event queue to obtain the change probability of each data block corresponding to the current event queue includes: The minimum value of the difference between the hash value of the data block to be analyzed and the hash values of all data blocks corresponding to each comparison event queue is recorded as the hash difference corresponding to each comparison event queue; Obtain the change probability of the data block to be analyzed according to the overall distribution of hash differences corresponding to all comparison event queues; The data block to be analyzed is any data block corresponding to the current event queue.
4. The efficient data transmission method for vehicle-mounted USB transmission according to claim 3, characterized in that: Obtaining the difference between the hash values of two data blocks, including: The Hamming distance between the hash values of two data blocks is taken as the difference between the hash values of the corresponding two data blocks.
5. The efficient data transmission method for vehicle-mounted USB transmission according to claim 3, characterized in that: The step of obtaining the change probability of the data block to be analyzed according to the overall distribution of the hash differences corresponding to all comparison event queues includes: The sum of the hash differences corresponding to all comparison event queues is used as the change probability of the data block to be analyzed.
6. The efficient data transmission method for vehicle-mounted USB transmission according to claim 1, characterized in that: The method of obtaining a target hash sequence based on the relative size relationship of the probability of change of each data block corresponding to the current event queue of the vehicle terminal includes: According to the order of the change probability of all data blocks corresponding to the current event queue of the vehicle terminal from small to large, the hash values of all data blocks corresponding to the current event queue of the vehicle terminal are sorted to obtain the target hash sequence.
7. The efficient data transmission method for vehicle-mounted USB transmission according to claim 6, characterized in that: The matching of the data block of the vehicle terminal with the data block of the mobile phone based on the target hash sequence, and synchronizing the vehicle terminal data with the mobile phone data according to the matching result, includes: According to the order of the elements in the target hash sequence from left to right, the hash value corresponding to the data block corresponding to each element in the target hash sequence is matched with the hash value of the data block on the mobile phone. If the match is successful, the vehicle terminal data will not be updated; if the match is unsuccessful, the vehicle terminal data will be updated according to the data of the data block on the mobile phone.
8. The efficient data transmission method for vehicle-mounted USB transmission according to claim 1, characterized in that: The difference between the event information of the same feature dimension in the current event queue and the historical event queue of the same type is obtained, including: The edit distance between the event information of each feature dimension that is the same between the current event queue and the candidate event queue is calculated as the difference between the event information of each feature dimension that is the same between the current event queue and the candidate event queue.
9. An efficient data transmission system for vehicle-mounted USB transmission, characterized in that: The system includes: A data acquisition module is used to obtain the current event queue corresponding to the vehicle terminal and the historical event queue of the same type as the current event queue; A comparison event queue screening module is used to obtain the transmission similarity between the current event queue and each corresponding historical event queue by combining the proportion of the number of the same feature dimensions and the difference between the event information of the same feature dimensions in the current event queue and the historical event queue of the same type, and screen the comparison event queue using the transmission similarity; The change probability determination module is used to divide the to-be-updated data corresponding to the current event queue of the vehicle terminal and the data corresponding to the comparison event queue into data blocks, and obtain the hash value of each data block; analyze the difference between the hash value of each data block corresponding to the current event queue and the hash value of each data block corresponding to the comparison event queue, and obtain the change probability of each data block corresponding to the current event queue; A data synchronization module is used to obtain a target hash sequence based on the relative size relationship of the change probability of each data block corresponding to the current event queue of the vehicle terminal; match the data block of the vehicle terminal with the data block of the mobile phone based on the target hash sequence, and synchronize the vehicle terminal data with the mobile phone data according to the matching result; The method combines the proportion of the number of the same feature dimensions in the current event queue and the historical event queues of the same type, and the difference between the event information of the same feature dimensions, to obtain the transmission similarity between the current event queue and each corresponding historical event queue, including: Obtaining a maximum value between the number of feature dimensions included in the current event queue and the number of feature dimensions included in the candidate event queue; recording a ratio between the number of feature dimensions that are the same as the current event queue and the candidate event queue and the maximum value as a first quantity ratio; According to the overall difference between the event information of the same feature dimension of the current event queue and the candidate event queue, and the first quantity ratio, the transmission similarity between the current event queue and the candidate event queue is obtained, the first quantity ratio is positively correlated with the transmission similarity, and the overall difference is negatively correlated with the transmission similarity; The candidate event queue is any historical event queue of the same type as the current event queue.
