CN114780019A - Electronic device management method and device, electronic device and storage medium - Google Patents

Electronic device management method and device, electronic device and storage medium Download PDF

Info

Publication number
CN114780019A
CN114780019A CN202210283644.0A CN202210283644A CN114780019A CN 114780019 A CN114780019 A CN 114780019A CN 202210283644 A CN202210283644 A CN 202210283644A CN 114780019 A CN114780019 A CN 114780019A
Authority
CN
China
Prior art keywords
partition
data
target
sub
electronic device
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.)
Pending
Application number
CN202210283644.0A
Other languages
Chinese (zh)
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.)
Jiangsu Zejing Automobile Electronic Co ltd
Original Assignee
Jiangsu Zejing Automobile Electronic 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 Jiangsu Zejing Automobile Electronic Co ltd filed Critical Jiangsu Zejing Automobile Electronic Co ltd
Priority to CN202210283644.0A priority Critical patent/CN114780019A/en
Publication of CN114780019A publication Critical patent/CN114780019A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The application is applicable to the field of software management, and provides a management method of electronic equipment, which comprises the following steps: determining the identifier of the target sub-image partition; determining a target sub-mirror image partition in at least two sub-mirror image partitions according to the identifier of the target sub-mirror image partition; acquiring target data; storing the target data into a target sub-mirror image partition; and updating the electronic equipment based on the target data to finish system upgrading of the electronic equipment. The application also provides a management device of the electronic equipment, the electronic equipment and a storage medium. The method and the device aim to solve the problem that one storage area is repeatedly used in the system upgrading process.

Description

Electronic device management method and device, electronic device and storage medium
Technical Field
The present application relates to the field of software management, and in particular, to a method and an apparatus for managing an electronic device, and a storage medium.
Background
The current mainstream system upgrade scheme is a single partition upgrade scheme, and generally, upgrade is performed in a manner of directly replacing an original file with an upgrade file. The same partition needs to be frequently operated when the single partition is upgraded, so that data of the partition is easily lost or damaged after multiple operations, and the problem that the storage device is damaged is caused.
Disclosure of Invention
The application aims to provide a management method and device of electronic equipment, the electronic equipment and a storage medium, so that upgrade files of different rounds can be stored in different partitions.
In a first aspect, an embodiment of the present application provides a method for managing an electronic device, which adopts the following technical solutions:
determining the identifier of the target sub-image partition;
determining a target sub-mirror image partition in at least two sub-mirror image partitions according to the identifier of the target sub-mirror image partition;
acquiring target data;
storing the target data into a target sub-mirror image partition;
and updating the electronic equipment based on the target data to finish system upgrading of the electronic equipment.
In a second aspect, an embodiment of the present application provides a management apparatus for electronic devices, which adopts the following technical solutions:
a management device of electronic equipment comprises an identification acquisition module, a partition determination module, a data acquisition module, a data storage module and a system updating module.
The identification acquisition module is used for determining the identification of the target sub-image partition;
the partition determining module is used for determining a target sub-mirror image partition in at least two sub-mirror image partitions according to the identification of the target sub-mirror image partition;
the data acquisition module is used for acquiring target data;
the data storage module is used for storing the target data into the target sub-mirror image partition;
and the system updating module is used for updating the electronic equipment based on the target data so as to complete system upgrading of the electronic equipment.
In a third aspect, an embodiment of the present application provides an electronic device, including:
an electronic device comprises at least one connected processor and a memory, wherein the memory is used for storing computer readable instructions, and the processor is used for calling the computer readable instructions in the memory to execute the steps of the management method of the electronic device.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect as described above.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by one or more processors, performs the steps of the method of the first aspect as described above.
It is to be understood that, for the beneficial effects of the second aspect to the fifth aspect, reference may be made to the relevant description in the first aspect, and details are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that:
according to the method and the device, the upgrading file is placed in any one partition, and the storage area is divided into areas with the same multi-piece functions through a multi-partition framework, so that when the program is upgraded, the use times of the same partition in the storage medium are reduced through alternate use of each partition, and the service life of the storage medium is prolonged.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for management of an electronic device according to the present application;
FIG. 3 is a schematic diagram of a memory partition of a management method of an electronic device according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of a management apparatus for an electronic device according to the present application;
FIG. 5 is a schematic diagram of a structure of one embodiment of an electronic device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof in the description and claims of this application and the description of the figures above, are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the foregoing drawings are used for distinguishing between different objects and not for describing a particular sequential order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, an e-book reader, an MP3 player (Moving Picture experts Group Audio Layer III, motion Picture experts compression standard Audio Layer 3), an MP4 player (Moving Picture experts Group Audio Layer IV, motion Picture experts compression standard Audio Layer 4), a laptop portable computer, a desktop computer, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the management method of the electronic device provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the management apparatus of the electronic device is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continuing reference to FIG. 2, a flow diagram of one embodiment of a method for management of electronic devices in accordance with the present application is shown. The management method of the electronic equipment comprises the following steps:
step 201, determining the identification of the target sub-image partition.
In this embodiment, the electronic device (for example, the server/terminal device shown in fig. 1) on which the management method of the electronic device operates may receive the user request through a wired connection manner or a wireless connection manner. It should be noted that the above-mentioned wireless connection means may include, but is not limited to, 3G/4G connection, WiFi connection, bluetooth connection, WiMAX connection, Zigbee connection, uwb (ultra wideband) connection, and other now known or later developed wireless connection means.
In this embodiment, the identifier of the target child image partition is an identifier for indicating a child image partition corresponding to the system upgrade file to be stored. The stored partition is divided into n (n is greater than or equal to 2) sub-mirror partitions with equal space size, and each sub-mirror partition can store one boot mirror. Each boot image comprises an operating system Kernel, a device tree file DTB and a file system SYS. And each time the power-on is started, reading the indication mark in the storage, and determining the mark of the target sub-image partition according to the indication mark. The indication mark is used for indicating the storage of the system file.
Step 202, determining a target sub-mirror partition in at least two sub-mirror partitions according to the identifier of the target sub-mirror partition.
In this embodiment, a sub-mirror partition corresponding to the identifier of the target sub-mirror partition is found, and this partition may be determined as the target sub-mirror partition. And when the system upgrading file is acquired subsequently, storing the system upgrading file into the target sub-mirror image partition.
Step 203, acquiring target data.
In this embodiment, the target data is a boot image, and the boot image includes a system upgrade file (operating system). And after receiving the upgrading command, the system starts to download the latest upgrading file from the server. The downloading process is controlled by another downloading process, the process can be responsible for successfully downloading the upgrade file on the server into a local system, if an error occurs in the process, the process returns, and subsequent upgrade operation can not be carried out any more.
And step 204, storing the target data into the target sub-mirror image partition.
In this embodiment, each boot image includes an operating system, a device tree file, and a file system. The operating system, device tree files, and file system arrangement need to be placed into the child mirror partition in a specific order, with the relevant files being called at any time when the system is upgraded.
And step 205, updating the electronic equipment based on the target data to complete system upgrade of the electronic equipment.
In this embodiment, the corresponding target data is loaded by reading the identifier of the target sub-mirror image partition, thereby completing the upgrade of the system.
In this embodiment, the application places the upgrade file in any partition, and divides the storage area into multiple areas with the same function through a multi-partition architecture, so that when the program is upgraded, the number of times of use of the same partition in the storage medium is reduced by using each partition in turn, and the service life of the storage medium is prolonged.
In some alternative implementations, the electronic device further includes a primary partition, determining an identification of the target sub-mirror partition, including:
reading an indication identifier from the main partition, wherein the indication identifier is used for indicating the storage of system files;
and calculating the identification of the target sub-mirror partition based on the indication identification.
In the above embodiment, the distribution of the main partition, the backup partition, and the sub-mirror partition in the storage space is as shown in fig. 3. Wherein the primary partition is an Env _ Main partition, the backup partition is an Env _ Back partition, and the nth sub-mirror partition is an image _ n partition. The main partition and the backup partition can control the loading mode of the sub-mirror partition by configuring data files, for example, whether the data files are started by a U disk or other storage media can be configured. The electronic device stores data files in a primary partition and a backup partition. The main partition and the backup partition can record the number of the sub-mirror partitions, and can also record which sub-mirror partition the electronic equipment can be loaded from after being started. The functional division of the main partition, the backup partition and the sub-mirror partition is completed through the mode.
In some optional implementations, calculating the identification of the target child mirror partition based on the indication identification includes:
reading a total number of partitions from a main partition;
if the indication identification is equal to the total number of the partitions, updating the identification of the target sub-mirror image partition into any numerical value smaller than the total number of the partitions;
and if the indication mark is not equal to the total number of the partitions, calculating the mark of the target sub-mirror image partition based on a preset numerical value and the indication mark, wherein the preset numerical value is any positive integer smaller than the total number of the partitions.
In the above embodiment, when the program starts to be upgraded, a data file is read from the main partition, where the total number n of partitions and the storage location of the current system file are recorded in the data file. When the program runs, the program will continue to determine whether the identifier of the storage location of the current system file is consistent with the last storage location. If the sub-image partitions are consistent, the fact that the current sub-image partitions are all traversed is probably shown, and the fact that the sub-image partitions are used once is proved. The system file downloaded next time is selected for use by the first sub-mirroring partition, or any one of the sub-mirroring partitions. If the system file is inconsistent with the storage location of the current system file, the next partition of the storage location of the current system file is selected to be used as a new sub-mirror partition, and the next two or even three of the storage locations of the current system file can be used. In addition to the above two cases, any random number may be generated, and the sub-mirror partitions corresponding to the random number may be used. The determination of the position of the system upgrading file in the storage is completed through the mode.
In some optional implementations, the electronic device further includes a backup partition, the indication identifier is further stored in the backup partition, and after storing the target data in the target sub-mirror partition, the management method further includes:
after the target data are stored in the target sub-mirror image partition, updating the indication identification in the backup partition based on the identification of the target sub-mirror image partition;
and writing the updated indication identifier into the main partition from the backup partition.
In the above embodiment, after the system is upgraded, the electronic device may start to modify the data file, i.e., modify the updated currently used system location of the data file. The electronic device may finally save the modified variable values to the backup partition first and then to the primary partition. The above process can be understood as follows: and storing the indication mark to the backup partition firstly, and then storing the indication mark from the backup partition to the main partition for use in next upgrading.
The whole system upgrading process can be understood as follows: first at the end of the last update, the new system has been downloaded into the number 3 sub-mirror partition. After downloading, recording the identifier of the 3 # sub-mirror image partition in a data file, namely indicating the identifier: no. 3. And then the system sends an upgrading request to the server, downloads the upgrading file, and judges that a new upgrading file is to be placed in the sub-image partition with the number 4 of the identifier of the target sub-image partition according to the read indicating identifier. And then, reading and updating the upgrade file in the No. 4 sub-mirror image partition, and updating the indication mark to be No. 4 after the update is finished. And storing the indication mark to the backup partition firstly, and then storing the indication mark from the backup partition to the main partition for use in next upgrading. In the upgrading process, when the main partition successfully reads data, the system file can be normally read. If the content of the main partition can not read the data (i.e. successfully read No. 4), copying the data file in the backup partition into the main partition, and reading the data after copying. The system is upgraded in the above manner.
In some optional implementations, the electronic device includes a primary partition and a backup partition, where the primary partition and the backup partition store the indication identifier, and the management method further includes:
when the electronic equipment is started, checking whether the data in the main partition is damaged or not;
if the verification result is that the data is not damaged, loading target data or starting data based on the indication identification read from the main partition, wherein the starting data refers to system data before updating;
and if the data is damaged as a result of the verification, updating the indication identifier in the main partition based on the indication identifier read from the backup partition, and loading the target data based on the indication identifier read from the main partition after the indication identifier stored in the main partition is updated.
In the above embodiment, the startup data refers to system file data before updating, and when the system fails to update, the startup of the electronic device may be protected by the system data before updating. There are three nodes that may fail the entire download process: data files are downloaded to the child mirrored partition, related information is written to the backup partition, and related information is written from the backup partition to the primary partition.
For the process that the data file is downloaded to the sub-mirror image partition to cause the upgrade failure, at this time: because the downloading fails and the process of writing data into the backup partition cannot be executed, the data of the backup partition and the data of the main partition record the information of the system without upgrading at the moment, and the information recorded by the main partition and the backup partition is not damaged. When the system is restarted, since the loading of the system can be performed based on the data read from the main partition, the loaded system remains an unemplified system. The system is successfully started.
A process that results in an upgrade failure for the relevant information written to the backup partition, at which point: due to successful downloading, the process of writing the related data into the backup partition can be executed, but the writing process is accidentally failed, so that the data of the backup partition is damaged at the moment. But the data of the main partition still records the information of the system when the system is not upgraded, and the information recorded by the main partition is not damaged. Further, when the system is restarted, the read file is read from the main partition, so that the read file is still the system which is not upgraded. The system is successfully started.
A process of failure of an upgrade for relevant information written from a backup partition to a primary partition, at which time: because the backup information is successful, the process of writing the related data into the main partition can be executed, but the writing into the main partition fails due to an accident in the writing process, at this time, the data recorded in the backup partition is of the upgraded system and is not damaged, and the data recorded in the main partition is damaged. Further, when the system is restarted, if the system directly reads the data recorded in the main partition, the electronic device may be damaged. Therefore, when it is detected that the data of the main partition is damaged, the system starts updating the file after the data of the backup partition is written into the main partition again, and the file successfully read by the main partition is the updated system file. The system completes the update.
By the mode, even if the system upgrading process is damaged, the electronic equipment can be normally started and operated.
In some optional implementations, checking whether data in the main partition is corrupted at startup of the electronic device includes:
acquiring a Cyclic Redundancy Check (CRC) value in a main partition;
a check is made based on the CRC value to determine if the data in the main partition is corrupted.
In the above embodiment, the primary partition has a CRC value, and the determining process may be understood as: when the data in the main partition is required to be acquired, recalculating a CRC value according to the data in the main partition and comparing the recalculated CRC value with the CRC value in the main partition, if the two CRC values are different, judging that the data in the main partition is damaged, and if the two CRC values are the same, judging that the data in the main partition is not damaged. When the system is powered on or restarted, the system boot program is loaded first. At this time, the system first determines whether the data of the main partition is complete and available, and this process determines whether the data is complete by checking the CRC value of the main partition. The boot program is responsible for loading the kernel, the file system and the like from the child mirror partition, and the data file can be set or the boot mode and the like can be configured through the boot program.
In some alternative implementations, storing the target data in the target sub-mirror partition includes:
splitting target data into a plurality of starting files;
and storing a plurality of starting files in the target sub-mirror image partition according to a preset sequence.
In the above embodiment, the electronic device is divided into n (n is greater than or equal to 2) sub-image partitions with the same space size, each sub-image partition can store one boot image, the boot image is used for loading the system, and each boot image includes an operating system Kernel, a device tree file DTB, and a file system SYS. The size of n needs to be set in advance. After each power-on start, the sub-mirror image partition from which the data file is recorded is judged to be read according to the content of the data file record, and then the corresponding file is loaded so as to complete the system start of the electronic equipment. The loading of the system file is completed in the above mode.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, the processes of the embodiments of the methods described above can be included. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless otherwise indicated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 4, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a management apparatus for an electronic device, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 4, the management apparatus 400 of the electronic device of the present embodiment includes: an identity acquisition module 401, a partition determination module 402, a data acquisition module 403, a data deposit module 404, and a system update module 405. Wherein:
the identifier obtaining module 401 is configured to determine an identifier of the target sub-image partition;
the partition determining module 402 is configured to determine a target sub-mirror partition in the at least two sub-mirror partitions according to the identifier of the target sub-mirror partition;
the data acquiring module 403 is configured to acquire target data;
the data storage module 404 is configured to store the target data into the target sub-mirror partition;
the system update module 405 is configured to update the electronic device based on the target data to complete system upgrade of the electronic device.
In some optional implementation manners of this embodiment, the identifier obtaining module 401 further includes:
a first obtaining unit, configured to read an indication identifier from the main partition, where the indication identifier is used to indicate storage of a system file;
and the first processing unit is used for calculating the identification of the target sub-mirror image partition based on the indication identification.
In some optional implementations of this embodiment, the first processing unit includes:
a first obtaining subunit, configured to read a total number of partitions from a main partition;
the first processing subunit is used for updating the identifier of the target sub-mirror image partition to any value smaller than the total number of the partitions if the indication identifier is equal to the total number of the partitions;
and the second processing subunit is used for calculating the identifier of the target sub-mirror image partition based on a preset numerical value and the indication identifier if the indication identifier is not equal to the total number of the partitions, wherein the preset numerical value is any positive integer smaller than the total number of the partitions.
In some optional implementation manners of this embodiment, the identifier obtaining module 401 further includes:
the second processing unit is used for updating the indication identifier in the backup partition based on the identifier of the target sub-mirror partition after the target data is stored into the target sub-mirror partition;
and the third processing unit is used for writing the updated indication identifier into the main partition from the backup partition.
In some optional implementations of this embodiment, the apparatus 400 further includes:
the data checking module is used for checking whether the data in the main partition is damaged or not when the electronic equipment is started;
a first verification result processing module, configured to load the target data or start data based on the indication identifier read from the main partition if the verification result indicates that the data is not damaged, where the start data is system data before update;
and the second checking result processing module is used for updating the indication identifier in the main partition based on the indication identifier read from the backup partition if the checking result is that the data is damaged, and loading the target data based on the indication identifier read from the main partition after the indication identifier stored in the main partition is updated.
In some optional implementations of this embodiment, the data checking module further includes:
a second obtaining unit, configured to obtain a cyclic redundancy check CRC value in the main partition;
and the fourth processing unit is used for checking based on the CRC value to judge whether the data in the main partition is damaged or not.
In some optional implementations of this embodiment, the data storage module further includes:
a third obtaining unit, configured to split the target data into multiple boot files;
and the fifth processing unit is used for storing the plurality of starting files in the target sub-mirror image partition according to a preset sequence.
In order to solve the technical problem, an embodiment of the application further provides an electronic device. Referring to fig. 5, fig. 5 is a block diagram of a basic structure of the electronic device according to the embodiment.
The electronic device 5 comprises a memory 501 and a processor 502 communicatively connected to each other via a system bus. It is noted that only electronic device 5 having components 501, 502 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the electronic device is a device capable of automatically performing numerical calculation and/or information processing according to instructions set in advance or stored in advance, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be a desktop computer, a notebook, a palmtop, a cloud server, or other computing device. The electronic device can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or a voice control device.
The memory 501 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 501 may be an internal storage unit of the electronic device 5, such as a hard disk or a memory of the electronic device 5. In other embodiments, the memory 501 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device. Of course, the memory 501 may also include both internal and external memory units of the electronic device 5. In this embodiment, the memory 501 is generally used for storing an operating system and various application software installed in the electronic device 5, such as computer readable instructions of a management method of the electronic device. Further, the memory 501 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 502 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 502 is generally used to control the overall operation of the electronic device 5. In this embodiment, the processor 502 is configured to execute computer readable instructions stored in the memory 501 or process data, for example, computer readable instructions for executing a management method of an electronic device.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing computer-readable instructions, which can be executed by at least one processor, so that the at least one processor performs the steps of the management method of an electronic device as described above.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method of the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields, and all the equivalent structures are within the protection scope of the present application.

Claims (10)

1. A management method of an electronic device, wherein the electronic device includes at least two sub-mirror partitions, the management method comprising:
determining the identifier of the target sub-image partition;
determining a target sub-mirror image partition in the at least two sub-mirror image partitions according to the identifier of the target sub-mirror image partition;
acquiring target data;
storing the target data into the target sub-mirror image partition;
and updating the electronic equipment based on the target data to finish system upgrading of the electronic equipment.
2. The method of managing as set forth in claim 1, wherein the electronic device further includes a primary partition, the determining an identification of a target sub-mirror partition including:
reading an indication identifier from the main partition, wherein the indication identifier is used for indicating the storage of system files;
and calculating the identification of the target sub-mirror image partition based on the indication identification.
3. The management method according to claim 2, wherein said calculating an identification of the target child mirror partition based on the indication identification comprises:
reading a total number of partitions from the main partition;
if the indication identification is equal to the total number of the partitions, updating the identification of the target sub-mirror image partition to any numerical value smaller than the total number of the partitions;
if the indication mark is not equal to the total number of the partitions, calculating the mark of the target sub-mirror image partition based on a preset numerical value and the indication mark, wherein the preset numerical value is any positive integer smaller than the total number of the partitions.
4. The management method of claim 2, wherein the electronic device further comprises a backup partition, wherein the indication is further stored in the backup partition, and wherein after the storing the target data in the target child mirror partition, the management method further comprises:
after the target data are stored into the target sub-mirror image partition, updating the indication identifier in the backup partition based on the identifier of the target sub-mirror image partition;
writing the updated indication from the backup partition to the primary partition.
5. The management method according to claim 1, wherein the electronic device includes a primary partition and a backup partition, the primary partition and the backup partition storing an indication flag indicating storage of a system file, the management method further comprising:
when the electronic equipment is started, checking whether data in the main partition are damaged or not;
if the verification result is that the data is not damaged, loading the target data or starting data based on the indication identifier read from the main partition, wherein the starting data refers to system data before updating;
and if the verification result is that the data is damaged, updating the indication identifier in the main partition based on the indication identifier read from the backup partition, and loading the target data based on the indication identifier read from the main partition after the indication identifier stored in the main partition is updated.
6. The method for managing as set forth in claim 5, wherein the verifying whether the data in the main partition is corrupted at the time of booting the electronic device comprises:
acquiring a Cyclic Redundancy Check (CRC) value in the main partition;
a check is performed based on the CRC value to determine whether data in the main partition is corrupted.
7. The method of managing as set forth in claim 1 wherein said storing said target data into said target sub-mirrored partition comprises:
splitting the target data into a plurality of starting files;
and storing the plurality of starting files in the target sub-mirror image partition according to a preset sequence.
8. An apparatus for managing an electronic device, wherein the electronic device comprises at least two sub-image partitions, comprising:
the identification acquisition module is used for determining the identification of the target sub-image partition;
the partition determining module is used for determining a target sub-mirror partition in the at least two sub-mirror partitions according to the identifier of the target sub-mirror partition;
the data acquisition module is used for acquiring target data;
the data storage module is used for storing the target data into the target sub-mirror image partition;
and the system updating module is used for updating the electronic equipment based on the target data so as to finish system upgrading of the electronic equipment.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202210283644.0A 2022-03-22 2022-03-22 Electronic device management method and device, electronic device and storage medium Pending CN114780019A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210283644.0A CN114780019A (en) 2022-03-22 2022-03-22 Electronic device management method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210283644.0A CN114780019A (en) 2022-03-22 2022-03-22 Electronic device management method and device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN114780019A true CN114780019A (en) 2022-07-22

Family

ID=82425898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210283644.0A Pending CN114780019A (en) 2022-03-22 2022-03-22 Electronic device management method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114780019A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541900A (en) * 2023-07-07 2023-08-04 深圳星火半导体科技有限公司 Storage management method, device, equipment and medium based on data protection
CN117472291A (en) * 2023-12-27 2024-01-30 苏州元脑智能科技有限公司 Data block verification method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108418720A (en) * 2018-04-24 2018-08-17 深圳市菲菱科思通信技术股份有限公司 A kind of restoration methods, device and the routing device of routing device configuration information
CN110780890A (en) * 2019-10-24 2020-02-11 百度在线网络技术(北京)有限公司 System upgrading method and device, electronic equipment and medium
CN112363739A (en) * 2021-01-18 2021-02-12 杭州觅睿科技股份有限公司 Partition image online upgrading method, device, equipment and medium for terminal equipment
CN113114730A (en) * 2021-03-22 2021-07-13 深圳市晨北科技有限公司 Upgrading method and device, terminal equipment and storage medium
CN114064084A (en) * 2021-11-23 2022-02-18 瑞斯康达科技发展股份有限公司 ONU upgrade management method, storage medium, electronic device, and ONU

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108418720A (en) * 2018-04-24 2018-08-17 深圳市菲菱科思通信技术股份有限公司 A kind of restoration methods, device and the routing device of routing device configuration information
CN110780890A (en) * 2019-10-24 2020-02-11 百度在线网络技术(北京)有限公司 System upgrading method and device, electronic equipment and medium
CN112363739A (en) * 2021-01-18 2021-02-12 杭州觅睿科技股份有限公司 Partition image online upgrading method, device, equipment and medium for terminal equipment
CN113114730A (en) * 2021-03-22 2021-07-13 深圳市晨北科技有限公司 Upgrading method and device, terminal equipment and storage medium
CN114064084A (en) * 2021-11-23 2022-02-18 瑞斯康达科技发展股份有限公司 ONU upgrade management method, storage medium, electronic device, and ONU

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周建峰 等: "《数据存储、恢复与安全应用实践》", 中国铁道出版社, pages: 162 - 163 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541900A (en) * 2023-07-07 2023-08-04 深圳星火半导体科技有限公司 Storage management method, device, equipment and medium based on data protection
CN116541900B (en) * 2023-07-07 2024-04-05 深圳星火半导体科技有限公司 Storage management method, device, equipment and medium based on data protection
CN117472291A (en) * 2023-12-27 2024-01-30 苏州元脑智能科技有限公司 Data block verification method and device, storage medium and electronic equipment
CN117472291B (en) * 2023-12-27 2024-03-22 苏州元脑智能科技有限公司 Data block verification method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN103150231B (en) The method of computer booting and computer system
CN105867947B (en) Data processing method and device after preset application program updating
CN110058873B (en) Application page updating method, device, equipment and storage medium
US9804832B2 (en) Method, apparatus, and communication device for updating firmware
CN108388599B (en) Electronic device, data migration and calling method and storage medium
US20070074201A1 (en) Method and system for updating software and computer readable recording medium storing the method
CN114780019A (en) Electronic device management method and device, electronic device and storage medium
WO2022111097A1 (en) File update method and apparatus, device and storage medium
CN107291481B (en) Component updating method, device and system
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
WO2022262754A1 (en) Operating system data updating method and device, storage medium, and program product
CN109710286B (en) System upgrading method, device, equipment and storage medium
CN112882734B (en) Upgrading method and device, computer equipment and medium
CN105867962A (en) System upgrading method and device
CN110825419B (en) Firmware refreshing method and device, electronic equipment and storage medium
CN110244951B (en) Application publishing method and device
CN116594639A (en) Method, apparatus, storage medium, and program product for managing system installation package
CN111176671B (en) Method for automatically and continuously updating system, mobile terminal and storage medium
CN113505026B (en) Method, device and equipment for verifying backup data and storage medium
CN112181467B (en) Method and device for upgrading memory firmware of terminal, terminal and storage medium
CN114296764A (en) System upgrading method and device, storage medium and electronic equipment
CN112559131A (en) Method, device and equipment for updating container mirror image and computer readable storage medium
CN113190244A (en) Method and device for upgrading wireless module, computer equipment and storage medium
CN114020211A (en) Storage space management method, device, equipment and storage medium
EP1160666A2 (en) Switching versions of software in a system background

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220722