Vehicle data updating method and device, computer equipment, storage medium and computer program product
By real-time detection of vehicle status information and dynamically adjusting the subcontracting strategy, the problem of low download efficiency during vehicle OTA upgrade is solved, and data transmission efficiency and stability of vehicle network communication are improved.
Patent Information
- Application Number
- CN202510530297.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-29
AI Technical Summary
The prior art causes the update packet to be retransmitted during vehicle OTA upgrade process, especially when the vehicle is parked at a poor location signal or the vehicle is started, resulting in the problem of low download efficiency.
By detecting vehicle status information, determining the subcontracting strategy, and re-adjusting the subcontracting strategy when the status changes, dynamically match the current status of the vehicle and optimizing packet transmission.
It improves the data download efficiency during the vehicle OTA upgrade process, reduces the amount of retransmission of data, and reduces the impact on the normal network communication of the vehicle.
Smart Images

Figure CN120389945A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data transmission, and particularly to a vehicle data update method, device, computer device, storage medium, and computer program product. Background Art
[0002] TBOX (Telematics Box), that is, an in-vehicle telecommunication terminal, is used to communicate with various in-vehicle systems and external devices in a vehicle. TBOX supports the OTA (Over-The-Air) upgrade function. When an automotive service provider needs to update in-vehicle software, it can establish a communication connection with the TBOX and push the data to be updated to the TBOX through the network. The TBOX can then write the update data into the in-vehicle system to complete the update of the in-vehicle software.
[0003] In related technologies, in order to reduce the impact on normal communication during vehicle driving, the OTA upgrade is usually required to download update data after the vehicle is turned off. However, when the signal at the vehicle parking location is poor, resulting in a high packet loss rate, or when the vehicle needs to be started during the update process, this method usually causes the entire update data packet to be retransmitted, and the amount of data retransmitted each time is large, resulting in a low update data download efficiency. Summary of the Invention
[0004] Based on this, it is necessary to provide a vehicle data update method, device, computer device, storage medium, and computer program product for the above technical problems.
[0005] In a first aspect, the present application provides a vehicle data update method. The method includes:
[0006] Determine the current vehicle state information, and determine a sub-packaging strategy for the update data based on the size of the update data and the current vehicle state information;
[0007] Take the current vehicle state information as the reference vehicle state information, and send the sub-packaging strategy to the server, and receive each data packet obtained by sub-packaging based on the sub-packaging strategy;
[0008] Continuously detect the vehicle state information, and when the difference between the current vehicle state information and the reference vehicle state information meets a first preset condition, determine the untransmitted data in the update data, and determine a sub-packaging strategy for the untransmitted data based on the size of the untransmitted data and the current vehicle state information;
[0009] Jump to the step of taking the current vehicle state information as the reference vehicle state information until all the update data is received, and perform an update based on the update data.
[0010] In one embodiment, the vehicle state information includes the vehicle driving speed, and the subcontracting strategy includes the number of subcontracts, and the number of subcontracts is positively correlated with the vehicle driving speed.
[0011] In one embodiment, the vehicle state information further includes the expected driving route;
[0012] Determining a subcontracting strategy for the update data based on the size of the update data and the current vehicle state information includes:
[0013] Determine the expected driving speed of the vehicle at various locations on the expected driving route, and determine the expected network quality at various locations on the expected driving route;
[0014] According to the expected driving speed and the expected network quality, determine the network stability score at various locations on the expected driving route, and divide the expected driving route into multiple route segments based on the network stability score;
[0015] Based on the size of the update data, the expected passing duration of each route segment, and the network stability score of each route segment, determine the amount of data to be downloaded corresponding to each route segment;
[0016] According to the amount of data to be downloaded and the network stability score corresponding to each route segment, determine the number of subcontracts corresponding to each route segment.
[0017] In one embodiment, determining the amount of data to be downloaded corresponding to each route segment based on the size of the update data, the expected passing duration of each route segment, and the network stability score of each route segment includes:
[0018] According to the network stability score corresponding to each route segment and the proportion of the expected passing duration of each route segment in the total expected passing duration of the expected driving route, determine the proportion of the data to be downloaded corresponding to each route segment;
[0019] According to the proportion of the data to be downloaded corresponding to each route segment and the size of the update data, respectively determine the amount of data to be downloaded corresponding to each route segment.
[0020] In one embodiment, the method further includes:
[0021] When receiving any of the data packets, perform integrity verification on the data packet;
[0022] When the integrity verification fails, send a data packet retransmission request to the server;
[0023] When the number of integrity verification failures for any of the data packets reaches a preset threshold, suspending the reception of each of the data packets, and restarting the reception of each of the data packets when a preset restart condition is met;
[0024] Among them, the preset restart condition includes at least a preset time period from the suspension of receiving each of the data packets, and / or a difference between the current vehicle status information and the target vehicle status information satisfies a second preset condition, and the target vehicle status information is the vehicle status information when the reception of each of the data packets is suspended.
[0025] In one embodiment, the preset number threshold is positively correlated with the integrity verification success rate, and the integrity verification success rate is determined according to the integrity verification results of each data packet obtained by subpackaging based on the current subpackaging strategy.
[0026] In a second aspect, the present application further provides a vehicle data updating device. The device comprises:
[0027] a first determining module, configured to determine current vehicle status information, and determine a subpackaging strategy for the update data based on the size of the update data and the current vehicle status information;
[0028] a sending module, configured to use the current vehicle state information as reference vehicle state information, send the subpackaging strategy to a server, and receive each data packet obtained by subpackaging based on the subpackaging strategy;
[0029] a second determining module, configured to continuously detect vehicle status information, and when a difference between current vehicle status information and the reference vehicle status information satisfies a first preset condition, determine untransmitted data in the update data, and determine a subpackaging strategy for the untransmitted data based on a size of the untransmitted data and the current vehicle status information;
[0030] An updating module is used to jump to the step of using the current vehicle status information as the reference vehicle status information until all the update data are received, and to perform updating based on the update data.
[0031] In one embodiment, the vehicle status information includes a vehicle speed, the subcontracting strategy includes a subcontracting quantity, and the subcontracting quantity is positively correlated with the vehicle speed.
[0032] In one embodiment, the vehicle state information further includes an expected driving route; and the first determining module is further configured to:
[0033] determining an expected driving speed of the vehicle at each point along the expected driving route, and determining an expected network quality at each point along the expected driving route;
[0034] determining a network stability score at each location of the expected driving route based on the expected driving speed and the expected network quality, and dividing the expected driving route into a plurality of route segments based on the network stability score;
[0035] Determining the amount of data to be downloaded corresponding to each route segment based on the size of the update data, the expected transit time of each route segment, and the network stability score of each route segment;
[0036] The number of subpackets corresponding to each route segment is determined based on the amount of data to be downloaded and the network stability score corresponding to each route segment.
[0037] In one embodiment, the first determining module is further configured to:
[0038] Determining the proportion of data to be downloaded corresponding to each route segment according to the network stability score corresponding to each route segment and the proportion of the expected travel time corresponding to each route segment to the total expected travel time of the expected driving route;
[0039] The amount of data to be downloaded corresponding to each route segment is determined according to the proportion of data to be downloaded corresponding to each route segment and the size of the update data.
[0040] In one embodiment, the apparatus further comprises:
[0041] A verification module, configured to perform integrity verification on any data packet received;
[0042] A sending module, configured to send a data packet resend request to the server in case the integrity verification fails;
[0043] a processing module, configured to suspend receiving the data packets if the number of integrity verification failures for any of the data packets reaches a preset threshold, and resume receiving the data packets if a preset restart condition is met;
[0044] Among them, the preset restart condition includes at least a preset time period from the suspension of receiving each of the data packets, and / or a difference between the current vehicle status information and the target vehicle status information satisfies a second preset condition, and the target vehicle status information is the vehicle status information when the reception of each of the data packets is suspended.
[0045] In one embodiment, the preset number threshold is positively correlated with the integrity verification success rate, and the integrity verification success rate is determined according to the integrity verification results of each data packet obtained by subpackaging based on the current subpackaging strategy.
[0046] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the above-mentioned method according to any one of the preceding items is implemented.
[0047] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the above-mentioned method according to any one of the preceding items is implemented.
[0048] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the above-mentioned method according to any one of the preceding items is implemented.
[0049] For the above-mentioned vehicle data update method, device, computer device, storage medium, and computer program product, when it is necessary to download vehicle software update data, the vehicle status information is detected, and a packet splitting strategy is determined according to the vehicle status information and the size of the update data, and each data packet obtained by packet splitting according to the packet splitting strategy is received. In the case where the vehicle status information changes significantly compared with the vehicle status information when the packet splitting strategy was determined last time, a new packet splitting strategy for the untransmitted data that has not been completed is determined, and each data packet obtained by packet splitting according to the new packet splitting strategy is received. Therefore, the packet splitting strategy can be dynamically adjusted according to the current state of the vehicle, so that when packet loss and retransmission occur during the download process, the amount of data to be retransmitted matches the current state of the vehicle, improving the download efficiency of the update data. Description of the Drawings
[0050] Figure 1 It is a schematic flowchart of a vehicle data update method in an embodiment;
[0051] Figure 2 It is a schematic flowchart of step 102 in an embodiment;
[0052] Figure 3 It is a schematic flowchart of integrity verification of data packets in an embodiment;
[0053] Figure 4 It is a schematic flowchart of downloading data packets after the vehicle is turned off in an embodiment;
[0054] Figure 5 It is a structural block diagram of a vehicle data update device in an embodiment;
[0055] Figure 6 It is an internal structure diagram of a computer device in an embodiment. Detailed Embodiments
[0056] To make the objectives, technical solutions, and advantages of this application more clear and understandable, the following further elaborates on this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely used to explain this application and are not intended to limit this application.
[0057] In one embodiment, as Figure 1 shown, a vehicle data update method is provided. This embodiment takes the application of this method to an in-vehicle TBOX as an example and includes the following steps:
[0058] Step 102, determine the current vehicle status information, and based on the size of the update data and the current vehicle status information, determine the sub-packaging strategy for the update data.
[0059] In the embodiments of this application, when an automotive service provider needs to update in-vehicle software, it will send a data update instruction to the TBOX through a server. The data update instruction may include the name and size of the update data. After receiving the data update instruction, the TBOX can display a prompt message on the vehicle's display device to prompt the user to select the update time.
[0060] After the user confirms the update time, the TBOX determines the current vehicle status information at the moment when the update time arrives. The vehicle status information may include but is not limited to vehicle driving status information and vehicle network status information. The vehicle driving status information may include the terrain type where the vehicle is located (city, mountain area, underground, etc.), the vehicle driving speed, the remaining battery power of the vehicle (if the vehicle is a new energy vehicle), and so on. The vehicle network status information may include the current network signal strength, and after considering other network communication tasks that the TBOX needs to perform, the available network bandwidth for downloading the update data, and so on.
[0061] Furthermore, the sub-packaging strategy for the update data can be determined based on the size of the update data and the vehicle status information. In one example, the vehicle status information includes the vehicle driving speed, and the sub-packaging strategy includes the number of sub-packages. The number of sub-packages is positively correlated with the vehicle driving speed. Since the faster the vehicle driving speed, the higher the frequency at which the vehicle needs to switch the connected base station, and thus the network may be more unstable. When the vehicle driving speed is relatively fast, setting a higher number of sub-packages can make the size of each sub-package smaller. When a data packet transmission error occurs, the amount of data that needs to be retransmitted is also smaller, improving the data transmission efficiency. When the vehicle driving speed is relatively slow, setting a smaller number of sub-packages can reduce the number of times the TBOX needs to connect to the server, saving the overhead of establishing a connection and also improving the data transmission efficiency.
[0062] When determining the packet splitting strategy based on the vehicle driving speed, it is also possible to preset the size range of each data packet after packet splitting and make the vehicle driving speed negatively correlated with the data packet size. When determining the packet splitting strategy, the data packet size to be used within the size range can be determined according to the vehicle driving speed, and then the number of packet splits can be determined based on the data packet size and the size of the updated data.
[0063] In another embodiment, the current network stability score of the vehicle can be determined according to the vehicle status information, and the network stability score is made positively correlated with the number of packet splits. The network stability score is used to characterize the network connection stability of the vehicle in the current state. The higher the score, the stronger the network connection stability. Exemplarily, a network stability score can be determined for each vehicle status information respectively, and a weight can be set for each vehicle status information respectively. The network stability scores of each vehicle status information are weighted to obtain the network stability score. The weight can be related to the degree of influence of the vehicle status information on the network connection stability. For example, the remaining battery power of the vehicle usually affects the network connection stability only when it is relatively low (there is a risk of power interruption during the update process), so the weight of the remaining battery power of the vehicle can be set relatively low. The network signal strength has a greater impact on the network connection stability, so the weight of the network signal strength can be set relatively high.
[0064] Similarly, it is also possible to preset the size range of each data packet after packet splitting and make the network stability score negatively correlated with the data packet size, and then determine the number of packet splits based on the data packet size and the size of the updated data.
[0065] Step 104: Use the current vehicle status information as the reference vehicle status information, send the packet splitting strategy to the server, and receive each data packet obtained by packet splitting based on the packet splitting strategy.
[0066] In the embodiment of the present application, after determining the packet splitting strategy, the current vehicle status information can be cached and used as the reference vehicle status information that needs to be compared with it later. Then the TBOX can send the packet splitting strategy to the server to instruct the server to split the updated data according to the packet splitting strategy. After the server obtains multiple data packets according to the packet splitting strategy, it sends each data packet to the TBOX in sequence.
[0067] Step 106: Continuously detect the vehicle status information, and when the difference between the current vehicle status information and the reference vehicle status information meets the first preset condition, determine the untransmitted data in the updated data, and determine the packet splitting strategy for the untransmitted data based on the size of the untransmitted data and the current vehicle status information.
[0068] Step 108: Jump to the step of using the current vehicle status information as the reference vehicle status information until all update data is received, and perform updates based on the update data.
[0069] In the embodiments of the present application, before each data packet corresponding to the update data is downloaded completely, the TBOX can detect the vehicle status information again at regular intervals (such as 1 minute, 5 minutes, etc.), and compare the difference between the currently detected vehicle status information and the reference vehicle status information. If the difference does not meet a certain first preset condition, the TBOX continues to perform the next vehicle status information detection. If the difference meets the first preset condition, it indicates that the current vehicle status information has changed significantly compared with the previous determination of the packet splitting strategy, and the previous packet splitting strategy may no longer be applicable to the current scenario. In this case, the packet splitting strategy can be re-determined for the part of the update data that has not been transmitted yet, so that the untransmitted data is transmitted according to the new packet splitting strategy. Among them, the untransmitted data refers to each data packet in the update data except for the data packets that the TBOX has received and the data packet that is currently being received.
[0070] Those skilled in the art can preset different first preset conditions for different vehicle status information. When any vehicle status information meets its corresponding first preset condition, it can be determined that the difference between the current vehicle status information and the reference vehicle status information meets the first preset condition.
[0071] The embodiments of the present application do not specifically limit the specific form of the first preset condition. For example, the preset condition for the vehicle driving speed can be: the vehicle driving speed in the reference vehicle status information and the vehicle driving speed in the current vehicle status information belong to different preset speed intervals. The preset speed intervals are pre-determined speed intervals that may correspond to different network stabilities. For example, the preset speed intervals may include 0 km / h - 60 km / h, 60 km / h - 100 km / h, above 100 km / h, and so on.
[0072] For another example, the preset condition for the available network bandwidth for downloading updated data may be: the difference between the available network bandwidth in the reference vehicle status information and the available network bandwidth in the current vehicle status information is greater than a preset value. When the available network bandwidth in the current vehicle status information increases compared to the available network bandwidth in the reference vehicle status information, since the network can support the download of larger data packets at this time, the number of sub-packets can be correspondingly reduced. When the available network bandwidth in the current vehicle status information decreases compared to the available network bandwidth in the reference vehicle status information, since the probability of network congestion increases at this time, the number of sub-packets can be correspondingly increased to avoid a decrease in data transmission efficiency caused by the need to retransmit data packets after abnormal reception of data packets due to network congestion.
[0073] When the server transmits data packets to the TBOX, it can attach the sequence number of the data packet to the data packet. In this way, the TBOX can determine the sequence numbers of the data packets that have not been received by comparing the sequence numbers of the received data packets and the number of sub-packets, so as to determine the untransmitted data. The TBOX can also determine the size of the untransmitted data based on the size of the updated data and the sizes of the received data packets.
[0074] The TBOX can then determine the sub-packet strategy for the untransmitted data by referring to the method of determining the sub-packet strategy in the foregoing embodiments, which will not be elaborated herein. After determining the sub-packet strategy, the TBOX sends the sub-packet strategy and an identifier that can indicate the untransmitted data (such as the sequence numbers of the data packets corresponding to the untransmitted data) to the server, so that the server can sub-packet the untransmitted data according to the new sub-packet strategy.
[0075] The TBOX then uses the current vehicle status information as the reference vehicle status information to be compared and continues to detect the vehicle status information until the TBOX receives all the updated data. The criterion for determining that all the updated data has been received can be that the size of the received data is equal to the size of the updated data carried in the data update instruction, and the number of data packets received after the TBOX last determined the sub-packet strategy is equal to the number of sub-packets specified in the sub-packet strategy.
[0076] After receiving all the updated data, the TBOX can wait until the vehicle shuts down to update the in-vehicle software, avoiding the situation where some functions of the vehicle cannot be used normally during the in-vehicle software update process, which affects the user driving experience. The TBOX can maintain a power-off update flag bit in the memory and set the power-off update flag bit to a valid value after receiving all the updated data. After the TBOX detects that the vehicle has shut down and there are no other tasks to execute at present, the TBOX checks the value of the power-off update flag bit. If the value is a valid value, the TBOX starts the update of the in-vehicle software.
[0077] The vehicle data update method provided by the embodiments of the present application detects vehicle status information when it is necessary to download updated vehicle software data, determines a packet splitting strategy based on the vehicle status information and the size of the updated data, and receives each data packet obtained by splitting according to the packet splitting strategy. In the case where the vehicle status information has changed significantly compared to the vehicle status information when the packet splitting strategy was determined last time, the packet splitting strategy for the untransmitted data that has not been completed is re-determined, and each data packet obtained by splitting according to the new packet splitting strategy is received. Therefore, during the driving of the vehicle, each data packet can be downloaded according to the packet splitting strategy that matches the current state of the vehicle, reducing the impact on the normal network communication during vehicle driving while improving the download efficiency of the updated data.
[0078] In one embodiment, as Figure 2 shown, the vehicle status information further includes the expected driving route; in step 102, based on the size of the updated data and the current vehicle status information, determining a packet splitting strategy for the updated data includes:
[0079] Step 202, determining the expected driving speed at each location on the expected driving route of the vehicle, and determining the expected network quality at each location on the expected driving route;
[0080] Step 204, according to the expected driving speed and the expected network quality, determining the network stability score at each location on the expected driving route, and dividing the expected driving route into multiple route segments based on the network stability score;
[0081] Step 206, based on the size of the updated data, the expected passing duration of each route segment, and the network stability score of each route segment, determining the amount of data to be downloaded corresponding to each route segment;
[0082] Step 208, according to the amount of data to be downloaded and the network stability score corresponding to each route segment, determining the number of packets to be split corresponding to each route segment.
[0083] In the embodiments of the present application, if the navigation function is turned on during the driving of the vehicle, the TBOX can obtain the expected driving route of the vehicle. In the case where the TBOX can obtain the expected driving route, the packet splitting strategy for the updated data can be determined in combination with the expected driving route.
[0084] Based on the expected driving route, the expected driving speed and the expected network quality of the vehicle in each part of the expected driving route can be determined. First, how to determine the expected driving speed will be described. If the navigation function of the vehicle has the function of estimating the driving speed of each section of the expected driving route, the TBOX can directly obtain the expected driving speed.
[0085] If the navigation function of the vehicle has the function of estimating the congestion degree of each section of the expected driving route, the TBOX can obtain the expected driving speed according to the congestion degree of each section and the road type of each section. For example, for an urban section with unobstructed traffic, the expected driving speed can be 40 km / h; for a highway section with unobstructed traffic, the expected driving speed can be 100 km / h; for an urban section with severe congestion, the expected driving speed can be 10 km / h, and so on.
[0086] If the navigation function of the vehicle does not have the function of estimating the driving speed or the congestion degree, the TBOX can obtain the expected driving speed according to the road type of each section and the historical driving data of the vehicle on each road type.
[0087] The expected network quality can be determined according to the terrain type passed by the expected driving route. For example, when the entire expected driving route is located in the urban area, it can be determined that the network quality of each section of the expected driving route is relatively good. When the expected driving route passes through the mountainous area, it can be determined that the network quality of the sections located in the mountainous area may be poor. When the expected driving route passes through the tunnel, it can be determined that the network quality of the sections located in the tunnel may be poor.
[0088] Furthermore, according to the expected driving speed and the expected network quality, the network stability score of each location on the expected driving route can be determined. For example, multiple expected driving speed intervals and expected network quality intervals can be preset, and a preset score is assigned to each interval. For any location on the expected driving route, according to the preset score of the expected driving speed interval to which the expected driving speed at that location belongs, and the sum of the preset scores of the expected network quality interval to which the expected network quality at that location belongs, the network stability score corresponding to that location can be obtained. Furthermore, multiple route segments can be divided according to the network stability score. For example, multiple expected network stability score intervals can be preset, and the sections belonging to the same expected network stability score interval are classified as one route segment.
[0089] After obtaining each route segment, based on the size of the updated data, the expected passing time of each route segment, and the network stability score of each route segment, the amount of data to be downloaded corresponding to each route segment can be determined. The amount of data to be downloaded is positively correlated with the expected passing time and also positively correlated with the network stability score.
[0090] In one embodiment, the proportion of data to be downloaded corresponding to each route segment can be determined according to the network stability score corresponding to each route segment and the proportion of the expected passing duration corresponding to each route segment in the total expected passing duration of the expected driving route; according to the proportion of data to be downloaded corresponding to each route segment and the size of the updated data, the amount of data to be downloaded corresponding to each route segment can be determined respectively. Among them, the expected passing duration corresponding to each route segment can be determined according to the length of the route segment and the expected driving speed corresponding to the route segment. The sum of the expected passing durations of each route segment is the total expected passing duration of the expected driving route. The proportion of the expected passing duration of each route segment in the total expected passing duration of the expected driving route can be regarded as the basic proportion of the amount of data to be downloaded corresponding to the route segment in the updated data. Adjusting the basic proportion based on the network stability score corresponding to the route segment can obtain the proportion of data to be downloaded.
[0091] It can be made such that the network stability score is positively correlated with the floating value of the basic proportion (the floating value can be negative), and the floating value of the basic proportion and the basic proportion are added to obtain the proportion of data to be downloaded. After obtaining the proportion of data to be downloaded, based on the product of the size of the updated data and the proportion of data to be downloaded, the amount of data to be downloaded corresponding to the route segment can be obtained.
[0092] After obtaining the amount of data to be downloaded, the appropriate packet size corresponding to each route segment can be further determined according to the network stability score corresponding to each route segment (the method for determining the packet size can refer to the foregoing embodiment and will not be elaborated here). The ratio of the amount of data to be downloaded to the packet size is the number of sub-packets.
[0093] In one embodiment, as Figure 3 shown, the above method further includes:
[0094] Step 302, when receiving any packet, perform integrity verification on the packet;
[0095] Step 304, when the integrity verification fails, send a packet retransmission request to the server;
[0096] Step 306, when the number of times of integrity verification failure for any packet reaches a preset number threshold, suspend receiving each packet, and resume receiving each packet when meeting the preset restart condition;
[0097] Among them, the preset restart condition includes at least that a preset duration has elapsed since suspending receiving each packet, and / or the difference between the current vehicle state information and the target vehicle state information meets the second preset condition, and the target vehicle state information is the vehicle state information when suspending receiving each packet.
[0098] In the embodiments of the present application, in order to ensure the integrity of data transmission, after receiving each data packet, the TBOX can perform integrity verification on the data packet. The embodiments of the present application do not limit the specific method of integrity verification, and the verification can be completed by any algorithm such as MD5 value (Message-Digest Algorithm 5, a message digest algorithm), CRC (Cyclic Redundancy Check), etc.
[0099] If the integrity verification passes, the TBOX stores the data packet. If the integrity verification fails, the TBOX needs to send a data packet retransmission request to the server, and carry the identifier of the data packet to be retransmitted in the data packet retransmission request, such as the sequence number of the data packet, etc.
[0100] After the server retransmits the data packet to the TBOX, the TBOX can continue to perform integrity verification on the retransmitted data packet. If the integrity verification fails, the TBOX continues to send a data packet retransmission request to the server until the number of times of integrity verification failure for the data packet reaches a preset number threshold (such as 3 times). At this time, the TBOX can determine that there are certain problems in the current network communication, and send a pause transmission instruction to the server to pause receiving each data packet.
[0101] After pausing to receive each data packet, the TBOX can continuously detect whether the preset restart condition is met, and send a restart transmission instruction to the server when the preset restart condition is met to start receiving each data packet again. The preset restart condition can be any condition that can determine that the network state may have changed since the pause in transmission. For example, the preset restart condition can be that a preset duration (such as 30 seconds) has passed since the pause in receiving each data packet. That is to say, after pausing the transmission for a certain duration, the TBOX can try to initiate a reconnection to the server and re-download the data packets that failed the integrity verification before from the server.
[0102] Or the preset restart condition can also be that the difference between the current vehicle state information and the target vehicle state information meets the second preset condition. The target vehicle state information is the vehicle state information when pausing to receive each data packet. When pausing the transmission, the TBOX records the vehicle state information at this time as the target vehicle state information, and when it detects that the difference between the current vehicle state information and the target vehicle state information meets the second preset condition, it determines that the network state may have changed and tries to initiate a reconnection to the server.
[0103] The embodiments of the present application do not specifically limit how to set the second preset condition, and the second preset condition can be set by referring to the first preset condition in the foregoing embodiments.
[0104] In one embodiment, the preset number threshold is positively correlated with the integrity verification success rate, and the integrity verification success rate is determined according to the integrity verification results of each data packet obtained by subcontracting based on the current subcontracting strategy. In the embodiments of the present application, after each re-determination of the subcontracting strategy, the integrity verification success rate of each data packet corresponding to the current subcontracting strategy can be statistically calculated in real time. The integrity verification success rate refers to the proportion of data packets whose first integrity verification result is passed among all data packets. If, according to the current subcontracting strategy, the integrity verification success rate of each data packet is relatively high, then when the number of times of integrity verification failure of a certain data packet reaches a certain small value, it can be determined that the reason for the integrity verification failure of the data packet may be the current network state or there is a certain problem with the communication connection with the server, and the transmission can be paused for a period of time and then reconnected to the server.
[0105] If, according to the current subcontracting strategy, the integrity verification success rate of each data packet is relatively low, then it is normal for a certain data packet to have a certain number of integrity verification failures. When the number of times of integrity verification failure reaches a relatively high number, it can be determined that there is a certain problem with the current network state or the communication connection with the server, and the transmission can be paused for a period of time and then reconnected to the server.
[0106] In one embodiment, as shown in Figure 4 a vehicle data update method is provided. This method is applied to the scenario where the TBOX updates data download and in-vehicle software update after the vehicle is turned off, and includes:
[0107] S1. Receive a data update instruction sent by the server, where the data update instruction carries the name and size of the update file.
[0108] S2. Set the power-off update flag bit to a valid value.
[0109] S3. When it is detected that the vehicle is turned off and there is no pending file upload task, detect the power-off update flag bit. If the power-off update flag bit is a valid value, or if there is a breakpoint record currently, connect to the server.
[0110] S4. If there is no breakpoint record currently, the subcontracting quantity can be calculated according to the method in the foregoing embodiments and sent to the server. If there is a breakpoint record currently, send the breakpoint record to the server.
[0111] S5. Receive each data packet sent by the server, and after receiving the data packet, perform integrity verification on the data packet.
[0112] S6. If the integrity verification passes, increment the number of downloaded data packets by 1. If the integrity verification fails, increment the number of failures by 1. When the number of failures reaches the preset threshold, determine the breakpoint position based on the currently downloading data packet, write the breakpoint position to the memory, interrupt the updated data download, and power off and shut down.
[0113] S7. If the number of downloaded data packets reaches the number of sub - packets, perform vehicle software update.
[0114] It should be understood that although the steps in the flowcharts involved in the above - mentioned embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above - mentioned embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0115] Based on the same inventive concept, the embodiments of the present application also provide a vehicle data update device for implementing the vehicle data update method involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the vehicle data update device provided below can refer to the limitations on the vehicle data update method in the above text, and will not be repeated here.
[0116] In one embodiment, as Figure 5 shown, a vehicle data update device 500 is provided, including: a first determination module 502, a sending module 504, a second determination module 506, and an update module 508, where:
[0117] The first determination module 502 is configured to determine the current vehicle status information, and determine a sub - packet strategy for the update data based on the size of the update data and the current vehicle status information;
[0118] The sending module 504 is configured to use the current vehicle status information as the reference vehicle status information, send the sub - packet strategy to the server, and receive each data packet obtained by sub - packet based on the sub - packet strategy;
[0119] A second determination module 506, configured to continuously detect vehicle state information, and determine the untransmitted data in the update data when the difference between the current vehicle state information and the reference vehicle state information meets a first preset condition, and determine a sub-packaging strategy for the untransmitted data based on the size of the untransmitted data and the current vehicle state information;
[0120] An update module 508, configured to jump to the step of using the current vehicle state information as the reference vehicle state information until all the update data is received, and perform an update based on the update data.
[0121] The vehicle data update device provided by the embodiments of the present application, when it is necessary to download update data of in-vehicle software, detects vehicle state information, determines a sub-packaging strategy according to the vehicle state information and the size of the update data, and receives each data packet obtained by sub-packaging according to the sub-packaging strategy. When the vehicle state information changes greatly compared with the vehicle state information when the sub-packaging strategy was determined last time, re-determine the sub-packaging strategy for the untransmitted data that has not been completed yet, and receive each data packet obtained by sub-packaging according to the new sub-packaging strategy. Therefore, during the driving process of the vehicle, each data packet can be downloaded according to the sub-packaging strategy that matches the current state of the vehicle, reducing the impact on the normal network communication during vehicle driving while improving the download efficiency of the update data.
[0122] In one embodiment, the vehicle state information includes the vehicle driving speed, and the sub-packaging strategy includes the number of sub-packages, and the number of sub-packages is positively correlated with the vehicle driving speed.
[0123] In one embodiment, the vehicle state information further includes an expected driving route; the first determination module 502 is further configured to:
[0124] Determine the expected driving speed at each location on the expected driving route, and determine the expected network quality at each location on the expected driving route;
[0125] According to the expected driving speed and the expected network quality, determine the network stability score at each location on the expected driving route, and divide the expected driving route into multiple route segments based on the network stability score;
[0126] Based on the size of the update data, the expected passing duration of each route segment, and the network stability score of each route segment, determine the data volume to be downloaded corresponding to each route segment;
[0127] According to the data volume to be downloaded and the network stability score corresponding to each route segment, determine the number of sub-packages corresponding to each route segment.
[0128] In one embodiment, the first determination module 502 is further configured to:
[0129] Determine the proportion of data to be downloaded corresponding to each route segment according to the network stability score corresponding to each route segment and the proportion of the expected passing duration corresponding to each route segment in the total expected passing duration of the expected driving route;
[0130] Determine the amount of data to be downloaded corresponding to each route segment respectively according to the proportion of data to be downloaded corresponding to each route segment and the size of the update data.
[0131] In one embodiment, the device further includes:
[0132] A verification module, configured to perform integrity verification on the data packet when receiving any data packet;
[0133] A sending module, configured to send a data packet retransmission request to the server when the integrity verification fails;
[0134] A processing module, configured to pause receiving each data packet when the number of integrity verification failures for any data packet reaches a preset number threshold, and resume receiving each data packet when a preset restart condition is met;
[0135] Wherein, the preset restart condition at least includes that a preset duration has elapsed since pausing to receive each data packet, and / or the difference between the current vehicle state information and the target vehicle state information satisfies a second preset condition, and the target vehicle state information is the vehicle state information when pausing to receive each data packet.
[0136] In one embodiment, the preset number threshold is positively correlated with the integrity verification success rate, and the integrity verification success rate is determined according to the integrity verification results of each data packet obtained by subcontracting based on the current subcontracting strategy.
[0137] Each module in the above device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.
[0138] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 6As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a vehicle data update method.
[0139] Those skilled in the art can understand that Figure 6 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0140] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps in the above method embodiments are implemented.
[0141] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0142] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0143] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0144] Those of ordinary skill in the art can understand that all or part of the processes in the above-described embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-described method embodiments. Among them, any reference to a memory, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the various embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the various embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0145] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0146] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application should be subject to the appended claims.
Claims
1. A vehicle data update method, characterized in that, The method includes: Determine the current vehicle state information, and determine a sub-packaging strategy for the update data based on the size of the update data and the current vehicle state information; Use the current vehicle state information as the reference vehicle state information, send the sub-packaging strategy to the server, and receive each data packet obtained by sub-packaging based on the sub-packaging strategy; Continuously detect the vehicle state information, and when the difference between the current vehicle state information and the reference vehicle state information meets a first preset condition, determine the untransmitted data in the update data, and determine a sub-packaging strategy for the untransmitted data based on the size of the untransmitted data and the current vehicle state information; Jump to the step of using the current vehicle state information as the reference vehicle state information until all the update data is received, and perform an update based on the update data.
2. The method according to claim 1, characterized in that, The vehicle state information includes the vehicle driving speed, and the sub-packaging strategy includes the number of sub-packages, and the number of sub-packages is positively correlated with the vehicle driving speed.
3. The method according to claim 2, wherein The vehicle state information further includes the expected driving route; The determining of the sub-packaging strategy for the update data based on the size of the update data and the current vehicle state information includes: Determine the expected driving speed at each location on the expected driving route, and determine the expected network quality at each location on the expected driving route; According to the expected driving speed and the expected network quality, determine the network stability score at each location on the expected driving route, and divide the expected driving route into multiple route segments based on the network stability score; Based on the size of the update data, the expected passing duration of each route segment, and the network stability score of each route segment, determine the amount of data to be downloaded corresponding to each route segment; According to the amount of data to be downloaded and the network stability score corresponding to each route segment, determine the number of sub-packages corresponding to each route segment.
4. The method according to claim 3, characterized in that, The determining of the amount of data to be downloaded corresponding to each route segment based on the size of the update data, the expected passing duration of each route segment, and the network stability score of each route segment includes: According to the network stability score corresponding to each route segment and the proportion of the expected passing duration of each route segment in the total expected passing duration of the expected driving route, determine the proportion of data to be downloaded corresponding to each route segment; According to the proportion of data to be downloaded corresponding to each route segment and the size of the update data, respectively determine the amount of data to be downloaded corresponding to each route segment.
5. The method according to claim 1, wherein The method further includes: When any data packet is received, perform an integrity verification on the data packet; When the integrity verification fails, send a data packet retransmission request to the server; When the number of integrity verification failures for any data packet reaches a preset number threshold, suspend receiving each data packet, and resume receiving each data packet when a preset restart condition is met; Among them, the preset restart condition includes at least that a preset duration has elapsed since receiving each of the data packets was paused, and / or the difference between the current vehicle state information and the target vehicle state information satisfies a second preset condition, where the target vehicle state information is the vehicle state information when receiving each of the data packets was paused.
6. The method according to claim 5, characterized in that, The preset number threshold is positively correlated with the integrity verification success rate, and the integrity verification success rate is determined according to the integrity verification results of each data packet obtained by packetizing based on the current packetization strategy.
7. A vehicle data update device, characterized in that, The device includes: A first determination module, configured to determine the current vehicle state information, and determine a packetization strategy for the update data based on the size of the update data and the current vehicle state information; A sending module, configured to use the current vehicle state information as the reference vehicle state information, send the packetization strategy to the server, and receive each data packet obtained by packetizing based on the packetization strategy; A second determination module, configured to continuously detect the vehicle state information, and when the difference between the current vehicle state information and the reference vehicle state information satisfies a first preset condition, determine the untransmitted data in the update data, and determine a packetization strategy for the untransmitted data based on the size of the untransmitted data and the current vehicle state information; An update module, configured to jump to the step of using the current vehicle state information as the reference vehicle state information until all the update data is received, and perform an update based on the update data.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.