A method and device for remote online upgrading of a terminal
By detecting network quality, adjusting the data size of a single request and reconnecting when the network is disconnected, the interruption problem caused by network reasons during remote online upgrade of terminals is solved, and the upgrade success rate is improved.
Patent Information
- Application Number
- CN202210789216.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-06
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-07-06
AI Technical Summary
The remote online upgrade of existing terminals is easily interrupted due to network reasons during the download process, resulting in the upgrade failure, and it cannot effectively solve the problem between link stability and speed in different network environments.
By detecting the current network quality, adjusting the size of the single requested data, including adjusting it according to network bandwidth, network strength and network response time, and initiating multiple network connection requests when the network is disconnected, ensuring the stable download of data packets.
It improves the success rate of a single upgrade task, solves the problem between link stability and speed in different network environments, and ensures the complete download of upgraded data packets.
Smart Images

Figure CN115314480B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and more specifically, to a method and device for remote online upgrading of a terminal. Background Art
[0002] The existing terminal remote online upgrade is that the server pushes upgrade information to the terminal or the terminal sends an upgrade request for an application to the server. The upgrade information contains the URL of the firmware upgrade, the firmware version number and other information. The terminal obtains the firmware package data by accessing the URL in the upgrade information pushed by the server and caches it locally. Since the firmware is relatively large, if it is interrupted during the download process due to network or other reasons, it is considered that the upgrade has failed. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a method for remote online upgrading of a terminal, comprising the following steps:
[0004] Step S1, detecting whether a message push for remote online upgrade is received;
[0005] Step S2: if the message push is received, download the upgrade data package according to the message push request;
[0006] Step S3: periodically detect the current network quality during the process of downloading the upgrade data package;
[0007] Step S4: adjust the size of the single request data according to the current network quality and download the upgrade data package.
[0008] Further, in the method for remote online terminal upgrade of the present invention, the step S3 comprises: in the process of downloading the upgrade data packet, periodically detecting the size of the current network bandwidth;
[0009] The step S4 of adjusting the size of the single request data according to the current network quality includes: adjusting the size of the single request data according to the current network bandwidth.
[0010] Further, in the method for remote online upgrading of a terminal according to the present invention, adjusting the size of single request data according to the current network bandwidth comprises:
[0011] The size of a single request data is adjusted according to the current network bandwidth, and the current network bandwidth is positively correlated with the size of the request data.
[0012] Further, in the method for remote online terminal upgrade of the present invention, the step S3 comprises: periodically detecting the current network strength during the process of downloading the upgrade data packet;
[0013] The step S4 of adjusting the size of the single request data according to the current network quality includes: adjusting the size of the single request data according to the current network strength.
[0014] Further, in the method for remote online terminal upgrade of the present invention, adjusting the size of single request data according to the current network strength includes:
[0015] The size of a single request data is adjusted according to the current network strength, and the current network strength is positively correlated with the size of the request data.
[0016] Further, in the method for remote online terminal upgrade of the present invention, the step S2 comprises: accessing the network address in the message push, requesting to download the upgrade data packet;
[0017] The step S3 comprises: regularly detecting the current network response time during the process of downloading the upgrade data packet, wherein the current network response time is the response time for accessing the network address;
[0018] The step S4 includes: adjusting the size of single request data according to the current network response time.
[0019] Further, in the method for remote online upgrading of a terminal according to the present invention, adjusting the size of single request data according to the current network response time includes:
[0020] The size of a single request data is adjusted according to the current network response time, and the current network response time is negatively correlated with the size of the request data.
[0021] Furthermore, in the method for remote online terminal upgrade of the present invention, the following steps are further included after step S1 and before step S2:
[0022] Step S11, obtaining the version number and MD5 value in the upgrade data;
[0023] Step S12: determining whether the version number in the upgrade data is the same as the version number in the application to be upgraded;
[0024] Step S13: If different, execute step S2.
[0025] Furthermore, in the method for remote online terminal upgrade of the present invention, after step S12, the following steps are further included:
[0026] Step S14: when the version number in the upgrade data is the same as the version number in the application to be upgraded, determining whether the MD5 value in the upgrade data is the same as the MD5 value in the application to be upgraded;
[0027] Step S15: If they are the same, obtain the last download breakpoint, restart the download from the breakpoint, and execute step S3;
[0028] Step S16: If different, execute step S2.
[0029] Furthermore, in the method for remote online terminal upgrade of the present invention, the following steps are further included after step S2 and before step S3:
[0030] Step S21, periodically checking whether the current network is disconnected during the process of downloading the upgrade data package;
[0031] Step S22: If yes, the terminal initiates a network connection request;
[0032] Step S23: If not, execute step S3.
[0033] Further, in the method for remote online upgrading of a terminal according to the present invention, step S22 comprises:
[0034] Determining whether the network connection request is successful;
[0035] If the network connection request is successful, execute step S3;
[0036] If the network connection request fails, return to step S1.
[0037] Further, in the method for remote online terminal upgrade of the present invention, if the network connection request fails, returning to step S1 includes:
[0038] If the network connection request fails, determining whether the number of connection requests is less than a preset number;
[0039] If yes, execute step S22;
[0040] If not, return to step S1.
[0041] Furthermore, in the method for remote online upgrading of a terminal according to the present invention, after step S4, the following steps are further included:
[0042] Step S5, determining whether all the upgrade data has been downloaded;
[0043] If yes, the remote online upgrade of the terminal is successful;
[0044] If not, return to step S1.
[0045] In addition, the present invention also provides a device for remote online upgrading of a terminal, comprising:
[0046] Receiving module: detects whether the message push for remote online upgrade is received;
[0047] Download module: if the message push is received, download the upgrade data package according to the message push request;
[0048] Detection module: regularly detect the current network quality during the process of downloading the upgrade data package;
[0049] Adjustment module: adjust the size of single request data according to the current network quality and download the upgrade data package.
[0050] The method and device for remote online terminal upgrade of the present invention have the following beneficial effects: based on the existing upgrade mechanism, the size of a single request data is adjusted according to different network qualities to download the upgrade data packet, and multiple network connection requests are sent to the server when the network is disconnected, which effectively solves the problem between the stability and speed of the downlink in different network environments and improves the success rate of a single upgrade task. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0052] Figure 1 is a flow chart of a method for remote online upgrading of a terminal provided by an embodiment of the present invention;
[0053] Figure 2 is a flow chart of a method for remote online upgrading of a terminal provided by an embodiment of the present invention;
[0054] Figure 3 It is a structural diagram of a device for remote online upgrading of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0056] In a preferred embodiment, reference Figure 1 A method for remote online upgrading of a terminal in this embodiment includes the following steps:
[0057] Step S1, detecting whether a message push for remote online upgrade is received;
[0058] Step S2: if a message push is received, download the upgrade data package according to the message push request;
[0059] Step S3: periodically detect the current network quality during the process of downloading the upgrade data package;
[0060] Step S4: adjust the size of the single request data according to the current network quality and download the upgrade data package.
[0061] Specifically, the server pushes a message of remote online upgrade to the terminal device. The upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received. After receiving it, it accesses the network address in the upgrade message to download the upgrade data packet. In the process of downloading the data packet, the terminal device periodically detects the network quality, such as detecting the network bandwidth, the network strength, or detecting the response time of accessing the network address, and adjusts the size of a single request data to download the upgrade package according to the detection situation. For example, the larger the network bandwidth, the larger the request data; the stronger the network strength, the larger the request data; the shorter the response time of accessing the network address, the larger the request data, and vice versa. The network here includes broadband and WiFi, and the terminal devices include but are not limited to mobile phones, tablets, laptops and other terminal devices.
[0062] Based on the existing upgrade mechanism, this embodiment adjusts the size of a single request data to download the upgrade data packet according to different network qualities, and sends multiple network connection requests to the server when the network is disconnected. This not only effectively solves the problem between the stability and speed of the downlink in different network environments, but also improves the success rate of a single upgrade task.
[0063] In the method for remote online upgrade of a terminal in some embodiments, step S3 includes: in the process of downloading the upgrade data packet, periodically detecting the size of the current network bandwidth; in step S4, adjusting the size of the single request data according to the current network quality includes: adjusting the size of the single request data according to the current network bandwidth. Specifically, the server pushes a message of remote online upgrade to the terminal device, and the upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received, and after receiving it, accesses the network address in the upgrade message to download the upgrade data packet. In the process of downloading the data packet, the terminal device periodically detects the size of the network bandwidth, and adjusts the single request data according to the detected size of the network bandwidth.
[0064] Based on the previous embodiment, this embodiment describes the detected network quality. By regularly detecting the size of the network bandwidth and adjusting the size of the requested data, the problem between the stability and speed of the link during the download process is effectively solved.
[0065] In the method for remote online upgrade of a terminal in some embodiments, adjusting the size of a single request data according to the current network bandwidth includes: adjusting the size of a single request data according to the current network bandwidth, and the current network bandwidth is positively correlated with the size of the request data. Specifically, the server pushes a message of remote online upgrade to the terminal device, and the upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received, and after receiving it, accesses the network address in the upgrade message to download the upgrade data packet. In the process of downloading the data packet, the terminal device periodically detects the size of the network bandwidth, and adjusts the single request data according to the size of the detected network bandwidth. The larger the network bandwidth, the better the network quality, and the request data can be increased. Conversely, the smaller the network bandwidth, the poorer the network quality, and the request data can be reduced.
[0066] Based on the previous embodiment, this embodiment illustrates the relationship between network bandwidth and request data. The larger the network bandwidth, the larger the request data; the smaller the network bandwidth, the smaller the request data, which effectively solves the problem between link stability and speed during the download process.
[0067] In the method for remote online upgrade of a terminal in some embodiments, step S3 includes: periodically detecting the current network strength during the process of downloading the upgrade data packet; adjusting the size of the single request data according to the current network quality in step S4 includes: adjusting the size of the single request data according to the current network strength. Specifically, the server pushes a message of remote online upgrade to the terminal device, and the upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received, and after receiving it, accesses the network address in the upgrade message to download the upgrade data packet. In the process of downloading the data packet, the terminal device periodically detects the size of the network strength and adjusts the single request data according to the detected network strength.
[0068] Based on the above embodiments, this embodiment describes the detected network quality. By regularly detecting the size of the network strength and adjusting the size of the requested data, the problem between the stability and speed of the link during the download process is effectively solved.
[0069] In the method for remote online upgrade of a terminal in some embodiments, adjusting the size of a single request data according to the current network strength includes: adjusting the size of a single request data according to the current network strength, and the current network strength is positively correlated with the size of the request data. Specifically, the server pushes a message of remote online upgrade to the terminal device, and the upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received, and after receiving it, accesses the network address in the upgrade message to download the upgrade data packet. In the process of downloading the data packet, the terminal device periodically detects the size of the network strength, and adjusts the single request data according to the size of the detected network strength. The greater the network strength, the better the network quality, and the request data can be increased. Conversely, the smaller the network strength, the poorer the network quality, and the request data can be reduced. For example, the WiFi network strength can work normally when it is greater than -70dbm. The greater the strength, the larger the request data.
[0070] Based on the previous embodiment, this embodiment illustrates the relationship between network strength and request data. The greater the network strength, the greater the request data; the smaller the network strength, the smaller the request data, which effectively solves the problem between link stability and speed during downloading.
[0071] In the method of remote online upgrade of a terminal in some embodiments, step S2 includes: accessing the network address in the message push and requesting to download the upgrade data packet; step S3 includes: periodically detecting the current network response time during the process of downloading the upgrade data packet, and the current network response time is the response time of accessing the network address; step S4 includes: adjusting the size of the single request data according to the current network response time. Specifically, the server pushes a message of remote online upgrade to the terminal device, and the upgraded message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgraded message push is received, and after receiving it, it accesses the network address in the upgraded message to download the upgrade data packet. In the process of downloading the data packet, the terminal device periodically detects the length of the terminal's access to the network address response time, and adjusts the single request data according to the length of the detected access time.
[0072] Based on the above embodiments, this embodiment describes the detected network quality. By regularly detecting the length of the response time of accessing the network address, the size of the requested data is adjusted, which effectively solves the problem between the stability and speed of the link during the download process.
[0073] In the method for remote online upgrade of a terminal in some embodiments, adjusting the size of a single request data according to the current network response time includes: adjusting the size of a single request data according to the current network response time, and the current network response time is negatively correlated with the size of the request data. Specifically, the server pushes a message of remote online upgrade to the terminal device, and the upgraded message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgraded message push is received, and after receiving it, accesses the network address in the upgraded message to download the upgrade data packet. In the process of downloading the data packet, the terminal device regularly detects the size of the network response time, and adjusts the single request data according to the size of the detected network response time. The shorter the network response time, the better the network quality, and the request data can be increased. Conversely, the longer the network response time, the poorer the network quality, and the request data can be reduced. For example, if the response time for accessing a website at the first moment is 2S, and the response time for accessing a website at the second moment is 30s, it means that the network quality at the first moment is better than that at the second moment, and the request data can be increased.
[0074] Based on the previous embodiment, this embodiment illustrates the relationship between network response time and request data. The shorter the network response time, the larger the request data; the longer the network response time, the smaller the request data, which effectively solves the problem between link stability and speed during the download process.
[0075] In the terminal remote online upgrade method of some embodiments, after step S1 and before step S2, the following steps are also included: step S11, obtaining the version number and MD5 value in the upgrade data; step S12, determining whether the version number in the upgrade data is the same as the version number in the application to be upgraded; step S13, if different, executing step S2.
[0076] Specifically, the server pushes a remote online upgrade message to the terminal device. The upgrade message contains the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message has been received. After receiving the upgrade message, it accesses the network address in the upgrade message to obtain the version number and MD5 value in the upgrade data packet, and compares the version number with the version number in the application to be upgraded. If they are different, it means that the upgrade data packet is downloaded for the first time and can be downloaded directly. In the process of downloading the data packet, the terminal device regularly detects the network quality, such as detecting the network bandwidth, the network strength, or the response time of accessing the network address, and adjusts the size of the single request data according to the detection situation to download the upgrade package.
[0077] Based on the above embodiment, this embodiment determines whether the data to be upgraded is the first upgrade data by comparing whether the version number in the upgrade data packet is the same as the version number of the application to be upgraded, thereby improving the accuracy of downloading the upgrade data packet.
[0078] In the method for remote online upgrade of a terminal in some embodiments, after step S12, the following steps are further included: step S14, when the version number in the upgrade data is the same as the version number in the application to be upgraded, then determine whether the MD5 value in the upgrade data is the same as the MD5 value in the application to be upgraded; step S15, if they are the same, then obtain the last download breakpoint, restart the download from the breakpoint, and execute step S3; step S16, if they are different, then execute step S2. Specifically, the server pushes a message of remote online upgrade to the terminal device, and the upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received. After receiving it, the network address in the upgrade message is accessed to obtain the version number and MD5 value in the upgrade data packet, and the version number is compared with the version number in the application to be upgraded. If they are different, it means that the upgrade data packet is downloaded for the first time and can be downloaded directly. If they are the same, then the MD5 value in the upgrade data is compared with the MD5 value in the application to be upgraded. If the two are the same, it means that this upgrade is not the first upgrade, and this download can continue to download where the last download ended. If the two are different, it means that this upgrade data package is downloaded for the first time and can be downloaded directly. During the download of the data package, the terminal device periodically detects the network quality, such as the network bandwidth, network strength or the response time of accessing the network address, and adjusts the size of the single request data according to the detection situation to download the upgrade package.
[0079] Based on the previous embodiment, this embodiment determines whether the data to be upgraded is the first upgrade data by comparing the version number in the upgrade data packet with the version number of the application to be upgraded, thereby improving the accuracy of downloading the upgrade data packet and avoiding wasting resources to repeatedly download the same upgrade data packet.
[0080] In the method for remote online upgrade of a terminal in some embodiments, after step S2 and before step S3, the following steps are also included: step S21, periodically detecting whether the current network is disconnected during the process of downloading the upgrade data packet; step S22, if yes, the terminal device initiates a network connection request; step S23, if no, execute step S3. Specifically, the server pushes a message of remote online upgrade to the terminal device, and the upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received, and after receiving it, accesses the network address in the upgrade message to download the upgrade data packet. During the download process, the network status is periodically detected. If the network is disconnected, the terminal device initiates a network connection request; if the network is not disconnected, during the process of downloading the data packet, the terminal device periodically detects the network quality, such as detecting the network bandwidth, the network strength, or detecting the response time of accessing the network address, and adjusts the size of the single request data according to the detection situation to download the upgrade package.
[0081] On the basis of the above embodiment, in this embodiment, when the network is disconnected, the terminal device initiates a network connection request, and when the network is normally connected, continues to download the upgrade data package, thereby improving the success rate of a single upgrade task.
[0082] In the method for remote online upgrade of a terminal in some embodiments, step S22 includes: determining whether the network connection request is successful; if the network connection request is successful, executing step S3; if the network connection request fails, returning to step S1. Specifically, the server pushes a message of remote online upgrade to the terminal device. The upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received. After receiving the message, the terminal device accesses the network address in the upgrade message to download the upgrade data packet. During the download process, the network status is periodically detected. When the network is disconnected, the terminal device initiates a network connection request. If the network connection request is successful, the upgrade data packet continues to be downloaded. If the network connection fails, the terminal device detects whether the upgrade message push is received.
[0083] Based on the previous embodiment, in this embodiment, the terminal initiates a network connection request when the network is disconnected, continues to download the upgrade data package when the network is normally connected, and initiates a network connection request when the network connection fails, thereby improving the success rate of a single upgrade task.
[0084] In some embodiments of the method for remote online upgrade of a terminal, if the network connection request fails, returning to step S1 includes: if the network connection request fails, determining whether the number of connection requests is less than the preset number; if so, executing step S22; if not, returning to step S1. Specifically, the server pushes a message of remote online upgrade to the terminal device, and the upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received, and after receiving it, accesses the network address in the upgrade message to download the upgrade data packet. During the download process, the network status is regularly detected. When the network is disconnected, the terminal device initiates a network connection request. If the network connection request is successful, the upgrade data packet continues to be downloaded. If the network connection request fails, the network connection request is initiated again. If the connection fails again, the network connection request continues to be initiated until the number of network connection requests is greater than the preset number. At this time, the terminal device detects whether the upgrade message push is received. The preset number can be four times, five times, etc.
[0085] Based on the previous embodiment, in this embodiment, the terminal device initiates a network connection request when the network is disconnected, continues to download upgrade data packets when the network is normally connected, and continues to initiate network connection requests when the network connection fails until the number of requests exceeds the preset number, thereby further improving the success rate of a single upgrade task.
[0086] In some embodiments of the terminal remote online upgrade method, reference Figure 2 , after step S4, the method further includes the following steps: step S5, determining whether all the upgrade data has been downloaded; if so, the remote online upgrade of the terminal is successful; if not, returning to step S1.
[0087] Specifically, the server pushes a message of remote online upgrade to the terminal device. The upgrade message contains information such as the network address and version number of the application to be upgraded. The terminal device detects whether the upgrade message push is received. After receiving it, it accesses the network address in the upgrade message to download the upgrade data packet. In the process of downloading the data packet, the terminal device regularly detects the network quality, such as detecting the network bandwidth, the network strength, or detecting the response time of accessing the network address, and adjusts the size of the single request data to download the upgrade package according to the detection situation. For example, the larger the network bandwidth, the larger the request data; the stronger the network strength, the larger the request data; the shorter the response time of accessing the network address, the larger the request data, and vice versa. Determine whether the upgrade data packet is completed. If it is completed, it means that the remote online upgrade of the terminal is successful; if it is not completed, the terminal device detects whether the upgrade message push is received. The network here includes broadband and WiFi, and the terminal devices include but are not limited to mobile phones, tablets, laptops and other terminal devices.
[0088] On the basis of the above embodiment, in this embodiment, when the download is not completed, the terminal device continues to detect whether the upgrade message push is received, which can further improve the success rate of the upgrade task.
[0089] In a preferred embodiment, reference Figure 3 , a terminal remote online upgrade device of this embodiment includes:
[0090] Receiving module: used to detect whether the message push for remote online upgrade is received;
[0091] Download module: used to download the upgrade data package according to the message push request when receiving the message push;
[0092] Detection module: used to periodically detect the current network quality during the process of downloading the upgrade data package;
[0093] Adjustment module: used to adjust the size of single request data according to the current network quality and download upgrade data packets.
[0094] Specifically, the detection module is used to detect whether a message push for remote online upgrade is received; for example, the terminal device includes but is not limited to a mobile phone, a tablet, a laptop computer, etc. to detect whether the upgrade message push is received. When the download module receives the message push, it downloads the upgrade data packet according to the network address in the message push. In the process of downloading the data packet, the detection module regularly detects the network quality, such as detecting the network bandwidth, the network strength, or detecting the response time of accessing the network address. The adjustment module adjusts the size of a single request data to download the upgrade package according to the detection situation. For example, the larger the network bandwidth, the larger the request data; the stronger the network strength, the larger the request data; the shorter the response time of accessing the network address, the larger the request data, and vice versa.
[0095] Based on the existing upgrade mechanism, this embodiment adjusts the size of a single request data to download the upgrade data packet according to different network qualities, and sends multiple network connection requests to the server when the network is disconnected. This not only effectively solves the problem between the stability and speed of the downlink in different network environments, but also improves the success rate of a single upgrade task.
[0096] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0097] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0098] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0099] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot limit the scope of protection of the present invention. All equivalent changes and modifications made to the scope of the claims of the present invention should fall within the scope of the claims of the present invention.
Claims
1. A method for remote online upgrading of a terminal, characterized in that: The steps include: Step S1: Detect whether a message push for remote online upgrade is received; Step S2: If the push message is received, download the upgrade data package according to the push message request; Step S3: Regularly check the current network quality during the process of downloading the upgrade data package; Step S4: Adjust the size of the single request data according to the current network quality and download the upgrade data package; The method further includes the following steps after step S1 and before step S2: Step S11, obtaining the version number and MD5 value in the upgrade data of the upgrade data package; Step S12: determining whether the version number in the upgrade data is the same as the version number in the application to be upgraded; Step S13: If different, execute step S2; After step S12, the method further includes the following steps: Step S14: When the version number in the upgrade data is the same as the version number in the application to be upgraded, determining whether the MD5 value in the upgrade data is the same as the MD5 value in the application to be upgraded; Step S15: If they are the same, obtain the last download breakpoint, restart the download from the breakpoint, and execute step S3; Step S16: If different, execute step S2.
2. The method for remote online terminal upgrade according to claim 1, characterized in that: The step S3 includes: during the process of downloading the upgrade data package, regularly detecting the size of the current network bandwidth; Adjusting the size of the single request data according to the current network quality in step S4 includes: adjusting the size of the single request data according to the current network bandwidth.
3. The method for remote online terminal upgrade according to claim 2, characterized in that: The adjusting the size of single request data according to the current network bandwidth includes: The size of the single request data is adjusted according to the current network bandwidth, and the current network bandwidth is positively correlated with the size of the request data.
4. The method for remote online terminal upgrade according to claim 1, characterized in that: The step S3 includes: regularly detecting the current network strength during the process of downloading the upgrade data packet; Adjusting the size of the single request data according to the current network quality in step S4 includes: adjusting the size of the single request data according to the current network strength.
5. The method for remote online terminal upgrade according to claim 4, characterized in that: The adjusting the size of single request data according to the current network strength includes: The size of the single request data is adjusted according to the current network strength, and the current network strength is positively correlated with the size of the request data.
6. The method for remote online terminal upgrade according to claim 1, characterized in that: The step S2 includes: accessing the network address in the message push and requesting to download the upgrade data package; The step S3 includes: regularly detecting the current network response time during the process of downloading the upgrade data package, wherein the current network response time is the response time for accessing the network address; The step S4 includes: adjusting the size of single request data according to the current network response time.
7. The method for remote online terminal upgrade according to claim 6, characterized in that: The adjusting the size of single request data according to the current network response time includes: The size of the single request data is adjusted according to the current network response time, and the current network response time is negatively correlated with the size of the request data.
8. The method for remote online terminal upgrade according to claim 1, characterized in that: The method further includes the following steps after step S2 and before step S3: Step S21: During the process of downloading the upgrade data package, periodically check whether the current network is disconnected; Step S22: If yes, the terminal initiates a network connection request; Step S23: If not, execute step S3.
9. The method for remote online terminal upgrade according to claim 8, characterized in that: The step S22 includes: Determining whether the network connection request is successful; If the network connection request is successful, execute step S3; If the network connection request fails, return to step S1.
10. The method for remote online terminal upgrade according to claim 9, characterized in that: If the network connection request fails, returning to step S1 includes: If the network connection request fails, determining whether the number of connection requests is less than a preset number; If yes, proceed to step S22; If not, return to step S1.
11. The method for remote online terminal upgrade according to claim 1, characterized in that: After step S4, the method further includes the following steps: Step S5: Determine whether all the upgrade data has been downloaded; If yes, the remote online upgrade of the terminal is successful; If not, return to step S1.
12. A device for remote online terminal upgrade, characterized in that: The method for implementing the remote online upgrade of a terminal according to any one of claims 1 to 11, the device comprising: Receiving module: detects whether the message push for remote online upgrade is received; Download module: if the message push is received, download the upgrade data package according to the message push request; Detection module: regularly detects the current network quality during the download of upgrade data packets; Adjustment module: adjusts the size of single request data according to the current network quality and downloads the upgrade data package.
