Upgrading method and device of embedded system software, equipment, storage medium and program product

By receiving upgrade response messages from the cloud server, filtering and scoring candidate upgrade packages, and selecting the appropriate upgrade package to upgrade IoT devices, the problem of low efficiency in traditional upgrade methods is solved, and an efficient and reliable upgrade process is achieved.

CN121300829APending Publication Date: 2026-01-09SOUTHERN POWER GRID SENSING TECHNOLOGY (GUANGDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511463703.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Traditional IoT device upgrade methods are inefficient and cannot meet the requirements for efficiency and reliability in the upgrade process.

Method used

By receiving upgrade response messages from the cloud server, candidate upgrade packages are filtered, and they are scored based on download parameters. The appropriate upgrade package is selected for upgrade based on the scoring results, including the selection of full or incremental mode and the switching of download methods, to ensure the normal progress of the upgrade process.

Benefits of technology

It improves the efficiency and reliability of software upgrades for IoT devices, is suitable for various application scenarios, and can quickly detect and adjust the download process of upgrade packages to ensure a smooth upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121300829A_ABST
    Figure CN121300829A_ABST
Patent Text Reader

Abstract

The invention relates to an embedded system software upgrading method and device, equipment, a storage medium and a program product. The method comprises the following steps: receiving an upgrade reply message sent by a cloud server; the upgrade reply message is generated by an upgrade request sent by the terminal device to the cloud server; the upgrade reply message carries an upgrade package downloading link; obtaining various types of upgrade packages required by the application software based on the download link, and screening out candidate upgrade packages from the plurality of upgrade packages; scoring the candidate upgrade package according to the downloading parameter of the candidate upgrade package to obtain a first scoring result; and upgrading the application software according to the first scoring result to obtain an upgrading result. According to the method, the application program is upgraded by setting multiple types of upgrading packages, the method can be suitable for various application upgrading scenes, the downloading process of the upgrading packages is detected through the first scoring result, the candidate upgrading packages are rapidly adjusted, and the upgrading efficiency and reliability of the application software of the embedded system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things, and in particular to an embedded system software upgrading method and device, equipment, a storage medium and a program product. BACKGROUND

[0002] With the rapid development of Internet of Things technology, Internet of Things devices can realize function iteration and bug fixing through software upgrading. In related technologies, the upgrading method of Internet of Things devices has developed from offline wired upgrading to wireless remote upgrading such as WiFi, 4G / 5G, LoRa, and the scene can be extended to in-operation upgrading, low-bandwidth, high-reliability demand scenarios, etc.

[0003] However, the traditional upgrading method has the problem of low upgrading efficiency. SUMMARY

[0004] Therefore, it is necessary to provide an embedded system software upgrading method, device, equipment, storage medium and program product capable of improving software upgrading efficiency in view of the above technical problems.

[0005] In a first aspect, the present application provides an embedded system software upgrading method applied to a terminal device, comprising:

[0006] receiving an upgrading reply message sent by a cloud server; the upgrading reply message is generated for an upgrading request sent by the terminal device to the cloud server; the upgrading request carries a version number of application software to be upgraded on the terminal device; the upgrading reply message carries an upgrading package download link;

[0007] obtaining various types of upgrading packages required by the application software based on the download link, and screening a candidate upgrading package from the plurality of upgrading packages;

[0008] scoring the candidate upgrading package according to a download parameter of the candidate upgrading package to obtain a first scoring result;

[0009] upgrading the application software according to the first scoring result to obtain an upgrading result.

[0010] In one embodiment, the step of upgrading the application software according to the first scoring result to obtain an upgrading result comprises:

[0011] if the scoring value corresponding to the first scoring result is greater than a preset score value, then upgrading the application software using the candidate upgrading package to obtain an upgrading result;

[0012] If the score value corresponding to the first score result is not greater than the preset score value, a download method of the candidate upgrade package is switched, and a download parameter of the candidate upgrade package is updated based on the switched download method to obtain a new download parameter of the candidate upgrade package, and the candidate upgrade package is re-scored according to the new download parameter to obtain a second score result, and the application software is upgraded according to the second score result and the remaining upgrade packages in the plurality of upgrade packages to obtain an upgrade result.

[0013] In one of the embodiments, the upgrading the application software according to the second score result and the remaining upgrade packages in the plurality of upgrade packages to obtain an upgrade result comprises:

[0014] If the score value corresponding to the second score result is greater than the preset score value, the application software is upgraded using the candidate upgrade package to obtain an upgrade result.

[0015] If the score value corresponding to the second score result is not greater than the preset score value, a new candidate upgrade package is determined from the remaining upgrade packages, and the step of scoring the candidate upgrade package according to the download parameter of the candidate upgrade package to obtain a first score result is returned based on the new candidate upgrade package.

[0016] In one of the embodiments, the upgrading the application software using the candidate upgrade package to obtain an upgrade result comprises:

[0017] verifying the candidate upgrade package;

[0018] In a case where the verification is passed, the application software is upgraded using the candidate upgrade package to obtain an upgrade result.

[0019] In a case where the verification is not passed, a download method of the candidate upgrade package is switched, and a download parameter of the candidate upgrade package is updated based on the switched download method to obtain a new download parameter of the candidate upgrade package, and the upgrade package is re-scored according to the new download parameter to obtain a third score result, and the application software is upgraded according to the third score result and the remaining upgrade packages in the plurality of upgrade packages to obtain an upgrade result.

[0020] In one of the embodiments, the upgrading the application software according to the third score result and the remaining upgrade packages in the plurality of upgrade packages to obtain an upgrade result comprises:

[0021] If the score value corresponding to the third score result is greater than the preset score value, the application software is upgraded using the candidate upgrade package to obtain an upgrade result.

[0022] If the score value corresponding to the third score result is not greater than a preset score value, a new candidate upgrade package is determined from the remaining upgrade packages, and the step of returning to performing the scoring of the candidate upgrade package according to the download parameter of the candidate upgrade package to obtain a first score result is performed based on the new candidate upgrade package.

[0023] In one of the embodiments, the filtering of the candidate upgrade package from the plurality of upgrade packages comprises:

[0024] determining a full-mode type upgrade package from the plurality of upgrade packages, and determining a remaining storage amount of the terminal device and a current network transmission bandwidth;

[0025] If the remaining storage amount is greater than or equal to the volume of the full-mode type upgrade package, and the current network transmission bandwidth is greater than or equal to a preset bandwidth threshold, the full-mode type upgrade package from the plurality of upgrade packages is determined as the candidate upgrade package.

[0026] If the remaining storage amount is less than the volume of the full-mode type upgrade package, or the current network transmission bandwidth is less than the preset bandwidth threshold, a delta-mode type upgrade package from the plurality of upgrade packages is determined as the candidate upgrade package.

[0027] In a second aspect, the application further provides an upgrade device of an embedded system software, applied to a terminal device, comprising:

[0028] a receiving module configured to receive an upgrade reply message sent by a cloud server; the upgrade reply message is generated for an upgrade request sent by the terminal device to the cloud server; the upgrade request carries a version number of an application software to be upgraded on the terminal device; and the upgrade reply message carries an upgrade package download link;

[0029] a filtering module configured to acquire various types of upgrade packages required by the application software based on the download link, and filter a candidate upgrade package from the plurality of upgrade packages;

[0030] a scoring module configured to score the candidate upgrade package according to a download parameter of the candidate upgrade package to obtain a first score result;

[0031] an upgrade module configured to upgrade the application software according to the score result to obtain an upgrade result.

[0032] In a third aspect, the application further provides a computer device comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0033] receive an upgrade reply message sent by the cloud server; the upgrade reply message is generated for an upgrade request sent by the terminal device to the cloud server; the upgrade request carries a version number of application software to be upgraded on the terminal device; the upgrade reply message carries an upgrade package download link;

[0034] obtain various types of upgrade packages required by the application software based on the download link, and screen a candidate upgrade package from the multiple upgrade packages;

[0035] score the candidate upgrade package according to a download parameter of the candidate upgrade package, to obtain a first scoring result;

[0036] upgrade the application software according to the first scoring result, to obtain an upgrade result.

[0037] In a fourth aspect, the present application further provides a computer readable storage medium, which has a computer program stored thereon, and the computer program is executed by a processor to implement the following steps:

[0038] receive an upgrade reply message sent by the cloud server; the upgrade reply message is generated for an upgrade request sent by the terminal device to the cloud server; the upgrade request carries a version number of application software to be upgraded on the terminal device; the upgrade reply message carries an upgrade package download link;

[0039] obtain various types of upgrade packages required by the application software based on the download link, and screen a candidate upgrade package from the multiple upgrade packages;

[0040] score the candidate upgrade package according to a download parameter of the candidate upgrade package, to obtain a first scoring result;

[0041] upgrade the application software according to the first scoring result, to obtain an upgrade result.

[0042] In a fifth aspect, the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the following steps:

[0043] receive an upgrade reply message sent by the cloud server; the upgrade reply message is generated for an upgrade request sent by the terminal device to the cloud server; the upgrade request carries a version number of application software to be upgraded on the terminal device; the upgrade reply message carries an upgrade package download link;

[0044] obtain various types of upgrade packages required by the application software based on the download link, and screen a candidate upgrade package from the multiple upgrade packages;

[0045] score the candidate upgrade package according to the download parameter of the candidate upgrade package, to obtain a first scoring result;

[0046] upgrade the application software according to the first scoring result, to obtain an upgrade result.

[0047] The embedded system software upgrade method, device, computer equipment, computer readable storage medium and computer program product, first receive the upgrade reply message sent by the cloud server, then obtain various types of upgrade packages required by the application software based on the download link, and select a candidate upgrade package from the multiple upgrade packages; score the candidate upgrade package according to the download parameter of the candidate upgrade package, to obtain a first scoring result; upgrade the application software according to the first scoring result, to obtain an upgrade result. By setting multiple types of upgrade packages to upgrade the application program, it can be applied to various application upgrade scenarios, and by measuring the download environment of the selected candidate upgrade package through the first scoring result, it can detect whether the download process of the upgrade package is abnormal, and quickly adjust the candidate upgrade package, thereby improving the upgrade efficiency and reliability of the embedded system application software. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0049] Figure 1 An application environment diagram of the embedded system software upgrade method in one embodiment;

[0050] Figure 2 A flowchart of the embedded system software upgrade method in one embodiment;

[0051] Figure 3 A flowchart of upgrading through the first scoring result in one embodiment;

[0052] Figure 4 A flowchart of upgrading through the second scoring result in one embodiment;

[0053] Figure 5 A flowchart of verifying the candidate upgrade package in one embodiment;

[0054] Figure 6 A flowchart of upgrading through the third scoring result in one embodiment;

[0055] Figure 7 a flowchart of a process for screening a candidate upgrade package in an embodiment;

[0056] Figure 8 a flowchart of a process for upgrading embedded system software in another embodiment;

[0057] Figure 9 a block diagram of an upgrade device for embedded system software in an embodiment;

[0058] Figure 10 an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0059] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0060] It should be noted that the terms "first", "second", and the like used in the present application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "include" and "have" and any variations thereof used in the present application are intended to cover non-exclusive inclusion. The term "multiple" used in the present application refers to two or more. The term "and / or" used in the present application refers to one of the options, or any combination of multiple options.

[0061] With the rapid development of Internet of Things technology, Internet of Things devices can realize function iteration and bug fixing through software upgrade. In related technologies, the upgrade method of Internet of Things devices develops from offline wired upgrade to wireless remote upgrade such as WiFi, 4G / 5G, LoRa, etc. The scene can be extended to in-service upgrade, low-bandwidth, high-reliability demand scenarios, etc. Related technologies present three trends: wireless and remote upgrade methods, process lightweight and low power consumption, and intelligent and fault-tolerant strategies, to adapt to device resource constraints and complex application environments. However, the traditional upgrade method has the problem of low upgrade efficiency.

[0062] In view of the above technical problems, the embodiments of the present application provide an embedded system software upgrade method which can improve the upgrade efficiency of the application program. The following embodiments will specifically describe the embedded system software upgrade method.

[0063] The embedded system software upgrade method provided by the embodiments of the present application can be applied to, for example Figure 1The application environment shown. Among them, the terminal device 102 is connected with the cloud server 104 by wire or wireless, the terminal device 102 is provided with various types of embedded system application software, and the cloud server 104 stores the upgrade package of different embedded system application software. In a specific application, the terminal device 102 sends an upgrade request of application software to the cloud server, the cloud server 104 calls the upgrade package of application software from the cloud based on the upgrade request and transmits it to the terminal device 102, so that the terminal device 102 completes the upgrade of the application program. The terminal device 102 will transmit the early warning information to the cloud server 104 for recording during the upgrade process. Among them, the terminal device 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices, the Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle device, a projection device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc.

[0064] In one exemplary embodiment, as Figure 2 shown, an embedded system software upgrade method is provided, and the embodiment is exemplified by applying the method to a terminal device. In the embodiment, the method comprises:

[0065] S201, receiving the upgrade reply message sent by the cloud server;

[0066] Among them, the upgrade reply message is generated by the terminal device sending an upgrade request to the cloud server; the upgrade request carries the version number of the application software to be upgraded on the terminal device and the local firmware information; the upgrade reply message carries the upgrade package download link, which can be obtained through the upgrade package type list, which contains the upgrade package type and the corresponding type of upgrade package download link, for example, the upgrade package type includes full upgrade package and incremental upgrade package, and the upgrade package download link includes path 1 and path 2, wherein the full upgrade package corresponds to path 1, and the incremental upgrade package corresponds to path 2.

[0067] In the embodiment, the data collection module of the terminal device collects the local firmware information and the version number of the application software to be upgraded according to a preset period (for example, 24 hours), generates an upgrade request based on the collected information, and uploads the upgrade request to the cloud server. The cloud server compares the received version number of the application software with the pre-stored upgrade package version information in the cloud, and when the current version number of the application software is lower than the pre-stored upgrade package version information, extracts the upgrade package link corresponding to the version number of the application software to be upgraded, and transmits the upgrade reply message generated by the upgrade package link to the upgrade control module of the terminal device for subsequent upgrade processing of the application program.

[0068] S202, obtaining various types of upgrade packages required by the application software based on the download link, and screening a candidate upgrade package from the plurality of upgrade packages;

[0069] In the embodiment, when the upgrade package is obtained through the download link, the corresponding download link can be selected according to the arrangement order of the download link to obtain the various types of upgrade packages required by the application software. Alternatively, all the download links can be selected at the same time to obtain the various types of upgrade packages required by the application software.

[0070] In the embodiment, after the terminal device obtains the various types of upgrade packages required by the application software, the first optional way is to select a type of upgrade package in the upgrade package as a candidate upgrade package for upgrade processing. The second optional way is to first determine a full upgrade package and the current device state and network parameters of the terminal device from the upgrade package, and match the information of the full upgrade package with the current device state and network parameters of the terminal device. If the information of the full upgrade package matches the current device state and network parameters of the terminal device successfully, the full upgrade package is determined as the candidate upgrade package. If the information of the full upgrade package does not match the current device state and network parameters of the terminal device successfully, the incremental upgrade package is determined as the candidate upgrade package. The device state includes CPU load and remaining storage, and the network parameters include bandwidth and packet loss rate. For example, the information of the full upgrade package is the volume, and it is judged whether the remaining storage is greater than or equal to the volume of the full upgrade package and whether the bandwidth is greater than or equal to a preset bandwidth threshold. In the case where the remaining storage is greater than or equal to the volume of the full upgrade package and the bandwidth is greater than or equal to the preset bandwidth threshold, the full upgrade package is selected as the candidate upgrade package. In the case where the remaining storage is less than the volume of the full upgrade package or the bandwidth is less than the preset bandwidth threshold, the incremental upgrade package is selected as the candidate upgrade package.

[0071] S203, scoring the candidate upgrade package according to the download parameters of the candidate upgrade package to obtain a first scoring result;

[0072] The download parameters can be download rate, packet loss rate, and timeout number in the candidate upgrade package download process. The first score result can be a numerical value of 0-100.

[0073] In this embodiment, before scoring the candidate upgrade package, the candidate upgrade package obtained through screening is preprocessed according to the type of the candidate upgrade package, for example, the full upgrade package is compressed, and the differential file is generated for the incremental upgrade package; and the preprocessed upgrade package is added with UUID, SHA-256 check value, and parameter description. Then, the corresponding download method is selected for the candidate upgrade package according to the packet loss rate. That is, it is determined whether the current packet loss rate is less than or equal to a preset packet loss rate threshold. The first download mode is selected when the packet loss rate is less than or equal to the preset packet loss rate threshold, and the second download mode is selected when the packet loss rate is less than or equal to the preset packet loss rate threshold. For example, the TCP download method is used when the packet loss rate is less than or equal to 5%, and the download method of “UDP + sliding window retransmission” is used when the packet loss rate is greater than 5%.

[0074] In this embodiment, the candidate upgrade package is downloaded according to the download method determined in the foregoing, and the download rate, packet loss rate, and timeout number and other information are collected at a preset interval (for example, 100 ms) through the data collection module during the download process. The collected download rate, packet loss rate, and timeout number are processed according to a preset scoring model to obtain a score corresponding to the situation. Each collection parameter corresponds to a scoring mechanism, and the scores of various situations are weighted and summed to obtain a first score result. For example, the scoring mechanism of the download rate can be that 100 points are obtained when the download rate is greater than or equal to 500 KB / s, and 10 points are deducted for each 10% decrease. The scoring mechanism of the packet loss rate can be that 100 points are obtained when the packet loss rate is 0, and 10 points are deducted for each 1% increase. The scoring mechanism of the timeout number can be that 100 points are obtained when the timeout number is 0, and 20 points are deducted for each 1-time increase. Alternatively, the first scoring method is to score one parameter selected from the download rate, packet loss rate, and timeout number. The score obtained according to the scoring mechanism of the selected parameter of the corresponding type is taken as the first score result. For example, the download rate is selected for scoring. The download rate of the current candidate upgrade package is 450 KB / s. According to the scoring mechanism of the download rate, the current score can be calculated as 90 points, that is, the first score result is 90 points.

[0075] Optionally, the second way is to score from the download rate, the packet loss rate and the timeout number, and score the selected parameters according to the corresponding type of scoring mechanism, and finally the calculated scores are weighted and summed to obtain the first score result. The weights of the two parameters can be set according to the actual scene requirements. For example, the packet loss rate and the timeout number are selected for scoring, the current packet loss rate is 0.03, and the timeout number is 1. According to the corresponding scoring mechanism, the packet loss rate score is 70 points, and the timeout number score is 80 points. At the same time, the scoring weight of the packet loss rate is 0.5, and the scoring weight of the timeout number is 0.5. The packet loss rate score and the timeout number score are weighted and summed to obtain the first score result of 75 points.

[0076] Optionally, the third way is to select the download rate, the packet loss rate and the timeout number for scoring, and score the selected parameters according to the corresponding type of scoring mechanism, and finally the calculated scores are weighted and summed to obtain the first score result. The weights of the three parameters can be set according to the actual scene requirements. For example, the download rate is 400KB / s, the packet loss rate is 0.01, and the timeout number is 2. According to the corresponding type of scoring mechanism, the download rate score is 80 points, the packet loss rate score is 90 points, and the timeout number score is 60 points. Among them, the download rate weight is 0.4, the packet loss rate weight is 0.3, and the timeout number weight is 0.3. The download rate score, the packet loss rate score and the timeout number score are weighted and summed to obtain the first score result of 77 points.

[0077] S204, upgrading the application software according to the first score result to obtain an upgrade result.

[0078] The upgrade result includes success or failure state information, upgrade time consumption and version number of the application program after performing the upgrade operation.

[0079] In this embodiment, after the terminal device calculates the first score result, the score value corresponding to the first score result is compared with the preset score value, and whether the download parameter of the candidate upgrade package needs to be adjusted is determined according to the comparison result, that is, if the score value corresponding to the first score result is greater than the preset score value, it is indicated that the download process of the candidate upgrade package has no abnormal information, and the subsequent upgrade processing of the application software is performed through the candidate upgrade package to obtain an upgrade result. If the score value corresponding to the first score result is not greater than the preset score value, it is indicated that the download process of the candidate upgrade package has abnormal information, and the download information of the candidate upgrade package needs to be adjusted to complete the subsequent normal upgrade operation.

[0080] The embodiment first receives an upgrade reply message sent by a cloud server, then obtains various types of upgrade packages required by the application software based on a download link, and screens candidate upgrade packages from the multiple upgrade packages; scores the candidate upgrade packages according to the download parameters of the candidate upgrade packages to obtain a first score result; and upgrades the application software according to the first score result to obtain an upgrade result. By setting multiple types of upgrade packages to upgrade the application program, the application upgrade scene can be adapted to various application upgrade scenes, and by measuring the download environment of the selected candidate upgrade package through the first score result, it can be detected whether the download process of the upgrade package is abnormal, and the candidate upgrade package can be quickly adjusted, thereby improving the upgrade efficiency and reliability of the embedded system application software.

[0081] In one exemplary embodiment, as shown in Figure 3 The application software is upgraded according to the first score result to obtain an upgrade result, including:

[0082] S301, if the score value corresponding to the first score result is greater than a preset score value, the application software is upgraded using the candidate upgrade package to obtain an upgrade result;

[0083] The preset score value can be 60 points.

[0084] In the embodiment, when the score value corresponding to the first score result is greater than the preset score value, the score value corresponding to the first score result can be further classified and judged, that is, whether the score value is in a first interval greater than the preset score value. If the score value is in the first interval greater than the preset score value, it indicates that the candidate upgrade package is normally downloaded, and the application software is directly upgraded using the candidate upgrade package to obtain an upgrade result. If the score value is not in the first interval greater than the preset score value, it indicates that the candidate upgrade package is a risk download, and the terminal device needs to record a warning log for the risk information in the local storage and upload the risk information to the cloud server for storage. At the same time, the application software is upgraded using the candidate upgrade package to obtain an upgrade result. The first interval can be [80, 100]. For example, when the first score result is 85 points, which is in the first interval, it indicates that the candidate upgrade package is normally downloaded, and the application software is directly upgraded using the current candidate upgrade package to obtain an upgrade result. For example, when the first score result is 76 points, it is not in the first interval, the risk information at this time is recorded in the local storage and uploaded to the cloud server for storage, and at the same time, the application software is upgraded using the candidate upgrade package to obtain an upgrade result.

[0085] This step can accurately distinguish the download state of the upgrade package to improve the reliability of subsequent application program upgrade.

[0086] S302, if the score value corresponding to the first score result is not greater than the preset score value, switching the download method of the candidate upgrade package, updating the download parameter of the candidate upgrade package based on the switched download method, obtaining new download parameter of the candidate upgrade package, and re-scoring the candidate upgrade package according to the new download parameter, obtaining a second score result, upgrading the application software according to the second score result and the remaining upgrade packages in the plurality of upgrade packages, and obtaining an upgrade result.

[0087] The second score result can be a value of 0-100.

[0088] In this embodiment, when the score value corresponding to the first score result is not greater than the preset score value, it indicates that the current download state of the candidate upgrade package is abnormal, and the download operation of the candidate upgrade package is immediately suspended. The terminal device records the abnormal information, and simultaneously switches the download method of the candidate upgrade package (for example, switches from "TCP" to "UDP + sliding window retransmission"). The candidate upgrade package is downloaded by using the switched download method. Since the download parameters corresponding to different download methods are different, the download rate, the packet loss rate and the timeout number are re-acquired by the data acquisition module according to the preset interval, the candidate upgrade package is re-scored according to the newly acquired download parameters, the download parameter of the candidate upgrade package is updated, and the candidate upgrade package is re-scored according to the updated download parameter, so as to obtain a second score result. When the application software is upgraded according to the second score result and the remaining upgrade packages in the plurality of upgrade packages, an upgrade result is obtained. Optionally, the first way is to determine whether the second score result is greater than the preset score value. If the second score result is greater than the preset score value, the application software is upgraded by using the candidate upgrade package, and an upgrade result is obtained. If the second score result is not greater than the preset score value, the download method of the candidate upgrade package is switched, and the download parameter of the candidate upgrade package is updated based on the switched download method, new download parameter of the candidate upgrade package is obtained, and the candidate upgrade package is re-scored according to the new download parameter, a new score result is obtained, and the application software is upgraded according to the new score result and the remaining upgrade packages in the plurality of upgrade packages, and an upgrade result is obtained.

[0089] Optionally, the second way is as shown in Figure 4 , which includes:

[0090] S401, if the score value corresponding to the first score result is not greater than the preset score value, switching the download method of the candidate upgrade package, updating the download parameter of the candidate upgrade package based on the switched download method, obtaining new download parameter of the candidate upgrade package, and re-scoring the candidate upgrade package according to the new download parameter, obtaining a second score result, upgrading the application software according to the second score result and the remaining upgrade packages in the plurality of upgrade packages, and obtaining an upgrade result.

[0091] In this embodiment, the execution principle of this step is the same as that of S301, and will not be described here.

[0092] S402, if the score value corresponding to the second score result is not greater than the preset score value, determining a new candidate upgrade package from the remaining upgrade packages, and returning to perform the step of scoring the candidate upgrade package according to the download parameter of the candidate upgrade package to obtain a first score result based on the new candidate upgrade package.

[0093] In the embodiment, the adjustment manner of the download parameter of the candidate upgrade package includes switching the type of the candidate upgrade package in addition to adjusting only the download method of the candidate upgrade package. This situation is applied when the download methods corresponding to the candidate upgrade package have all been used, and the score results corresponding to all the download methods are not greater than the preset score value, indicating that there is abnormal information in the download process of the candidate upgrade package, and the type of the candidate upgrade package should be switched, and the switched candidate upgrade package is rescored to ensure the reliability of the application upgrade. Since it has been determined that the score value corresponding to the first score result is not greater than the preset score value, the download process of the candidate upgrade package downloaded according to the current download method has abnormal information. When the score value corresponding to the second score result is not greater than the preset score value, it indicates that the download process of the candidate upgrade package with the switched download method still has abnormal information. At this time, the download methods of the candidate upgrade package have all been used, and the conditions for normal download cannot still be met. At this time, a new candidate upgrade package is determined from the remaining upgrade packages, and the download method of the new candidate upgrade package is determined. The new candidate upgrade is downloaded according to the download method. The download rate, the packet loss rate, and the timeout number in the download process are collected at a preset interval through the data collection module. The download process of the new candidate upgrade package is scored according to the collected parameters. Whether the download process of the new candidate upgrade package has abnormal information, whether the download method of the new candidate upgrade package needs to be switched, or the application is directly upgraded according to the new candidate upgrade package is determined according to the score value, so as to realize the efficiency and reliability of the embedded system application software upgrade.

[0094] For example, the upgrade package of the application program A includes two types of full upgrade package and incremental upgrade package, the full upgrade package is selected as the candidate upgrade package based on the remaining storage and bandwidth of the terminal device, TCP is selected as the download method of the candidate upgrade package based on the packet loss rate of the terminal device, the candidate upgrade package is downloaded according to TCP, and the download process of the candidate upgrade package is scored in real time according to the download rate, the packet loss rate and the timeout number corresponding to the download method, and the first score result is 56, which is less than the preset score value. The download method of the candidate upgrade package is switched to UDP + sliding window retransmission, and the candidate upgrade package is downloaded again according to the switched download method. The download rate, packet loss rate and timeout number corresponding to the switched download method are collected in real time, the candidate upgrade package is scored according to the newly collected data, and the second score result is 58. At this time, the download method of the full upgrade package has been used, and there are abnormal information, which does not meet the upgrade requirement. The full upgrade package is switched to the incremental upgrade package, at this time the incremental upgrade package is the candidate upgrade package, the packet loss rate of the current terminal device is obtained to reselect the download method for downloading the candidate upgrade package, and the candidate upgrade package is scored in real time according to the download parameters. When the score is greater than the preset score value, the application program is upgraded according to the current candidate upgrade package, and the upgrade result is obtained. When the score is not greater than the preset score value, the download method is switched, and the candidate upgrade package is downloaded again based on the switched download method. The execution principle of this case is the same as that of step S302, and details are not repeated here.

[0095] By scoring the download process of the candidate upgrade package and switching the type of the candidate upgrade package in time when the score does not meet the normal download condition, the upgrade efficiency and reliability of the embedded system application software are improved.

[0096] In an exemplary embodiment, as shown in FIG. 5, Figure 5 the application software is upgraded by using the candidate upgrade package to obtain an upgrade result, including:

[0097] S501, the candidate upgrade package is verified;

[0098] The candidate upgrade package can be verified by SHA-256 value, or can be verified by other verification methods, which is not limited here.

[0099] In the embodiment, when the real-time download parameter of the candidate upgrade package always meets the condition that the score value is greater than the preset score value, it is represented that the candidate upgrade package is normally downloaded. After the candidate upgrade package is downloaded, the check value of the candidate upgrade package is compared with the SHA-256 value sent by the cloud server through the check recovery module of the terminal device. When the check value of the candidate upgrade package is consistent with the SHA-256 value sent by the cloud server, it is represented that the check passes. When the check value of the candidate upgrade package is inconsistent with the SHA-256 value sent by the cloud server, it is represented that the check does not pass, and the candidate upgrade package is processed according to the check result.

[0100] S502, in the case of passing the check, the application software is upgraded by using the candidate upgrade package, and an upgrade result is obtained;

[0101] In the embodiment, when the check value of the candidate upgrade package is consistent with the SHA-256 value sent by the cloud server, it is represented that the check passes. In this case, the average CPU load of the preset time range is calculated by the upgrade control module of the terminal device, and the average CPU load is compared with the preset load threshold. If the average CPU load is less than or equal to the preset load threshold, the application program is immediately upgraded by the candidate upgrade package. If the average CPU load is greater than the preset load threshold, the waiting area is entered, and the load at each time is continuously monitored. When the average CPU load in the preset time range is less than or equal to the preset load threshold, the application program is upgraded by the candidate upgrade package. The preset time range can be a 10-second period before the current time, or other time ranges, which are not limited herein. The preset load threshold can be 50%, or can be set according to actual scene requirements, which are not limited herein.

[0102] S503, in the case of failing to pass the check, the download method of the candidate upgrade package is switched, the download parameter of the candidate upgrade package is updated based on the switched download method, the new download parameter of the candidate upgrade package is obtained, the upgrade package is re-scored according to the new download parameter, the third score result is obtained, the application software is upgraded according to the third score result and the remaining upgrade packages in the plurality of upgrade packages, and the upgrade result is obtained.

[0103] In the embodiment, when the check value of the candidate upgrade package is inconsistent with the SHA-256 value sent by the cloud server, the check fails, which indicates that the download process of the candidate upgrade package is abnormal, the download method of the candidate upgrade package is switched, the candidate upgrade package is downloaded according to the switched download method, and the rate, the packet loss rate, and the timeout number in the download process are collected in real time, the third score result is obtained by scoring the collected parameters. When the third score result is greater than the preset score value, the application software is upgraded by using the candidate upgrade package, and the upgrade result is obtained. When the third score result is not greater than the preset score value, a new candidate upgrade package is determined from the remaining upgrade packages, and the step of scoring the candidate upgrade package according to the download parameters of the candidate upgrade package to obtain the first score result is returned based on the new candidate upgrade package.

[0104] The candidate upgrade package is checked through the downloaded candidate upgrade package, the application program is upgraded through the candidate upgrade package meeting the check condition, and the candidate upgrade package not meeting the check condition is adjusted in time, so that the efficiency and reliability of the embedded system application software upgrade are improved.

[0105] In an exemplary embodiment, as shown in Figure 6 The application software is upgraded according to the third score result and the remaining upgrade packages in the plurality of upgrade packages, and the upgrade result is obtained, including:

[0106] S601, if the score value corresponding to the third score result is greater than the preset score value, the application software is upgraded by using the candidate upgrade package, and the upgrade result is obtained;

[0107] In the embodiment, for the case that the score value corresponding to the third score result is greater than the preset score value, it is indicated that the candidate upgrade package is normally downloaded and there is no abnormal information. When the application software is upgraded by using the candidate upgrade package, the upgrade result is obtained, and the execution principle of S301 is the same, which will not be described herein.

[0108] S602, if the score value corresponding to the third score result is not greater than the preset score value, a new candidate upgrade package is determined from the remaining upgrade packages, and the step of scoring the candidate upgrade package according to the download parameters of the candidate upgrade package to obtain the first score result is returned based on the new candidate upgrade package.

[0109] In the embodiment, when the score value corresponding to the third score result is not greater than the preset score value, it indicates that the download methods of the candidate upgrade package have all been used, and the download processes of all the download methods have abnormal information, and the same candidate upgrade package has no other download method to use. In order to ensure the smooth upgrade of the application program, a new candidate upgrade package is determined from the remaining upgrade packages, a corresponding download method is selected for the new candidate upgrade package according to the packet loss rate of the terminal device, the new candidate upgrade package is downloaded according to the selected download method, and the step of returning to execute the terminal device-based data collection system to collect the download parameters and score the new candidate upgrade package according to the download parameters to obtain a first score result is performed.

[0110] By scoring the download process of the candidate upgrade package and switching the type of the candidate upgrade package in time when the score does not satisfy the normal download condition, the upgrade efficiency and reliability of the embedded system application software are improved.

[0111] In an exemplary embodiment, as shown in Figure 7 FIG. 1, the candidate upgrade package is selected from the plurality of upgrade packages, including:

[0112] S701, determining a full-mode type upgrade package in the plurality of upgrade packages, and determining a remaining storage capacity of the terminal device and a current network transmission bandwidth;

[0113] In the embodiment, the full-mode type upgrade package can be determined from the plurality of upgrade packages according to the name or number of the upgrade package. The remaining storage capacity of the terminal device and the current network transmission bandwidth can be collected by the upgrade control module or collected by a sensor.

[0114] S702, if the remaining storage capacity is greater than or equal to the volume of the full-mode type upgrade package, and the current network transmission bandwidth is greater than or equal to a preset bandwidth threshold, determining the full-mode type upgrade package in the plurality of upgrade packages as the candidate upgrade package;

[0115] The preset bandwidth threshold can be 1 Mbps.

[0116] In the embodiment, when determining the candidate upgrade package, optionally, in a first mode, the remaining storage is compared with the volume of the full-mode type upgrade package respectively, and the current network transmission bandwidth is compared with the preset bandwidth threshold, when the remaining storage is greater than or equal to the volume of the full-mode type upgrade package, and the current network transmission bandwidth is greater than or equal to the preset bandwidth threshold, the full-mode type upgrade package is determined as the candidate upgrade package. Optionally, in a second mode, the remaining storage is compared with the preset multiple of the volume of the full-mode type upgrade package respectively, and the current network transmission bandwidth is compared with the preset bandwidth threshold, when the remaining storage is greater than or equal to the preset multiple of the volume of the full-mode type upgrade package, and the current network transmission bandwidth is greater than or equal to the preset bandwidth threshold, the full-mode type upgrade package is determined as the candidate upgrade package. For example, the remaining storage is greater than or equal to the volume of the full-mode type upgrade package multiplied by 1.2, and the bandwidth is greater than or equal to 1 Mbps, the full-mode type upgrade package is determined as the candidate upgrade package.

[0117] In S703, if the remaining storage is less than the volume of the full-mode type upgrade package, or the current network transmission bandwidth is less than the preset bandwidth threshold, the incremental-mode type upgrade package in the plurality of upgrade packages is determined as the candidate upgrade package.

[0118] In the embodiment, optionally, when the remaining storage is less than the volume of the full-mode type upgrade package, or the current network transmission bandwidth is less than the preset bandwidth threshold, the incremental-mode type upgrade package in the plurality of upgrade packages is determined as the candidate upgrade package; optionally, when the remaining storage is less than the preset multiple of the volume of the full-mode type upgrade package, or the current network transmission bandwidth is less than the preset bandwidth threshold, the incremental-mode type upgrade package in the plurality of upgrade packages is determined as the candidate upgrade package. For example, the current network transmission bandwidth is 1.2 Mbps, which is greater than the preset bandwidth threshold, and the remaining storage is less than the volume of the full-mode type upgrade package, the incremental-mode type upgrade package is determined as the candidate upgrade package.

[0119] By providing a plurality of types of upgrade packages, the scene adaptability is enhanced, the high-load device can delay upgrade, the low-bandwidth device selects incremental upgrade, and different scenes are adapted.

[0120] Optionally, for the case that the terminal device needs to upgrade multiple application softwares simultaneously, the terminal device sends an upgrade request to the cloud server, the upgrade request containing version numbers of the multiple application softwares to be upgraded and corresponding local firmware information, the cloud server obtaining upgrade package download links of the multiple application softwares to be upgraded based on the upgrade request and transmitting the upgrade package download links to the terminal device, the terminal device obtaining the upgrade packages of the multiple application softwares to be upgraded based on the upgrade package download links, determining candidate upgrade packages of the multiple application softwares to be upgraded from the upgrade packages, and scoring download parameters of the candidate upgrade packages respectively, and if there is at least one candidate upgrade package whose first score result is not greater than a preset score value, returning to the step of determining the candidate upgrade packages of the multiple application softwares to be upgraded from the upgrade packages, that is, the upgrade processes of all the application softwares are executed synchronously. In particular, when scoring the real-time download parameters of the candidate upgrade packages respectively, optionally, the first way is to score the real-time download parameters of each candidate upgrade package according to the arrangement order of the application software version numbers, when the first first score result is not greater than the preset score value, suspending the download process of the corresponding candidate upgrade package, and not executing the download process of the remaining candidate upgrade packages, and returning to the step of determining the candidate upgrade packages of the multiple application softwares to be upgraded from the upgrade packages; and optionally, the second way is to score the real-time download parameters of the candidate upgrade packages in parallel, when the first first score result is not greater than the preset score value, suspending the download processes of all the candidate upgrade packages, and returning to the step of determining the candidate upgrade packages of the multiple application softwares to be upgraded from the upgrade packages.

[0121] By simultaneously upgrading multiple application softwares and adjusting the candidate upgrade packages that do not meet the normal download in time, the efficiency and reliability of the upgrade of the application software of the embedded system are improved.

[0122] The method of all the above embodiments is also provided, and an upgrade method of an embedded system software is also provided, as shown in Figure 8 The method comprises the following steps.

[0123] S801, receiving an upgrade reply message sent by a cloud server; the upgrade reply message carrying an upgrade package download link;

[0124] S802, obtaining various types of upgrade packages required by the application software based on the download link;

[0125] S803, determining a full-mode type upgrade package in the multiple upgrade packages, and determining a remaining storage capacity of the terminal device and a current network transmission bandwidth;

[0126] S804, if the remaining storage is greater than or equal to the volume of the full-mode type upgrade package and the current network transmission bandwidth is greater than or equal to the preset bandwidth threshold, determining the full-mode type upgrade package in the plurality of upgrade packages as the candidate upgrade package; if the remaining storage is less than the volume of the full-mode type upgrade package or the current network transmission bandwidth is less than the preset bandwidth threshold, determining the incremental-mode type upgrade package in the plurality of upgrade packages as the candidate upgrade package;

[0127] S805, scoring the candidate upgrade package according to the download parameter of the candidate upgrade package to obtain a first scoring result;

[0128] S806, if the scoring value corresponding to the first scoring result is greater than a preset scoring value, checking the candidate upgrade package; in the case of passing the checking, upgrading the application software by using the candidate upgrade package to obtain an upgrade result; in the case of failing the checking, switching the download method of the candidate upgrade package, updating the download parameter of the candidate upgrade package based on the switched download method to obtain a new download parameter of the candidate upgrade package, re-scoring the upgrade package according to the new download parameter to obtain a third scoring result, and upgrading the application software according to the third scoring result and the remaining upgrade packages in the plurality of upgrade packages to obtain an upgrade result. If the scoring value corresponding to the first scoring result is not greater than the preset scoring value, switching the download method of the candidate upgrade package, updating the download parameter of the candidate upgrade package based on the switched download method to obtain a new download parameter of the candidate upgrade package, and re-scoring the candidate upgrade package according to the new download parameter to obtain a second scoring result;

[0129] S807, upgrading the application software according to the second scoring result and the remaining upgrade packages in the plurality of upgrade packages to obtain an upgrade result. If the scoring value corresponding to the second scoring result is greater than the preset scoring value, upgrading the application software by using the candidate upgrade package to obtain an upgrade result; if the scoring value corresponding to the second scoring result is not greater than the preset scoring value, determining a new candidate upgrade package from the remaining upgrade packages, and returning to execute the step of scoring the candidate upgrade package according to the download parameter of the candidate upgrade package to obtain a first scoring result based on the new candidate upgrade package.

[0130] The above steps are described in the foregoing embodiments, and the details are described in the foregoing content, which will not be repeated here.

[0131] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately executed with at least some of the other steps or steps or stages in other steps. It can be understood that the steps in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.

[0132] Based on the same inventive concept, the embodiments of the present application also provide an embedded system software upgrading device for implementing the above-mentioned embedded system software upgrading method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more embedded system software upgrading device embodiments provided below can refer to the limitations of the embedded system software upgrading method in the above text, which will not be repeated here.

[0133] In an exemplary embodiment, as shown in Figure 9 An embedded system software upgrading device is provided, comprising: a receiving module 91, a screening module 92, a scoring module 93, and an upgrading module 94, wherein:

[0134] The receiving module 91 is configured to receive an upgrading reply message sent by a cloud server; the upgrading reply message is generated for an upgrading request sent by a terminal device to the cloud server; the upgrading request carries a version number of an application software to be upgraded on the terminal device; and the upgrading reply message carries an upgrading package download link;

[0135] The screening module 92 is configured to obtain various types of upgrading packages required by the application software based on the download link, and screen candidate upgrading packages from the multiple upgrading packages;

[0136] The scoring module 93 is configured to score the candidate upgrading packages according to download parameters of the candidate upgrading packages, to obtain a first scoring result;

[0137] The upgrading module 94 is configured to upgrade the application software according to the scoring result, to obtain an upgrading result.

[0138] In an exemplary embodiment, the above-mentioned upgrading module 94 comprises:

[0139] The first upgrading unit is configured to upgrade the application software by using the candidate upgrading package when the score value corresponding to the first score result is greater than the preset score value, and obtain an upgrading result.

[0140] The second upgrading unit is configured to switch the downloading method of the candidate upgrading package if the score value corresponding to the first score result is not greater than the preset score value, update the downloading parameter of the candidate upgrading package based on the switched downloading method, obtain a new downloading parameter of the candidate upgrading package, re-score the candidate upgrading package according to the new downloading parameter, obtain a second score result, upgrade the application software according to the second score result and the remaining upgrading packages in the plurality of upgrading packages, and obtain an upgrading result.

[0141] In an exemplary embodiment, the second upgrading unit is configured to:

[0142] The first upgrading unit is configured to upgrade the application software by using the candidate upgrading package when the score value corresponding to the first score result is greater than the preset score value, and obtain an upgrading result.

[0143] The first upgrading unit is configured to upgrade the application software by using the candidate upgrading package when the score value corresponding to the first score result is greater than the preset score value, and obtain an upgrading result.

[0144] In an exemplary embodiment, the first upgrading unit includes:

[0145] The checking sub-unit is configured to check the candidate upgrading package.

[0146] The first upgrading sub-unit is configured to upgrade the application software by using the candidate upgrading package when the checking passes, and obtain an upgrading result.

[0147] The second upgrading sub-unit is configured to switch the downloading method of the candidate upgrading package if the checking fails, update the downloading parameter of the candidate upgrading package based on the switched downloading method, obtain a new downloading parameter of the candidate upgrading package, re-score the candidate upgrading package according to the new downloading parameter, obtain a third score result, upgrade the application software according to the third score result and the remaining upgrading packages in the plurality of upgrading packages, and obtain an upgrading result.

[0148] In an exemplary embodiment, the second upgrading sub-unit is configured to:

[0149] The first upgrading unit is configured to upgrade the application software by using the candidate upgrading package when the score value corresponding to the first score result is greater than the preset score value, and obtain an upgrading result.

[0150] If the score value corresponding to the third score result is not greater than the preset score value, then a new candidate upgrade package is determined from the remaining upgrade packages, and the process of scoring the candidate upgrade package according to the download parameters of the candidate upgrade package is returned based on the new candidate upgrade package to obtain the first score result.

[0151] In an exemplary embodiment, the filtering module 92 described above is used for:

[0152] Identify the full-mode upgrade package among multiple upgrade packages, and determine the remaining storage capacity and current network bandwidth of the terminal device;

[0153] If the remaining storage is greater than or equal to the size of the full-mode upgrade package, and the current network transmission bandwidth is greater than or equal to the preset bandwidth threshold, then the full-mode upgrade package among the multiple upgrade packages is determined as a candidate upgrade package.

[0154] If the remaining storage is less than the size of the full-mode upgrade package, or the current network bandwidth is less than the preset bandwidth threshold, then the incremental-mode upgrade package among the multiple upgrade packages is selected as the candidate upgrade package.

[0155] Each module in the aforementioned embedded system software upgrade device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0156] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores application upgrade packages and version numbers. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for upgrading embedded system software.

[0157] Those skilled in the art can understand that Figure 10 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0158] In an exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.

[0159] In an embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implements the steps in the above method embodiments when executed by a processor.

[0160] In an embodiment, a computer program product is provided, including a computer program, and the computer program implements the steps in the above method embodiments when executed by a processor.

[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0162] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.

[0163] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A method for upgrading embedded system software, applied to terminal devices, characterized in that, The method includes: The device receives an upgrade response message sent by a cloud server; the upgrade response message is generated from an upgrade request sent by the terminal device to the cloud server; the upgrade request carries the version number of the application software to be upgraded on the terminal device; the upgrade response message carries a download link for the upgrade package. Based on the download link, obtain various types of upgrade packages required by the application software, and filter out candidate upgrade packages from multiple upgrade packages; The candidate upgrade packages are scored based on their download parameters to obtain a first score result; The application software is upgraded based on the first scoring result to obtain the upgrade result.

2. The method according to claim 1, characterized in that, The step of upgrading the application software based on the first scoring result to obtain an upgrade result includes: If the score value corresponding to the first scoring result is greater than the preset score value, the application software is upgraded using the candidate upgrade package to obtain the upgrade result; If the score value corresponding to the first scoring result is not greater than the preset score value, then the download method of the candidate upgrade package is switched, and the download parameters of the candidate upgrade package are updated based on the switched download method to obtain the new download parameters of the candidate upgrade package. The candidate upgrade package is then re-scored according to the new download parameters to obtain the second scoring result. The application software is then upgraded according to the second scoring result and the remaining upgrade packages among the multiple upgrade packages to obtain the upgrade result.

3. The method according to claim 2, characterized in that, The step of upgrading the application software based on the second scoring result and the remaining upgrade packages among the multiple upgrade packages to obtain the upgrade result includes: If the score value corresponding to the second scoring result is greater than the preset score value, then the application software is upgraded using the candidate upgrade package to obtain the upgrade result; If the score value corresponding to the second scoring result is not greater than the preset score value, then a new candidate upgrade package is determined from the remaining upgrade packages, and the step of scoring the candidate upgrade package according to the download parameters of the candidate upgrade package to obtain the first score result is returned based on the new candidate upgrade package.

4. The method according to claim 2, characterized in that, The step of upgrading the application software using the candidate upgrade package to obtain the upgrade result includes: The candidate upgrade packages are verified; If the verification passes, the application software is upgraded using the candidate upgrade package to obtain the upgrade result; If the verification fails, the download method of the candidate upgrade package is switched, and the download parameters of the candidate upgrade package are updated based on the switched download method to obtain new download parameters for the candidate upgrade package. The upgrade package is then re-evaluated based on the new download parameters to obtain a third evaluation result. The application software is then upgraded based on the third evaluation result and the remaining upgrade packages among the multiple upgrade packages to obtain an upgrade result.

5. The method according to claim 4, characterized in that, The step of upgrading the application software based on the third scoring result and the remaining upgrade packages among the plurality of upgrade packages to obtain an upgrade result includes: If the score value corresponding to the third scoring result is greater than the preset score value, then the application software is upgraded using the candidate upgrade package to obtain the upgrade result; If the score value corresponding to the third scoring result is not greater than the preset score value, then a new candidate upgrade package is determined from the remaining upgrade packages, and the step of scoring the candidate upgrade package according to the download parameters of the candidate upgrade package to obtain the first scoring result is returned based on the new candidate upgrade package.

6. The method according to any one of claims 1-5, characterized in that, The step of selecting candidate upgrade packages from the plurality of upgrade packages includes: Identify the full-mode upgrade package among multiple upgrade packages, and determine the remaining storage capacity and current network transmission bandwidth of the terminal device; If the remaining storage is greater than or equal to the size of the full-mode upgrade package, and the current network transmission bandwidth is greater than or equal to a preset bandwidth threshold, then the full-mode upgrade package among the multiple upgrade packages is determined as the candidate upgrade package. If the remaining storage is less than the size of the full-mode upgrade package, or the current network transmission bandwidth is less than a preset bandwidth threshold, then the incremental-mode upgrade package among the multiple upgrade packages is determined as the candidate upgrade package.

7. An embedded system software upgrade device, applied to a terminal device, characterized in that, The device includes: The receiving module is used to receive an upgrade response message sent by a cloud server; the upgrade response message is generated by an upgrade request sent by the terminal device to the cloud server; the upgrade request carries the version number of the application software to be upgraded on the terminal device; the upgrade response message carries a download link for the upgrade package; A filtering module is used to obtain various types of upgrade packages required by the application software based on the download link, and to filter out candidate upgrade packages from multiple upgrade packages; The scoring module is used to score the candidate upgrade package based on the download parameters of the candidate upgrade package and obtain a first scoring result; The upgrade module is used to upgrade the application software based on the scoring results and obtain the upgrade results.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.