System upgrading method and device, terminal equipment and storage medium

By detecting the status in the terminal device and performing end-to-end system upgrades, the problem that system upgrades in the prior art rely on network connections is solved, and the stability and success rate of upgrades are improved.

CN119728421APending Publication Date: 2025-03-28BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311279229.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art relies on network connections when upgrading terminal equipment systems, resulting in high traffic consumption and inability to upgrade without network or server failure, affecting convenience and stability.

Method used

By detecting whether the status of the terminal device meets the preset conditions, if so, the system upgrade will be performed with another terminal. The end-to-end upgrade method does not require relying on the network connection version server, and the system upgrade will be performed directly through data transmission between terminals.

Benefits of technology

It reduces the consumption of network resources, reduces the inability to upgrade due to factors such as server failure, and improves the stability and success rate of system upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728421A_ABST
    Figure CN119728421A_ABST
Patent Text Reader

Abstract

The invention relates to a system upgrading method and device, terminal equipment and a storage medium. The method applied to a first terminal comprises the steps that whether the state of the first terminal meets a first preset state condition or not is detected; and in response to the condition that the state of the first terminal meets the first preset state condition and the state of a second terminal meets a second preset state condition, performing system upgrading with the second terminal. Through the method, on one hand, consumption of network resources is reduced, the situation that upgrading cannot be carried out due to factors such as server faults is reduced, the network resources are saved, and the stability of system upgrading is improved; on the other hand, various conditions that the state of the first terminal and / or the second terminal is not suitable for supporting system upgrading are reduced, and the success rate of system upgrading is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a system upgrade method and device, terminal equipment, and storage medium. Background Art

[0002] System upgrade means replacing the terminal system with a higher version of the system, such as changing the system in the mobile phone from Android 4.0 to Android 5.0. Usually, the terminal uses Over-the-Air Technology (OTA) to upgrade the system, for example, the terminal connects to the network and downloads the system data from the version server for upgrade installation.

[0003] However, the OTA method for system upgrades relies on network connection, which consumes a lot of traffic. In addition, in the case of no network connection or version server failure, the terminal cannot complete the system upgrade in time. How to improve the convenience and stability of system upgrades has always been a concern. Summary of the invention

[0004] The present invention provides a system upgrade method and device, terminal equipment, and storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a system upgrade method is provided, which is applied to a first terminal and includes:

[0006] Detecting whether the state of the first terminal meets a first preset state condition;

[0007] In response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition, a system upgrade is performed with the second terminal.

[0008] In some embodiments, the detecting whether the state of the first terminal satisfies a first preset state condition includes:

[0009] detecting the remaining power of the first terminal;

[0010] In response to the remaining power of the first terminal being greater than a first preset power threshold, it is determined that the state of the first terminal satisfies the first preset state condition.

[0011] In some embodiments, in response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition, performing a system upgrade with the second terminal includes:

[0012] In response to the state of the first terminal satisfying the first preset state condition, and the state of the second terminal satisfying the second preset state condition, determining an output terminal and a receiving terminal of system data according to the system identification information and the second terminal; wherein the system identification information includes a system type and a system version number;

[0013] In response to the system type of the second terminal being consistent with the system type of the first terminal and the system version number of the second terminal being later than the system version number of the first terminal, system data of the second terminal is received and the system is upgraded using the system data.

[0014] In some embodiments, in response to the system type of the second terminal being consistent with the system type of the first terminal and the system version number of the second terminal being later than the system version number of the first terminal, receiving system data of the second terminal and performing system upgrade using the system data includes:

[0015] In response to the system type of the second terminal being consistent with the system type of the first terminal, and the system version number of the second terminal being later than the system version number of the first terminal, receiving system upgrade area information sent by the second terminal; wherein the system upgrade area information includes a starting address of the system upgrade area and a memory occupied by the system upgrade area;

[0016] Determine the area to be upgraded of the first terminal according to the starting address of the area in the system area information and the memory occupied by the area, and send a system data acquisition request to the second terminal;

[0017] The system data fed back by the second terminal based on the system data acquisition request is received, and the area to be upgraded is upgraded using the system data.

[0018] In some embodiments, the using the system data to perform system upgrade includes:

[0019] Comparing the system data with the system data of the first terminal before the upgrade, and determining the target data in the system data sent by the second terminal;

[0020] Part of the system data of the first terminal is upgraded based on the target data.

[0021] In some embodiments, the using the system data to perform system upgrade further includes:

[0022] In response to failure to upgrade the first terminal based on the target data, the first terminal is upgraded using all system data sent by the second terminal.

[0023] In some embodiments, the method further comprises:

[0024] In response to the system upgrade of the first terminal being completed, restarting the first terminal;

[0025] In response to the first terminal failing to restart, the first terminal is operated using system data before the first terminal is upgraded.

[0026] According to a second aspect of an embodiment of the present disclosure, a system upgrade method is provided, which is applied to a second terminal and includes:

[0027] Detecting whether the state of the second terminal meets a second preset state condition;

[0028] In response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition, a system upgrade is performed with the first terminal.

[0029] In some embodiments, the detecting whether the state of the second terminal satisfies a second preset state condition includes:

[0030] detecting the remaining power of the second terminal;

[0031] In response to the remaining power of the second terminal being greater than a second preset power threshold, it is determined that the state of the second terminal satisfies the second preset state condition.

[0032] In some embodiments, in response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition, performing a system upgrade with the first terminal includes:

[0033] In response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition, determining an output terminal and a receiving terminal of system data according to the system identification information and the first terminal; wherein the system identification information includes a system type and a system version number;

[0034] In response to the system type of the first terminal being consistent with the system type of the second terminal and the system version number of the first terminal being later than the system version number of the second terminal, system data is sent to the first terminal; wherein the system data is used for system upgrade of the first terminal.

[0035] In some embodiments, in response to the system type of the first terminal being consistent with the system type of the second terminal, and the system version number of the first terminal being later than the system version number of the second terminal, sending system data to the first terminal comprises:

[0036] In response to the system type of the first terminal being consistent with the system type of the second terminal, and the system version number of the first terminal being later than the system version number of the second terminal, sending system upgrade area information to the first terminal; wherein the system upgrade area information includes a starting address of the system upgrade area and a memory occupied by the system upgrade area, and the system upgrade area information is used by the first terminal to determine an area to be upgraded;

[0037] A system data acquisition request is received, which is sent by the first terminal after the area to be upgraded is determined, and the system data is fed back to the first terminal based on the system data acquisition request.

[0038] According to a third aspect of an embodiment of the present disclosure, a system upgrade device is provided, which is applied to a first terminal, and the device includes:

[0039] A first judgment module, used to detect whether the state of the first terminal meets a first preset state condition;

[0040] The first upgrading module is configured to perform a system upgrade with the second terminal in response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition.

[0041] In some embodiments, the first judgment module is further used to detect the remaining power of the first terminal; in response to the remaining power of the first terminal being greater than a first preset power threshold, it is determined that the state of the first terminal meets the first preset state condition.

[0042] In some embodiments, the first upgrade module is further used to determine the output end and the receiving end of the system data according to the system identification information and the second terminal in response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition; wherein the system identification information includes the system type and the system version number; in response to the system type of the second terminal being consistent with the system type of the first terminal and the system version number of the second terminal being later than the system version number of the first terminal, receive the system data of the second terminal and use the system data to perform a system upgrade.

[0043] In some embodiments, the first upgrade module is further used to receive system upgrade area information sent by the second terminal in response to the system type of the second terminal being consistent with the system type of the first terminal and the system version number of the second terminal being later than the system version number of the first terminal; wherein the system upgrade area information includes the starting address of the system upgrade area and the memory occupied by the system upgrade area; determine the area to be upgraded of the first terminal according to the starting address of the area in the system area information and the memory occupied by the area, and send a system data acquisition request to the second terminal; receive system data fed back by the second terminal based on the system data acquisition request, and use the system data to upgrade the area to be upgraded.

[0044] In some embodiments, the first upgrade module is further used to compare the system data with the system data of the first terminal before upgrading to determine the target data in the system data sent by the second terminal; and upgrade part of the system data of the first terminal based on the target data.

[0045] In some embodiments, the first upgrade module is further configured to, in response to a failure in upgrading the first terminal based on the target data, upgrade the first terminal using all system data sent by the second terminal.

[0046] In some embodiments, the apparatus further comprises: in response to completion of the system upgrade of the first terminal, restarting the first terminal; in response to failure of the first terminal to restart, running the first terminal using system data before the upgrade of the first terminal.

[0047] According to a fourth aspect of an embodiment of the present disclosure, a system upgrade device is provided, which is applied to a second terminal, and the device includes:

[0048] A second judgment module, used to detect whether the state of the second terminal meets a second preset state condition;

[0049] The second upgrading module is used for performing a system upgrade with the first terminal in response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition.

[0050] In some embodiments, the second determination module is further configured to determine that the state of the second terminal satisfies the second preset state condition in response to the remaining power of the second terminal being greater than a second preset power threshold.

[0051] In some embodiments, the second upgrade module is also used to determine the output end and the receiving end of the system data according to the system identification information and the first terminal in response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition; wherein the system identification information includes the system type and the system version number; in response to the system type of the first terminal being consistent with the system type of the second terminal and the system version number of the first terminal being later than the system version number of the second terminal, send the system data to the first terminal; wherein the system data is used for the first terminal to perform a system upgrade.

[0052] In some embodiments, the second upgrade module is further used to send system upgrade area information to the first terminal in response to the system type of the first terminal being consistent with the system type of the second terminal and the system version number of the first terminal being later than the system version number of the second terminal; wherein the system upgrade area information includes the starting address of the system upgrade area and the memory occupied by the system upgrade area, and the system upgrade area information is used by the first terminal to determine the area to be upgraded; receive a system data acquisition request sent by the first terminal after determining the area to be upgraded, and feed back the system data to the first terminal based on the system data acquisition request.

[0053] According to a fifth aspect of an embodiment of the present disclosure, a terminal device is provided, the terminal device comprising:

[0054] processor;

[0055] a memory for storing processor-executable instructions;

[0056] The processor is configured to execute the system upgrade method as described in any one of the first aspect or the second aspect.

[0057] According to the sixth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of a terminal device, the terminal device is enabled to execute a system upgrade method as described in any one of the first aspect or the second aspect above.

[0058] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0059] In an embodiment of the present disclosure, when both the first terminal and the second terminal meet preset status conditions, the first terminal and the second terminal perform a system upgrade, that is, through end-to-end upgrade, there is no need to rely on a network connection version server to obtain system data required for the system upgrade. On the one hand, it reduces the consumption of network resources and the occurrence of upgrade failures due to factors such as server failures, saves network resources, and improves the stability of the system upgrade; on the other hand, it reduces the occurrence of various situations in which the status of the first terminal and / or the second terminal is not suitable for supporting the system upgrade, thereby improving the success rate of the system upgrade.

[0060] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0062] Figure 1 This is a system upgrade method process shown in the embodiment of the present disclosure Figure 1 .

[0063] Figure 2 This is a system upgrade method process shown in the embodiment of the present disclosure Figure 2 .

[0064] Figure 3 This is a process interaction of a system upgrade method shown in an embodiment of the present disclosure. Figure 1 .

[0065] Figure 4 It is an interactive diagram of a terminal verification process of a system upgrade method shown in an embodiment of the present disclosure.

[0066] Figure 5 It is a terminal upgrade process interaction diagram of a system upgrade method shown in an embodiment of the present disclosure.

[0067] Figure 6 4 is a diagram of a system upgrade device applied to a first terminal in an embodiment of the present disclosure.

[0068] Figure 7 4 is a diagram of a system upgrade device applied to a second terminal in an embodiment of the present disclosure.

[0069] Figure 8 It is a block diagram of a terminal device apparatus 800 shown in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0070] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0071] Figure 1 This is a system upgrade method process shown in the embodiment of the present disclosure Figure 1 , applied to the first terminal, such as Figure 1 As shown, the system upgrade method applied to the first terminal includes the following steps:

[0072] S11, detecting whether the state of the first terminal meets a first preset state condition;

[0073] S12: In response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition, perform system upgrade with the second terminal.

[0074] In the embodiments of the present disclosure, the first terminal and the second terminal may be terminals installed with an operating system, such as a smart phone, a tablet computer, a notebook, a smart speaker, or a smart watch. The operating system may be an Android system (Android), an Apple system (IOS), a Microsoft system (Windows Phone), etc., and the embodiments of the present disclosure do not limit this. It should be noted that in the embodiments of the present disclosure, the premise for the first terminal and the second terminal to perform system upgrades is that the first terminal and the second terminal can run based on the same operating system.

[0075] In step S11, the first terminal detects whether its own state meets the first preset state condition, which may be that the first terminal determines whether the state of the first terminal can support the upgrade of the first terminal when receiving the instruction to be upgraded. The instruction to be upgraded of the first terminal may be triggered based on user operation; or it may be detected by the first terminal at regular intervals. For example, the user triggers the instruction to be upgraded of the first terminal by sending a voice message "upgrade the system" to the first terminal, or clicking the upgrade button on the screen of the first terminal; for another example, the first terminal detects the system upgrade mark at regular intervals, and triggers the instruction to be upgraded of the first terminal when the system upgrade mark indicates that the system is to be upgraded.

[0076] In the embodiment of the present disclosure, there are multiple ways for the first terminal to detect its own state, such as detecting the power state of the first terminal, detecting the usage state of the first terminal, or detecting the mode state of the first terminal. The power state of the first terminal can be characterized by the remaining power; the usage state of the first terminal can be characterized by whether there is an application running and / or the usage rate of the central processing unit (CPU); the mode state of the first terminal can include a sleep mode and a wake-up mode.

[0077] For example, the first terminal can detect its remaining power. If the remaining power is greater than a first preset power threshold, it indicates that the state of the first terminal meets the first preset state condition. The first terminal can also detect the CPU usage rate. If the CPU usage rate is less than the first preset CPU threshold, it indicates that the state of the first terminal meets the first preset state condition. The first terminal can also detect whether there are any third-party applications such as WeChat, office software, etc. running. If there are no third-party applications running, it indicates that the state of the first terminal meets the first preset state condition. In addition, since users usually do not have the need to use the first terminal in sleep mode, the first terminal can also determine that the first preset state condition is met when the current state is sleep mode.

[0078] In the disclosed embodiment, the first preset state condition can be set based on the aforementioned single state, or can be set based on multiple states. For example, the first preset state condition can be set to that the power of the first terminal is greater than the first preset power threshold; or the first preset state condition can be set to that the power of the first terminal is greater than the first preset power threshold and the CPU usage of the first terminal is less than the first preset CPU threshold.

[0079] In the embodiment of the present disclosure, if the state of the first terminal does not meet the first preset state condition, the system upgrade may not be performed; if the state of the first terminal meets the first preset state condition, it may be further determined whether to perform the system upgrade according to the state of the second terminal. In the embodiment of the present disclosure, the second terminal may also detect whether its own state meets the second preset state condition in a similar manner as the first terminal.

[0080] In step S12, when the state of the first terminal satisfies the first preset state condition and the state of the second terminal satisfies the second preset state condition, the first terminal and the second terminal perform a system upgrade. The method for confirming whether the state of the second terminal satisfies the second preset state condition can be detected in a similar manner to the first terminal.

[0081] In the embodiment of the present disclosure, after the first terminal and the second terminal respectively detect their own states, they may mutually send an identification of whether the states meet the preset state conditions, so that when both parties determine that the preset state conditions are met, the first terminal and the second terminal automatically perform a system upgrade. Alternatively, after the first terminal and the second terminal respectively determine that their own states meet the corresponding preset state conditions, the first terminal and the second terminal perform a system upgrade when both parties manually determine that the conditions are met.

[0082] It should be noted that, in the embodiment of the present disclosure, the first preset state condition and the second preset state condition can be set according to various factors such as the type, performance, and role played in the upgrade process of the first terminal and the second terminal, and the first preset state condition and the second preset state condition can be set to be the same or different. In the embodiment of the present disclosure, when the first terminal and the second terminal are terminals of the same type (for example, both are mobile phones), the first preset state condition and the second preset state condition can be set to be the same, so that the judgment of whether to perform a system upgrade is simpler and more efficient; when the first terminal and the second terminal are terminals of different types (for example, a mobile phone and a tablet), or terminals of the same type with different performances (for example, a high-performance mobile phone and a low-performance mobile phone), the first preset state condition and the second preset state condition can be set to be different, so that the judgment of whether to perform a system upgrade is more accurate; when the first terminal and the second terminal play different roles in the upgrade process, the first preset state condition and the second preset state condition can be set to be different, so as to improve the success rate of the system upgrade.

[0083] In the embodiment of the present disclosure, during the system upgrade process, it can generally include a terminal for providing system data required for the upgrade (the output end of the system data), and a terminal for receiving the system data and performing the upgrade (the receiving end of the system data). The first terminal can be the receiving end of the system data or the output end of the system data. For ease of description, in the embodiment of the present disclosure, the first terminal will be described as the receiving end of the system data and the second terminal will be described as the output end of the system data.

[0084] It should be noted that the first terminal, as the receiving end of the system data, usually needs to consume more device resources to support the upgrade process including system version comparison, status detection, installation package (system data) transmission, installation package installation, etc., compared with the second terminal, which is the output end of the system data. In this regard, in the embodiment of the present disclosure, the first preset state condition can be set to be stricter than the second preset state condition to maximize the upgrade success rate.

[0085] In the disclosed embodiment, the first preset state condition and the second preset state condition are set according to various factors such as the type, performance, and role played in the upgrade process of the first terminal and the second terminal to adapt to system upgrades between various types of terminals, thereby improving the intelligence of the system upgrade method.

[0086] In the embodiment of the present disclosure, when the first terminal and the second terminal perform a system upgrade, the first terminal can send a transmission request message to request the second terminal to transmit system data when a communication connection is successfully established with the second terminal, and use the received system data of the second terminal for upgrading, or the second terminal can actively send the system upgrade data to the first terminal. The first terminal can be connected to the second terminal via wired or wireless communication, and the communication connection methods involved include local area network, Bluetooth, etc.

[0087] It should be noted that, in the embodiment of the present disclosure, a system data receiving end (such as a first terminal) can receive system data from one or more system data output ends (such as a second terminal) for upgrading; in addition, a system data output end can also send system data to one or more system data receiving ends so that the system data receiving ends can be upgraded.

[0088] In the related technology, the system upgrade using OTA not only needs to rely on the network connection to the version server to download the system data, but also during the process of the terminal downloading and upgrading, the terminal may be unable to support the completion of the system upgrade due to low battery status, busy status, etc.

[0089] In contrast, in the embodiment of the present disclosure, when both the first terminal and the second terminal meet the preset status conditions, the first terminal and the second terminal perform a system upgrade, that is, through end-to-end upgrade, there is no need to rely on the network connection version server to obtain the system data required for the system upgrade. On the one hand, it reduces the consumption of network resources and the occurrence of upgrade failures due to factors such as server failures, saves network resources, and improves the stability of the system upgrade; on the other hand, it reduces the occurrence of various situations where the status of the first terminal and / or the second terminal is not suitable for supporting the system upgrade, thereby improving the success rate of the system upgrade.

[0090] In some embodiments, the detecting whether the state of the first terminal satisfies a first preset state condition includes:

[0091] detecting the remaining power of the first terminal;

[0092] In response to the remaining power of the first terminal being greater than a first preset power threshold, it is determined that the state of the first terminal satisfies the first preset state condition.

[0093] In the disclosed embodiment, the remaining power of the first terminal is detected, and when the remaining power of the first terminal is greater than the first preset power threshold, it is determined that the state of the first terminal meets the first preset state condition. The first preset power threshold can be flexibly set according to many factors such as the battery capacity and performance of the first terminal, so as to support the first terminal to complete the system upgrade when the state of the first terminal meets the first preset state condition. For example, for a first terminal with a large battery capacity or low power consumption, the first preset power threshold can be set relatively small; for a first terminal with a small battery capacity or high power consumption, the first preset power threshold can be set relatively large.

[0094] In the embodiment of the present disclosure, when the remaining power of the first terminal is greater than the first preset power threshold, determining that the state of the first terminal meets the first preset state condition can reduce the occurrence of system upgrade failures due to insufficient power of the first terminal, which is beneficial to improving the success rate and stability of the system upgrade.

[0095] In some embodiments, in response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition, performing a system upgrade with the second terminal includes:

[0096] In response to the state of the first terminal satisfying the first preset state condition, and the state of the second terminal satisfying the second preset state condition, determining an output terminal and a receiving terminal of system data according to the system identification information and the second terminal; wherein the system identification information includes a system type and a system version number;

[0097] In response to the system type of the second terminal being consistent with the system type of the first terminal and the system version number of the second terminal being later than the system version number of the first terminal, system data of the second terminal is received and the system is upgraded using the system data.

[0098] In the disclosed embodiment, the output end and the receiving end of the system data can be determined according to the system identification information of the first terminal and the second terminal. There are multiple ways to determine the output end and the receiving end of the system data. The first terminal can obtain the system identification information of the second terminal, compare the obtained system identification information of the second terminal with its own system identification information to determine the output end and the receiving end of the system data, and send the comparison result (the output end and the receiving end of the system data) to the second terminal; or the first terminal can send its system identification information to the second terminal, and the second terminal can compare the system identification information of the first terminal with the system identification information of the second terminal, and send the comparison result to the first terminal.

[0099] In the embodiment of the present disclosure, when the system types of the first terminal and the second terminal are the same, the terminal installed with the later-released system can be determined as the output terminal of the system data, and the terminal installed with the earlier-released system can be determined as the receiving terminal of the system data; when the system types of the first terminal and the second terminal are different, the system upgrade is not performed. In the embodiment of the present disclosure, since the system version number of the second terminal is later than that of the first terminal, the first terminal is the receiving terminal and the second terminal is the output terminal.

[0100] In the embodiment of the present disclosure, after receiving the system data of the second terminal, the first terminal can detect the upgrade mode of the first terminal. If the upgrade mode is a full upgrade, the first terminal can directly use all the system data received from the second terminal to upgrade the first terminal; if the upgrade mode is a differential upgrade, the first terminal can compare the system data of the second terminal with the system data of the first terminal before the upgrade based on the system data received from the second terminal to obtain the differential system data as the upgrade data, and use the upgrade data to upgrade the first terminal.

[0101] In addition, in the embodiment of the present disclosure, after receiving the system data of the second terminal, the first terminal can also compare the size of the system data of the second terminal with the size of the system data of the first terminal before the upgrade. If the difference is large, it can be determined that the first terminal is undergoing a full upgrade; if the difference is small, it can be determined that the first terminal is undergoing a differential upgrade.

[0102] In the disclosed embodiment, the system data output terminal and the receiving terminal for the system upgrade are automatically determined based on the system identification information of the first terminal and the second terminal, and the receiving terminal receives the system data sent by the output terminal for upgrading. The data transmission method is simple, convenient, and has a wide range of applications, thereby improving the usability of the system upgrade method.

[0103] In some embodiments, in response to the system type of the second terminal being consistent with the system type of the first terminal and the system version number of the second terminal being later than the system version number of the first terminal, receiving system data of the second terminal and performing system upgrade using the system data includes:

[0104] In response to the system type of the second terminal being consistent with the system type of the first terminal, and the system version number of the second terminal being later than the system version number of the first terminal, receiving system upgrade area information sent by the second terminal; wherein the system upgrade area information includes a starting address of the system upgrade area and a memory occupied by the system upgrade area;

[0105] Determine the area to be upgraded of the first terminal according to the starting address of the area in the system area information and the memory occupied by the area, and send a system data acquisition request to the second terminal;

[0106] The system data fed back by the second terminal based on the system data acquisition request is received, and the area to be upgraded is upgraded using the system data.

[0107] In the disclosed embodiment, the system upgrade area information may be information corresponding to an area specified by a user of the second terminal, or may be information corresponding to an area selected by the second terminal according to a predetermined rule based on an identifier of a system partition. After the first terminal receives the system upgrade area information sent by the second terminal, it determines the area to be upgraded of the first terminal based on the starting address of the system upgrade area and the memory occupied by the upgrade area, and then sends a system data acquisition request to the second terminal. The area to be upgraded of the first terminal may be a continuous storage memory area or a plurality of partitions of distributed storage, and the memory size of each partition may be greater than or equal to the memory size of the corresponding partition in the second terminal. In practical applications, it may be reasonably divided according to the memory situation of the first terminal. The system data acquisition request may include information such as the starting address of the system data and the memory size of the system data partition.

[0108] In the embodiment of the present disclosure, the first terminal receives the system data fed back by the second terminal based on the system data acquisition request, and uses the system data to upgrade the area to be upgraded. There are multiple ways for the first terminal to receive the system data fed back by the second terminal, which can be to cache the system data sent by the second terminal first, and directly store it in the area to be upgraded of the first terminal after all the system data are sent; or multiple partition data of the system data sent by the second terminal can be stored in the area to be upgraded of the first terminal by using the method of storing while transmitting.

[0109] In the embodiment of the present disclosure, the first terminal first determines the area to be upgraded of the first terminal based on the system upgrade area information of the second terminal obtained, and then performs system data transmission, thereby reducing the situation where system data transmission failures caused by insufficient memory of the first terminal are caused and improving the reliability of data transmission.

[0110] In some embodiments, the using the system data to perform system upgrade includes:

[0111] Comparing the system data with the system data of the first terminal before the upgrade, and determining the target data in the system data sent by the second terminal;

[0112] Part of the system data of the first terminal is upgraded based on the target data.

[0113] As mentioned above, the first terminal can use the system data sent by the second terminal for differential upgrade. In the embodiment of the present disclosure, the first terminal compares the received system data of the second terminal with the system data of the first terminal before the upgrade, and determines the difference data obtained by the comparison as the target data in the system data sent by the second terminal. In the embodiment of the present disclosure, the system data comparison method can be to directly compare all the system data sent by the second terminal with all the system data of the first terminal before the upgrade to obtain the target data; or when the system data sent by the second terminal carries a partition identifier, the system data sent by the second terminal is compared with the system data in the partition corresponding to the partition identifier in the first terminal to obtain the target data.

[0114] In the disclosed embodiment, the first terminal performs a system upgrade on the first terminal based on target data representing difference data before and after the upgrade, which helps to improve the system upgrade efficiency and save terminal resources.

[0115] In some embodiments, the using the system data to perform system upgrade further includes:

[0116] In response to failure to upgrade the first terminal based on the target data, the first terminal is upgraded using all system data sent by the second terminal.

[0117] As mentioned above, the first terminal can use the system data sent by the second terminal to perform a full upgrade. In the embodiment of the present disclosure, if the upgrade of the first terminal based on the target data fails, the first terminal can use all the system data sent by the second terminal to upgrade the first terminal. The method for determining whether the upgrade of the first terminal fails can be to determine whether it fails by restarting the system of the first terminal, or to determine whether it fails by detecting a process freeze during the upgrade process, or by the user determining whether it fails based on an abnormal upgrade interface.

[0118] In the disclosed embodiment, when it is determined that the first terminal fails to upgrade based on the target data, all system data sent by the second terminal are used for upgrading, which helps to improve the success rate of the system upgrade and enhances the stability of the system upgrade.

[0119] In some embodiments, the method further comprises:

[0120] In response to the system upgrade of the first terminal being completed, restarting the first terminal;

[0121] In response to the first terminal failing to restart, the first terminal is operated using system data before the first terminal is upgraded.

[0122] In the embodiment of the present disclosure, after the system upgrade of the first terminal is completed, the first terminal can be restarted, and it is determined whether to roll back the system of the first terminal according to the restart result. Under normal circumstances, if it is detected that a process freeze occurs during the boot process of the first terminal, or it is manually determined that an abnormal interface or sound appears in the first terminal during the restart process, it can be determined that the first terminal has failed to restart; if it is detected that the first terminal can be started normally, or it is manually determined that the first terminal can run to the system main interface and perform simple operations, it can be determined that the first terminal has successfully restarted. In the embodiment of the present disclosure, if the first terminal fails to restart, the system is rolled back, and the first terminal restores the operating system to the system data before the upgrade and runs with the system data before the upgrade; if the first terminal restarts successfully, it indicates that the first terminal has been successfully upgraded, and the first terminal runs with the system data of the second terminal.

[0123] In the disclosed embodiment, when the system upgrade fails, the first terminal restores the operating system to the system data before the upgrade, thereby reducing the occurrence of first terminal failures caused by the upgrade failure and improving the stability of the system upgrade.

[0124] Figure 2 This is a system upgrade method process shown in the embodiment of the present disclosure Figure 2 , applied to the second terminal, such as Figure 2 As shown, the system upgrade method applied to the second terminal includes the following steps:

[0125] S21, detecting whether the state of the second terminal meets a second preset state condition;

[0126] S22: In response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition, perform a system upgrade with the first terminal.

[0127] In step S21, the second terminal detects whether its own state meets the second preset state condition, which may be that the second terminal determines whether the state of the second terminal can support the system upgrade when receiving the instruction to be upgraded. The instruction to be upgraded of the second terminal may be triggered based on the upgrade request sent by the first terminal; or it may be detected by the second terminal at a fixed time. For example, when the state of the first terminal meets the first preset state condition, a system upgrade request is sent to the second terminal, and the second terminal receives the upgrade request and triggers the instruction to be upgraded of the second terminal; for another example, the second terminal detects the system upgrade flag at a fixed time, and triggers the instruction to be upgraded of the second terminal when the system upgrade flag indicates that the upgrade is to be upgraded.

[0128] In the embodiments of the present disclosure, there are multiple ways for the second terminal to detect its own state, such as detecting the power state of the second terminal, detecting the usage state of the second terminal, or detecting the mode state of the second terminal. The power state of the second terminal can be characterized by the remaining power; the usage state of the second terminal can be characterized by whether there is an application running and / or the CPU usage rate; the mode state of the first terminal can include a sleep mode and a wake-up mode.

[0129] For example, the second terminal can detect its remaining power. If the remaining power is greater than the second preset power threshold, it indicates that the state of the second terminal meets the second preset state condition; the second terminal can also detect the CPU usage rate. If the CPU usage rate is less than the second preset CPU threshold, it indicates that the state of the second terminal meets the second preset state condition; the second terminal can also detect whether there are any third-party applications such as WeChat, office software, etc. running. If there are no third-party applications running, it indicates that the state of the second terminal meets the second preset state condition; in addition, since users usually do not have the need to use the first terminal in sleep mode, the first terminal can also determine that the first preset state condition is met when the current state is sleep mode.

[0130] In the embodiment of the present disclosure, the second preset state condition can be set based on the aforementioned single state, or can be set based on multiple states. For example, the second preset state condition can be set to that the power of the second terminal is greater than the second preset power threshold; or the second preset state condition can be set to that the power of the second terminal is greater than the second preset power threshold and the CPU usage of the second terminal is less than the second preset CPU threshold.

[0131] In the embodiment of the present disclosure, if the state of the second terminal does not meet the second preset state condition, the system upgrade may not be performed; if the state of the second terminal meets the second preset state condition, it may be further determined whether to perform the system upgrade according to the state of the first terminal. In the embodiment of the present disclosure, the first terminal may also detect whether its own state meets the first preset state condition in a similar manner as the second terminal.

[0132] In step S22, when the state of the second terminal satisfies the second preset state condition and the state of the first terminal satisfies the first preset state condition, the second terminal and the first terminal perform a system upgrade. The upgrade method can refer to the above description of the system upgrade of the first terminal and the second terminal.

[0133] It should be noted that the second terminal, as the output terminal of the system data, is mainly used to transmit the installation package (system data) to the first terminal, and consumes less device resources than the first terminal as the receiving terminal of the system data. In this regard, in the embodiment of the present disclosure, the second preset state condition can be set to be relatively looser than the first preset state condition.

[0134] In the disclosed embodiment, the first preset state condition and the second preset state condition are set according to various factors such as the type, performance, and role played in the upgrade process of the first terminal and the second terminal to adapt to system upgrades between various types of terminals, thereby improving the intelligence of the system upgrade method.

[0135] In the related technology, the system upgrade using OTA not only needs to rely on the network connection to the version server to download the system data, but also during the process of the terminal downloading and upgrading, the terminal may be unable to support the completion of the system upgrade due to low battery status, busy status, etc.

[0136] In the disclosed embodiment, when the second terminal and the first terminal both meet preset status conditions, the second terminal and the first terminal perform system upgrade, that is, through end-to-end upgrade, there is no need to rely on the network connection version server to obtain system data required for system upgrade. On the one hand, it reduces the consumption of network resources and the occurrence of upgrade failures due to factors such as server failures, saves network resources, and improves the stability of system upgrades; on the other hand, it reduces the occurrence of various situations where the status of the second terminal and / or the first terminal is not suitable for supporting system upgrades, thereby improving the success rate of system upgrades.

[0137] In some embodiments, the detecting whether the state of the second terminal satisfies a second preset state condition includes:

[0138] detecting the remaining power of the second terminal;

[0139] In response to the remaining power of the second terminal being greater than a second preset power threshold, it is determined that the state of the second terminal satisfies the second preset state condition.

[0140] In the disclosed embodiment, the remaining power of the second terminal is detected, and when the remaining power of the second terminal is greater than the second preset power threshold, it is determined that the state of the second terminal meets the second preset state condition. The second preset power threshold can be flexibly set according to many factors such as the battery capacity and performance of the second terminal, so as to support the second terminal to complete the system upgrade when the state of the second terminal meets the second preset state condition. For example, for a second terminal with a large battery capacity or low power consumption, the second preset power threshold can be set relatively small; for a second terminal with a small battery capacity or high power consumption, the second preset power threshold can be set relatively large.

[0141] In the embodiment of the present disclosure, when the remaining power of the second terminal is greater than the second preset power threshold, determining that the state of the second terminal meets the second preset state condition can reduce the occurrence of system upgrade failures due to insufficient power of the second terminal, which is beneficial to improving the success rate and stability of the system upgrade.

[0142] In some embodiments, in response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition, performing a system upgrade with the first terminal includes:

[0143] In response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition, determining an output terminal and a receiving terminal of system data according to the system identification information and the first terminal; wherein the system identification information includes a system type and a system version number;

[0144] In response to the system type of the first terminal being consistent with the system type of the second terminal and the system version number of the first terminal being later than the system version number of the second terminal, system data is sent to the first terminal; wherein the system data is used for system upgrade of the first terminal.

[0145] As mentioned above, in the embodiment of the present disclosure, the output end and the receiving end of the system data can be determined according to the system identification information of the first terminal and the second terminal. The method for determining the output end and the receiving end of the system data can refer to the above-mentioned related instructions, and the embodiment of the present disclosure will not be repeated here.

[0146] In the embodiment of the present disclosure, since the system version number of the second terminal is later than that of the first terminal, the first terminal is a receiving terminal, the second terminal is an output terminal, and the second terminal will send system data to the first terminal. The second terminal may directly send the system data to the first terminal, or may first send the system upgrade area information of the second terminal, and after the first terminal determines the area to be upgraded according to the system upgrade area information and sends an upgrade data request, the system data is sent to the first terminal.

[0147] In the embodiment of the present disclosure, the system data output terminal and the receiving terminal of the system upgrade are automatically determined based on the system identification information of the first terminal and the second terminal, and the system data is sent from the output terminal to the receiving terminal to complete the system upgrade. The data transmission method is simple, convenient, and has a wide range of applications, which improves the usability of the system upgrade method.

[0148] In some embodiments, in response to the system type of the first terminal being consistent with the system type of the second terminal, and the system version number of the first terminal being later than the system version number of the second terminal, sending system data to the first terminal comprises:

[0149] In response to the system type of the first terminal being consistent with the system type of the second terminal, and the system version number of the first terminal being later than the system version number of the second terminal, sending system upgrade area information to the first terminal; wherein the system upgrade area information includes a starting address of the system upgrade area and a memory occupied by the system upgrade area, and the system upgrade area information is used by the first terminal to determine an area to be upgraded;

[0150] A system data acquisition request is received, which is sent by the first terminal after the area to be upgraded is determined, and the system data is fed back to the first terminal based on the system data acquisition request.

[0151] In the disclosed embodiment, the system upgrade area information of the second terminal may be information corresponding to an area specified by a user of the second terminal, or may be information corresponding to an area selected by the second terminal according to a predetermined rule based on an identifier of a system partition. The second terminal sends the system upgrade area information to the first terminal so that the first terminal determines the area to be upgraded of the first terminal based on the starting address of the system upgrade area and the memory occupied by the upgrade area. In the disclosed embodiment, after receiving the system data acquisition request sent by the first terminal, the second terminal feeds back the system data to the first terminal based on the system data acquisition request. In the disclosed embodiment, the second terminal may directly send the system data to the first terminal; or the system data may be first divided according to the information of the area to be upgraded of the first terminal carried in the system data acquisition request (such as the starting address of each partition in the area to be upgraded, the memory size, and other information), and the divided system data may be sent to the first terminal in a serial or parallel manner.

[0152] In the disclosed embodiment, the second terminal feeds back system data after receiving a system data acquisition request, where the data acquisition request is sent by the first terminal after determining the area to be upgraded. This reduces the occurrence of system data transmission failures due to insufficient storage space of the first terminal or the current state being unsuitable for receiving system data, thereby improving the reliability of data transmission.

[0153] Figure 3 This is a process interaction of a system upgrade method shown in an embodiment of the present disclosure. Figure 1 ,like Figure 3 As shown, the system upgrade method is applied to the first terminal and the second terminal, and includes the following steps:

[0154] S31. The first terminal detects whether the state of the first terminal meets a first preset state condition;

[0155] S32. The second terminal detects whether the state of the second terminal meets a second preset state condition;

[0156] S33: In response to the state of the first terminal satisfying the first preset state condition, and the state of the second terminal satisfying the second preset state condition, the first terminal and the second terminal perform system upgrade.

[0157] In steps S31 and S32, the first terminal and the second terminal detect their respective states respectively, and the detection may be performed simultaneously or in a preset order. For example, after receiving the system upgrade instruction, the first terminal and the second terminal may perform the detection simultaneously, or when the first terminal or the second terminal satisfies the preset state condition, the state of the other terminal (the second terminal or the first terminal) may be further detected to see whether it satisfies the preset state condition.

[0158] In step S33, the operation of determining whether the states of the first terminal and the second terminal both satisfy the corresponding preset state condition may be performed by the first terminal or the second terminal. For example, the first terminal may determine whether the first preset state condition is satisfied based on the detected state of the first terminal, and the first terminal may also obtain the state of the second terminal and determine whether the state of the second terminal satisfies the second preset state condition based on the second preset state condition.

[0159] In the embodiment of the present disclosure, in response to the state of the first terminal satisfying the first preset state condition, and the state of the second terminal satisfying the second preset state condition, the first terminal and the second terminal perform a system upgrade, and the output end and the receiving end of the system data can be determined according to the system identification information of the first terminal and the system identification of the second terminal, and the system data is transmitted from the output end to the receiving end of the system data, and the receiving end uses the received system data to perform a system upgrade. The system identification information includes the system type and the system version number, etc. When the system types of the first terminal and the second terminal are the same, the system data with a later release time is determined as the system data required for the upgrade according to the system version number.

[0160] Figure 4 is a terminal verification process interaction diagram of a system upgrade method shown in an embodiment of the present disclosure, such as Figure 4As shown, the system upgrade method is applied to the first terminal and the second terminal, and includes the following steps:

[0161] S401, the first terminal selects Bluetooth or LAN;

[0162] S402, the second terminal selects Bluetooth or LAN;

[0163] S403: Are the first terminal and the second terminal connected? If yes, execute step S404; if no, execute step S408;

[0164] In this embodiment, it is detected whether the first terminal and the second terminal are connected successfully. If the Bluetooth of the first terminal is paired with the Bluetooth of the second terminal successfully, or the first terminal and the second terminal are connected to the same local area network, it is determined that the first terminal and the second terminal are connected.

[0165] S404: Whether the first terminal and the second terminal match each other; if so, execute step S405; if not, execute step S409;

[0166] In this embodiment, the first terminal may determine whether the models match; or the second terminal may determine whether the models match. Specifically, the first terminal may obtain the model information of the second terminal. If the model of the first terminal matches the model of the second terminal, it is determined that the models are the same; if the model of the first terminal does not match the model of the second terminal, it is determined that the models are different. In this embodiment, the specific method for the second terminal to determine whether the models match can refer to the first terminal, and will not be repeated here.

[0167] S405: Whether the status of the first terminal and the second terminal supports upgrading; if so, executing step S406; if not, executing step S410;

[0168] In this embodiment, whether the status of the first terminal and the second terminal supports the upgrade, that is, in the embodiment of the present disclosure, in response to the status of the first terminal satisfying the first preset status condition and the status of the second terminal satisfying the second preset status condition, the first terminal and the second terminal perform a system upgrade. The status of the first terminal and / or the second terminal may be the battery status of the terminal, whether it is in an idle state, whether it is in a do not disturb state, etc.

[0169] S406, confirm whether the system versions in the first terminal and the second terminal are the same; if so, execute step S411; if not, execute step S407;

[0170] In this embodiment, the first terminal can determine whether the system versions are the same; the second terminal can also determine whether the system versions are the same. Specifically, the system version number of the second terminal can be obtained by the first terminal. If the system version number of the first terminal is the same as the system version number of the second terminal, it is determined that the versions are the same; if the system version number of the first terminal is different from the system version number of the second terminal, it is determined that the system versions are different. In this embodiment, the specific method for the second terminal to determine whether the system versions are the same can refer to the first terminal, and will not be repeated here.

[0171] In this embodiment, when the system version number of the first terminal is different from the system version number of the second terminal, the output end and the receiving end of the system upgrade are determined according to the higher or lower system version numbers.

[0172] S407, start upgrading;

[0173] In this embodiment, system data transmission is performed based on the output end and the receiving end of the system upgrade determined above, and the system data required for the upgrade is transferred from the output end to the receiving end.

[0174] S408: Connection rejected;

[0175] In this embodiment, when the first terminal and the second terminal refuse to connect, you can wait for the first terminal and the second terminal to connect within a first predetermined time. If the first terminal and the second terminal still fail to connect after the first predetermined time, you can exit the system upgrade.

[0176] S409, different models;

[0177] In this embodiment, when the first terminal and the second terminal are of different models, the system upgrade may be exited.

[0178] S410, poor condition;

[0179] In this embodiment, when the status of the first terminal and / or the second terminal is poor, the status of the first terminal and / or the second terminal can be rechecked within a second predetermined time. If the status of the first terminal and / or the second terminal is still poor after the second predetermined time, the system upgrade can be exited.

[0180] S411, same version;

[0181] In this embodiment, when the first terminal and the second terminal have the same version, the system upgrade may be exited.

[0182] S412. Exit the upgrade.

[0183] In the disclosed embodiment, based on factors such as the network connection of the first terminal and the second terminal, model matching, terminal status, system version, etc., it is verified whether the first terminal and the second terminal can perform system upgrades, and system data transmission and upgrades are performed when the verification passes, thereby reducing the occurrence of situations in which the system upgrade cannot be performed due to the above factors that easily cause upgrade failures, which is conducive to improving the success rate of the system upgrade.

[0184] Figure 5 is a terminal upgrade process interaction diagram of a system upgrade method shown in an embodiment of the present disclosure, such as Figure 5 As shown, the system upgrade method is applied to the first terminal and the second terminal, and includes the following steps:

[0185] As mentioned above, in this embodiment, the output end and the receiving end in the system upgrade process are determined according to the system version numbers of the first terminal and the second terminal, and the system data required for the upgrade are transmitted from the output end to the receiving end. The transmission and upgrade of the system data can be sliced, and the output end divides and stores the system data into multiple partitions, and transmits the data of each partition to the receiving end by streaming, so that the receiving end upgrades each partition that needs to be upgraded. The data transmission and upgrade of the first partition are used as an example for explanation. Specifically, in this embodiment, the system data is stored and transmitted in the form of metadata.

[0186] S501, obtaining the first partition to be upgraded;

[0187] In this embodiment, the output end obtains the first partition to be upgraded in the system data.

[0188] S502, obtaining block information of the first partition;

[0189] In this embodiment, the output end obtains the block information (metadata information) of the first partition, including the size of the block memory and the memory address corresponding to the starting area of ​​the block.

[0190] S503, partition information acquisition;

[0191] In this embodiment, the receiving end obtains the partition information corresponding to the system data in the output end, including the memory size of the first partition and the memory address corresponding to the starting area.

[0192] S504, updating the partition information of the area to be upgraded;

[0193] In this embodiment, the receiving end updates the partition information of the area to be upgraded, including the block information storing the first partition data in the area to be upgraded, according to the first partition information obtained from the output end. Specifically, the updating method metadata_back may be called.

[0194] S505, transmitting partition data;

[0195] In this embodiment, the output end starts to transmit the partition data in response to receiving the data transmission request. The data transmission request is sent after the partition information of the area to be upgraded of the receiving end is updated. In this embodiment, a streaming processing method is adopted for data processing while transmitting.

[0196] S506, receiving partition data;

[0197] In this embodiment, the system upgrade mode can be divided into full upgrade and differential upgrade. Therefore, the receiving end receives the partition data of the first partition sent by the output end, and can adopt the full reception mode (execute step S509) or the differential reception mode (execute step S507). Generally, the differential reception mode can be preferred. In the case of differential reception failure, the full reception mode is adopted.

[0198] S507, first partition data comparison;

[0199] In this embodiment, when the receiving end adopts a differential receiving mode, the data before and after the upgrade of the first partition can be compared to obtain differential data, wherein the differential data can be stored in a snapshot device.

[0200] S508, update partition with differential data;

[0201] In this embodiment, the receiving end updates the data of the first partition with the differential data in the snapshot device according to the differential data obtained by comparison.

[0202] S509, writing data into the first partition;

[0203] In this embodiment, when the receiving end adopts the full-data receiving mode, the data of the first partition of the output end can be directly written into the first partition of the receiving end.

[0204] S510, first partition upgrade;

[0205] In this embodiment, the receiving end upgrades the first partition according to the data of the first partition.

[0206] S511, whether the startup is normal; if so, execute step S512; if not, execute step S513;

[0207] In this embodiment, when all partition data that need to be upgraded are transmitted and upgraded, the receiving end is started for detection. The detection method can be that the receiving end detects whether there are abnormal situations such as process congestion during the upgrade process, or whether the user encounters interface freezes or abnormal sounds through the terminal.

[0208] S512, upgrade completed;

[0209] In this embodiment, after the receiving end is upgraded, it can be restarted and used normally.

[0210] S513, rolling back according to the system data before the upgrade;

[0211] In this embodiment, in case of an abnormal upgrade, the receiving end performs a rollback operation based on the system data before the upgrade, and restores the operating system of the receiving end to the version before the upgrade, so as to restart and use it normally.

[0212] In the disclosed embodiment, when both the first terminal and the second terminal meet the preset status conditions, the first terminal and the second terminal perform a system upgrade, that is, through end-to-end upgrade, there is no need to rely on a network connection version server to obtain system data required for the system upgrade. On the one hand, it reduces the consumption of network resources and the occurrence of upgrade failures due to factors such as server failures, saves network resources, and improves the stability of the system upgrade; on the other hand, it reduces the occurrence of various situations in which the first terminal and / or the second terminal is not suitable for supporting the system upgrade, thereby improving the success rate of the system upgrade.

[0213] Figure 6 is a diagram of a system upgrade device applied to a first terminal in an embodiment of the present disclosure. Figure 6 The system upgrade device 600 includes:

[0214] A first judgment module 601 is used to detect whether the state of the first terminal meets a first preset state condition;

[0215] The first upgrading module 602 is configured to perform a system upgrade with the second terminal in response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition.

[0216] In some embodiments, the first judgment module 601 is further used to detect the remaining power of the first terminal; in response to the remaining power of the first terminal being greater than a first preset power threshold, it is determined that the state of the first terminal meets the first preset state condition.

[0217] In some embodiments, the first upgrade module 602 is further used to determine the output end and the receiving end of the system data according to the system identification information and the second terminal in response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition; wherein the system identification information includes the system type and the system version number; in response to the system type of the second terminal being consistent with the system type of the first terminal and the system version number of the second terminal being later than the system version number of the first terminal, receive the system data of the second terminal and use the system data to perform a system upgrade.

[0218] In some embodiments, the first upgrade module 602 is further used to receive system upgrade area information sent by the second terminal in response to the system type of the second terminal being consistent with the system type of the first terminal and the system version number of the second terminal being later than the system version number of the first terminal; wherein the system upgrade area information includes the starting address of the system upgrade area and the memory occupied by the system upgrade area; determine the area to be upgraded of the first terminal according to the starting address of the area in the system area information and the memory occupied by the area, and send a system data acquisition request to the second terminal; receive system data fed back by the second terminal based on the system data acquisition request, and use the system data to upgrade the area to be upgraded.

[0219] In some embodiments, the first upgrade module 602 is further used to compare the system data with the system data of the first terminal before upgrading to determine the target data in the system data sent by the second terminal; and upgrade part of the system data of the first terminal based on the target data.

[0220] In some embodiments, the first upgrading module 602 is further configured to, in response to a failure in upgrading the first terminal based on the target data, upgrade the first terminal using all system data sent by the second terminal.

[0221] In some embodiments, the apparatus further comprises: in response to completion of the system upgrade of the first terminal, restarting the first terminal; in response to failure of the first terminal to restart, running the first terminal using system data before the upgrade of the first terminal.

[0222] Figure 7 is a diagram of a system upgrade device applied to a second terminal in an embodiment of the present disclosure. Figure 7 The system upgrade device 700 includes:

[0223] A second judgment module 701 is used to detect whether the state of the second terminal meets a second preset state condition;

[0224] The second upgrading module 702 is configured to perform a system upgrade with the first terminal in response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition.

[0225] In some embodiments, the second determination module 701 is further configured to determine that the state of the second terminal satisfies the second preset state condition in response to the remaining power of the second terminal being greater than a second preset power threshold.

[0226] In some embodiments, the second upgrade module 702 is also used to determine the output end and the receiving end of the system data according to the system identification information and the first terminal in response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition; wherein the system identification information includes the system type and the system version number; in response to the system type of the first terminal being consistent with the system type of the second terminal and the system version number of the first terminal being later than the system version number of the second terminal, send the system data to the first terminal; wherein the system data is used for the first terminal to perform a system upgrade.

[0227] In some embodiments, the second upgrade module 702 is further used to send system upgrade area information to the first terminal in response to the system type of the first terminal being consistent with the system type of the second terminal and the system version number of the first terminal being later than the system version number of the second terminal; wherein the system upgrade area information includes the starting address of the system upgrade area and the memory occupied by the system upgrade area, and the system upgrade area information is used by the first terminal to determine the area to be upgraded; receive a system data acquisition request sent by the first terminal after determining the area to be upgraded, and feed back the system data to the first terminal based on the system data acquisition request.

[0228] about Figure 6 and Figure 7 The specific manner in which each module performs operations in the device in the illustrated embodiment has been described in detail in the embodiment of the method, and will not be elaborated on here.

[0229] Figure 8 8 is a block diagram of a terminal device 800 shown in an embodiment of the present disclosure. For example, the device 800 may be a mobile phone, a mobile computer, etc.

[0230] Reference Figure 8, the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0231] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0232] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0233] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0234] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0235] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0236] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0237] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0238] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0239] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0240] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0241] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a first terminal or a second terminal, enables the first terminal or the second terminal to execute the aforementioned system upgrade method.

[0242] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims above.

[0243] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A system upgrade method, characterized in that: Applied to a first terminal, the method includes: Detecting whether the state of the first terminal meets a first preset state condition; In response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition, a system upgrade is performed with the second terminal.

2. The method according to claim 1, characterized in that The detecting whether the state of the first terminal satisfies a first preset state condition includes: detecting the remaining power of the first terminal; In response to the remaining power of the first terminal being greater than a first preset power threshold, it is determined that the state of the first terminal satisfies the first preset state condition.

3. The method according to claim 1, characterized in that In response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition, performing a system upgrade with the second terminal includes: In response to the state of the first terminal satisfying the first preset state condition, and the state of the second terminal satisfying the second preset state condition, determining an output terminal and a receiving terminal of system data according to the system identification information and the second terminal; wherein the system identification information includes a system type and a system version number; In response to the system type of the second terminal being consistent with the system type of the first terminal and the system version number of the second terminal being later than the system version number of the first terminal, system data of the second terminal is received and the system is upgraded using the system data.

4. The method according to claim 3, characterized in that In response to the system type of the second terminal being consistent with the system type of the first terminal, and the system version number of the second terminal being later than the system version number of the first terminal, receiving system data of the second terminal and performing system upgrade using the system data, comprising: In response to the system type of the second terminal being consistent with the system type of the first terminal, and the system version number of the second terminal being later than the system version number of the first terminal, receiving system upgrade area information sent by the second terminal; wherein the system upgrade area information includes a starting address of the system upgrade area and a memory occupied by the system upgrade area; Determine the area to be upgraded of the first terminal according to the starting address of the area in the system area information and the memory occupied by the area, and send a system data acquisition request to the second terminal; The system data fed back by the second terminal based on the system data acquisition request is received, and the area to be upgraded is upgraded using the system data.

5. The method according to claim 3 or 4, characterized in that: The method of using the system data to perform system upgrade includes: Comparing the system data with the system data of the first terminal before the upgrade, and determining the target data in the system data sent by the second terminal; Part of the system data of the first terminal is upgraded based on the target data.

6. The method according to claim 5, characterized in that The method of using the system data to perform system upgrade also includes: In response to failure to upgrade the first terminal based on the target data, the first terminal is upgraded using all system data sent by the second terminal.

7. The method according to claim 1, characterized in that The method further comprises: In response to the system upgrade of the first terminal being completed, restarting the first terminal; In response to the first terminal failing to restart, the first terminal is operated using system data before the first terminal is upgraded.

8. A system upgrade method, characterized in that: Applied to the second terminal, the method includes: Detecting whether the state of the second terminal meets a second preset state condition; In response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition, a system upgrade is performed with the first terminal.

9. The method according to claim 8, characterized in that The detecting whether the state of the second terminal satisfies a second preset state condition includes: detecting the remaining power of the second terminal; In response to the remaining power of the second terminal being greater than a second preset power threshold, it is determined that the state of the second terminal satisfies the second preset state condition.

10. The method according to claim 8, characterized in that In response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition, performing a system upgrade with the first terminal includes: In response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition, determining an output terminal and a receiving terminal of system data according to the system identification information and the first terminal; wherein the system identification information includes a system type and a system version number; In response to the system type of the first terminal being consistent with the system type of the second terminal and the system version number of the first terminal being later than the system version number of the second terminal, system data is sent to the first terminal; wherein the system data is used for system upgrade of the first terminal.

11. The method according to claim 9, characterized in that The step of sending system data to the first terminal in response to the system type of the first terminal being consistent with the system type of the second terminal and the system version number of the first terminal being later than the system version number of the second terminal comprises: In response to the system type of the first terminal being consistent with the system type of the second terminal, and the system version number of the first terminal being later than the system version number of the second terminal, sending system upgrade area information to the first terminal; wherein the system upgrade area information includes a starting address of the system upgrade area and a memory occupied by the system upgrade area, and the system upgrade area information is used by the first terminal to determine an area to be upgraded; A system data acquisition request is received, which is sent by the first terminal after the area to be upgraded is determined, and the system data is fed back to the first terminal based on the system data acquisition request.

12. A system upgrade device, characterized in that: Applied to a first terminal, the device includes: A first judgment module, used to detect whether the state of the first terminal meets a first preset state condition; The first upgrading module is configured to perform a system upgrade with the second terminal in response to the state of the first terminal satisfying the first preset state condition and the state of the second terminal satisfying the second preset state condition.

13. A system upgrade device, characterized in that: Applied to a second terminal, the device includes: A second judgment module, used to detect whether the state of the second terminal meets a second preset state condition; The second upgrading module is used for performing a system upgrade with the first terminal in response to the state of the second terminal satisfying the second preset state condition and the state of the first terminal satisfying the first preset state condition.

14. A terminal device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the system upgrade method according to any one of claims 1 to 7 or claims 8 to 11.

15. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by the processor of the terminal device, the terminal device is enabled to execute the system upgrade method as described in any one of claims 1 to 7 or claims 8 to 11.