CN112486733B - System restoration method, device, terminal and storage medium - Google Patents

System restoration method, device, terminal and storage medium Download PDF

Info

Publication number
CN112486733B
CN112486733B CN202011446107.0A CN202011446107A CN112486733B CN 112486733 B CN112486733 B CN 112486733B CN 202011446107 A CN202011446107 A CN 202011446107A CN 112486733 B CN112486733 B CN 112486733B
Authority
CN
China
Prior art keywords
version
identifier
terminal
server
operating system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011446107.0A
Other languages
Chinese (zh)
Other versions
CN112486733A (en
Inventor
陈利
梁瑞昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011446107.0A priority Critical patent/CN112486733B/en
Publication of CN112486733A publication Critical patent/CN112486733A/en
Application granted granted Critical
Publication of CN112486733B publication Critical patent/CN112486733B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application belongs to the technical field of terminals, and particularly relates to a system restoration method, a system restoration device, a terminal and a storage medium. A system restore method, comprising: acquiring a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition; when the first version identifier is inconsistent with the second version identifier, acquiring system installation information corresponding to the target version based on the second version identifier; and restoring the operating system from the current version to the target version based on the system installation information. The application can improve the convenience of the operation system.

Description

System restoration method, device, terminal and storage medium
Technical Field
The application belongs to the technical field of terminals, and particularly relates to a system restoration method, a system restoration device, a terminal and a storage medium.
Background
Along with the development of scientific technology, communication technology is also rapidly developed, so that the popularization rate of the terminal is higher and higher. An operating system can be installed in the terminal, and when a user uses the terminal, the terminal can call application functions in the terminal through the operating system. When the user uses the terminal, the user can also change the operating system through the brushing machine.
Disclosure of Invention
The embodiment of the application provides a system restoration method, a device, a terminal and a storage medium, which can improve the convenience of operating system use. The technical scheme of the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides a system restoration method, where the method includes:
acquiring a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition;
when the first version identifier is inconsistent with the second version identifier, acquiring system installation information corresponding to the target version based on the second version identifier;
and restoring the operating system from the current version to the target version based on the system installation information.
In a second aspect, an embodiment of the present application provides a system restore device, including:
the device comprises an identifier acquisition unit, a target version identification acquisition unit and a target version identification acquisition unit, wherein the identifier acquisition unit is used for acquiring a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition;
the information acquisition unit is used for acquiring system installation information corresponding to the target version based on the second version identifier when the first version identifier is inconsistent with the second version identifier;
And the version restoring unit is used for restoring the operating system from the current version to the target version based on the system installation information.
In a third aspect, a terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method of any of the first aspects when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which when executed by a processor performs a method according to any of the preceding claims.
In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
The technical scheme provided by the embodiments of the application has the beneficial effects that at least:
in one or more embodiments of the present application, when the first version identifier of the current version of the operating system and the second version identifier of the target version recorded in the system partition are inconsistent, the operating system may be restored from the current version to the target version based on the system installation information corresponding to the target version obtained by the second version identifier. Therefore, when the current version of the operating system is not the target version, the system installation information of the target version can be obtained, the operating system is restored, the operating system can be restored to the target version without damaging the system installation information corresponding to the target version, the restoring efficiency of the operating system can be improved, and the using convenience of the operating system can be further improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a background schematic of a system restore method applied to an embodiment of the present application;
FIG. 2 shows a system architecture diagram of a system restore method applied to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a system restore method according to an embodiment of the application;
FIG. 4 is a schematic flow chart of a system restore method according to an embodiment of the application;
FIG. 5 is a flow chart of a system restore method according to an embodiment of the application;
FIG. 6 shows an exemplary schematic of a system restore device interface in accordance with an embodiment of the application;
FIG. 7 shows an exemplary schematic of a system restore device interface in accordance with an embodiment of the application;
FIG. 8 is a schematic flow chart of a system restore method according to an embodiment of the application;
FIG. 9 is a flow chart of a system restore method according to an embodiment of the application;
FIG. 10 is a flow chart of a system restore method according to an embodiment of the application;
FIG. 11 is a schematic diagram of a system recovery device according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a system restore device according to an embodiment of the present application;
FIG. 13 is a schematic diagram of a system recovery device according to an embodiment of the present application;
fig. 14 shows a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the present application better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it should be noted that, unless expressly specified and limited otherwise, "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
With the development of scientific technology, the types of the system reduction devices are more and more, and the application functions which can be supported by the system reduction devices are more and more. Fig. 1 shows a background schematic diagram of a system restoration method applied to an embodiment of the present application. An operating system can be installed in the system reduction device, and application functions in the system reduction device are called through the operating system. However, with the development of science and technology, a user may break the operating system of the system restoration device, resulting in a situation that the system restoration device cannot be used.
According to some embodiments, when the operating system is unavailable, the system restoration device may reduce the situations that the system restoration device is unavailable by backing up the startup parameters and the corrupted original startup parameters. However, in this process, the original starting parameters of the operating system are destroyed, so that the system restoration device cannot restore the operating system determined to be unusable to the original available operating system, and the operating system is inconvenient to use.
It is easy to understand that when the system restore device reduces the situations that the operating system cannot be used by backing up the starting parameters and the damaged original starting parameters, the version of the operating system cannot be timely obtained when the version of the operating system is updated because the parameters of the backup area are not compatible, and the maintenance cost of the operating system is increased.
Fig. 2 shows a system architecture diagram of a system restoration method applied to an embodiment of the present application. As shown in fig. 2, the execution subject of the embodiment of the present application is a system restoration device, which may be an electronic device with an operating system, including but not limited to: wearable devices, handheld devices, personal computers, tablet computers, vehicle-mounted devices, smart phones, computing devices, or other processing devices connected to a wireless modem, etc. The system restore devices in different networks may be called different names, for example: a user equipment, an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent or user device, a cellular telephone, a cordless telephone, a personal digital assistant (personal digital assistant, PDA), a system restoration device in a fifth generation mobile communication technology (5th generation mobile networks,5G) network or a future evolution network, and the like. The operating system refers to an operating system which can run on the system restoration device, is a program for managing and controlling hardware of the system restoration device and an application of the system restoration device, and is an indispensable system application in the system restoration device. The operating system includes, but is not limited to, android system, IOS system, windows Phone (WP) system, ubuntu mobile version operating system, and the like.
According to some embodiments, the system restore device may be connected to the server via a network. The network is used to provide a communication link between the system restore device and the server. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others. It should be understood that the number of system restore devices, networks, and servers in fig. 2 is merely illustrative. There may be any number of system restore devices, networks, and servers as practical. For example, the server may be a server cluster formed by a plurality of servers. The user may interact with the server through the network using the system restore device to obtain system installation information, etc.
It is easy to understand that the server may be, for example, a background service device corresponding to a system restore device application in the system restore device. The system restore device may obtain a first version identification of a current version of the operating system and a second version identification of a target version recorded in the system partition. When the first version identifier and the second version identifier are inconsistent, the system restoration device can acquire system installation information corresponding to the target version based on the second version identifier, and restore the operating system from the current version to the target version based on the system installation information. When the system restoration device acquires the system installation information corresponding to the target version, the system restoration device may send a version acquisition request to the server. When the server acquires the system installation information, the server can return the system installation information to the system restoration device. The system restoration device may acquire the system installation information. The embodiment of the application provides a system restoration method which can improve the use convenience of an operating system.
The present application will be described in detail with reference to specific examples.
In one embodiment, as shown in fig. 3, a system restore method is specifically proposed, which may be implemented by a computer program and may be executed on a system restore device based on a system with an operating system. The computer program may be integrated in the application or may run as a stand-alone tool class application. The method of the embodiment of the application can be used for a system restoration scene, a system upgrading scene, an application upgrading scene and the like.
Specifically, the system reduction method comprises the following steps:
s101, acquiring a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition;
according to some embodiments, an operating system refers to a collection of system software in a system restore device that manages hardware resources, controls other programs to run, and provides an interactive operation interface for a user. The operating system is used for managing and configuring memory, determining the priority of system resource supply and demand, controlling input and output equipment, operating network, managing file system and other basic tasks.
It is easy to understand that the current version refers to a version corresponding to an operating system in the system restoration device when the system restoration device obtains the version identifier. The current version is not specific to a fixed version. For example, the system restore device may change the version of the operating system based on the user's version change instructions before the system restore device obtains the version identification. Modifications to the operating system version by the system restore device include, but are not limited to, version updates and version replacements, among others.
Optionally, the first version identifier refers to a version identifier of a current version of the operating system, where the first version identifier does not refer to a fixed identifier, and when the current version of the operating system changes, the first version identifier also changes correspondingly.
According to some embodiments, the system partition refers to a partition in the system restore device for storing the second version identification. The system partition is a partition preset by the system restoration device. The system restoration device may set the system partition based on the partition instruction for input, or may be a system partition set when the system restoration device leaves the factory. The user-entered partition instructions include, but are not limited to, voice partition instructions, click partition instructions, timed partition instructions, text partition instructions, and the like. The partition instruction may instruct the system restoration device to set the system partition, may also instruct the system restoration device to set the size and location of the system partition, and so on.
It is easy to understand that the target version refers to a version to which the system restore device can restore the operating system when the system restore device restores the operating system. The target version is not specific to a fixed version. The target version may be changed based on a version change instruction of the user, or may be changed based on version state information stored in a server connected to the system restore device. The version change instructions include, but are not limited to, voice change instructions, click change instructions, timing change instructions, and the like.
It will be readily appreciated that the second version identification is a version identification corresponding to the target version recorded in the system partition. The version identification does not refer specifically to a certain fixed identification. When the system restore device changes the operating system to the target version, the system restore device may record a second version identification of the target version in the system partition. When the system restoration device changes the first target version to the second target version, the system restoration device can change the version identifier corresponding to the first target version recorded in the system partition to the version identifier of the second target version.
According to some embodiments, when the system restore device obtains the first version identifier of the current version of the operating system, the system restore device may obtain the second version identifier of the target version recorded in the system partition in the system restore device.
S102, when the first version identifier and the second version identifier are inconsistent, acquiring system installation information corresponding to the target version based on the second version identifier;
according to some embodiments, the system installation information refers to installation information corresponding to a target version of the operating system. The system installation information does not particularly refer to certain fixed installation information, and the system installation information changes with the change of the target version. For example, when the target version of the operating system is changed from the first target version to the second target version, the system installation information may have the first system installation information changed to the second system installation information. The first target version corresponds to the first system installation information, and the second target version corresponds to the second system installation information.
It is easy to understand that when the system restore device obtains the first version identifier of the current version of the operating system and the second version identifier of the target version recorded in the system partition, the system restore device may determine whether the first version identifier and the second version identifier are consistent. When the system restoration device detects that the first version identifier and the second version identifier are inconsistent, the system restoration device can acquire the system installation information corresponding to the target version based on the second version identifier.
S103, restoring the operating system from the current version to the target version based on the system installation information.
According to some embodiments, when the first version identifier and the second version identifier are inconsistent, the system restoration device may acquire system installation information corresponding to the target version based on the second version identifier. When the system restoration device acquires the system installation information, the system restoration device can restore the operating system from the current version to the target version based on the system installation information.
It is easy to understand that the Q system restore device obtains the version a identifier of the first version of the operating system a and the version B identifier of the second version of the operating system B. Wherein, the version a is the current version and the version b is the target version. When the Q system restoring device obtains the version A identifier of the version a of the current version a of the operating system and the version B identifier of the target version B recorded in the system partition, the Q system restoring device can judge whether the version A identifier and the version B identifier are consistent. When the Q system restoration device detects that the version A identifier and the version B identifier are inconsistent, the Q system restoration device can acquire the system installation information corresponding to the target version based on the version B identifier. When the Q system restoring device acquires the system installation information corresponding to the target version based on the version B identifier, the Q system restoring device restores the operating system from the version a to the version B.
In one or more embodiments of the present application, when the first version identifier of the current version of the operating system and the second version identifier of the target version recorded in the system partition are inconsistent, the operating system may be restored from the current version to the target version based on the system installation information corresponding to the target version obtained by the second version identifier. Therefore, when the current version of the operating system is not the target version, the system installation information of the target version can be obtained, the operating system is restored, the operating system can be restored to the target version without damaging the system installation information corresponding to the target version, the restoring efficiency of the operating system can be improved, and the using convenience of the operating system can be further improved. In addition, the system restoration device restores the operating system based on the acquired system installation information of the target version, and the user does not need to manually input the system installation information, so that the system restoration steps can be reduced, and the use convenience of the operating system is improved.
Referring to fig. 4, a flow chart of a system restoration method is provided in an embodiment of the present application. As shown in fig. 4, the method includes the following steps S201 to S206.
S201, sending a terminal identifier to a server; the terminal identifier is used for indicating the server to confirm the terminal type corresponding to the terminal identifier;
According to some embodiments, the terminal identifier refers to an identifier carried by the system restoration device, and the terminal identifier may uniquely identify the system restoration device. The terminal identifiers carried by the system reduction devices of different types are different, and the terminal identifiers carried by the system reduction devices of the same type are also different. For example, the terminal identifier carried by the Q system recovery device may be 157946852, and the terminal identifier carried by the w system recovery device may be 157946853.
It is to be readily understood that fig. 5 shows a flowchart of a system restore method according to an embodiment of the present application. When the system restoration device performs system restoration, the system restoration device can acquire the terminal identification of the system restoration device. When the system restoration device acquires the terminal identifier, the system restoration device can send the terminal identifier to the server. Before the system restoration device sends the terminal identifier to the server, the system restoration device may establish a connection with the server. For example, the system restore device may send a connection request to the server. When the system restoration device receives a confirmation instruction for the connection request returned by the server, the system restoration device can establish connection with the server.
Optionally, the terminal identifier is used for indicating the server to confirm the terminal type corresponding to the terminal identifier. The terminal types include, but are not limited to, non-custom types and custom types. Wherein the custom type is a terminal indicating that the system restore device belongs to a management control. For example, when the terminal type of the system restore device is a custom type, it may indicate that the use of the system restore device is governed by the terminal manufacturer or operator, and the content of the management may include, but is not limited to, the version of the operating system that controls the use of the system restore device, the type of subscriber identity card (Subscriber Identity Module, SIM) installed, and the like. The non-custom type is indicative of the system restore device being a terminal that is not under control. It will be appreciated that when a user purchases a terminal, the terminal may be loaded with terminal information of a partner vendor or partner operator by default, for example: operating systems, related terminal applications, supported communication formats, etc. Therefore, for the custom type system restoration device, in order to secure the quality of service and the use effect, the system restoration device is required to be executed according to the initially loaded terminal information, whereas for the non-custom type system restoration device, the user may be allowed to change the terminal information thereof.
It is easy to understand that, when the server receives the terminal identifier sent by the system restoration device, the server may confirm the terminal type corresponding to the terminal identifier based on the terminal identifier. For example, the server may confirm whether the system restore device is a custom type system restore device. When the server confirms the terminal type corresponding to the terminal identification, the server can return type confirmation information to the system restoration device.
According to some embodiments, the terminal identifier of the Q system recovery device acquired by the Q system recovery device may be 157946852. When the Q-system restoration device acquires the terminal identifier, the Q-system restoration device may send the terminal identifier to the server. When the server receives the terminal identifier sent by the Q system restoration device, the server may confirm the terminal type of the Q system restoration device based on the terminal identifier 157946852. When the server confirms the terminal type corresponding to the terminal identifier 157946852, the server may return the type confirmation information to the Q system restoration device.
S202, obtaining type confirmation information returned by a server;
according to some embodiments, after the system restoration device sends the terminal identifier to the server, the system restoration device may detect whether the type confirmation information returned by the server is received. When the system restoration device detects the type confirmation information returned by the server, the system restoration device can acquire the type confirmation information returned by the server.
According to some embodiments, the terminal identifier of the Q system recovery device acquired by the Q system recovery device may be 157946852. When the Q-system restoration device acquires the terminal identifier, the Q-system restoration device may send the terminal identifier to the server. When the server receives the terminal identifier sent by the Q system restoration device, the server may confirm the terminal type of the Q system restoration device based on the terminal identifier 157946852. When the server confirms the terminal type corresponding to the terminal identifier 157946852, the server may return the type confirmation information to the Q system restoration device. When the Q-system restoration device detects that the server returns the type confirmation information, the Q-system restoration device may acquire the type confirmation information.
S203, when the type confirmation information indicates that the terminal type is a custom type, executing the step of acquiring a first version identifier corresponding to the current version of the operating system and a second version identifier corresponding to the target version recorded in the system partition;
according to some embodiments, when the system restoration device obtains the type confirmation information returned by the server, the system restoration device may detect whether the type confirmation information indicates that the terminal type is a custom type. When the system restoration device confirms that the type confirmation information indicates that the terminal type is a custom type, the system restoration device executes the step of acquiring a first version identifier corresponding to the current version of the operating system and a second version identifier corresponding to the target version recorded in the system partition.
It is easy to understand that when the Q-system restoration device detects that the server returns the type confirmation information, the Q-system restoration device may acquire the type confirmation information. When the Q-system restoring device acquires the type confirmation information returned by the server, the Q-system restoring device may detect whether the type confirmation information indicates that the terminal type is a custom type. When the Q system restoration device confirms that the type confirmation information indicates that the terminal type is a custom type, the Q system restoration device may perform the step of acquiring a first version identifier corresponding to the current version of the operating system and a second version identifier corresponding to the target version recorded in the system partition.
According to some embodiments, when the system restoration device obtains the type confirmation information returned by the server, the system restoration device may detect whether the type confirmation information indicates that the terminal type is a custom type. When the system restoration device confirms that the type confirmation information indicates that the terminal type is not the custom type, the system restoration device may not perform the step of acquiring the first version identifier corresponding to the current version of the operating system and the second version identifier corresponding to the target version recorded in the system partition.
S204, acquiring a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition;
S205, when the first version identifier is inconsistent with the second version identifier, generating a version acquisition request based on the second version identifier, and sending the version acquisition request to a server; the version acquisition request is used for indicating the server to search the system installation information corresponding to the second version identification;
according to some embodiments, the version acquisition request refers to a request sent by the system restore device to the server for acquiring system installation information. The version acquisition request is generated by the system restore device based on the second version identification. The version acquisition request is used for indicating the server to search the system installation information corresponding to the second version identification. The version acquisition request is not specific to a fixed request. The version acquisition request may, for example, change as the second version identification changes.
It is readily appreciated that when the system restore device obtains the first version identification of the current version of the operating system and the second version identification of the target version recorded in the system partition, the system restore device may detect whether the first version identification and the second version identification are consistent. When the system restore device detects that the first version identification and the second version identification are inconsistent, the system restore device may generate a version acquisition request based on the second version identification. When the system restoration device generates the version acquisition request, the system restoration device may transmit the version acquisition request to the server. That is, when the server receives the version acquisition request sent by the system restore device, the server may parse the version acquisition request to acquire the second version identifier. The server may look up system installation information corresponding to the second version identification. When the server finds the system installation information corresponding to the second version identifier, the server can send the system installation information to the system restoration device.
Optionally, when the Q system restoration device confirms that the type confirmation information indicates that the terminal type is a custom type, the Q system restoration device may perform the step of acquiring a first version identifier corresponding to the current version of the operating system and a second version identifier corresponding to the target version recorded in the system partition. When the Q system reduction device acquires the A identifier of the current version of the operating system and the B identifier of the target version recorded in the system partition, the Q system reduction device can judge whether the A version identifier and the B version identifier are consistent. When the Q-system restoration device detects that the version a identifier and the version B identifier are inconsistent, the Q-system restoration device may generate a version acquisition request based on the version B identifier, and send the version acquisition request to the server. When the server acquires the version acquisition request, the server can search the system installation information corresponding to the version B identifier. When the server finds the system installation information corresponding to the version B identifier, the server may send the system installation information to the Q system restoration device.
According to some embodiments, when the system restore device obtains the first version identifier of the current version of the operating system and the second version identifier of the target version recorded in the system partition, the system restore device may detect whether the first version identifier and the second version identifier are consistent. When the system restoration device detects that the first version identifier is inconsistent with the second version identifier, the system restoration device can send out reminding information, for example, the reminding information can be information that whether the first version identifier is inconsistent with the second version identifier or not and whether version restoration is carried out or not. At this time, an exemplary schematic of the system restore device interface may be as shown in fig. 6. When the system restoration device receives the confirmation information for the reminder information, the system restoration device may generate a version acquisition request based on the second version identification. When the system restoration device generates the version acquisition request, the system restoration device may transmit the version acquisition request to the server.
S206, acquiring system installation information returned by the server;
according to some embodiments, when the system restoration device generates the version acquisition request based on the second version identifier, and sends the version acquisition request to the server, the system restoration device may detect whether system installation information returned by the server is received. When the system restoration device detects the system installation information returned by the server, the system restoration device can acquire the system installation information returned by the server. The system installation information may be, for example, obtained by the system restore device via Over-the-Air Technology (OTA). The system installation information returned by the system restoration device acquiring server can be applied to a scene of pre-storing the system installation information in the system restoration device or a scene of pre-storing no system installation information in the system restoration device. Because the system restoration method of the embodiment does not need parameters of the backup area of the system restoration device, the situation that the updated version cannot be obtained in time when the version of the operating system is updated can be reduced, and the maintenance cost of the operating system can be reduced.
It is easy to understand that when the Q system restoration device detects that the a version identifier and the B version identifier are inconsistent, the Q system restoration device may generate a version acquisition request based on the B version identifier and send the version acquisition request to the server. When the server acquires the version acquisition request, the server can search the system installation information corresponding to the version B identifier. When the server finds the system installation information corresponding to the version B identifier, the server may send the system installation information to the Q system restoration device. When the Q system restoration device detects the system installation information returned by the server, the system restoration device can acquire the system installation information returned by the server.
S207, restoring the operating system from the current version to the target version based on the system installation information.
The specific process is as described above, and will not be described here again.
It is easy to understand that the system restoration device may store, for example, system installation information corresponding to the second version identifier. When the system restoration device acquires the system installation information returned by the server, the system restoration device can detect whether the system installation information stored in the system restoration device is consistent with the system installation information returned by the server. When the system restoration device detects that the system installation information stored in the system restoration device is consistent with the system installation information returned by the server, the system restoration device may restore the operating system from the current version to the target version based on the system installation information stored in the system restoration device or the system installation information returned by the server. When the system restoration device detects that the system installation information stored in the system restoration device is consistent with the system installation information returned by the server, the system restoration device can restore the operating system from the current version to the target version based on the system installation information returned by the server. The system recovery device can upgrade the version of the operating system, reduce the step of operating system upgrade and improve the efficiency of operating system upgrade.
According to some embodiments, when the system restore device restores the operating system from the current version to the target version, the system restore device may present hint information that is used to hint the system restore device to restore the operating system from the current version to the target version. At this time, an exemplary schematic of the system restore device interface may be as shown in fig. 7.
In one or more embodiments of the present application, by sending the terminal identifier to the server and executing the step of obtaining the first version identifier corresponding to the current version of the operating system and the second version identifier corresponding to the target version recorded in the system partition when the obtained type confirmation information indicates that the terminal type is the custom type, the system restoration can be performed when the system restoration device is the custom type, the reduction of the operating system of the system restoration device when the system restoration device is not the custom type can be reduced, and the accuracy of the operation system restoration can be improved. In addition, when the first version identifier and the second version identifier are inconsistent, a version acquisition request is generated based on the second version identifier, the version acquisition request is sent to the server, and when system installation information returned by the server is acquired, the operating system is restored from the current version to the target version, so that when the current version of the operating system is not the target version, the system installation information of the target version can be acquired, the operating system is restored, the operating system can be restored to the target version without damaging the system installation information corresponding to the target version, the restoring efficiency of the operating system can be improved, and the using convenience of the operating system can be improved.
Referring to fig. 8, a flow chart of a system restoration method is provided in an embodiment of the present application. As shown in fig. 8, the method includes the following steps S301-S307.
S301, acquiring a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition;
s302, when the first version identifier is inconsistent with the second version identifier, a version state request is sent to a server; the version state request is generated based on the terminal identification, and the version state request is used for indicating the server to acquire version state information corresponding to the terminal identification;
according to some embodiments, the version status request refers to a request sent by the system restore device to the server for obtaining version status information. The version status request is generated by the system restore device based on the terminal identification. The version state request is used for indicating the server to acquire version state information corresponding to the terminal identifier. The version status request does not refer specifically to a fixed request. The version status request may for example change as the identity of the terminal changes. The version status information is used to indicate whether the current version of the operating system is an available version.
It is to be readily understood that fig. 9 shows a flowchart of a system restore method according to an embodiment of the present application. When the system restoration device obtains the first version identifier of the current version of the operating system and the second version identifier of the target version recorded in the system partition, the system restoration device can detect whether the first version identifier and the second version identifier are consistent. When the system restoration device detects that the first version identification and the second version identification are inconsistent, the system restoration device may generate a version status request based on the terminal identification. When the system restore device generates the version status request, the system restore device may send the version status request to the server. That is, when the server receives the version status request sent by the system restoration device, the server may parse the version status request to obtain the terminal identifier. The server may obtain version status information corresponding to the terminal identifier. When the server acquires the version state information corresponding to the terminal identifier, the server can send the version state information to the system restoration device.
According to some embodiments, the terminal identifier of the Q system recovery device acquired by the Q system recovery device may be 157946852. When the Q-system restoration device acquires the terminal identifier, the Q-system restoration device may generate a version status request based on the terminal identifier 157946852. When the Q-system restore device generates a version status request, the Q-system restore device may send the version status request to the server. When the server receives the version status request sent by the Q system restoration device, the server may obtain version status information corresponding to the terminal identifier 157946852 based on the terminal identifier 157946852 carried in the version status request. When the server acquires the version status information corresponding to the terminal identifier 157946852, the server may send the version status information to the Q-system restoration device.
S303, obtaining version state information returned by the server;
according to some embodiments, after the system restore device sends the version status request to the server, the system restore device may detect whether version status information returned by the server is received. When the system restoration device detects the version state information returned by the server, the system restoration device can acquire the version state information returned by the server. The version status information is used to indicate whether the current version of the operating system is an available version.
According to some embodiments, the terminal identifier of the Q system recovery device acquired by the Q system recovery device may be 157946852. When the Q-system restoration device acquires the terminal identifier, the Q-system restoration device may generate a version status request based on the terminal identifier 157946852. When the Q-system restore device generates a version status request, the Q-system restore device may send the version status request to the server. When the server receives the version status request sent by the Q system restore device, the server may parse the version status request, obtain the terminal identifier 157946852, and obtain version status information corresponding to the terminal identifier 157946852. When the server acquires the version status information corresponding to the terminal identifier 157946852, the server may send the version status information to the Q-system restoration device. When the Q-system restoring device detects that the server returns version state information, the Q-system restoring device may acquire the version state information.
S304, when the version state information indicates that the current version of the operating system is an unavailable version, acquiring system installation information corresponding to the target version based on the second version identifier;
according to some embodiments, when the system restore device obtains version status information returned by the server, the system restore device may detect whether the version status information indicates that the current version of the operating system is an unavailable version. When the system restoration device determines that the version status information indicates that the current version of the operating system is an unavailable version, the system restoration device may acquire system installation information corresponding to the target version based on the second version identifier.
It is to be readily understood that when the system restoration device determines that the version status information indicates that the current version of the operating system is an available version, the system restoration device may not perform the step of acquiring the system installation information corresponding to the target version based on the second version identification. For example, the version status information is information indicating whether the current version of the operating system in the system restore device is an available version. When the system restoration device acquires the version state information, the system restoration device may not execute the step of acquiring the system installation information corresponding to the target version based on the second version identifier when the system restoration device determines that the version state information indicates that the current version of the operating system is an available version.
Alternatively, the version status information may be, for example, information that the current version is not the target version but the current version is an available version. When the system restoration device acquires the version status information, the system restoration device may determine that the version status information indicates that the current version of the operating system is an available version, and the system restoration device may not execute the step of acquiring the system installation information corresponding to the target version based on the second version identifier.
S305, setting the state of the input event as a forbidden input state;
According to some embodiments, when the system restoration device acquires the system installation information corresponding to the target version based on the second version identification, the system restoration device may set the state of the input event to the input prohibition state. When the system restoration device sets the state of the input event to the input prohibition state, the system restoration device may set the state of the input event to the input prohibition state based on a preset instruction, and the system restoration device may further send a state setting request to the server to set the state of the input event to the input prohibition state based on state setting information returned by the server.
It is readily understood that input events include, but are not limited to, making an android debug bridge (Android Debug Bridge, adb) connection, displaying a navigation bar, pulling down a menu bar, controlling a hover ball, using a voice assistant, and the like. The system restore device may set the state of all or part of the above-described input events to the input disabled state.
S306, acquiring network connection information of a terminal network;
according to some embodiments, the network connection information includes, but is not limited to, wireless-Fidelity (WIFI) connection or using a cellular data connection, etc. When the system restoration device acquires the system installation information corresponding to the target version based on the second version identifier, the system restoration device can acquire the network connection information of the system restoration device network. The network connection information acquired by the Q-system restoration device may be, for example, WIFI connection status information.
S307, when the network connection information indicates that the terminal network is in a connected state, the operating system is restored from the current version to the target version based on the system installation information.
According to some embodiments, when the system restoration device acquires the network connection information of the terminal network, the system restoration device may detect whether the network connection information indicates that the terminal network is in a connected state. When the system restoration device determines that the network connection information indicates that the terminal network is in a connected state, the system restoration device may restore the operating system from the current version to the target version based on the system installation information.
It is easy to understand that the network connection information acquired by the Q system restoration device may be, for example, WIFI connection status information. When the Q system restoration device receives the WIFI connection status information and the Q system restoration device determines that the WIFI connection status information indicates that the terminal network is in a connected state, the system restoration device may restore the operating system from the current version to the target version based on the system installation information.
According to some embodiments, when the system restoration device acquires the network connection information of the terminal network, the system restoration device may detect whether the network connection information indicates that the terminal network is in a connected state. When the system restoration device determines that the network connection information indicates that the terminal network is in an unconnected state, the system restoration device can monitor the network connection state. When the system restoring device monitors that the terminal network is in a connected state, the system restoring device can restore the operating system from the current version to the target version based on the system installation information.
In one or more embodiments of the present application, when the obtained first version identifier of the current version of the operating system is inconsistent with the second version identifier of the target version recorded in the system partition, and when the obtained version status information returned by the server indicates that the current version of the operating system is an unavailable version, system installation information corresponding to the target version is obtained based on the second version identifier, and restoration of the operating system is not required when the current version is the available version, so that a restoration step of the operating system can be reduced, and the accuracy of restoration of the operating system is improved. Secondly, the system restoring device sets the state of the input event as an input forbidden state, so that the influence of the input event on the restoration of the operating system can be reduced, and the success probability of the restoration of the operating system can be improved. In addition, when the acquired network connection information indicates that the terminal network is in a connected state, the system restoration device restores the operating system from the current version to the target version based on the system installation information, so that the influence of the terminal network on the restoration of the operating system can be reduced, and the success probability of the restoration of the operating system is improved.
Referring to fig. 10, a flow chart of a system restoration method is provided in an embodiment of the present application. As shown in fig. 10, the method includes the following steps S401 to S404.
S401, acquiring a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition;
s401, when the first version identifier and the second version identifier are inconsistent, acquiring system installation information corresponding to the target version based on the second version identifier;
s403, when a shutdown instruction is detected and the operating system is in a recovery state of recovering from the current version to the target version, recording the recovery state;
according to some embodiments, after the system restoration device obtains the system installation information corresponding to the target version based on the second version identifier, the system restoration device may restore the operating system from the current version to the target version based on the system installation information. When the system restore device detects a shutdown instruction and the system restore device determines that the operating system is in a restore state from the current version to the target version, the system restore device may record the restore state. The shutdown instruction includes, but is not limited to, a shutdown instruction input by a user, a shutdown instruction when the electric quantity of the system restoration device is low, and a shutdown instruction acquired by the system restoration device based on the restart instruction. The shutdown command input by the user includes, but is not limited to, a voice shutdown command input by the user, a click shutdown command, a timing shutdown command and the like.
It is easy to understand that the shutdown instruction detected by the Q-system reduction device may be, for example, a shutdown instruction generated by the Q-system reduction device when the Q-system reduction device detects that the electric quantity of the system reduction device meets the shutdown electric quantity. The Q system restoration device detects the shutdown instruction, and obtains that the operating system is in a restoration state from the current version to the target version, and the Q system restoration device may record the restoration state.
S404, when a start-up instruction is detected, the system installation information is continuously executed based on the restoring state, and the operating system is restored from the current version to the target version.
According to some embodiments, when a shutdown instruction is detected and the operating system is in a restore state from the current version to the target version, the system restore device may record the restore state. The restore state is used to represent the state that the operating system is in during the process of restoring from the current version to the target version. The restore status includes, but is not limited to, restore flag information or restore progress information. The restore flag bit indicates whether the operating system is restored from the current version to the target version. The restore progress information indicates a restore progress of the operating system from the current version to the target version, and may be, for example, information that the restore progress is 50%.
It is easy to understand that, after the system restoration device records the restoration state, when the system restoration device detects the power-on instruction, the system restoration device may continue to execute the restoration from the current version to the target version based on the system installation information based on the restoration state. The power-on instruction includes, but is not limited to, a power-on instruction input by a user, and a power-on instruction acquired when the system restoration device detects that the system restoration device is connected with the power supply system after the electric quantity is low and power-off.
Optionally, when the system restore device detects the power-on instruction and continuously executes the system installation information based on the restore state to restore the operating system from the current version to the target version, the restore state acquired by the system restore device may be, for example, a restore flag bit. The restore flag bit may indicate whether the operating system is restored from the current version to the target version. When the system restoration device determines that the restoration flag bit indicates that the operating system is not restored from the current version to the target version, the system restoration device may restore the operating system from the current version to the target version based on the system installation information, and the system restoration device may not record restoration progress information of the operating system before the system restoration device is turned off, so that operation loss of the system restoration device may be reduced.
Optionally, when the system restore device detects the power-on instruction and continuously executes the system installation information based on the restore state, and restores the operating system from the current version to the target version, the restore state acquired by the system restore device may be, for example, restore progress information. The restore progress information may represent a restore progress of the operating system from the current version to the target version when the system restore device receives the shutdown instruction. When the system restoration device detects a start-up instruction and acquires the restoration progress information, the system restoration device can continue to restore the operating system from the current version to the target version based on the system installation information and the restoration progress of the operating system from the current version to the target version before the system restoration device is powered off. For example, when the restoration progress of the operating system is 50% before the system restoration device is powered off, the system restoration device may continue to restore the operating system from the current version to the target version when the system restoration device detects the power-on instruction, that is, may increase the restoration progress from 50% to 100%. The system restoring device does not need to restore the operating system from the current version to the target version, so that the restoring steps of the operating system can be reduced, and the restoring efficiency of the operating system is improved.
It is easy to understand that the shutdown instruction detected by the Q-system reduction device may be, for example, a shutdown instruction generated by the Q-system reduction device when the Q-system reduction device detects that the electric quantity of the system reduction device meets the shutdown electric quantity. The Q system restoration device detects the shutdown instruction, and obtains that the operating system is in a restoration state from the current version to the target version, and the Q system restoration device may record the restoration state. The restore state may be, for example, a restore flag. When the Q system restoring device detects a starting instruction, the Q system restoring device can restore the operating system from the current version to the target version based on the system installation information when determining that the restoring flag bit indicates that the operating system is not restored from the current version to the target version.
In one or more embodiments of the present application, when the obtained first version identifier of the current version of the operating system is inconsistent with the second version identifier of the target version recorded in the system partition, system installation information corresponding to the target version is obtained based on the second version identifier, when a shutdown instruction is detected, and the operating system is in a recovery state of recovering from the current version to the target version, the recovery state is recorded, when a startup instruction is detected, the recovery state is continuously executed based on the system installation information, and the operating system is recovered from the current version to the target version, so that the condition that the recovery failure of the operating system is caused by shutdown of a system recovery device can be reduced, the success probability of recovery of the operating system can be improved, and the convenience of use of the operating system can be improved.
The system recovery device provided by the embodiment of the application will be described in detail with reference to fig. 11-13. It should be noted that, the system recovery device shown in fig. 11-13 is used to execute the method of the embodiment shown in fig. 3-10, and for convenience of explanation, only the portion relevant to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to the embodiment shown in fig. 3-10 of the present application.
Fig. 11 is a schematic structural diagram of a system recovery device according to an embodiment of the application. The system restore device 1100 may be implemented as all or a portion of a user terminal by software, hardware, or a combination of both.
According to some embodiments, the system restore device 1100 includes an identification acquisition unit 1101, an information acquisition unit 1102, and a version restore unit 1103, specifically configured to:
an identifier obtaining unit 1101, configured to obtain a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition;
an information obtaining unit 1102, configured to obtain, when the first version identifier and the second version identifier are inconsistent, system installation information corresponding to the target version based on the second version identifier;
The version restoring unit 1103 is configured to restore the operating system from the current version to the target version based on the system installation information.
According to some embodiments, fig. 12 illustrates a schematic structural diagram of a system restore device according to an embodiment of the present application. As shown in fig. 12, the system restore device 1100 includes a type confirmation unit 1104, where the type confirmation unit 1104 is further specifically configured to, before acquiring the first version identifier of the current version of the operating system and the second version identifier of the target version recorded in the system partition:
transmitting a terminal identifier to a server; the terminal identifier is used for indicating the server to confirm the terminal type corresponding to the terminal identifier;
acquiring type confirmation information returned by the server;
and when the type confirmation information indicates that the terminal type is the custom type, executing the step of acquiring a first version identifier corresponding to the current version of the operating system and a second version identifier corresponding to the target version recorded in the system partition.
According to some embodiments, the information obtaining unit 1102 includes a request generating subunit 1112 and an information obtaining subunit 1122, where the information obtaining unit 1102 is configured to, when obtaining system installation information corresponding to the target version based on the second version identifier:
A request generation subunit 1112, configured to generate a version acquisition request based on the second version identifier, and send the version acquisition request to the server; the version acquisition request is used for indicating the server to search the system installation information corresponding to the second version identification;
the information obtaining subunit 1122 is configured to obtain the system installation information returned by the server.
According to some embodiments, the information obtaining unit 1102 further includes a request sending subunit 1132, a status information obtaining subunit 1142, and an installation information obtaining subunit 1152, where the information obtaining unit 1102 is configured to, when the first version identifier and the second version identifier are inconsistent, obtain, based on the second version identifier, system installation information corresponding to the target version:
a request sending subunit 1132, configured to send a version status request to the server when the first version identifier and the second version identifier are inconsistent; the version state request is generated based on the terminal identification, and the version state request is used for indicating the server to acquire version state information corresponding to the terminal identification;
a status information obtaining subunit 1142, configured to obtain version status information returned by the server;
the installation information obtaining subunit 1152 is configured to obtain, when the version status information indicates that the current version of the operating system is an unavailable version, system installation information corresponding to the target version based on the second version identifier.
According to some embodiments, fig. 13 shows a schematic structural diagram of a system restore device according to an embodiment of the present application. As shown in fig. 13, the system restore apparatus 1100 includes a state setting unit 1105 for setting the state of the input event to the input prohibition state before restoring the operating system from the current version to the target version based on the system installation information.
According to some embodiments, the version restoration unit 1103 includes a connection information acquisition subunit 1113 and a version-addition atom unit 1123, where the version restoration unit 1103 is configured to, when restoring the operating system from the current version to the target version based on the system installation information:
a connection information acquisition sub-unit 1113 for acquiring network connection information of the terminal network;
and a version further atom unit 1123 for restoring the operating system from the current version to the target version based on the system installation information when the network connection information indicates that the terminal network is in the connected state.
According to some embodiments, the version restoration unit 1103 includes a state recording subunit 1133 and an instruction detection subunit 1143, where the version restoration unit 1103 is configured to, when restoring the operating system from the current version to the target version based on the system installation information:
A state recording subunit 1133, configured to record a restore state when the shutdown instruction is detected and the operating system is in a restore state from the current version to the target version;
the instruction detection subunit 1143 is configured to, when a power-on instruction is detected, continue to execute the system installation information based on the restore state, and restore the operating system from the current version to the target version.
In one or more embodiments of the present application, when the first version identifier of the current version of the operating system and the second version identifier of the target version recorded in the system partition are inconsistent, the operating system may be restored from the current version to the target version based on the system installation information corresponding to the target version obtained by the second version identifier. Therefore, when the current version of the operating system is not the target version, the system installation information of the target version can be obtained, the operating system is restored, the operating system can be restored to the target version without damaging the system installation information corresponding to the target version, the restoring efficiency of the operating system can be improved, and the using convenience of the system restoring device can be further improved.
Fig. 14 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 14, the terminal 1400 may include: at least one processor 1401, at least one network interface 1404, a user interface 1403, a memory 1405, at least one communication bus 1402.
Wherein a communication bus 1402 is used to enable connected communication among the components.
The user interface 1403 may include a Display screen (Display) and a GPS, among other things, and the optional user interface 1403 may also include a standard wired interface, a wireless interface.
The network interface 1404 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 1401 may include one or more processing cores. The processor 1401 connects various portions of the overall terminal 1400 using various interfaces and lines, and performs various functions of the terminal 1400 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1405, and invoking data stored in the memory 1405. Alternatively, the processor 1401 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1401 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 1401 and may be implemented solely on a single chip.
The Memory 1405 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1405 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 1405 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1405 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, and the like; the storage data area may store data or the like referred to in the above respective method embodiments. Memory 1405 may also optionally be at least one storage device located remotely from the processor 1401. As shown in fig. 14, an operating system, a network communication module, a user interface module, and an application program for system restoration may be included in the memory 1405 as one type of computer storage medium.
In the terminal 1400 shown in fig. 14, a user interface 1403 is mainly used as an interface for providing input for a user, and data input by the user is acquired; and processor 1401 may be configured to invoke the system restored application program stored in memory 1405 and specifically perform the following operations:
Acquiring a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition;
when the first version identifier is inconsistent with the second version identifier, acquiring system installation information corresponding to the target version based on the second version identifier;
and restoring the operating system from the current version to the target version based on the system installation information.
According to some embodiments, the processor 1401 is configured to, before executing the obtaining the first version identifier of the current version of the operating system and the second version identifier of the target version recorded in the system partition, further specifically perform the following operations:
transmitting a terminal identifier to a server; the terminal identifier is used for indicating the server to confirm the terminal type corresponding to the terminal identifier;
acquiring type confirmation information returned by the server;
and when the type confirmation information indicates that the terminal type is the custom type, executing the step of acquiring a first version identifier corresponding to the current version of the operating system and a second version identifier corresponding to the target version recorded in the system partition.
According to some embodiments, the processor 1401 is configured to, when acquiring the system installation information corresponding to the target version based on the second version identifier, specifically perform the following operations:
Generating a version acquisition request based on the second version identifier, and sending the version acquisition request to a server; the version acquisition request is used for indicating the server to search the system installation information corresponding to the second version identification;
and acquiring system installation information returned by the server.
According to some embodiments, the processor 1401 is configured to perform, when the first version identifier and the second version identifier are inconsistent, acquiring system installation information corresponding to the target version based on the second version identifier, specifically configured to perform the following operations:
when the first version identifier is inconsistent with the second version identifier, sending a version state request to a server; the version state request is generated based on the terminal identification, and the version state request is used for indicating the server to acquire version state information corresponding to the terminal identification;
version state information returned by the server is obtained;
and when the version state information indicates that the current version of the operating system is an unavailable version, acquiring system installation information corresponding to the target version based on the second version identification.
According to some embodiments, the processor 1401 is configured to perform the following operations, before restoring the operating system from the current version to the target version based on the system installation information:
The state of the input event is set to the inhibit input state.
According to some embodiments, the processor 1401 is configured to perform the following operations when restoring the operating system from the current version to the target version based on the system installation information:
acquiring network connection information of a terminal network;
and when the network connection information indicates that the terminal network is in a connected state, the operating system is restored from the current version to the target version based on the system installation information.
According to some embodiments, the processor 1401 is configured to perform the following operations when restoring the operating system from the current version to the target version based on the system installation information:
recording a restore state when a shutdown instruction is detected and the operating system is in the restore state from the current version to the target version;
and when the starting instruction is detected, continuing to execute the system installation information based on the restoring state, and restoring the operating system from the current version to the target version.
In one or more embodiments of the present application, when the first version identifier of the current version of the operating system and the second version identifier of the target version recorded in the system partition are inconsistent, the operating system may be restored from the current version to the target version based on the system installation information corresponding to the target version obtained by the second version identifier. Therefore, when the current version of the operating system is not the target version, the system installation information of the target version can be obtained, the operating system is restored, the operating system can be restored to the target version without damaging the system installation information corresponding to the target version, the restoring efficiency of the operating system can be improved, and the using convenience of the operating system can be further improved.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method. The computer readable storage medium may include, among other things, any type of disk including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform part or all of the steps of any one of the system restore methods described in the method embodiments above.
It will be clear to a person skilled in the art that the solution according to the application can be implemented by means of software and/or hardware. "Unit" and "module" in this specification refer to software and/or hardware capable of performing a specific function, either alone or in combination with other components, such as Field programmable gate arrays (Field-ProgrammaBLE Gate Array, FPGAs), integrated circuits (Integrated Circuit, ICs), etc.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, such as the division of the units, merely a logical function division, and there may be additional manners of dividing the actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on this understanding, the technical solution of the present application may be embodied essentially or partly in the form of a software product, or all or part of the technical solution, which is stored in a memory, and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be performed by hardware associated with a program that is stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing is merely exemplary embodiments of the present disclosure and is not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (9)

1. A system restore method, the method comprising:
Transmitting a terminal identifier to a server; the terminal identifier is used for indicating the server to confirm the terminal type corresponding to the terminal identifier;
acquiring type confirmation information returned by the server;
when the type confirmation information indicates that the terminal type is a customized type, acquiring a first version identifier of a current version of an operating system and a second version identifier of a target version recorded in a system partition, wherein the customized type indicates that the terminal is controlled and terminal information cannot be changed;
when the first version identifier is inconsistent with the second version identifier, acquiring system installation information corresponding to the target version based on the second version identifier;
and restoring the operating system from the current version to the target version based on the system installation information.
2. The method of claim 1, wherein the obtaining system installation information corresponding to the target version based on the second version identifier comprises:
generating a version acquisition request based on the second version identifier, and sending the version acquisition request to a server; the version acquisition request is used for indicating the server to search system installation information corresponding to the second version identifier;
And acquiring the system installation information returned by the server.
3. The method of claim 1, wherein the obtaining system installation information corresponding to the target version based on the second version identifier when the first version identifier and the second version identifier are inconsistent comprises:
when the first version identifier is inconsistent with the second version identifier, sending a version state request to a server; the version state request is generated based on a terminal identifier, and the version state request is used for indicating the server to acquire version state information corresponding to the terminal identifier;
the version state information returned by the server is obtained;
and when the version state information indicates that the current version of the operating system is an unavailable version, acquiring system installation information corresponding to the target version based on the second version identifier.
4. The method of claim 1, wherein prior to restoring the operating system from the current version to the target version based on the system installation information, further comprising:
the state of the input event is set to the inhibit input state.
5. The method of claim 1, wherein the restoring the operating system from the current version to the target version based on the system installation information comprises:
Acquiring network connection information of a terminal network;
and when the network connection information indicates that the terminal network is in a connected state, restoring the operating system from the current version to the target version based on the system installation information.
6. The method of claim 1, wherein the restoring the operating system from the current version to the target version based on the system installation information comprises:
recording a restore state when a shutdown instruction is detected and the operating system is in the restore state restored from the current version to the target version;
and when a starting instruction is detected, continuing to execute the operation system based on the system installation information based on the restoring state, and restoring the operating system from the current version to the target version.
7. A system restore device, the device comprising:
the type confirming unit is used for sending the terminal identification to the server; the terminal identifier is used for indicating the server to confirm the terminal type corresponding to the terminal identifier; acquiring type confirmation information returned by the server;
the identification acquisition unit is used for acquiring a first version identification of a current version of an operating system and a second version identification of a target version recorded in a system partition when the type confirmation information indicates that the terminal type is a customized type, wherein the customized type indicates that the terminal is controlled and terminal information cannot be changed;
The information acquisition unit is used for acquiring system installation information corresponding to the target version based on the second version identifier when the first version identifier is inconsistent with the second version identifier;
and the version restoring unit is used for restoring the operating system from the current version to the target version based on the system installation information.
8. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-6 when executing the computer program.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method of any of the preceding claims 1-6.
CN202011446107.0A 2020-12-11 2020-12-11 System restoration method, device, terminal and storage medium Active CN112486733B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011446107.0A CN112486733B (en) 2020-12-11 2020-12-11 System restoration method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011446107.0A CN112486733B (en) 2020-12-11 2020-12-11 System restoration method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112486733A CN112486733A (en) 2021-03-12
CN112486733B true CN112486733B (en) 2023-08-18

Family

ID=74941254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011446107.0A Active CN112486733B (en) 2020-12-11 2020-12-11 System restoration method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112486733B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254060B (en) * 2021-05-31 2022-10-21 紫光展讯通信(惠州)有限公司 Control method, device and equipment for terminal shipment software version
CN113806139B (en) * 2021-06-15 2023-04-07 荣耀终端有限公司 Operating system recovery method, operating system recovery device, storage medium and computer program product

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101335641A (en) * 2007-06-29 2008-12-31 华为技术有限公司 Method, apparatus and system for updating apparatus
CN101635917A (en) * 2009-08-24 2010-01-27 中兴通讯股份有限公司 Method and system for upgrading software of mobile terminal as well as mobile terminal and server
WO2017016139A1 (en) * 2015-07-28 2017-02-02 安一恒通(北京)科技有限公司 System recovery method and apparatus
CN107656740A (en) * 2016-07-25 2018-02-02 中兴通讯股份有限公司 A kind of customized version switching method, device and mobile terminal
CN107783857A (en) * 2017-10-31 2018-03-09 珠海市魅族科技有限公司 A kind of abnormal restorative procedure and device, computer installation, readable storage medium storing program for executing
CN109032661A (en) * 2018-08-07 2018-12-18 武汉普利商用机器有限公司 System version method for customizing, device and intelligent terminal
CN110515777A (en) * 2019-08-30 2019-11-29 苏州浪潮智能科技有限公司 A kind of restoring method, the apparatus and system of ARM server operating system
CN111124764A (en) * 2019-12-30 2020-05-08 惠州视维新技术有限公司 System restoring method, smart television and computer storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10838827B2 (en) * 2015-09-16 2020-11-17 Richard Banister System and method for time parameter based database restoration

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101335641A (en) * 2007-06-29 2008-12-31 华为技术有限公司 Method, apparatus and system for updating apparatus
CN101635917A (en) * 2009-08-24 2010-01-27 中兴通讯股份有限公司 Method and system for upgrading software of mobile terminal as well as mobile terminal and server
WO2017016139A1 (en) * 2015-07-28 2017-02-02 安一恒通(北京)科技有限公司 System recovery method and apparatus
CN107656740A (en) * 2016-07-25 2018-02-02 中兴通讯股份有限公司 A kind of customized version switching method, device and mobile terminal
CN107783857A (en) * 2017-10-31 2018-03-09 珠海市魅族科技有限公司 A kind of abnormal restorative procedure and device, computer installation, readable storage medium storing program for executing
CN109032661A (en) * 2018-08-07 2018-12-18 武汉普利商用机器有限公司 System version method for customizing, device and intelligent terminal
CN110515777A (en) * 2019-08-30 2019-11-29 苏州浪潮智能科技有限公司 A kind of restoring method, the apparatus and system of ARM server operating system
CN111124764A (en) * 2019-12-30 2020-05-08 惠州视维新技术有限公司 System restoring method, smart television and computer storage medium

Also Published As

Publication number Publication date
CN112486733A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN107273160A (en) A kind of method and device of edition upgrading
CN112486733B (en) System restoration method, device, terminal and storage medium
EP2660761A1 (en) Timestamp management method for data synchronization and terminal therefor
CN105224421B (en) Data backup method and device and electronic equipment
WO2024078218A1 (en) System booting method and electronic device
CN111708557A (en) Method, device and storage medium for updating configuration file
CN112148337A (en) Firmware upgrading method and device
CN108762983B (en) Multimedia data recovery method and device
CN102883017A (en) Terminal and terminal managing method
CN102880478A (en) Software updating method
CN107396185B (en) Upgrading method and system
CN111930565B (en) Process fault self-healing method, device and equipment for components in distributed management system
CN112632647A (en) Electronic equipment information anti-theft method, related device and computer storage medium
CN112463199A (en) System upgrading method and terminal
CN110109707B (en) Terminal starting method and device and terminal
CN114185576A (en) Embedded equipment upgrading method and device, computer equipment and storage medium
CN105700895A (en) Adaptation method for terminal system, terminal and system server
CN111736859B (en) Version updating method of operating system, server and terminal
CN113127029A (en) Firmware updating method and device, electronic equipment and storage medium
CN103488503B (en) Oftware updating method and device
CN112817796A (en) Board setting method, board resetting method, device, equipment and storage medium
CN112464095B (en) Message pushing method, device, terminal and storage medium
CN110597536A (en) Software upgrading method, system and terminal equipment
CN112631639B (en) Patch code adding method, device, equipment and computer readable storage medium
CN107968880B (en) Information management method, mobile terminal, and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant