Differential packet determination method, device, equipment and medium based on firmware upgrade
By receiving the upgrade detection request in the vehicle terminal device and determining the target differential packet based on the optimization strategy, the problem of excessive differential upgrade packets in the prior art is solved, and the transmission efficiency and upgrade success rate are improved.
Patent Information
- Application Number
- CN202411961732.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-30
AI Technical Summary
In the prior art, differential upgrade packages produced based on the differences between the current version and the latest version are relatively large, which affects transmission efficiency and easily leads to upgrade failure.
By receiving the upgrade detection request of the vehicle terminal device, determine whether there is a differential packet list, and optimize the differential packet list based on the preset optimization strategy to determine the target candidate data. This strategy takes into account version importance, transmission efficiency and upgrade risks, and optimizes the transmission path and size of differential packets.
It improves the transmission efficiency and upgrade success rate of differential packets, reduces the traffic consumption and time cost of users, and reduces the risk of errors during the upgrade process.
Smart Images

Figure CN119376776B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a differential packet determination method, device, equipment and medium based on firmware upgrade. Background Art
[0002] With the rapid development of IoT technology, firmware upgrades based on Over the Air (OTA) technology have become an important means of remote device management. Through OTA technology, devices can obtain and install the latest firmware packages from the cloud to achieve functional expansion, performance optimization, and vulnerability repair. Depending on the size of the firmware package and the upgrade requirements, OTA upgrades are usually divided into two methods: full upgrade and differential upgrade.
[0003] For example, for vehicle terminal equipment, a full upgrade requires the vehicle terminal equipment to download a complete firmware package. Although it is simple and easy, the amount of data transmission is large, which may put a lot of pressure on the user's download time and traffic costs. For this reason, the differential upgrade method came into being. Differential upgrades only need to transmit the difference between the new and old versions of the firmware package, thereby greatly reducing the amount of transmission data and reducing the user's traffic consumption and time cost. However, differential upgrades also face some significant technical challenges in actual applications. In related technologies, the upgrade differential package required for differential upgrades is usually made based on the difference between the current version and the latest version. The differential package determined according to the above method is large, which affects the transmission efficiency and is prone to upgrade failure.
[0004] Therefore, there is an urgent need for a differential packet determination method that can improve differential packet transmission efficiency and upgrade success rate. Summary of the invention
[0005] Therefore, the technical problem to be solved by the present invention is to overcome the problem in the related art that the upgrade differential package required for differential upgrade is produced according to the difference between the current version and the latest version, the determined differential package is large, which affects the transmission efficiency and is prone to upgrade failure.
[0006] In order to solve the above technical problem, the present invention provides a differential packet determination method based on firmware upgrade, and the differential packet determination method based on firmware upgrade includes:
[0007] Receiving an upgrade detection request of the vehicle-mounted terminal device; the upgrade detection request includes: the current version number of the vehicle-mounted terminal device and the current vehicle status information;
[0008] Determine whether a differential package list exists according to the current version number;
[0009] The differential package list includes at least one candidate data, and the candidate data includes a first upgrade path and a first memory occupancy of the candidate differential package stored in a corresponding relationship;
[0010] When it is determined that there is a differential package list, the differential package list is optimized based on a preset optimization strategy to determine the target candidate data; the candidate differential package corresponding to the target candidate data is the target differential package, which is used to upgrade the vehicle-mounted terminal device; the optimization strategy is determined based on version importance, transmission efficiency and upgrade risk; the version importance is determined based on the number of devices corresponding to the first upgrade path; the transmission efficiency is determined based on the first upgrade path and the first memory occupancy; the upgrade risk is determined based on the current vehicle status information and the number of upgrade failures in the historical upgrade records.
[0011] In an optional implementation manner, after determining the target candidate data, the method further includes:
[0012] An access path of the target differential package is determined, and the target differential package is downloaded based on the access path of the target differential package.
[0013] In an optional implementation, determining the access path of the target differential package includes:
[0014] The access path of the target differential package is determined according to a predetermined differential package path table; the differential package path table includes at least one differential data, and the differential data includes the access path of the standard differential package, the second upgrade path, and the second memory occupancy stored in a corresponding relationship.
[0015] In an optional implementation, before determining the access path of the target differential packet, the method further includes:
[0016] When generating a current full firmware package, determining the firmware package basic information of the current full firmware package; and storing the current full firmware package and the firmware package basic information of the current full firmware package in a full package library in the order of version numbers; the firmware package basic information includes: version number and firmware package memory usage;
[0017] Traversing the full package library, and determining whether there are other full firmware packages with a version lower than the current full firmware package according to the version number of the current full firmware package;
[0018] When there are other full firmware packages with a version lower than that of the current full firmware package, the differential package path table is determined according to the firmware package basic information of the other full firmware packages and the firmware package basic information of the current full firmware package.
[0019] In an optional implementation, the second upgrade path includes a minimum version number, and determining whether a differential package list exists according to the current version number includes:
[0020] Traversing the differential packet path table to determine whether target data exists; the target data is differential data matching the current version number with the lowest version number;
[0021] When it is determined that the target data exists, it is determined that the differential package list exists; the differential package list is determined according to the target data, and the candidate differential package is a standard differential package corresponding to the target data.
[0022] In an optional implementation, when it is determined that there is a differential packet list, optimizing the differential packet list based on a preset optimization strategy to determine the target candidate data includes:
[0023] When it is determined that there is a differential package list, for each candidate data in the differential package list, the version importance is determined according to the ratio of the number of devices corresponding to the first upgrade path to the total number of devices, the transmission efficiency is determined according to the sum of the ratios of the target path length to the first memory occupancy and the total first memory occupancy, and the upgrade risk is determined according to the current vehicle status information and the ratio of the number of upgrade failures in the historical upgrade records to the total number of upgrades; the evaluation value corresponding to the candidate data is determined according to the version importance, the transmission efficiency and the upgrade risk; the target path length is the path length corresponding to the first upgrade path;
[0024] The candidate data corresponding to the maximum value among the evaluation values corresponding to all the candidate data is determined as the target candidate data.
[0025] In an optional implementation, when the current vehicle state information is the current vehicle speed, determining the upgrade risk according to the current vehicle state information, the ratio of the number of upgrade failures in the historical upgrade record to the total number of upgrades, includes:
[0026] Determine the average value of the vehicle speed corresponding to the number of successful upgrades in the historical upgrade records;
[0027] The upgrade risk is determined according to the ratio of the current vehicle speed to the average value, and the sum of the ratios of the number of upgrade failures to the total number of upgrades in the historical upgrade records.
[0028] In a second aspect, the present invention provides a differential packet determination device based on firmware upgrade, the differential packet determination device based on firmware upgrade comprising:
[0029] A first processing module is used to receive an upgrade detection request from a vehicle-mounted terminal device; the upgrade detection request includes: a current version number of the vehicle-mounted terminal device and the current vehicle status information;
[0030] A second processing module, used to determine whether a differential package list exists according to the current version number;
[0031] The differential package list includes at least one candidate data, and the candidate data includes a first upgrade path and a first memory occupancy of the candidate differential package stored in a corresponding relationship;
[0032] The third processing module is used to optimize the differential package list based on a preset optimization strategy to determine the target candidate data when it is determined that there is a differential package list; the candidate differential package corresponding to the target candidate data is the target differential package, which is used to upgrade the vehicle-mounted terminal device; the optimization strategy is determined according to version importance, transmission efficiency and upgrade risk; the version importance is determined according to the number of devices corresponding to the first upgrade path; the transmission efficiency is determined according to the first upgrade path and the first memory occupancy; the upgrade risk is determined according to the current vehicle status information and the number of upgrade failures in the historical upgrade records.
[0033] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the differential packet determination method based on firmware upgrade of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0034] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a single computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the differential packet determination method based on firmware upgrade of the above-mentioned first aspect or any corresponding embodiment thereof.
[0035] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the differential packet determination method based on firmware upgrade according to the first aspect or any corresponding embodiment thereof.
[0036] The technical solution provided by the present invention has the following technical effects:
[0037] The present invention takes into account the methods in the related art such as making differential packages required for differential upgrades based on the difference between the current version and the latest version. Making differential packages based on version differences may not take into account the optimization of the transmission path. The differential packages made by traditional methods may contain some unnecessary intermediate transition information, which makes the transmission path complicated. For example, in the software update path, some intermediate version updates can actually be merged or skipped, but because the differential packages are made based on the difference between the starting and final versions, these complex intermediate path information may be included, which increases the complexity of the transmission and thus affects the transmission efficiency. When the version span is large, the differential package made from the current version to the latest version may be very large. A large number of changes will increase the probability of errors during the upgrade process and greatly increase the risk of upgrade failure.
[0038] The present invention can determine whether there is a differential package list according to the current version number. The existence of a differential package list indicates that there is a differential package that can be used for firmware upgrade. The differential package list usually includes multiple candidate data. Correspondingly, there are multiple upgrade paths between the current version and the version to be upgraded of the vehicle-mounted terminal device (firmware). The difference between the current version and the version to be upgraded will not be directly used to make the differential package required for the differential upgrade, nor will the differential package be made according to the difference between adjacent versions. And when the present invention determines that there is a differential package list, the differential package list can be optimized based on the optimization strategy determined by the version importance determined by the number of devices, the transmission efficiency determined by the first upgrade path and the first memory occupancy, and the upgrade risk determined by the current vehicle status information and the number of upgrade failures, to determine the target candidate data. The target differential package determined based on this is more universal and important in terms of version coverage, has higher transmission efficiency, and has a lower risk of upgrade failure. The present invention first determines all candidate differential packages that may realize firmware upgrade according to the specific upgrade requirements of the vehicle-mounted terminal equipment, and then performs optimization based on a preset optimization strategy to determine all candidate differential packages that can be used for firmware differential upgrade, and comprehensively judges and determines the optimal target candidate data and the optimal target differential package in terms of version importance, transmission efficiency, upgrade risk, etc.
[0039] The importance of versions is determined based on the number of devices corresponding to the first upgrade path, which means that differential packages corresponding to upgrade paths involving more devices will be given priority. This can focus on the upgrade paths that are commonly used or more representative of most devices, ensuring that the selected differential packages are more universal and important in terms of version coverage.
[0040] The transmission efficiency can be determined by combining the first upgrade path and the first memory usage, based on two key factors: the length of the path involved in differential packet transmission and the size of the memory occupied. Shorter paths and smaller memory usage mean that differential packets can be transmitted to the vehicle terminal device faster, reducing the waiting time during the upgrade process, improving the user experience, and also reducing the pressure on network transmission.
[0041] The upgrade risk is determined based on the current vehicle status information and the number of upgrade failures in the historical upgrade records, taking into full consideration the actual vehicle operating conditions and historical upgrade records.
[0042] Based on the target candidate data determined by the technical solution of the present invention, the versions involved in the upgrade path are more important, the corresponding target differential packet transmission efficiency is higher, and the upgrade success rate is higher when performing differential upgrades. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are 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.
[0044] Figure 1 is a flowchart of a method for determining a differential packet based on firmware upgrade according to an embodiment of the present invention;
[0045] Figure 2 is a schematic diagram of an application scenario architecture of an embodiment of the present invention;
[0046] Figure 3 is a schematic diagram of interaction between a local server and a FOTA server according to an embodiment of the present invention;
[0047] Figure 4 is a flowchart of another differential packet determination method based on firmware upgrade according to an embodiment of the present invention;
[0048] Figure 5 is a structural diagram of a differential packet determination device based on firmware upgrade according to an embodiment of the present invention;
[0049] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention. In addition, the terms "first", "second" and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0051] OTA upgrades are usually divided into two types: full upgrade and differential upgrade.
[0052] Full firmware upgrade: The current firmware of the device is completely replaced with a new firmware version. In this method, the user device will download the entire new firmware package, regardless of the difference between the new and old versions. The complete firmware file needs to be transferred.
[0053] Full upgrade requires the device to download the complete firmware package. Although it is simple and easy, the data transmission volume is large, which may cause great pressure on the user's download time and traffic cost. For this reason, differential upgrade method came into being.
[0054] Firmware differential upgrade: Only the difference between the new and old versions of the device firmware is generated into a differential package (i.e., a patch file) and transmitted to the user device. The user device generates a complete upgrade version by combining the differential package with the existing firmware. This method implements firmware updates by transmitting a small amount of data.
[0055] Differential upgrades only require the transmission of the differences between the new and old versions of the firmware package, which greatly reduces the amount of data transmitted and reduces the user's traffic consumption and time cost.
[0056] However, in the art, there are usually the following problems when performing firmware upgrades by differential upgrade:
[0057] Complexity of differential package management: With the continuous iteration of firmware versions, the number of differential upgrade packages has increased exponentially, which has brought great complexity to development and maintenance. In addition, in the process of manual management and deployment of differential packages, it is easy for human errors to cause the wrong differential packages to be distributed, thus affecting the normal operation of the device.
[0058] Inefficient server detection: When a user device requests a differential package, the server needs to match and generate or distribute differential packages for different version combinations. As the number of differential packages increases, this detection process takes a long time and may have a negative impact on user experience, especially in scenarios with large-scale concurrent requests.
[0059] To this end, the embodiments of the present invention provide a differential packet determination method, apparatus, device and medium based on firmware upgrade to simplify the differential packet management process, improve server response efficiency, and effectively reduce the error risk and user waiting time during the differential upgrade process.
[0060] According to an embodiment of the present invention, an embodiment of a differential packet determination method based on firmware upgrade is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer device such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0061] Figure 1 It is a flowchart of a differential packet determination method based on firmware upgrade according to an embodiment of the present invention.
[0062] like Figure 1As shown, an embodiment of the present invention provides a differential packet determination method based on firmware upgrade. The differential packet determination method based on firmware upgrade provided by the technical solution of the present invention can be applied to vehicles, for example, firmware upgrades of various vehicle-mounted terminal devices in automobiles. As an example, Figure 2 As shown in the schematic diagram of the application scenario architecture, the vehicle-mounted terminal device may include: a communication module, an acquisition module, an interface module, a display module, etc. The interface module is used to connect the vehicle-mounted terminal device to the vehicle system to ensure the physical acquisition logic of the data. The acquisition module is used to collect environmental data related to the vehicle-mounted terminal device, and is mainly used to obtain current vehicle status information, such as the current vehicle speed. The communication module is mainly responsible for data communication between the vehicle-mounted terminal device and the firmware over the air (Firmware Over The Air, FOTA) server through the network. The differential packet determination scheme based on firmware upgrade is mainly executed in the FOTA server.
[0063] The vehicle terminal device is powered on and started by the vehicle computer. The vehicle terminal device collects basic system information of the device through the acquisition module, including the unique identification code of the device and the current version number of the vehicle terminal device. The vehicle terminal device establishes a connection with the vehicle computer system through the interface module, and collects the current vehicle status information (for example, the current vehicle speed) from the vehicle computer system through the acquisition module. The vehicle terminal device communicates with the FOTA server through the communication module, sends the collected data, and sends an upgrade detection request to detect whether there is an updated firmware.
[0064] The FOTA server is used to receive upgrade detection requests from vehicle-mounted terminal devices. After receiving the upgrade detection request from the vehicle-mounted terminal device, it first stores the uploaded data, including the current version number of the vehicle-mounted terminal device and the current vehicle status information, and then queries the differential package path table according to the current version number to obtain a list of upgradeable differential packages.
[0065] The differential package list is used for optimal selection calculation, and the differential package update priority is calculated from three dimensions: transmission efficiency of differential packages, importance of firmware versions, and upgrade risk of differential packages. The transmission efficiency of differential packages is evaluated by querying the package size (first memory occupancy) and path length of the differential package record in the server storage module. First, the total size of all candidate differential packages in the differential package list is calculated, and then the first memory occupancy corresponding to the current upgrade path is calculated to obtain the ratio. Then, the path length corresponding to the candidate differential package is calculated according to the differential package path table (that is, the target path length). The transmission efficiency of the candidate differential package is calculated by the formula. The higher the calculated transmission efficiency, the faster the transmission rate. The total number of devices involved in all firmware versions (that is, the total number of devices) is queried from the server storage module, and the number of devices included in the upgrade path in the candidate differential package is queried. The ratio of the number of devices to the total number of devices is used as the firmware version importance. The higher the calculated version importance, the higher the firmware version importance, which is more important to users and the entire vehicle. According to the total upgrade times and upgrade failure times of each candidate differential package in the historical upgrade records in the server storage module, the ratio of the upgrade failure times to the total upgrade times is used as one of the upgrade risk indicators. At the same time, the average vehicle speed in the number of successful upgrades of different differential packages is calculated, and its ratio to the current vehicle speed transmitted by the terminal is used as another upgrade risk indicator. According to the calculation formula ,in, Indicates the evaluation value corresponding to the candidate data, corresponding to the update priority, represents the weight corresponding to the transmission efficiency, Indicates the weight corresponding to the importance of the version, Indicates the weight corresponding to the upgrade risk, It represents the transmission efficiency. Indicates the importance of the version. Indicates escalation risk. The higher the differential package upgrade priority, the higher the priority will be. The access path of the differential packet with the highest value (that is, the target differential packet) is output.
[0066] The differential packet determination method based on firmware upgrade includes:
[0067] S101: Receive an upgrade detection request from a vehicle-mounted terminal device.
[0068] In this embodiment, the upgrade detection request includes: the current version number of the vehicle-mounted terminal device and the current vehicle status information, and may also include the version number to be upgraded. The upgrade detection request of the vehicle-mounted terminal device may be received by the FOTA server.
[0069] In this embodiment, the vehicle terminal device is the firmware to be upgraded. The current version number of the vehicle terminal device is the version number of the current vehicle terminal device. The upgrade detection request of the vehicle terminal device can be selected by the user or automatically detected by the vehicle system. For example, the upgrade detection request of the vehicle terminal device can be periodically sent to the FOTA server with a preset period.
[0070] As an example, the current version number may be v1, v2, v3, s1, s2, 1.1.1, 1.1.2, etc., numbered in order of version. The version number may be written in a conventional manner in the art and is not limited in the present invention. The letters in the version number may be used to represent the vehicle-mounted terminal device as the unique identification code of the vehicle-mounted terminal device, and the number identifies the i-th version. As an example, the current vehicle status information may be the current speed of the vehicle.
[0071] S102: Determine whether there is a differential package list according to the current version number.
[0072] In this embodiment, the differential package list includes at least one candidate data, and the candidate data includes a first upgrade path and a first memory occupancy of the candidate differential package stored in a corresponding relationship.
[0073] In this embodiment, the version number and the firmware version are positively correlated. A larger version number corresponds to a higher firmware version. The firmware version of v2 is higher than the firmware version of v1, and the firmware version of 1.1.2 is higher than the firmware version of 1.1.1.
[0074] In this embodiment, when an upgrade detection request is received from the vehicle-mounted terminal device, it is determined whether a differential package list exists based on the current version number. The differential package list is used to store candidate data that can be differentially upgraded, and each candidate data in the differential package list corresponds to a candidate differential package. The number of candidate data is the same as the number of candidate differential packages. As an example, the inclusion of 3 candidate data in the differential package list indicates that there are 3 different upgrade paths. The first upgrade path is generated by concatenating the version numbers of the firmware versions involved in the first upgrade path. The first memory occupancy represents the size of the candidate differential package.
[0075] As an example, determining whether there is a differential package list based on the current version number specifically includes: traversing the full package library, and determining whether there are other full firmware packages with a higher version number than the current one based on the current version number. The full package library is used to store the generated full firmware packages and the basic firmware package information of the full firmware packages in the order of numbers, and can also store the unique identification code of the vehicle-mounted terminal device. The basic firmware package information may include: version number and firmware package memory usage.
[0076] When there are other full firmware packages with version numbers higher than the current version number in the full package library, it means that there is a higher version, and it can be determined that there is a differential package list. The differential package list can be determined according to a predetermined differential package path table. The differential package path table includes at least one differential data, and the differential data includes an access path, a second upgrade path, and a second memory occupancy of a standard differential package stored in a corresponding relationship.
[0077] A standard differential package whose lowest version number in the second upgrade path matches the current version number and whose highest version number matches the version number to be upgraded can be determined as a candidate differential package, its second upgrade path can be determined as the first upgrade path of the candidate differential package, and its second memory occupancy can be determined as the first memory occupancy of the candidate differential package, thereby obtaining a differential package list.
[0078] In this embodiment, when there are no other full firmware packages with version numbers higher than the current version number in the full package library, it means that the current version number is the latest version and no update or upgrade is required. It is determined that there is no differential package list, and the end information is returned to end the upgrade detection request.
[0079] The second upgrade path includes the lowest version number. The above S102 determines whether there is a differential package list according to the current version number, specifically including:
[0080] Traverse the differential packet path table to determine whether the target data exists.
[0081] In this embodiment, the target data is the difference data between the current version number and the lowest version number. The difference packet path table is predetermined, and the predetermined difference packet path table can be traversed to determine whether the target data exists.
[0082] When it is determined that the target data exists, it is determined that the differential packet list exists.
[0083] In this embodiment, when it is determined that the target data does not exist, it is determined that the differential package list does not exist. The differential package list is determined based on the target data, the candidate differential package is the standard differential package corresponding to the target data, and the first upgrade path and the first memory occupancy of the candidate differential package are the second upgrade path and the second memory occupancy of the standard differential package corresponding to the target data. The differential package list is obtained by extracting data from the target data.
[0084] As an example, the full package library includes: v1: 10MB, v2: 12MB, v3: 20MB, s1: 5MB, s2: 15MB. Full firmware packages v1, v2, v3, the existing full firmware package access path is:
[0085] / v1 / v2 / v3, there are two differential packages under this directory, namely / v1 / v1-v2 and / v1 / v2 / v2-v3.
[0086] / v1 / v3, there is a differential package under this directory, / v1 / v1-v3.
[0087] / v2 / v3, this directory has a differential package v2 / v2-v3.
[0088] v1-v2, v1-v3, and v2-v3 represent differential package numbers. v1, v2, and v3 are the numbers (version numbers) of the full firmware packages. It can be understood that the version number is the file directory, and the differential package number is the file actually accessed. / v1 / v1-v2 stores the differential package numbered v1-v2.
[0089] In this embodiment, when making a full firmware package, the full firmware package number can be generated according to the system current timestamp timestamp, and the full firmware package is sorted according to the timestamp size when it is stored. The larger the timestamp, the more updated the full firmware package version. When the user detects the update, the current version number of the device will be uploaded and compared with the version number to be upgraded in the differential package path table. If the version number to be upgraded is greater than the current version number, it means that it is an upgradeable differential package.
[0090] The unique identification code of the vehicle terminal device is 001, and the current version number is v1. The full package library is traversed, and according to the current version number v1, it is determined that there are other full firmware packages v2 and v3 with higher version numbers than the current version in the data with the unique identification code 001. The differential data with the highest version v3 and the lowest version v1 is found from the differential package path table.
[0091] For example, the first differential data: access path: https: / / xxx / v1 / v1-v3, the second upgrade path: v1-v3, the second memory usage: xaMB.
[0092] The second differential data: access path: https: / / xxx / v1 / v1-v2, https: / / xxx / v1 / v2 / v2-v3, second upgrade path: v1-v2-v3, second memory usage: xbMB.
[0093] The differential package storage location (the access path in the differential data) is determined based on the version number.
[0094] In this embodiment, the differential package path table is similar to a table. Each time a differential package is generated, a row of records will be generated. This row of records includes the access path (the path to access the differential package file), the second upgrade path, and the second memory usage. It can also include: the path length of the differential package (the length is calculated by the file path / number), the lowest version number (the current version number), and the highest version number (the version number to be upgraded). For example, in the above, the path length of the first differential data is 1, the lowest version number v1 and the highest version number v3, and the path length of the second differential data is 2, the lowest version number v1 and the highest version number v3.
[0095] S103: When it is determined that there is a differential packet list, the differential packet list is optimized based on a preset optimization strategy to determine target candidate data.
[0096] In this embodiment, the candidate differential package corresponding to the target candidate data is the target differential package, which is used to upgrade the vehicle-mounted terminal device. The optimization strategy is determined based on the version importance, transmission efficiency and upgrade risk. The version importance is determined based on the number of devices corresponding to the first upgrade path. The transmission efficiency is determined based on the first upgrade path and the first memory usage. The upgrade risk is determined based on the current vehicle status information and the number of upgrade failures in the historical upgrade records.
[0097] In this embodiment, when it is determined that there is a differential packet list, the differential packet list is optimized based on a preset optimization strategy to determine the target candidate data, specifically including:
[0098] When it is determined that there is a differential package list, for each candidate data in the differential package list, the version importance is determined according to the ratio of the number of devices corresponding to the first upgrade path to the total number of devices, the transmission efficiency is determined according to the sum of the ratios of the target path length to the first memory occupancy and the total first memory occupancy, and the upgrade risk is determined according to the current vehicle status information and the ratio of the number of upgrade failures in the historical upgrade records to the total number of upgrades. The evaluation value corresponding to the candidate data is determined according to the version importance, transmission efficiency and upgrade risk. The evaluation value corresponding to each candidate data is obtained.
[0099] In this embodiment, the target path length is the path length corresponding to the first upgrade path. The first total memory usage is the sum of all first memory usages in the differential package list.
[0100] The candidate data corresponding to the maximum value among the evaluation values corresponding to all the candidate data is determined as the target candidate data.
[0101] In this embodiment, when the current vehicle state information is the current vehicle speed, the upgrade risk is determined according to the current vehicle state information, the ratio of the number of upgrade failures in the historical upgrade records to the total number of upgrades, specifically including:
[0102] Determine the average value of the vehicle speed corresponding to the number of successful upgrades in the historical upgrade records.
[0103] The upgrade risk is determined based on the ratio of the current vehicle speed to the average value, and the sum of the ratios of the number of upgrade failures to the total number of upgrades in the historical upgrade records.
[0104] In order to improve the concurrent performance of the server, user experience and update success rate, the optimal upgrade differential package will be selected from three dimensions: differential package transmission efficiency, firmware version importance and differential package upgrade risk. The calculation method is as follows: As an example, , where V represents the evaluation value corresponding to the candidate data, corresponding to the update priority, represents the weight corresponding to the transmission efficiency, Indicates the weight corresponding to the importance of the version, Indicates the weight corresponding to the upgrade risk, It represents the transmission efficiency. Indicates the importance of the version. Indicates an escalation risk. As an example, , , The weights configured respectively can be 0.5, 0.2, and 0.3.
[0105] The transmission efficiency is determined by the total size of the differential packets in the differential packet list (i.e., the total amount of the first memory occupied), the first memory occupied by a first upgrade path, and the path length (i.e., the target path length). First, the total size of all differential packets in the differential packet list is calculated, recorded as the total amount of the first memory occupied DM and the current path differential packet size, recorded as the first memory occupied CDM, and the ratio of CDM to DM is used as one of the attribute values. Secondly, the target path length WY is calculated, and the path length is increased by 1 every time a path is passed.
[0106] Transmission efficiency The higher the transmission efficiency, the higher the priority. For example, the candidate data in the differential packet list are: [v1-v2-v3-v4-v5, pMB], [v1-v2-v5, qMB], [v1-v5, yMB].
[0107] [v1-v2-v3-v4-v5, pMB] corresponding transmission efficiency .
[0108] [v1-v2-v5, qMB] corresponding transmission efficiency .
[0109] [v1-v5, yMB] corresponding transmission efficiency .
[0110] The importance of the firmware version is determined according to the proportion of all firmware versions in the historical upgrade records. First, the historical upgrade records of all device firmware versions stored in the server are summed to obtain the total number of devices VI, the distribution of the number of devices with different firmware versions, and the number of devices CVI included in the first upgrade path in the candidate differential package. The ratio of CVI to VI is used as the version importance.
[0111] Version importance The more important the version, the higher the priority.
[0112] For example, the number of historical storage devices on the server (total number of devices VI) is 1000, and the different device version data of v1, v2, v3, and v4 (the number of devices corresponding to the versions involved in the upgrade path) are 100, 150, 250, and 500 respectively.
[0113] The number of devices included in the first upgrade path v1-v2-v3-v4 is CVI=100+150+250+500, and the version importance of v1-v2-v3-v4 is 1000 / 1000.
[0114] The number of devices included in the first upgrade path v1-v2-v3 is CVI=100+150+250, and the version importance of v1-v2-v3 is (100+150+250) / 1000.
[0115] The number of devices included in the first upgrade path v1-v4 is CVI=100+500, and the version importance of v1-v4 is (100+500) / 1000.
[0116] The differential package upgrade risk is evaluated based on the current driving environment and version upgrade success rate. The total number of upgrades and the number of upgrade failures for each candidate differential package in the historical upgrade records in the server storage module are counted. The ratio of the number of upgrade failures to the total number of upgrades is used as one of the upgrade risk indicators. At the same time, the average vehicle speed in different differential package upgrade success times is calculated, and its ratio to the current vehicle speed transmitted by the terminal is used as another upgrade risk indicator. The higher the escalation risk, the lower the priority. Indicates the number of upgrade failures. Indicates the total number of upgrades. Indicates the current vehicle speed. Indicates the average value of vehicle speed corresponding to the number of successful upgrades.
[0117] The candidate differential packages corresponding to v1-v2-v3-v4-v5 include differential packages with differential package numbers v1-v2, v2-v3, v3-v4, and v4-v5. In the historical upgrade records, the total number of firmware upgrades performed by differential packages with differential package numbers v1-v2, v2-v3, v3-v4, and v4-v5 is counted, for example, 100 times ( ), and the number of upgrade failures for each differential package for firmware upgrade. The number of upgrade failures for differential packages numbered v1-v2, v2-v3, v3-v4, and v4-v5 for firmware upgrade are 1, 5, 7, and 9 respectively. , the current vehicle speed is 50km / h, and the average vehicle speed corresponding to the number of successful upgrades (78 times) is 45km / h. The corresponding upgrade risk of [v1-v2-v3-v4-v5, pMB] .
[0118] In order to reduce the impact of different dimensions or numerical ranges of the three indicators on the results, each attribute value is normalized. The normalization calculation formula is:
[0119] .
[0120] in, Indicates the minimum value of the attribute value. Indicates the maximum value of the attribute value. represents the normalized attribute value, Represents the original attribute value.
[0121] In this embodiment, the terminal device sends a detection request to the server to detect whether the firmware needs to be upgraded. The request carries the unique identification code of the terminal device, the current version number, and the current vehicle status information (current vehicle speed). The server searches the differential package path table according to the current version number of the device, and detects whether there is an upgradeable differential package list according to the size of the version number. If so, the server calculates the optimal solution for the upgradeable differential package list and selects the optimal upgradeable differential package under the current environment.
[0122] Figure 4 It is a flowchart of another differential packet determination method based on firmware upgrade according to an embodiment of the present invention.
[0123] like Figure 4 As shown, another differential packet determination method based on firmware upgrade is provided in an embodiment of the present invention.
[0124] The differential packet determination method based on firmware upgrade includes:
[0125] S201: receiving an upgrade detection request from a vehicle-mounted terminal device. For details, refer to the relevant description of S101, which will not be repeated here.
[0126] S202: Determine whether there is a differential package list according to the current version number. For details, refer to the relevant description of S102, which will not be repeated here.
[0127] S203: When it is determined that there is a differential packet list, the differential packet list is optimized based on a preset optimization strategy to determine target candidate data. For details, refer to the relevant description of S103, which will not be repeated here.
[0128] S204: Determine an access path of the target differential package, and download the target differential package based on the access path of the target differential package.
[0129] In this embodiment, the terminal accesses the optimal upgrade firmware address (the access path of the target differential package) to download and perform firmware upgrade. If the upgrade is successful, a request is sent to the terminal server storage device to update the firmware times. Otherwise, a firmware upgrade failure log is recorded and stored in the terminal server.
[0130] In this embodiment, determining the access path of the target differential packet in S204 specifically includes:
[0131] The access path of the target differential package is determined according to a predetermined differential package path table, wherein the differential package path table includes at least one differential data, and the differential data includes the access path of the standard differential package, the second upgrade path and the second memory usage stored in a corresponding relationship.
[0132] In this embodiment, each time a new full firmware package is generated, it and its basic firmware package information are stored in the full package library in the order of version numbers, the full package library is traversed, differential data is generated, and the differential package path table is updated. As an example, a new full firmware package (i.e., the current full firmware package described below) is compiled locally, and the basic firmware package information of the full firmware package is recorded. The basic firmware package information may include: version number and firmware package memory usage. The full firmware package and the basic firmware package information of the full firmware package are stored in the full package library in the order of the size of the version number. That is to say, each time a new full firmware package is generated, it and its basic firmware package information are stored in the full package library in the order of numbering, specifically, the full firmware package and the basic firmware package information of the full firmware package are uploaded to the FOTA server and stored in the order of version numbers. The unique identification code corresponding to the vehicle-mounted terminal device can be stored during storage. In this embodiment, differential packages can be produced by tools, and conventional differential package production tools in the art can be used to produce differential packages, and the obtained differential packages are stored in a differential library. The present invention does not limit the specific production method of the differential packages.
[0133] After the full firmware package and the basic firmware package information of the full firmware package are stored in the full package library in the order of version numbers, the full package library is traversed sequentially to check whether there are other full firmware packages with a version lower than the full firmware package. When there are full firmware packages with a version number lower than the version number of the full firmware package in the full package library, it is determined that there are other full firmware packages with a version lower than the full firmware package, and the full firmware packages with a version number lower than the full firmware package are other full firmware packages. At this time, the differential package path table can be determined based on the basic firmware package information of other full firmware packages and the basic firmware package information of the full firmware package. The differential package path table is stored in the FOTA server, which does not occupy the memory of the vehicle terminal device. It can also realize the deployment of differential packages when generating new full firmware packages. The differential packages are deployed in advance so that when receiving the upgrade detection request of the vehicle terminal device, it can be determined whether there is a differential package that meets the upgrade requirements. By optimizing, the optimal upgrade path can be found from all upgrade paths that can realize firmware upgrade. The target differential package can be directly downloaded through the access path, and then the firmware can be upgraded. There is no need to make differential packages after receiving the upgrade detection request of the vehicle terminal device.
[0134] Specifically, when generating the current full firmware package, determine the basic firmware package information of the current full firmware package. And store the basic firmware package information of the current full firmware package and the current full firmware package in the full package library in the order of version numbers. The basic firmware package information includes: version number and firmware package memory usage. Traverse the full package library, and determine whether there are other full firmware packages with a version lower than the current full firmware package according to the version number of the current full firmware package. When there are other full firmware packages with a version lower than the current full firmware package, it means that the version of the current full firmware package is the latest version, and it is necessary to record differential data. According to the basic firmware package information of other full firmware and the basic firmware package information of the current full firmware package, determine the differential package path table, and store the differential data determined according to the basic firmware package information of other full firmware and the basic firmware package information of the current full firmware package in the differential package path table. The differential data in the differential package path table is continuously updated and expanded.
[0135] In this embodiment, the schematic diagram of the interaction between the local server and the FOTA server is as follows: Figure 3 As shown in the figure, each time the local server generates a new full firmware package, it uploads it to the FOTA server. The processing module in the FOTA server creates a differential package and adds the newly determined differential data to the differential package path table.
[0136] When there are other full firmware packages with a version higher than or equal to the current full firmware package in the full package library, it means that the version of the current full firmware package is a historical version that has been generated, and the current full firmware package has been stored in the full package library.
[0137] The technical solution of the present invention can effectively improve the efficiency of differential packet deployment and the server performance of vehicle-mounted terminal equipment when performing FOTA differential packet upgrades.
[0138] The main features of the present invention are:
[0139] 1) Based on the differential package deployment scenario, differential packages are produced and deployed automatically.
[0140] 2) Combined with the use scenarios of the Internet of Vehicles, the vehicle-mounted terminal equipment is performing differential FOTA efficient upgrades.
[0141] It should be noted that the contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.
[0142] In this embodiment, a differential packet determination device based on firmware upgrade is also provided. A single device is used to implement the above-mentioned embodiments and optional implementation methods. Those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0143] Figure 5 It is a structural diagram of a differential packet determination device based on firmware upgrade according to an embodiment of the present invention.
[0144] The present invention provides a differential packet determination device based on firmware upgrade, such as Figure 5 As shown, the differential packet determination device based on firmware upgrade includes:
[0145] The first processing module 11 is used to receive an upgrade detection request from a vehicle-mounted terminal device. The upgrade detection request includes: the current version number of the vehicle-mounted terminal device and current vehicle status information.
[0146] The second processing module 12 is used to determine whether there is a differential package list according to the current version number.
[0147] The differential package list includes at least one candidate data, and the candidate data includes a first upgrade path and a first memory occupancy of the candidate differential package stored in a corresponding relationship.
[0148] The third processing module 13 is used to optimize the differential package list based on a preset optimization strategy to determine the target candidate data when it is determined that there is a differential package list. The candidate differential package corresponding to the target candidate data is the target differential package, which is used to upgrade the vehicle-mounted terminal device. The optimization strategy is determined based on the version importance, transmission efficiency and upgrade risk. The version importance is determined based on the number of devices corresponding to the first upgrade path. The transmission efficiency is determined based on the first upgrade path and the first memory occupancy. The upgrade risk is determined based on the current vehicle status information and the number of upgrade failures in the historical upgrade records.
[0149] In an optional embodiment, the differential package determination device based on firmware upgrade also includes: a download module, which is used to determine the access path of the target differential package after determining the target candidate data, and download the target differential package based on the access path of the target differential package.
[0150] In an optional implementation, the download module is specifically used to determine the access path of the target differential package according to a predetermined differential package path table. The differential package path table includes at least one differential data, and the differential data includes the access path of the standard differential package, the second upgrade path, and the second memory usage stored in a corresponding relationship.
[0151] In an optional implementation, the differential package determination device based on firmware upgrade further includes: a full package library update module and a differential package path table update module.
[0152] The full package library update module is used to determine the basic information of the current full firmware package when generating the current full firmware package. And store the current full firmware package and the basic information of the current full firmware package in the full package library in the order of version numbers. The basic information of the firmware package includes: version number and firmware package memory usage.
[0153] The differential package path table update module is used to traverse the full package library after storing the current full firmware package and the firmware package basic information of the current full firmware package in the order of version numbers, and determine whether there are other full firmware packages with a version lower than the current full firmware package according to the version number of the current full firmware package.
[0154] When there are other full firmware packages with a version lower than the current full firmware package, the differential package path table is determined according to the firmware package basic information of the other full firmware packages and the firmware package basic information of the current full firmware package.
[0155] In an optional embodiment, the second processing module 12 is specifically used to traverse the differential package path table to determine whether the target data exists when the second upgrade path includes the minimum version number. The target data is the differential data that matches the current version number with the minimum version number. When it is determined that the target data exists, it is determined that there is a differential package list. The differential package list is determined based on the target data, and the candidate differential package is a standard differential package corresponding to the target data.
[0156] In an optional implementation, the third processing module 13 includes a first processing unit and a second processing unit.
[0157] The first processing unit is used to determine the version importance of each candidate data in the differential package list according to the ratio of the number of devices corresponding to the first upgrade path to the total number of devices, determine the transmission efficiency according to the sum of the ratio of the target path length to the first memory occupancy and the total first memory occupancy, and determine the upgrade risk according to the current vehicle status information and the ratio of the number of upgrade failures in the historical upgrade records to the total number of upgrades. Determine the evaluation value corresponding to the candidate data according to the version importance, transmission efficiency and upgrade risk. The target path length is the path length corresponding to the first upgrade path.
[0158] The second processing unit is used to determine the candidate data corresponding to the maximum value among the evaluation values corresponding to all the candidate data as the target candidate data.
[0159] In an optional implementation, the first processing unit in the third processing module 13 is specifically configured to determine the average value of the vehicle speed corresponding to the number of successful upgrades in the historical upgrade records when the current vehicle state information is the current vehicle speed. The upgrade risk is determined based on the sum of the ratio of the current vehicle speed to the average value and the ratio of the number of failed upgrades to the total number of upgrades in the historical upgrade records.
[0160] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0161] The differential packet determination device based on firmware upgrade in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0162] The embodiment of the present invention also provides a computer device having the above Figure 5 The differential packet determination device based on firmware upgrade is shown.
[0163] See also Figure 6 , Figure 6 Schematic diagram of the hardware structure of the computer device according to the embodiment of the present invention. Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In an optional embodiment, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor device). Figure 6 A processor 10 is taken as an example.
[0164] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0165] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0166] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating device, an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In an optional embodiment, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0167] The memory 20 may include a volatile memory, such as a random access memory. The memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive. The memory 20 may also include a combination of the above-mentioned types of memory.
[0168] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0169] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0170] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0171] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A differential packet determination method based on firmware upgrade, characterized in that: include: Receive upgrade detection request from vehicle terminal equipment; The upgrade detection request includes: the current version number of the vehicle-mounted terminal device and the current vehicle status information; Determine whether a differential package list exists according to the current version number; The differential package list includes at least one candidate data, and the candidate data includes a first upgrade path and a first memory occupancy of the candidate differential package stored in a corresponding relationship; When it is determined that there is a differential package list, the differential package list is optimized based on a preset optimization strategy to determine target candidate data; the candidate differential package corresponding to the target candidate data is the target differential package, which is used to upgrade the vehicle-mounted terminal device; the optimization strategy is determined according to version importance, transmission efficiency and upgrade risk; the version importance is determined according to the number of devices corresponding to the first upgrade path; the transmission efficiency is determined according to the first upgrade path and the first memory occupancy; the upgrade risk is determined according to the current vehicle status information and the number of upgrade failures in the historical upgrade record; When it is determined that there is a differential packet list, optimizing the differential packet list based on a preset optimization strategy to determine target candidate data includes: When it is determined that there is a differential package list, for each candidate data in the differential package list, the version importance is determined according to the ratio of the number of devices corresponding to the first upgrade path to the total number of devices, the transmission efficiency is determined according to the sum of the ratios of the target path length to the first memory occupancy and the total first memory occupancy, and the upgrade risk is determined according to the current vehicle status information and the ratio of the number of upgrade failures in the historical upgrade records to the total number of upgrades; the evaluation value corresponding to the candidate data is determined according to the version importance, the transmission efficiency and the upgrade risk; the target path length is the path length corresponding to the first upgrade path; The candidate data corresponding to the maximum value among the evaluation values corresponding to all the candidate data is determined as the target candidate data.
2. The method according to claim 1, characterized in that After determining the target candidate data, it also includes: An access path of the target differential package is determined, and the target differential package is downloaded based on the access path of the target differential package.
3. The method according to claim 2, characterized in that Determining the access path of the target differential package includes: The access path of the target differential package is determined according to a predetermined differential package path table; the differential package path table includes at least one differential data, and the differential data includes the access path of the standard differential package, the second upgrade path, and the second memory occupancy stored in a corresponding relationship.
4. The method according to claim 3, characterized in that Before determining the access path of the target differential package, the method further includes: When generating a current full firmware package, determining the firmware package basic information of the current full firmware package; and storing the current full firmware package and the firmware package basic information of the current full firmware package in a full package library in the order of version numbers; the firmware package basic information includes: version number and firmware package memory usage; Traversing the full package library, and determining whether there are other full firmware packages with a version lower than the current full firmware package according to the version number of the current full firmware package; When there are other full firmware packages with a version lower than that of the current full firmware package, the differential package path table is determined according to the firmware package basic information of the other full firmware packages and the firmware package basic information of the current full firmware package.
5. The method according to claim 3, characterized in that: The second upgrade path includes a minimum version number, and determining whether a differential package list exists according to the current version number includes: Traversing the differential packet path table to determine whether target data exists; the target data is differential data matching the current version number with the lowest version number; When it is determined that the target data exists, it is determined that the differential package list exists; the differential package list is determined according to the target data, and the candidate differential package is a standard differential package corresponding to the target data.
6. The method according to claim 1, characterized in that When the current vehicle state information is the current vehicle speed, determining the upgrade risk according to the current vehicle state information, the ratio of the number of upgrade failures in the historical upgrade record to the total number of upgrades, includes: Determine the average value of the vehicle speed corresponding to the number of successful upgrades in the historical upgrade records; The upgrade risk is determined according to the ratio of the current vehicle speed to the average value, and the sum of the ratios of the number of upgrade failures to the total number of upgrades in the historical upgrade records.
7. A differential packet determination device based on firmware upgrade, characterized in that: include: A first processing module is used to receive an upgrade detection request from a vehicle-mounted terminal device; The upgrade detection request includes: the current version number of the vehicle-mounted terminal device and the current vehicle status information; A second processing module, used to determine whether a differential package list exists according to the current version number; The differential package list includes at least one candidate data, and the candidate data includes a first upgrade path and a first memory occupancy of the candidate differential package stored in a corresponding relationship; The third processing module is used to optimize the differential package list based on a preset optimization strategy to determine the target candidate data when it is determined that there is a differential package list; the candidate differential package corresponding to the target candidate data is the target differential package, which is used to upgrade the vehicle-mounted terminal device; the optimization strategy is determined according to version importance, transmission efficiency and upgrade risk; the version importance is determined according to the number of devices corresponding to the first upgrade path; the transmission efficiency is determined according to the first upgrade path and the first memory occupancy; the upgrade risk is determined according to the current vehicle status information and the number of upgrade failures in the historical upgrade record; The third processing module includes: a first processing unit and a second processing unit; The first processing unit is used to, when determining that there is a differential package list, determine, for each candidate data in the differential package list, the version importance according to the ratio of the number of devices corresponding to the first upgrade path to the total number of devices, determine the transmission efficiency according to the sum of the ratio of the target path length to the first memory occupancy and the total first memory occupancy, and determine the upgrade risk according to the current vehicle status information and the ratio of the number of upgrade failures in the historical upgrade records to the total number of upgrades; determine the evaluation value corresponding to the candidate data according to the version importance, the transmission efficiency and the upgrade risk; the target path length is the path length corresponding to the first upgrade path; The second processing unit is used to determine the candidate data corresponding to the maximum value among the evaluation values corresponding to all the candidate data as the target candidate data.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the differential packet determination method based on firmware upgrade described in any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the differential packet determination method based on firmware upgrade according to any one of claims 1 to 6.
Citation Information
Patent Citations
Terminal equipment upgrading method, server, electronic equipment and storage medium
CN115167907A
Firmware upgrading method and device of vehicle-mounted terminal device and storage medium
CN118916063A