CN113835837B - Factory setting restoration method and device based on container system and electronic equipment - Google Patents

Factory setting restoration method and device based on container system and electronic equipment Download PDF

Info

Publication number
CN113835837B
CN113835837B CN202111129534.0A CN202111129534A CN113835837B CN 113835837 B CN113835837 B CN 113835837B CN 202111129534 A CN202111129534 A CN 202111129534A CN 113835837 B CN113835837 B CN 113835837B
Authority
CN
China
Prior art keywords
container
container system
host
partition
data
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
CN202111129534.0A
Other languages
Chinese (zh)
Other versions
CN113835837A (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.)
Ecarx Hubei Tech Co Ltd
Original Assignee
Ecarx Hubei Tech Co 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 Ecarx Hubei Tech Co Ltd filed Critical Ecarx Hubei Tech Co Ltd
Priority to CN202111129534.0A priority Critical patent/CN113835837B/en
Publication of CN113835837A publication Critical patent/CN113835837A/en
Application granted granted Critical
Publication of CN113835837B publication Critical patent/CN113835837B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The embodiment of the application provides a factory setting restoration method and device based on a container system and electronic equipment, wherein the factory setting restoration method based on the container system comprises the following steps: when one of the first container systems sends a first instruction to the host system is detected, the first instruction transmitted by the first container system to the host system is intercepted, and the host system and at least two container systems are in an operation state; if the first instruction is used for indicating the host machine system to restart so as to restore factory setting of the first container system, controlling the first container system to stop running and erasing target data in a target partition of the first container system; the first container system is restarted. In the application, when one container system is restored to the factory setting, the normal operation of other container systems is not affected.

Description

Factory setting restoration method and device based on container system and electronic equipment
Technical Field
The present application relates to the field of vehicle systems, and in particular, to a method and an apparatus for restoring factory settings based on a container system, and an electronic device.
Background
At present, the method for restoring factory settings of the android system is that after a user-level (init) process receives an operation of triggering the restoration of factory settings by a user, corresponding electronic equipment is restarted, and the android system is guided to load a corresponding restoration image file (recovery. Img). And after the kernel corresponding to the android system is started, allowing the corresponding recovery application program to run, and formatting the disk of the electronic equipment. And then the electronic equipment is required to be restarted again, the android system is guided to load boot. Img image files, and then each application program on the android system is operated to finish factory setting recovery of the android system.
The method for restoring the factory setting has the problems that the time for restoring the factory setting is long, and the efficiency for restoring the factory setting is low.
Disclosure of Invention
The application provides a factory setting restoration method and device based on a container system and electronic equipment. The method is used for solving the problems that the existing factory setting recovery time is long, and the factory setting recovery efficiency is low.
In a first aspect, an embodiment of the present application provides a factory-restoring method based on a container system, which is applied to an electronic device, where the electronic device includes a host system and at least two container systems, and the factory-restoring method based on the container systems includes: when one of the first container systems sends a first instruction to the host system is detected, the first instruction transmitted by the first container system to the host system is intercepted, and the host system and at least two container systems are in an operation state; if the first instruction is used for indicating the host machine system to restart so as to restore factory setting of the first container system, controlling the first container system to stop running and erasing target data in a target partition of the first container system; the first container system is restarted.
In one embodiment of the application, intercepting a first instruction transmitted by a first container system to a host system comprises: establishing inter-process communication between each container system and a host system; and intercepting the first instruction by adopting inter-process communication corresponding to the first container system.
In one embodiment of the present application, the container system-based factory reset method further comprises: if the first instruction is used for indicating to restart the first container system, after the first container system is restarted, the inter-process communication between the first container system and the host machine system is reestablished, wherein when the first container system stops running, the inter-process communication between the first container system and the host machine system is disconnected.
In one embodiment of the application, erasing target data in a target partition of a first container system includes: acquiring first data of each partition of a first container system and second data corresponding to an interactive interface; and erasing target data belonging to the target partition in the first data and the second data.
In one embodiment of the present application, the factory setting restoration method based on the container system further comprises: when target data in a target partition of the first container system is erased, prompt information is sent to a display interface corresponding to the first container system, and the prompt information is used for indicating that the erasing progress is displayed on the display interface.
In one embodiment of the application, at least two container systems comprise: and the first container system corresponding to the central control and the second container system corresponding to the instrument are controlled.
In one embodiment of the present application, before intercepting the first instruction transmitted by the first container system to the host system, the method further includes: when the power-on of the electronic equipment is detected, a host machine system is operated, and container environments corresponding to at least two container systems are created; starting a second container system based on the container environment, and running an application program corresponding to the second container system, wherein the second container system is other container systems except the first container system in at least two container systems; the first container system is started.
In a second aspect, an embodiment of the present application provides a factory-restoring device based on a container system, which is applied to an electronic device, where the electronic device includes a host system and at least two container systems, and the factory-restoring device based on the container systems includes:
the interception module is used for intercepting a first instruction transmitted by a first container system to a host machine system when detecting that the first container system transmits the first instruction to the host machine system, and the host machine system and at least two container systems are in an operation state;
the erasing module is used for controlling the first container system to stop running and erasing target data in a target partition of the first container system if the first instruction is used for indicating the host system to restart to restore factory setting of the first container system;
and the starting module is used for restarting the first container system.
In one embodiment of the present application, the interception module is specifically configured to: establishing inter-process communication between each container system and a host system; and intercepting the first instruction by adopting inter-process communication corresponding to the first container system.
In one embodiment of the present application, the factory-reset-based device for container system further comprises: and the restarting module is used for restarting the first container system if the first instruction is used for indicating the restarting of the first container system, and reestablishing the inter-process communication between the first container system and the host machine system after the restarting of the first container system, wherein the inter-process communication between the first container system and the host machine system is disconnected when the first container system stops running.
In one embodiment of the application, the erase module is specifically configured to: acquiring first data of each partition of a first container system and second data corresponding to an interactive interface; and erasing target data belonging to the target partition in the first data and the second data.
In one embodiment of the present application, the factory-reset-based device for container system further comprises: the sending module is used for sending prompt information to a display interface corresponding to the first container system when the target data in the target partition of the first container system is erased, wherein the prompt information is used for indicating the erasure progress to be displayed on the display interface.
In one embodiment of the application, at least two container systems comprise: and the first container system corresponding to the central control and the second container system corresponding to the instrument are controlled.
In one embodiment of the present application, the factory-reset-based device for container system further comprises: the system comprises a creation module, an operation module and an initial starting module;
the creation module is used for operating the host machine system when the electronic equipment is detected to be electrified and creating container environments corresponding to at least two container systems;
the operation module is used for starting a second container system based on the container environment and operating an application program corresponding to the second container system, wherein the second container system is other container systems except the first container system in at least two container systems;
and the initial starting module is used for starting the first container system.
In a third aspect, an embodiment of the present application provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the electronic device to perform the container system based factory reset method of any one of the first aspects of the application.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the container system-based factory-restoration method of any one of the first aspects of the present application.
The embodiment of the application provides a factory setting restoration method and device based on a container system and electronic equipment, wherein the factory setting restoration method based on the container system comprises the following steps: when one of the first container systems sends a first instruction to the host system is detected, the first instruction transmitted by the first container system to the host system is intercepted, and the host system and at least two container systems are in an operation state; if the first instruction is used for indicating the host machine system to restart so as to restore factory setting of the first container system, controlling the first container system to stop running and erasing target data in a target partition of the first container system; the first container system is restarted. In the application, when the first container system is restored to the factory setting, the first instruction for indicating the host system to restart is intercepted, so that the host system cannot restart, and the time consumed by restoring the factory setting of the first container is further reduced. And because the host machine system can not be restarted, other container systems except the first container system can still normally operate, and further, when one container system is restored to factory setting, the normal operation of the other container systems can not be influenced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic view of a scenario of a factory setting restoration method based on a container system according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps of a method for restoring factory settings based on a container system according to an embodiment of the present application;
FIG. 3 is a schematic view of another factory-restoration setting method based on a container system according to an embodiment of the present application;
FIG. 4 is a block diagram of a factory reset device based on a container system according to an embodiment of the present application;
fig. 5 is a schematic hardware structure of an electronic device according to an embodiment of the application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. 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.
The terms first, second, third and the like in the description and in the claims and in the above drawings, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein.
Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a schematic view of a scenario of a container system-based factory-restoration setting method according to an embodiment of the present application, and as shown in fig. 1, an electronic device 11 includes: a host system 111 and at least two container systems (container system 112 and container system 113 in the figure). Also included in fig. 1 are first display 12 and second display 13. Wherein the first display 12 is controlled to be displayed by the container system 112 and the second display 13 is controlled to be displayed by the container system 113. In the automotive field, the container system 112 is a central control system, and corresponding to the first display screen 12, may display audio and video applications. The container system 113 is an instrument system, and the corresponding second display 13 can display instrument data corresponding to the automobile.
In the above application scenario, when the factory setting needs to be restored to the container system 112, the whole electronic device 11 is generally restarted and then subjected to related operations for restoring the factory setting, and then the whole electronic device 11 is restarted to complete the restoration of the factory setting of the container system 112. The electronic device is restarted twice, which is time-consuming, and the restarting of the electronic device requires that the container system 113 is also restarted, so that the normal operation of the automobile is affected when the container system 113 is an instrument system of the automobile.
Based on the problems of the application scene, the application provides the factory setting restoration method based on the container system, which can restore factory setting to the first container system after intercepting the first instruction indicating the host system to restart, can not influence the normal operation of other container systems, and has short time consumption and high efficiency.
The technical scheme of the application is described in detail through specific embodiments. It should be noted that the following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a flowchart of a method for restoring factory settings based on a container system according to an embodiment of the present application. The embodiment of the application provides a factory-restoration setting method based on a container system, which is applied to electronic equipment, wherein the electronic equipment comprises a host system and at least two container systems, and the factory-restoration setting method based on the container systems specifically comprises the following steps:
s201, when one of the first container systems is detected to send a first instruction to the host system, the first instruction transmitted by the first container system to the host system is intercepted.
In an embodiment of the present application, the electronic device may have a host with at least two containers. The host system is a host system, and the container system is a virtual machine system. The term "host" derives from the content of the host system in which the container system is running. The container system can run inside the container, and the container system can be a Linux system or an android system. The containers are isolated from each other, the application sets of lightweight components or the application sets of the whole host system are arranged in the containers, files on which processes running the application sets depend are provided by the container mirror image, and then the application sets are run on an isolated container system which is run on the host system.
Illustratively, the first container system runs a corresponding set of applications for automotive center control, the set of applications comprising: video, audio, and network, etc. The second container system runs an application set corresponding to the automobile instrument, and the application set comprises: fuel oil indication, electronic throttle indication, alarm indication, front and rear fog lamp indication and the like.
Wherein S201 is performed while the host system and the at least two container systems are in an operational state. The host system and at least two container systems are in an operating state, which means that the application sets corresponding to the two container systems work normally. For example, the video, audio, network, etc. corresponding to the first container system are operating normally. And the fuel oil indication, the electronic throttle indication, the alarm indication, the front fog lamp indication and the rear fog lamp indication corresponding to the second container system work normally.
Specifically, the host system may intercept a first instruction transmitted by any container system to the host system. Wherein the first instruction comprises: a container system restart instruction or an instruction to restart the host system to restore the factory settings of the first container system.
The method comprises the steps that a user triggers an interface of a display screen corresponding to a first container system, the first container system receives trigger operation corresponding to the user, the trigger operation is judged to be used for indicating the first container system to restore factory setting, and the first container system adopts an init process and sends a host restarting signal to a host system so as to restart the host system.
In addition, the triggering operation is judged to be used for indicating the first container system to restart, the first container system also adopts an init process, and a first container system restart signal is sent to the host machine system so as to restart the first container system.
In the embodiment of the application, the host can be prevented from restarting by intercepting the first instruction, so that the time consumption is reduced, and the normal operation of other container systems except the first container system is prevented from being influenced.
S202, if the first instruction is used for indicating the host machine system to restart to restore factory setting of the first container system, controlling the first container system to stop running and erasing target data in a target partition of the first container system.
If the first instruction is sent by the first container system, the host system is instructed to restart to restore the factory setting of the first container system. And controlling the first container system to stop running so as to carry out related operations of restoring the factory settings subsequently.
If the first container system is not stopped, the service sets such as video, audio, network and the like corresponding to the running application sets of the first container system collide with the subsequent formatting of the disk data corresponding to the first container system, so that the risk of system running can occur.
In an embodiment of the present application, the target partition includes: data (data) partitions and cache (cache) partitions. In addition, the target partition may also be a user-defined partition.
S203, restarting the first container system.
Step S202 is executed to stop the operation of the first container system and erase the target data, and step S203 is executed to restart the first container system to complete the restoration of the first container system.
Specifically, after the first container system is restarted, the first container system operates each application set corresponding to the first container system, and factory setting restoration of the first container system is completed.
In the embodiment of the application, as the data of the target partition of the first container system is erased, certain difference exists between the content of the application set operated by the first container system when the first container system is started currently and the content of the application set operated before the factory setting is restored.
In the embodiment of the application, when the first container system is restored to the factory setting, the second container system always operates normally. The first container system is restored to the factory setting, the operation of the second container system is not affected, and the host computer system is not required to be restarted, so that the effects of short time consumption and high efficiency are achieved.
Referring to fig. 3, a flowchart of steps of a factory reset method based on a container system according to another embodiment of the present application specifically includes the following steps:
and S301, when the electronic equipment is detected to be powered on, the host machine system is operated, and container environments corresponding to at least two container systems are created.
Wherein at least two of the container systems comprise: and the first container system corresponding to the central control and the second container system corresponding to the instrument are controlled. The first container system and the second container system may be run on a single vehicle-machine chip of the vehicle.
Specifically, after the electronic device is powered on, a host image (host. Img) file is loaded, a Linux kernel (kernel) binary file in the host image file and a root file system of a host system are analyzed, and the root file system is copied to a specified memory. After the Linux kernel is initialized, the host system operates normally, and a container environment (virtualized environment) of LXC (Linux containers) is ready for starting each container system (e.g., a first container system and a second container system).
Further, the host system is defined as an operating system running on physical hardware in the LXC virtualized environment. A container system is defined as a virtual machine operating system running on a container.
S302, starting a second container system based on the container environment, and running an application program corresponding to the second container system.
Wherein the second container system is a further container system of the at least two container systems than the first container system. The second container system can be a container system corresponding to the instrument, and the second container system is started preferentially, so that the real-time requirement of ignition starting of the automobile can be ensured.
If the first container system and the second container system are container systems corresponding to other functions, it is possible to determine whether to preferentially activate the first container system or the second container system according to the need, which is not limited herein.
Further, the application program corresponding to the second container system includes: and the application programs correspond to services such as fuel oil indication, electronic throttle indication, alarm indication, front and rear fog lamp indication and the like. In the embodiment of the application, the application program corresponding to the second container system normally operates in the whole step flow of the application. The steps of the embodiment of the application do not influence the normal operation of the application program corresponding to the second container system.
S303, starting the first container system.
After the first container system is started, each application program corresponding to the first container system can be operated. Such as audio, video, etc.
In the embodiment of the application, a host system is adopted to start each container system.
S304, establishing inter-process communication between each container system and the host system.
After the host system of the automobile starts each container system, an event monitoring service of each container system is created, and then a bridge for communication between the host system and the processes of each container system is established. Each container system has its own corresponding inter-process communication.
Specifically, inter-process communication (IPC, inter-Process Communication) refers to the propagation or exchange of information between different processes. Information may be exchanged between the host system and the respective container systems.
S305, intercepting a first instruction by adopting inter-process communication corresponding to the first container system.
In the embodiment of the application, each container system has its own corresponding inter-process communication, so that the first container system corresponds to the inter-process communication with the host system, and the second container system also corresponds to the inter-process communication with the host system.
The method comprises the steps that a user triggers an interface of a display screen corresponding to a first container system, the first container system receives triggering operation corresponding to the user, and a first instruction is sent to a host system. The host computer system waits for the first container system to be actively connected with the host computer system and report the event corresponding to the first instruction. When no event is reported, the inter-process communication of the first container system is in a suspended state.
S306, determining whether the first instruction is to instruct the host system to restart for restoration of the first container system.
If yes, S307 is executed, and if not, S311 is executed. And if the first instruction does not instruct the host system to restart to restore the factory setting, the first instruction is used for instructing to restart the first container system.
Specifically, the automobile host system analyzes the first instruction according to the interprocess communication message, and if the first instruction indicates that the host system is restarted to perform factory restoration setting of the first container system, S307 is executed.
S307, controlling the first container system to stop running, and acquiring first data of each partition of the first container system and second data corresponding to the interactive interface.
Wherein each partition includes: and the second data corresponding to the interactive interface comprises Chinese fonts of a recovery application man-machine interactive interface.
Specifically, the host system runs a recovery (recovery) application program, and the recovery (recovery) application program is adopted to analyze first data of each partition of the first container system and second data corresponding to the interactive interface.
S308, erasing target data belonging to a target partition in the first data and the second data.
The target partition is a data partition and a cache partition, and can also be other user-defined partitions. The recovery application determines target data belonging to the target partition from the first data and the second data.
The recovery application program executes a data disk erasing task and erases data in the data partition, the cache partition and other custom partitions.
S309, when target data in a target partition of the first container system is erased, prompt information is sent to a display interface corresponding to the first container system.
Further, the prompt message is used for indicating to display the erasing progress on the display interface. And the Recovery application program can display the current erasing progress on the display screen corresponding to the first container system while erasing the target data. Specifically, the erasing progress can be displayed in an animation mode so as to prompt the user that the first container system is erasing the target data of the disk.
S310, restarting the first container system.
And restarting the first container system, and running each application program corresponding to the first container system.
S311, after the first container system is restarted, the inter-process communication between the first container system and the host system is reestablished.
Wherein when the first container system stops operating, the inter-process communication between the first container system and the host system is disconnected. Therefore, if the first instruction indicates to restart the first container system, the first container system needs to be disconnected first and then started, and the first container system after restarting needs to reestablish the inter-process communication between the first container system and the host system.
In addition, after step S311, S305 is performed to form a loop.
Further, in the whole process of the step, the display screen of the instrument corresponding to the second container system is always in a normal display state. The central control display screen corresponding to the first container system is in a normal display state in S303 to S306, in a stop display state in S307 to S308, in a erase progress in S309, and in a normal display state in S310.
The embodiment of the application provides a factory setting restoration method based on a container system, when a first container system restores factory setting, a first instruction for indicating a host system to restart is intercepted, so that the host system cannot restart, and the time consumed by restoring the factory setting of the first container is further reduced. And because the host machine system can not restart, other container systems except the first container system can still normally operate, and further normal operation of other container systems can not be influenced when one container system is restored to factory setting.
Fig. 4 is a block diagram illustrating a factory reset apparatus 40 based on a container system according to an embodiment of the present application. The factory setting restoration device based on the container system is applied to electronic equipment, the electronic equipment comprises a host system and at least two container systems, as shown in fig. 4, the factory setting restoration device 40 based on the container system provided by the embodiment of the application comprises:
the interception module 41 is configured to intercept, when detecting that one of the first container systems sends a first instruction to the host system, the first instruction transmitted by the first container system to the host system, where the host system and at least two container systems are in an operation state;
the erasing module 42 is configured to control the first container system to stop running and erase target data in a target partition of the first container system if the first instruction is used to instruct the host system to restart for restoring the factory setting of the first container system;
a start module 43 for restarting the first container system.
In one embodiment of the application, the interception module 41 is specifically configured to: establishing inter-process communication between each container system and a host system; and intercepting the first instruction by adopting inter-process communication corresponding to the first container system.
In one embodiment of the present application, the factory-reset-based device for container system further comprises: a restart module (not shown) for reestablishing inter-process communication between the first container system and the host system after the first container system is restarted if the first instruction is used to instruct to restart the first container system, wherein the inter-process communication between the first container system and the host system is disconnected when the first container system stops running.
The erase module 42 is specifically configured to: acquiring first data of each partition of a first container system and second data corresponding to an interactive interface; and erasing target data belonging to the target partition in the first data and the second data.
In one embodiment of the present application, the container system based factory reset apparatus 40 further comprises: and the sending module (not shown) is used for sending prompt information to the display interface corresponding to the first container system when the target data in the target partition of the first container system is erased, wherein the prompt information is used for indicating the erasure progress to be displayed on the display interface.
In one embodiment of the application, at least two container systems comprise: and the first container system corresponding to the central control and the second container system corresponding to the instrument are controlled.
In one embodiment of the present application, the container system based factory reset apparatus 40 further comprises: a creation module (not shown), a run module (not shown), and an initial start-up module (not shown);
the creation module is used for operating the host machine system when the electronic equipment is detected to be electrified and creating container environments corresponding to at least two container systems;
the operation module is used for starting a second container system based on the container environment and operating an application program corresponding to the second container system, wherein the second container system is other container systems except the first container system in at least two container systems;
and the initial starting module is used for starting the first container system.
The factory setting restoration device based on the container system provided by the embodiment of the application is used for executing the technical scheme in the method embodiment corresponding to fig. 2 or fig. 3, and the implementation principle and the technical effect are similar, and are not repeated here.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device (a first electronic device or a second electronic device) according to an embodiment of the present application. As shown in fig. 5, the electronic device 50 of the embodiment of the present application may include: at least one processor 51 (only one processor is shown in fig. 5); and a memory 52 communicatively coupled to the at least one processor. The memory 52 stores instructions executable by the at least one processor 51, and the instructions are executed by the at least one processor 51 to enable the electronic device 50 to perform the technical solutions of any of the method embodiments described above.
Alternatively, the memory 52 may be separate or integrated with the processor 51.
When the memory 52 is a device separate from the processor 51, the electronic device 50 further includes: a bus 53 for connecting the memory 52 and the processor 51.
The electronic device provided by the embodiment of the application can execute the technical scheme of any of the method embodiments, and the implementation principle and the technical effect are similar, and are not repeated here.
The embodiment of the application also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program is used for realizing the technical scheme in any one of the method embodiments when being executed by a processor.
Embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the technical solution in any of the foregoing method embodiments.
The embodiment of the application also provides a chip, which comprises: the processing module and the communication interface, the processing module can execute the technical scheme in the embodiment of the method.
Further, the chip further includes a storage module (e.g., a memory), where the storage module is configured to store the instructions, and the processing module is configured to execute the instructions stored in the storage module, and execution of the instructions stored in the storage module causes the processing module to execute the technical solution in the foregoing method embodiment.
It should be understood that the above processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). The processor and the storage medium may reside as discrete components in an electronic device.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (10)

1. A factory-restoration setting method based on a container system, which is characterized by being applied to an electronic device, wherein the electronic device comprises a host system and at least two container systems, and the factory-restoration setting method based on the container systems comprises the following steps:
when one of the first container systems is detected to send a first instruction to the host system, intercepting the first instruction transmitted by the first container system to the host system, wherein the host system and the at least two container systems are in an operation state;
if the first instruction is used for indicating the host machine system to restart so as to restore factory setting of the first container system, controlling the first container system to stop running and erasing target data in a target partition of the first container system; the target partition comprises a data partition, a cache partition and other user-defined partitions;
restarting the first container system.
2. The container system-based factory reset method of claim 1, wherein said intercepting a first instruction transmitted by said first container system to said host system comprises:
establishing inter-process communication between each of the container systems and the host system;
intercepting the first instruction by adopting inter-process communication corresponding to the first container system.
3. The container system-based factory reset method of claim 2, further comprising:
and if the first instruction is used for indicating to restart the first container system, reestablishing the inter-process communication between the first container system and the host machine system after the first container system is restarted, wherein when the first container system stops running, the inter-process communication between the first container system and the host machine system is disconnected.
4. The container system-based factory reset method of claim 1, wherein said erasing target data in a target partition of said first container system comprises:
acquiring first data of each partition of the first container system and second data corresponding to an interactive interface; the first data of each partition includes: data in a data partition, a cache partition, and a misc partition; the second data corresponding to the interactive interface comprises Chinese fonts of the man-machine interactive interface of the recovery application program;
and erasing target data belonging to the target partition in the first data and the second data.
5. The container system-based factory reset method of any one of claims 1 to 4, further comprising:
and when target data in a target partition of the first container system is erased, sending prompt information to a display interface corresponding to the first container system, wherein the prompt information is used for indicating that the erasing progress is displayed on the display interface.
6. The container system-based factory reset method of any one of claims 1 to 4, wherein the at least two container systems comprise: and the first container system corresponding to the central control and the second container system corresponding to the instrument are controlled.
7. The container system-based factory reset method of any one of claims 1-4, wherein prior to intercepting the first instruction transmitted by the first container system to the host system, further comprising:
when the electronic equipment is detected to be electrified, the host machine system is operated, and a container environment corresponding to the at least two container systems is created;
starting a second container system based on the container environment, and running an application program corresponding to the second container system, wherein the second container system is other container systems except the first container system in the at least two container systems;
the first container system is started.
8. A container system-based factory-restoration setting apparatus, characterized by being applied to an electronic device, the electronic device including a host system and at least two container systems, the container system-based factory-restoration setting apparatus comprising:
the interception module is used for intercepting a first instruction transmitted by a first container system to the host system when detecting that the first container system transmits the first instruction to the host system, and the host system and the at least two container systems are in an operation state;
the erasing module is used for controlling the first container system to stop running and erasing target data in a target partition of the first container system if the first instruction is used for indicating the host machine system to restart to restore factory setting of the first container system; the target partition comprises a data partition, a cache partition and other user-defined partitions;
and the starting module is used for restarting the first container system.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the electronic device to perform the container system based factory reset method of any one of claims 1 to 7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the container system based factory reset method of any one of claims 1 to 7.
CN202111129534.0A 2021-09-26 2021-09-26 Factory setting restoration method and device based on container system and electronic equipment Active CN113835837B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111129534.0A CN113835837B (en) 2021-09-26 2021-09-26 Factory setting restoration method and device based on container system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111129534.0A CN113835837B (en) 2021-09-26 2021-09-26 Factory setting restoration method and device based on container system and electronic equipment

Publications (2)

Publication Number Publication Date
CN113835837A CN113835837A (en) 2021-12-24
CN113835837B true CN113835837B (en) 2023-08-11

Family

ID=78970423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111129534.0A Active CN113835837B (en) 2021-09-26 2021-09-26 Factory setting restoration method and device based on container system and electronic equipment

Country Status (1)

Country Link
CN (1) CN113835837B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117075984B (en) * 2023-10-17 2023-12-26 海马云(天津)信息技术有限公司 Module processing method, device, communication equipment and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8261282B1 (en) * 2008-09-30 2012-09-04 Netapp, Inc. System and method for virtual machine host load protection
CN107704337A (en) * 2017-08-22 2018-02-16 北京珠穆朗玛移动通信有限公司 Method, mobile terminal and the device with store function of factory reset
CN109542676A (en) * 2018-10-26 2019-03-29 歌尔科技有限公司 Method, apparatus, equipment and the storage medium of factory reset
CN111400094A (en) * 2020-03-13 2020-07-10 苏州浪潮智能科技有限公司 Method, device, equipment and medium for restoring factory settings of server system
CN111796959A (en) * 2020-06-30 2020-10-20 中国工商银行股份有限公司 Host machine container self-healing method, device and system
CN112068987A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Method and device for rapidly restoring factory settings
CN113377512A (en) * 2021-06-09 2021-09-10 湖北亿咖通科技有限公司 Starting method, device and equipment of vehicle machine system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8261282B1 (en) * 2008-09-30 2012-09-04 Netapp, Inc. System and method for virtual machine host load protection
CN107704337A (en) * 2017-08-22 2018-02-16 北京珠穆朗玛移动通信有限公司 Method, mobile terminal and the device with store function of factory reset
CN109542676A (en) * 2018-10-26 2019-03-29 歌尔科技有限公司 Method, apparatus, equipment and the storage medium of factory reset
CN112068987A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Method and device for rapidly restoring factory settings
CN111400094A (en) * 2020-03-13 2020-07-10 苏州浪潮智能科技有限公司 Method, device, equipment and medium for restoring factory settings of server system
CN111796959A (en) * 2020-06-30 2020-10-20 中国工商银行股份有限公司 Host machine container self-healing method, device and system
CN113377512A (en) * 2021-06-09 2021-09-10 湖北亿咖通科技有限公司 Starting method, device and equipment of vehicle machine system

Also Published As

Publication number Publication date
CN113835837A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
US8250412B2 (en) Method and apparatus for monitoring and resetting a co-processor
CN101714091B (en) Methods and systems to display platform graphics during operating system initialization
JP5783809B2 (en) Information processing apparatus, activation method, and program
WO2013103023A1 (en) Information processing device, information processing method, and computer program
US20180203622A1 (en) Vehicular device
CN109960523B (en) Firmware upgrading method and device for embedded equipment
CN106547608B (en) A kind of the sandbox concurrent method and system of the active folding of page based on memory
KR101696490B1 (en) Partial rebooting recovery apparatus and method
KR101673299B1 (en) Operating system recovery method and apparatus, and terminal device
CN109408122B (en) Equipment starting method, electronic equipment and computer storage medium
US7308547B2 (en) Apparatus and method for control of write filter
CN113835837B (en) Factory setting restoration method and device based on container system and electronic equipment
CN114741233A (en) Quick start method
CN115113905A (en) Firmware upgrading method and firmware upgrading device
JP2002132741A (en) Processor adding method, computer and recording medium
CN110968392A (en) Method and device for upgrading virtualization simulator
TW201305772A (en) System and method for process network data continuously
US9852029B2 (en) Managing a computing system crash
CN108241522B (en) Sleep state switching method and device in virtualization environment and electronic equipment
JPH10307726A (en) System for firmware recovery at time of start error
CN107368389B (en) Control method and control device for one-key recovery function of operating system and EMMC
CN112363739B (en) Partition image online upgrading method, device, equipment and medium for terminal equipment
CN115168869A (en) Vehicle-mounted system based on multiple operating systems and control method thereof
CN111158783B (en) Environment variable modification method, device and equipment and readable storage medium
CN113094107A (en) Data protection method, device, equipment and computer 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
TA01 Transfer of patent application right

Effective date of registration: 20220329

Address after: 430051 No. b1336, chuanggu startup area, taizihu cultural Digital Creative Industry Park, No. 18, Shenlong Avenue, Wuhan Economic and Technological Development Zone, Wuhan, Hubei Province

Applicant after: Yikatong (Hubei) Technology Co.,Ltd.

Address before: 430056 building B, building 7, Qidi Xiexin science and Innovation Park, South Taizi Lake innovation Valley, Wuhan Economic and Technological Development Zone, Wuhan City, Hubei Province (qdxx-f7b)

Applicant before: HUBEI ECARX TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant