Disclosure of Invention
The main objective of the present application is to provide a system upgrade method, device and readable storage medium, which aims to solve the technical problem that the use time of user equipment is occupied during system upgrade in the prior art.
In order to achieve the above object, the present application provides a system upgrade method, which is applied to a system upgrade apparatus, the system upgrade method including:
responding to a system upgrading instruction, and determining data to be loaded corresponding to the system upgrading instruction, wherein the data to be loaded is obtained by converting the data to be upgraded in an upgrading packet;
determining a target storage address corresponding to the data to be loaded, and acquiring the data to be loaded according to the target storage address;
and upgrading the system by utilizing the data to be loaded.
Optionally, before the step of responding to the system upgrade instruction and determining the data to be loaded corresponding to the system upgrade instruction, the system upgrade method further includes:
acquiring an upgrade package, and extracting authentication information of the upgrade package;
if the authentication information is consistent with the preset standard authentication information, the upgrade package is read, and the data to be upgraded is obtained;
Acquiring an upgrade package type corresponding to the upgrade package, and determining a data conversion mode corresponding to the upgrade package based on the upgrade package type;
and converting the data to be upgraded into the data to be loaded according to the data conversion mode.
Optionally, the data conversion mode includes at least one of the following modes: the whole-packet conversion and the differential conversion,
the step of converting the data to be upgraded into the data to be loaded according to the data conversion mode comprises the following steps:
if the data conversion mode is the whole packet conversion, carrying out whole packet conversion on the data to be upgraded to obtain the data to be loaded; or,
and if the data conversion mode is the differential conversion, copying the data to be updated corresponding to the upgrade package, and carrying out differential conversion on the data to be updated based on the data to be upgraded to obtain the data to be loaded.
Optionally, the step of obtaining the upgrade package includes:
receiving a system upgrading request and acquiring the upgrading packet corresponding to the system upgrading request;
determining a target storage space capacity required by the data to be updated corresponding to the upgrade package for storage, and dividing idle address blocks corresponding to the target storage space capacity in the preset user partition;
And downloading the upgrade package to the idle address block.
Optionally, the step of dividing the free address block corresponding to the target storage space capacity in the preset user partition includes:
determining whether an available address block greater than or equal to the target storage space capacity exists in the preset user partition;
if the preset user partition has an available address block which is larger than or equal to the target storage space capacity, dividing the idle address block in the available address block;
and if the preset user partition does not have the available address block which is larger than or equal to the target storage space capacity, cleaning a temporary file storage area in the preset user partition, and dividing the idle address block in the available address block.
Optionally, after the step of performing a system upgrade using the data to be loaded, the system upgrade method further includes:
and erasing the system block to be updated corresponding to the data to be loaded, and merging the erased system block to be updated into a preset user partition.
Optionally, the step of determining the target storage address corresponding to the data to be loaded includes:
Determining a storage address table corresponding to the data to be loaded, and inquiring the target storage address corresponding to the data to be loaded in the storage address table.
Optionally, the system upgrade method is applied to a display terminal,
before the step of responding to the system upgrading instruction and determining the data to be loaded corresponding to the system upgrading instruction, wherein the data to be loaded is obtained by converting the data to be upgraded in an upgrading package, the system upgrading method further comprises the following steps:
determining each system block in the display terminal and a storage address corresponding to each system block, wherein the system blocks comprise user partitions, system partitions and system modules;
and establishing the pre-stored address table based on a one-to-one mapping relation between each system block and each storage address, wherein the storage address table comprises a partition table and a module table, the partition table is used for storing the storage address corresponding to the user partition and the storage address corresponding to the system partition, and the module table is used for storing the storage address corresponding to the system module.
The application also provides a system upgrade device, the system upgrade device is a virtual device, and the system upgrade device is applied to a system upgrade apparatus, the system upgrade device includes:
The first determining module is used for responding to a system upgrading instruction and determining data to be loaded corresponding to the system upgrading instruction, wherein the data to be loaded is obtained by converting the data to be upgraded in an upgrading packet;
the first acquisition module is used for determining a target storage address corresponding to the data to be loaded and acquiring the data to be loaded according to the target storage address;
and the system upgrading module is used for upgrading the system by utilizing the data to be loaded.
Optionally, the system upgrade apparatus further includes:
the second acquisition module is used for acquiring the upgrade package and extracting authentication information of the upgrade package;
the reading module is used for reading the upgrade package to obtain the data to be upgraded if the authentication information is consistent with the preset standard authentication information;
the second determining module is used for obtaining the type of the upgrade package corresponding to the upgrade package and determining a data conversion mode corresponding to the upgrade package based on the type of the upgrade package;
and the conversion module is used for converting the data to be upgraded into the data to be loaded according to the data conversion mode.
Optionally, the conversion module includes:
the whole packet conversion unit is used for carrying out whole packet conversion on the data to be upgraded if the data conversion mode is the whole packet conversion, so as to obtain the data to be loaded;
And the differential conversion unit is used for copying the data to be updated corresponding to the upgrading packet if the data conversion mode is the differential conversion, and carrying out differential conversion on the data to be updated based on the data to be upgraded to obtain the data to be loaded.
Optionally, the second obtaining module includes:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for receiving a system upgrading request and acquiring the upgrading packet corresponding to the system upgrading request;
the dividing unit is used for determining the target storage space capacity required by the storage of the data to be updated corresponding to the upgrade package, and dividing the idle address blocks corresponding to the target storage space capacity in the preset user partition;
and the downloading unit is used for downloading the upgrade package into the idle address block.
Optionally, the dividing unit includes:
a determining subunit, configured to determine whether an available address block greater than or equal to the target storage space capacity exists in the preset user partition;
a first dividing subunit, configured to divide, if the preset user partition has an available address block that is greater than or equal to the target storage space capacity, the idle address block in the available address block;
And the second dividing unit is used for clearing the temporary file storage area in the preset user partition and dividing the idle address block in the available address block if the preset user partition does not have the available address block which is larger than or equal to the target storage space capacity.
Optionally, the system upgrade apparatus further includes:
and the erasing module is used for erasing the system block to be updated corresponding to the data to be loaded and merging the erased system block to be updated into a preset user partition.
Optionally, the first acquisition module includes:
and the inquiring unit is used for determining a storage address table corresponding to the data to be loaded and inquiring the target storage address corresponding to the data to be loaded in the storage address table.
Optionally, the system upgrade apparatus further includes:
a third determining module, configured to determine each system block in the display terminal and a storage address corresponding to each system block, where the system block includes a user partition, a system partition, and a system module;
the system comprises a system block, a storage address table, a building module and a pre-storage address table, wherein the system block is used for storing a storage address corresponding to the user partition and a storage address corresponding to the system partition, the pre-storage address table is built based on a one-to-one mapping relation between each system block and each storage address, the storage address table comprises a partition table and a module table, the partition table is used for storing the storage address corresponding to the system module.
The application also provides a system upgrade device, which is entity device, and comprises: the system upgrade method comprises a memory, a processor and a program of the system upgrade method stored on the memory and capable of running on the processor, wherein the program of the system upgrade method can realize the steps of the system upgrade method when being executed by the processor.
The present application also provides a readable storage medium having stored thereon a program for implementing a system upgrade method, which when executed by a processor implements the steps of the system upgrade method as described above.
The method comprises the steps of responding to a system upgrading instruction, determining data to be loaded corresponding to the system upgrading instruction, wherein the data to be loaded is obtained by converting the data to be upgraded in an upgrading package, determining a target storage address corresponding to the data to be loaded, acquiring the data to be loaded according to the target storage address, and upgrading the system by utilizing the data to be loaded. That is, before responding to a system upgrade instruction, the data to be upgraded in the upgrade package is converted into the data to be loaded, and a corresponding target storage address is divided for the data to be loaded, so that when responding to the system upgrade instruction, the updated system block can be directly obtained and loaded based on the target storage address, and other system modules and partitions required by starting are loaded at the same time, so as to complete the starting of the display terminal, at the moment, the system of the display terminal can run based on the data to be loaded, further complete the system upgrade, the time for loading the data to be loaded is extremely short, the normal starting time is not prolonged, namely, the system upgrade of the terminal equipment is performed under the condition that the service time of the terminal equipment of a user is not occupied, the whole system upgrade process cannot be perceived by the user, the user can still normally use the terminal equipment, the condition that the terminal equipment needs to be restarted to enter a recover mode is avoided when the system upgrade is performed, and the purposes of not occupying the service time of the user to the terminal equipment when the system upgrade is realized, and the system upgrade efficiency and the user experience are improved.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The embodiment of the application provides a system upgrading method, which applies a system upgrading device, the system upgrading device comprises a display terminal, after receiving a system upgrading request, the system upgrading device downloads a corresponding upgrading packet into an idle address block of a preset user partition, converts the data to be upgraded in the upgrading packet into data to be loaded, determines a target storage address of the data to be loaded in the idle address block, further updates a preset storage address table based on the target storage address, further, when a user starts up, the data to be loaded can be directly based on the target storage address in the preset storage address table, the aim of updating the data to be updated is achieved, further, after the system upgrading is completed, the data to be updated is further erased, and a storage space corresponding to the data to be updated is combined into the preset user partition, so that the updating of the system block to be updated is completed under the condition that the user cannot perceive and does not occupy the equipment using time of the user, and the system upgrading efficiency is also achieved.
In a first embodiment of the system upgrade method of the present application, referring to fig. 1, the system upgrade method includes:
step S10, responding to a system upgrading instruction, and determining data to be loaded corresponding to the system upgrading instruction, wherein the data to be loaded is obtained by converting the data to be upgraded in an upgrading packet;
in this embodiment, it should be noted that, the system upgrade method is applied to a display terminal, where the display terminal includes a mobile phone, a television, a computer, and other devices, the system upgrade request is aimed at upgrading a system block to be updated of the display terminal, where the system block to be updated is an address block storing data to be updated, the data to be updated is data to be updated in a system of the display terminal, where the system block to be updated is one of the system blocks of the display terminal, the system block includes a partition and a system module, where the partition includes a system partition, a user partition, and the like, where the system partition is used to store a system kernel of the display terminal and an entire operating system other than a memory operation, and the user partition is used to store user data, and the system module includes a wifi module and a GPS (Global Positioning System ) module, and the like.
Determining data to be loaded corresponding to a system upgrading instruction in response to the system upgrading instruction, wherein the data to be loaded is obtained by converting the data to be upgraded in an upgrading package, specifically, after the system upgrading instruction is received, determining the data to be loaded corresponding to the system upgrading instruction based on a data identifier in the system upgrading instruction, wherein the data identifier is an identifier of the data to be loaded, the data identifier comprises a character string, a code and the like, further, the data to be loaded is obtained by converting the data to be upgraded in the upgrading package, specifically, before responding to the system upgrading instruction, receiving a system upgrading request sent by a preset server, and determining a system block to be updated corresponding to the system upgrading request, and further, downloading an upgrade package corresponding to the system block to be updated from the preset server, and converting the data to be updated in the upgrade package into data to be loaded based on a data conversion mode corresponding to the upgrade package, wherein the preset server is in communication connection with the display terminal, the preset server is used for deploying the upgrade package corresponding to the system block to be updated, the data conversion mode comprises integral package conversion and differential conversion, for example, if the data to be updated is 01010101, and the data to be updated after the upgrade, that is, the data to be loaded is 010101011111, if the data conversion mode is integral package upgrade, the data to be updated in the corresponding upgrade package is 010101011111, and if the system upgrade method is differential upgrade, the data to be upgraded in the corresponding upgrade package is 1111.
Step S20, determining a target storage address corresponding to the data to be loaded, and acquiring the data to be loaded according to the target storage address;
in this embodiment, it should be noted that the target storage address is a storage address of the update system block, that is, a storage address of the free address block storing the data to be loaded.
Determining a target storage address corresponding to the data to be loaded, acquiring the data to be loaded according to the target storage address, specifically, inquiring the target storage address based on a data identifier of the data to be loaded, and further extracting the data to be loaded from an update system block corresponding to the target storage address based on the target storage address.
The step of determining the target storage address corresponding to the data to be loaded includes:
step S21, a storage address table corresponding to the data to be loaded is determined, and the target storage address corresponding to the data to be loaded is queried in the storage address table.
In this embodiment, it should be noted that, the update system block is one of each partition or each system module in the display terminal, the storage address table includes a module table and a partition table, where the module table includes a one-to-one mapping relationship between one or more partitions and storage addresses corresponding to each partition, and the module table includes one-to-one mapping relationship between one or more system modules and storage addresses of each system module, and further based on the storage address table, each partition and each system module that need to be loaded during system upgrade may be obtained.
Determining a storage address table corresponding to the data to be loaded, and inquiring the target storage address corresponding to the data to be loaded in the storage address table, specifically, determining the storage address table corresponding to the data to be loaded, and further inquiring the target storage address based on the data identification of the data to be loaded.
And step S30, performing system upgrade by utilizing the data to be loaded.
In this embodiment, it should be noted that, when the system upgrade instruction is responded, the display terminal is started at this time, and when the display terminal is started, each system module and each partition need to be loaded one by one based on addresses corresponding to each system module and each partition, and then after each system module and each partition are loaded, the display terminal is started, and then the system upgrade of the display terminal is completed, where the system block to be updated is one of the system modules or one of the partitions, where the system block to be updated stores data to be updated, the updated data to be updated is the data to be loaded, and the address block storing the data to be loaded is the updated system block.
And carrying out system upgrading by utilizing the data to be loaded, specifically, loading the data to be loaded in the updated system block, and loading the data in other system modules and the data in other partitions required by the operation of a display terminal to finish the startup of the display terminal, and ensuring the normal and stable operation of the display terminal, wherein when all the data in the system modules and the data in all the partitions are loaded, the system of the display terminal operates based on the data to be loaded, namely, the system upgrading is finished, as shown in fig. 2, the partition condition diagram of each partition and each system module after the system upgrading is finished is shown, wherein a system partition 2 in a user partition is the updated system block, a system partition 2 on the right side of the system partition 1 is the system block to be updated, and each partition comprises a system partition 1, a system partition 2, a user partition and the like, and each system module comprises a module 1 and the like.
After the step of performing system upgrade by using the data to be loaded, the system upgrade method further includes:
and S40, erasing the system block to be updated corresponding to the data to be loaded, and merging the erased system block to be updated into a preset user partition.
In this embodiment, it should be noted that, erasing the system block to be updated corresponding to the data to be loaded is deleting the stored data in the system block to be updated, so as to convert the system block to be updated into an empty address block, where the address block is a storage space for storing data, and the system block to be updated is an address block storing the data to be updated.
And (3) erasing the system block to be updated corresponding to the data to be loaded, and merging the erased system block to be updated to a preset user partition, specifically, after the display terminal operates normally and stably, erasing the system block to be updated corresponding to the data to be loaded, so as to delete the data to be updated stored in the system block to be updated, and merging the storage space corresponding to the erased system block to be updated to the preset user partition, as shown in fig. 3, wherein a system partition 2-new is the updated system block, at this time, each partition comprises a system partition 1, a system partition 2-new, a user partition and the like, each system module comprises a module 1 and the like, and further, sorting the partitions and the system modules to be updated for the next system block, as shown in fig. 4, each sorted partition and each system module is divided, wherein a system partition 2-new is the updated system block, each system partition 1, each system partition 2-new comprises a system partition 1, each system partition 2-new and the like, and the system partition 1 and the like.
In the embodiment, data to be loaded corresponding to a system upgrading instruction is determined by responding to the system upgrading instruction, wherein the data to be loaded is obtained by converting the data to be upgraded in an upgrading packet, a target storage address corresponding to the data to be loaded is determined, the data to be loaded is obtained according to the target storage address, and system upgrading is performed by using the data to be loaded. In other words, before a system upgrade instruction is responded, the data to be upgraded in the upgrade package is converted into the data to be loaded, and the corresponding target storage address is divided for the data to be loaded, so that when the system upgrade instruction is responded, the updated system block can be directly obtained and loaded based on the target storage address, and other system modules and partitions required by starting are loaded at the same time, so as to complete the starting of the display terminal.
Further, referring to fig. 5, in another embodiment of the system upgrade method, based on the first embodiment in the present application, the system upgrade method is applied to a display terminal,
before the step of responding to the system upgrading instruction and determining the data to be loaded corresponding to the system upgrading instruction, wherein the data to be loaded is obtained by converting the data to be upgraded in an upgrading package, the system upgrading method further comprises the following steps:
step A10, determining each system block in the display terminal and a storage address corresponding to each system block, wherein the system blocks comprise user partitions, system partitions and system modules;
in this embodiment, it should be noted that, the system module may include a wifi module and a GPS module, where data for implementing a wifi function is stored in the wifi module, data for implementing a GPS function is stored in the GPS module, and the preset user partition is used to store user data, for example, address book data, short message data, application data downloaded by a user, and the system partition includes an entire operating system except for a system kernel and a system memory operation, and the display terminal includes a mobile terminal, a television, a computer, and the like.
And step A20, establishing the preset storage address table based on a one-to-one mapping relation between each system block and each storage address, wherein the preset storage address table comprises a partition table and a module table, the partition table is used for storing the storage address corresponding to the user partition and the storage address corresponding to the system partition, and the module table is used for storing the storage address corresponding to the system module.
In this embodiment, the preset storage address table is established based on a one-to-one mapping relationship between each system block and each storage address, where the preset storage address table includes a partition table and a module table, the partition table is used to store the storage address corresponding to the user partition and the storage address corresponding to the system partition, the module table is used to store the storage address corresponding to the system module, specifically, determine the storage address corresponding to each system block and each system block, where the system block includes a partition and a system module, and establish a partition table between each partition and the storage address corresponding to each partition based on the one-to-one mapping relationship between the system block and the storage address, and establish a module table between each system module and the storage address corresponding to each system module, as shown in fig. 6, where partition one, partition two, partition three and partition four are all the partition, address 1, address 2, address 3 and address 4 are all the corresponding storage addresses, as shown in fig. 7, and module one, module three and module four are all the module addresses corresponding to the system module 2, and module 4 are all the module addresses.
According to the embodiment, through determining each system block and the storage address corresponding to each system block in the display terminal, wherein the system blocks comprise preset user partitions, system partitions and system modules, and further the preset storage address table is established based on a one-to-one mapping relation between each system block and each storage address, wherein the preset storage address table comprises a partition table and a module table, the partition table is used for storing the storage address corresponding to the user partitions and the storage address corresponding to the system partitions, and the module table is used for storing the storage address corresponding to the system modules. That is, before the system is not sensitive, the embodiment establishes a partition table based on the mapping relationship between each partition in the display terminal and the storage address of each partition, where the partition includes a preset user partition and a system partition, and establishes a module table based on the mapping relationship between each system module in the display terminal and the storage address of each system module, and further establishes a module table based on the partition table and the module table, and when a start-up request is detected, the partition table or the system module can be loaded based on the storage address in the partition table or the module table, thereby laying a foundation for performing system upgrade, that is, laying a foundation for solving the technical problem that the use time of the user equipment is occupied during system upgrade.
Further, referring to fig. 8, in another embodiment of the system upgrade method according to the first and second embodiments of the present application, before the step of determining the data to be loaded corresponding to the system upgrade instruction in response to the system upgrade instruction, the system upgrade method further includes
Step B10, acquiring an upgrade package, and extracting authentication information of the upgrade package;
in this embodiment, it should be noted that, the authentication information is an identity of the upgrade package, which is used to determine whether the upgrade package is available, where the identity includes a code, a number, a character string, a code, and the like, and determining whether the upgrade package is available includes determining whether the upgrade package is damaged, determining whether the upgrade includes an upgrade package required for updating the system block to be updated, and the like.
In step B10, the step of obtaining the upgrade package includes:
step B11, receiving a system upgrading request and acquiring the upgrading packet corresponding to the system upgrading request;
in this embodiment, it should be noted that the system upgrade request includes identification information, where the identification information is an identification of the upgrade package, and for example, the identification information includes a code, a character string, text information, and the like.
Receiving a system upgrade request, acquiring the upgrade package corresponding to the system upgrade request, specifically receiving the system upgrade request, and inquiring the upgrade package corresponding to the upgrade package identification information on a preset server based on the upgrade package identification information in the system upgrade request.
And step B12, determining a target storage space capacity required by the data to be updated corresponding to the upgrade package for storage, and dividing idle address blocks corresponding to the target storage space capacity in the preset user partition.
In this embodiment, it should be noted that, the target storage space capacity is a product of a storage space capacity of the system block to be updated and a preset storage space expansion coefficient, where the preset storage space expansion coefficient may be obtained by self setting by a user or using a default coefficient of the system, and since a data amount becomes large after a system upgrade, a requirement of a storage space capacity required in general becomes large, the preset storage space expansion coefficient is a coefficient for preventing a storage space of the available address block from being too small, for example, assuming that a storage space capacity required for the data to be updated is 1GB, and a target storage space capacity required for the data to be updated after the system upgrade is 1.1GB, at this time, the preset storage space expansion coefficient is set to be greater than or equal to 1.1. The free address block is a storage space in which no data is stored, and the upgrade package includes data identification information, where the data identification information is an identification of the data to be updated, that is, the data identification information is used to identify the data to be updated corresponding to the upgrade package, and for example, the data identification information includes a code, a character string, and the like.
Determining a target storage space capacity required by storing data to be updated corresponding to the upgrade package, and dividing an idle address block corresponding to the target storage space capacity in the preset user partition, specifically, determining a system block to be updated corresponding to the upgrade package based on data identification information in the upgrade package, wherein the data to be updated is stored in the system block to be updated, and further dividing the idle address block corresponding to the system block to be updated in the preset user partition based on the capacity of the system block to be updated, wherein the capacity of the idle address block is matched with the capacity of the system block to be updated so as to ensure that the updated system block to be updated supports normal and stable operation of a display terminal.
In step B12, the step of dividing the idle address block corresponding to the target storage space capacity in the preset user partition includes:
step B121, determining whether an available address block greater than or equal to the target storage space capacity exists in the preset user partition;
step B122, if the available address block greater than or equal to the target storage space capacity exists in the preset user partition, dividing the idle address block in the available address block;
In this embodiment, it should be noted that the available address block is a storage space in the preset user partition, where data is not stored.
If the preset user partition has an available address block which is greater than or equal to the target storage space capacity, dividing the idle address block in the available address block, and specifically, if the preset user partition has an available address block which is greater than or equal to the target storage space capacity, indicating that enough storage space exists in the preset user partition for storing the data to be loaded, and further dividing the idle address block in the available address block directly.
Step S123, if the preset user partition does not have an available address block greater than or equal to the target storage space capacity, cleaning a temporary file storage area in the preset user partition, and dividing the free address block in the available address block.
In this embodiment, if the preset user partition does not have an available address block greater than or equal to the target storage space capacity, a temporary file storage area in the preset user partition is cleaned to divide the free address block in the available address block, specifically, if the preset user partition does not have an available address block greater than or equal to the target storage space capacity, it indicates that there is not enough storage space in the preset user partition to store the data to be loaded, and further, the temporary file storage area in the preset user partition is cleaned to clean file data to be cleaned, where the file data to be cleaned includes file data to be cleaned, file data for helping a user to download an application to quickly start, and the like, and then, after the preset user partition has cleaned an available address block with a sufficient capacity, the free address block is divided in the available address block.
And step B13, downloading the upgrade package to the idle address block.
Step B20, if the authentication information is consistent with the preset standard authentication information, reading the upgrade package to obtain data to be upgraded;
in this embodiment, if the authentication information is consistent with the preset standard authentication information, the upgrade package is read to obtain data to be upgraded, specifically, if the authentication information is inconsistent with the preset standard authentication information, the upgrade package is indicated to be unavailable, an error code is returned to a preset server, if the authentication information is consistent with the preset standard authentication information, the upgrade package is indicated to be available, and further, the upgrade package is opened and scanned in a preset upgrade package reading mode to obtain the data to be upgraded in the upgrade package, wherein the preset upgrade package reading mode includes decompression reading, decryption reading and the like.
And step B30, acquiring an upgrade package type corresponding to the upgrade package, and determining a data conversion mode corresponding to the upgrade package based on the upgrade package type.
In this embodiment, it should be noted that, the upgrade package includes a first type upgrade package and a second type upgrade package, and the data conversion mode includes whole package conversion and differential conversion, where the first type upgrade package is an upgrade package for performing the whole package conversion, and the second type upgrade package is an upgrade package for performing the differential conversion.
Acquiring an upgrade package type corresponding to the upgrade package, determining a data conversion mode corresponding to the upgrade package based on the upgrade package type, specifically determining the upgrade package type corresponding to the upgrade package based on the type information of the upgrade package, if the upgrade package is a first type upgrade package, the data conversion mode corresponding to the upgrade package is whole package conversion, and if the upgrade package is a second type upgrade package, the data conversion mode corresponding to the upgrade package is differential conversion.
And step B40, converting the data to be upgraded into the data to be loaded according to the data conversion mode.
In this embodiment, the data to be upgraded is converted into the data to be loaded according to the data conversion mode, specifically, if the data conversion mode is whole packet conversion, whole packet conversion is performed on the data to be upgraded in the upgrade packet to obtain the data to be loaded, and if the data conversion mode is differential conversion, differential conversion is performed on the data to be upgraded in the upgrade packet to obtain the data to be loaded.
The data conversion mode comprises at least one of the following modes: the whole-packet conversion and the differential conversion,
The step of converting the data to be upgraded into the data to be loaded according to the data conversion mode comprises the following steps:
step B41, if the data conversion mode is the whole packet conversion, carrying out whole packet conversion on the data to be upgraded to obtain the data to be loaded;
in this embodiment, it should be noted that, when the whole packet conversion is performed, all codes required for acquiring the data to be loaded are included in the data to be upgraded.
And if the data conversion mode is the whole packet conversion, carrying out whole packet conversion on the data to be upgraded to obtain the data to be loaded, and particularly, if the data conversion mode is the whole packet conversion, creating a whole packet conversion process to convert the data to be upgraded into the data to be loaded to obtain the data to be loaded, wherein the whole packet conversion process is used for carrying out the whole packet conversion.
And step B42, if the data conversion mode is the differential conversion, copying the data to be updated corresponding to the upgrade package, and performing differential conversion on the data to be updated based on the data to be upgraded to obtain the data to be loaded.
In this embodiment, it should be noted that, when the differential conversion is performed, the data to be updated includes a differential result between the data to be updated and the data to be loaded, for example, if the data to be updated is 010101 and the data to be loaded is 0101011111, the differential result is 1111, and when the differential conversion is performed, the data to be loaded cannot be obtained only based on the data to be updated, and the data to be loaded needs to be obtained through the differential conversion based on the data to be updated and the data to be updated at the same time.
And if the data conversion mode is the differential conversion, copying the data to be updated corresponding to the upgrade package, and performing differential conversion on the data to be updated based on the data to be updated to obtain the data to be loaded, specifically, if the data conversion mode is the differential conversion, copying the data to be updated in a system block to be updated corresponding to the upgrade package, storing the data to be updated in the idle address block corresponding to the upgrade package, further creating a differential conversion process corresponding to the differential conversion, converting the data to be updated and the data to be updated into the data to be loaded, for example, assuming that the data to be updated is 0101010101010101, the data to be updated is 1111, and executing the differential conversion process has the effect of inserting the data to be updated into the correct position in the data to be updated, and the data to be loaded is 0101111101010101.
According to the method, the device and the system, the upgrade package is obtained, the authentication information of the upgrade package is extracted, and then if the authentication information is consistent with the preset standard authentication information, the upgrade package is read, the data to be upgraded is obtained, the upgrade package type corresponding to the upgrade package is obtained, the data conversion mode corresponding to the upgrade package is determined based on the upgrade package type, and the data to be upgraded is converted into the data to be loaded according to the data conversion mode. The method comprises the steps of firstly obtaining an upgrade package, verifying authentication information in the upgrade package, then reading the upgrade package after verification is passed, obtaining the data to be upgraded, further determining a corresponding data conversion mode based on the type of the upgrade package, further converting the data to be upgraded into data to be loaded according to the data conversion mode, further completing system upgrading by utilizing the data to be loaded when responding to a system upgrading instruction, and further laying a foundation for achieving the purpose of system upgrading under the condition that the data to be upgraded are not perceived by a user and the service time of equipment of the user is not occupied, namely laying a foundation for solving the technical problem that the service time of the user equipment is occupied when the system is upgraded.
Referring to fig. 9, fig. 9 is a schematic device structure diagram of a hardware running environment according to an embodiment of the present application.
As shown in fig. 9, the system upgrade apparatus may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002, and the system upgrade device may be a display terminal such as a smart tv, a smart phone, or the like. Wherein a communication bus 1002 is used to enable connected communication between the processor 1001 and a memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Optionally, the system upgrade device may further include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. The rectangular user interface may include a Display screen (Display), an input sub-module such as a Keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the system upgrade apparatus structure shown in fig. 9 does not constitute a limitation of the system upgrade apparatus, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 9, an operating system, a network communication module, and a system upgrade method program may be included in a memory 1005, which is one type of computer storage medium. The operating system is a program that manages and controls the hardware and software resources of the system upgrade apparatus, supporting the running of system upgrade method programs and other software and/or programs. The network communication module is used to implement communication between components within the memory 1005 and other hardware and software in the system upgrade method system.
In the system upgrade apparatus shown in fig. 9, a processor 1001 is configured to execute a system upgrade method program stored in a memory 1005, and implement the steps of the system upgrade method described in any one of the above.
The specific implementation manner of the system upgrade device in the present application is basically the same as the embodiments of the system upgrade method described above, and will not be repeated here.
The embodiment of the application also provides a system upgrading device, which is applied to a system upgrading device and comprises:
the first determining module is used for responding to a system upgrading instruction and determining data to be loaded corresponding to the system upgrading instruction, wherein the data to be loaded is obtained by converting the data to be upgraded in an upgrading packet;
The first acquisition module is used for determining a target storage address corresponding to the data to be loaded and acquiring the data to be loaded according to the target storage address;
and the system upgrading module is used for upgrading the system by utilizing the data to be loaded.
Optionally, the system upgrade apparatus further includes:
the second acquisition module is used for acquiring the upgrade package and extracting authentication information of the upgrade package;
the reading module is used for reading the upgrade package to obtain the data to be upgraded if the authentication information is consistent with the preset standard authentication information;
the second determining module is used for obtaining the type of the upgrade package corresponding to the upgrade package and determining a data conversion mode corresponding to the upgrade package based on the type of the upgrade package;
and the conversion module is used for converting the data to be upgraded into the data to be loaded according to the data conversion mode.
Optionally, the conversion module includes:
the whole packet conversion unit is used for carrying out whole packet conversion on the data to be upgraded if the data conversion mode is the whole packet conversion, so as to obtain the data to be loaded;
and the differential conversion unit is used for copying the data to be updated corresponding to the upgrading packet if the data conversion mode is the differential conversion, and carrying out differential conversion on the data to be updated based on the data to be upgraded to obtain the data to be loaded.
Optionally, the second obtaining module includes:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for receiving a system upgrading request and acquiring the upgrading packet corresponding to the system upgrading request;
the dividing unit is used for determining the target storage space capacity required by the storage of the data to be updated corresponding to the upgrade package, and dividing the idle address blocks corresponding to the target storage space capacity in the preset user partition;
and the downloading unit is used for downloading the upgrade package into the idle address block.
Optionally, the dividing unit includes:
a determining subunit, configured to determine whether an available address block greater than or equal to the target storage space capacity exists in the preset user partition;
a first dividing subunit, configured to divide, if the preset user partition has an available address block that is greater than or equal to the target storage space capacity, the idle address block in the available address block;
and the second dividing unit is used for clearing the temporary file storage area in the preset user partition and dividing the idle address block in the available address block if the preset user partition does not have the available address block which is larger than or equal to the target storage space capacity.
Optionally, the system upgrade apparatus further includes:
and the erasing module is used for erasing the system block to be updated corresponding to the data to be loaded and merging the erased system block to be updated into a preset user partition.
Optionally, the first acquisition module includes:
and the inquiring unit is used for determining a storage address table corresponding to the data to be loaded and inquiring the target storage address corresponding to the data to be loaded in the storage address table.
Optionally, the system upgrade apparatus further includes:
a third determining module, configured to determine each system block in the display terminal and a storage address corresponding to each system block, where the system block includes a user partition, a system partition, and a system module;
the system comprises a system block, a storage address table, a building module and a pre-storage address table, wherein the system block is used for storing a storage address corresponding to the user partition and a storage address corresponding to the system partition, the pre-storage address table is built based on a one-to-one mapping relation between each system block and each storage address, the storage address table comprises a partition table and a module table, the partition table is used for storing the storage address corresponding to the system module. The specific implementation manner of the readable storage medium is basically the same as the embodiments of the system upgrade method described above, and will not be repeated here.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims.