CN117407012A - Equipment upgrading method and device, storage medium and electronic equipment - Google Patents
Equipment upgrading method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN117407012A CN117407012A CN202310288319.8A CN202310288319A CN117407012A CN 117407012 A CN117407012 A CN 117407012A CN 202310288319 A CN202310288319 A CN 202310288319A CN 117407012 A CN117407012 A CN 117407012A
- Authority
- CN
- China
- Prior art keywords
- upgrade
- upgrading
- command
- script
- equipment
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 81
- 238000003860 storage Methods 0.000 title claims abstract description 17
- 238000004590 computer program Methods 0.000 claims description 14
- 230000001174 ascending effect Effects 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 abstract description 10
- 238000004891 communication Methods 0.000 abstract description 2
- 230000001276 controlling effect Effects 0.000 description 19
- 230000006870 function Effects 0.000 description 9
- 238000004519 manufacturing process Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 2
- 230000001105 regulatory effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/22—Processing or transfer of terminal data, e.g. status or physical capabilities
- H04W8/24—Transfer of terminal data
- H04W8/245—Transfer of terminal data from a network towards a terminal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a device upgrading method, a device, a storage medium and electronic equipment, and relates to the technical field of communication, wherein the method comprises the following steps: acquiring a remote equipment upgrading package, wherein the remote equipment upgrading package comprises a meta information record file, a script interpreter and a command record script, the meta information record file records the number of incoming threads required by the script interpreter, and the command record script marks an incoming thread identifier for each upgrading command; establishing a corresponding number of upgrading threads according to the number of the threads in the meta-information record file; and controlling each upgrading command to be executed in a corresponding upgrading thread by the script interpreter according to the incoming thread identifier corresponding to each upgrading command in the command record script. The method and the device can effectively improve the upgrading efficiency of equipment upgrading through the remote upgrading Technology (OTA), and improve the user experience.
Description
Technical Field
The application relates to the technical field of internet of things, in particular to a device upgrading method, a device, a storage medium and electronic equipment.
Background
When the device is upgraded by the remote upgrade Technology (OTA), the device needs to be upgraded by a remote upgrade package (OTA upgrade package), and a script interpreter (update-binary) and a command recording script (update-script) can be integrated in the remote upgrade package (OTA upgrade package).
Currently, in related upgrade schemes, a script interpreter (update-binary) is each upgrade command in a single process execution command record script (updater-script). In this way, if the upgrade package is larger, the content of the upgrade is more, which results in a problem of lower upgrade efficiency and poor experience for the user.
Disclosure of Invention
The embodiment of the application provides a scheme, which can effectively improve the upgrading efficiency of equipment through the remote upgrading Technology (OTA), and improve the user experience.
The embodiment of the application provides the following technical scheme:
according to one embodiment of the present application, a device upgrade method includes: acquiring a remote equipment upgrading package, wherein the remote equipment upgrading package comprises a meta information record file, a script interpreter and a command record script, the meta information record file records the number of incoming threads required by the script interpreter, and the command record script marks an incoming thread identifier for each upgrading command; establishing a corresponding number of upgrading threads according to the number of the threads in the meta-information record file; and controlling each upgrading command to be executed in a corresponding upgrading thread by the script interpreter according to the incoming thread identifier corresponding to each upgrading command in the command record script.
In some embodiments of the present application, the device remote upgrade package is made in the following manner: acquiring equipment capacity information corresponding to local and acquiring the estimated size of an upgrade package of the equipment remote upgrade package; according to the equipment capability information and the pre-estimated size of the upgrade package, adjusting the number of incoming threads required by a script interpreter, and adjusting the incoming thread identifier bound by each upgrade order in an order recording script; and recording the thread number in the meta-information record file, and aiming at the thread identification corresponding to each upgrading command mark in the command record script.
In some embodiments of the present application, the upgrade incoming thread includes a plurality of upgrade processes, and each upgrade command marks a corresponding process identifier; the controlling each upgrade command to be executed in a corresponding upgrade thread comprises: and controlling each upgrading command to be executed in the upgrading process corresponding to the corresponding process identifier.
In some embodiments of the present application, the upgrade access thread includes a plurality of upgrade threads under a single process, and each upgrade command marks a corresponding thread identifier; the controlling each upgrade command to be executed in a corresponding upgrade thread comprises: and controlling each upgrading command to be executed in the upgrading thread corresponding to the corresponding thread identifier.
In some embodiments of the present application, the adjusting the number of incoming threads required by the script interpreter according to the device capability information and the pre-estimated size of the upgrade package, and adjusting the incoming thread identifier bound to each upgrade command in the command record script includes: according to a preset regulation strategy, determining preset thread regulation information of the equipment capacity information matched with the estimated size of the upgrade package; and adjusting the number of incoming threads required by the script interpreter according to the preset incoming thread adjusting information, and adjusting the incoming thread identifier bound by each upgrading command in the command recording script.
In some embodiments of the present application, the adjusting the number of incoming threads required by the script interpreter according to the device capability information and the pre-estimated size of the upgrade package, and adjusting the incoming thread identifier bound to each upgrade command in the command record script includes: according to the equipment capability information and the estimated size of the upgrade package, determining a target reference equipment matched locally from reference equipment with equipment upgrade scores higher than a preset threshold value in a reference library; and according to the equipment incoming line adjustment information corresponding to the target reference equipment, adjusting the number of incoming lines required by the script interpreter, and adjusting the incoming line identification bound by each ascending order command in the command recording script.
In some embodiments of the present application, the controlling each upgrade command to be executed in a corresponding upgrade-in thread includes: scoring a local equipment upgrading process to obtain a local corresponding equipment upgrading score; and if the equipment upgrading score corresponding to the local is higher than a preset threshold, the current thread adjusting information, the equipment capability information, the estimated size of the upgrading packet and the equipment information corresponding to the local are associated and recorded to a reference library.
According to one embodiment of the present application, an apparatus for upgrading a device, the apparatus includes: the device comprises an acquisition module, a command record script and a remote upgrading module, wherein the acquisition module is used for acquiring a device remote upgrading package, the device remote upgrading package comprises a meta information record file, a script interpreter and a command record script, the number of incoming threads required by the script interpreter is recorded in the meta information record file, and the command record script marks an incoming thread identifier for each upgrading command; the creation module is used for creating a corresponding number of upgrading threads according to the number of the threads in the meta-information record file; and the execution module is used for controlling each upgrade command to be executed in the corresponding upgrade thread according to the incoming thread identifier corresponding to each upgrade command in the command record script by the script interpreter.
In some embodiments of the present application, the apparatus further comprises a fabrication module for: acquiring equipment capacity information corresponding to local and acquiring the estimated size of an upgrade package of the equipment remote upgrade package; according to the equipment capability information and the pre-estimated size of the upgrade package, adjusting the number of incoming threads required by a script interpreter, and adjusting the incoming thread identifier bound by each upgrade order in an order recording script; and recording the thread number in the meta-information record file, and aiming at the thread identification corresponding to each upgrading command mark in the command record script.
In some embodiments of the present application, the upgrade incoming thread includes a plurality of upgrade processes, and each upgrade command marks a corresponding process identifier; the execution module is used for: and controlling each upgrading command to be executed in the upgrading process corresponding to the corresponding process identifier.
In some embodiments of the present application, the upgrade access thread includes a plurality of upgrade threads under a single process, and each upgrade command marks a corresponding thread identifier; the execution module is used for: and controlling each upgrading command to be executed in the upgrading thread corresponding to the corresponding thread identifier.
In some embodiments of the present application, the fabrication module is configured to: according to a preset regulation strategy, determining preset thread regulation information of the equipment capacity information matched with the estimated size of the upgrade package; and adjusting the number of incoming threads required by the script interpreter according to the preset incoming thread adjusting information, and adjusting the incoming thread identifier bound by each upgrading command in the command recording script.
In some embodiments of the present application, the fabrication module is configured to: according to the equipment capability information and the estimated size of the upgrade package, determining a target reference equipment matched locally from reference equipment with equipment upgrade scores higher than a preset threshold value in a reference library; and according to the equipment incoming line adjustment information corresponding to the target reference equipment, adjusting the number of incoming lines required by the script interpreter, and adjusting the incoming line identification bound by each ascending order command in the command recording script.
In some embodiments of the present application, the apparatus further comprises a scoring module for: scoring a local equipment upgrading process to obtain a local corresponding equipment upgrading score; and if the equipment upgrading score corresponding to the local is higher than a preset threshold, the current thread adjusting information, the equipment capability information, the estimated size of the upgrading packet and the equipment information corresponding to the local are associated and recorded to a reference library.
According to another embodiment of the present application, a storage medium has stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method described in the embodiments of the present application.
According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and the processor reads the computer program stored in the memory to execute the method according to the embodiment of the application.
According to another embodiment of the present application, a computer program product or computer program includes computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in the various alternative implementations described in the embodiments of the present application.
In the embodiment of the application, a remote equipment upgrading package is obtained, wherein the remote equipment upgrading package comprises a meta information record file, a script interpreter and a command record script, the meta information record file records the number of incoming threads required by the script interpreter, and the command record script marks an incoming thread identifier for each upgrading command; establishing a corresponding number of upgrading threads according to the number of the threads in the meta-information record file; and controlling each upgrading command to be executed in a corresponding upgrading thread by the script interpreter according to the incoming thread identifier corresponding to each upgrading command in the command record script.
In this way, by configuring the required number of threads and the corresponding thread identifier of each upgrade command in the remote upgrade package of the device, a corresponding number of upgrade threads can be created, the script interpreter can control each upgrade command to be executed in the corresponding upgrade thread, and multi-process or multi-thread upgrade can be realized when the upgrade is performed by the remote upgrade Technology (OTA), so that the upgrade time is shortened, and further, the upgrade efficiency of the upgrade by the remote upgrade Technology (OTA) is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a flow chart of a device upgrade method according to one embodiment of the present application.
Fig. 2 illustrates a flowchart of making an OTA upgrade package according to one embodiment of the present application.
Fig. 3 shows a block diagram of a device upgrade apparatus according to one embodiment of the present application.
Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Fig. 1 schematically shows a flow chart of a device upgrade method according to one embodiment of the present application. The main execution body of the device upgrading method can be any device, such as a television, a computer, a mobile phone, a smart watch, a household appliance and the like.
As shown in fig. 1, the device upgrade method may include steps S110 to S130.
Step S110, acquiring a remote equipment upgrading package, wherein the remote equipment upgrading package comprises a meta information record file, a script interpreter and a command record script, the meta information record file records the number of incoming threads required by the script interpreter, and the command record script marks an incoming thread identifier for each upgrading command; step S120, creating a corresponding number of upgrading threads according to the number of threads in the meta-information record file; step S130, controlling each upgrade command to be executed in a corresponding upgrade thread by the script interpreter according to the thread identification corresponding to each upgrade command in the command record script.
In this embodiment, the remote upgrade package of the device includes a meta information record file (metadata), a script interpreter (update-binary), and a command record script (update-script), wherein the number of incoming threads required by the script interpreter (update-binary) is recorded in the meta information record file (metadata), and an incoming thread identifier is marked for each upgrade command in the command record script (update-script). The thread count may include a number of threads and/or a number of threads. The command record script may include a plurality of upgrade commands, where, for each upgrade command, a corresponding incoming thread identifier is marked, and in one manner, the incoming thread identifier corresponding to the prefix record of the name of each upgrade command may be a serial number or an identifier.
According to the number of incoming threads in the meta-information record file, a corresponding number of incoming threads are created to serve as upgrade incoming threads, each upgrade command is controlled to be executed in the upgrade incoming thread corresponding to the corresponding incoming thread identifier through a script interpreter according to the incoming thread identifier corresponding to each upgrade command in the command record script, and further remote upgrade Technology (OTA) upgrade of multi-process or multi-line Cheng Bingfa execution equipment can be achieved.
In this way, based on steps S110 to S130, by configuring the number of needed threads and the corresponding thread identifier of each upgrade command in the remote upgrade package of the device, a corresponding number of upgrade threads may be created, the script interpreter may control each upgrade command to be executed in the corresponding upgrade thread, and may implement multi-process or multi-thread upgrade when upgrading by the remote upgrade Technology (OTA, over-the-Air Technology), thereby shortening the upgrade time, and further improving the upgrade efficiency of upgrade by the remote upgrade Technology (OTA, over-the-Air Technology), and improving the user experience.
Further alternative embodiments of the steps performed when performing an equipment upgrade under the embodiment of fig. 1 are described below.
In one embodiment, the device remote upgrade package is manufactured in the following manner: acquiring equipment capacity information corresponding to local and acquiring the estimated size of an upgrade package of the equipment remote upgrade package; according to the equipment capability information and the pre-estimated size of the upgrade package, adjusting the number of incoming threads required by a script interpreter, and adjusting the incoming thread identifier bound by each upgrade order in an order recording script; and recording the incoming thread number in the meta-information recording file, and aiming at the incoming thread identification corresponding to each upgrading command mark in the command recording script.
The device capability information and the upgrade package estimated size can be configured by related users, and the device capability information corresponding to the local and the upgrade package estimated size of the device remote upgrade package can be obtained from a preset position, wherein the device capability information can be a capability parameter such as a user-defined capability level or CPU occupation of the device, and the upgrade package estimated size can comprise an upgrade patch size or an upgrade package total estimated size of each partition.
The equipment capability information and the upgrade package estimated size can reflect the equipment condition and the upgrade package condition respectively, and then the equipment capability information and the upgrade package estimated size are combined, so that the number of incoming threads required by a script interpreter can be reasonably adjusted, the incoming thread identifier bound by each upgrade order in the order recording script is adjusted, the number of threads is recorded in a meta information recording file, and the incoming thread identifier corresponding to each upgrade order mark in the order recording script is adjusted.
Referring to fig. 2, an OTA upgrade package is manufactured according to device capability information and an upgrade package pre-estimated size, a process-number (process-nums) is recorded in a meta-information record file (metadata) in the OTA upgrade package, and a process identifier (e.g., process-1, process-2, etc.) corresponding to each upgrade command mark is recorded in a command record script (updater-script).
In one embodiment, the adjusting the number of incoming threads required by the script interpreter according to the device capability information and the upgrade package pre-estimated size, and adjusting the incoming thread identifier bound to each upgrade command in the command record script includes:
according to a preset regulation strategy, determining preset thread regulation information of the equipment capacity information matched with the estimated size of the upgrade package; and adjusting the number of incoming threads required by the script interpreter according to the preset incoming thread adjusting information, and adjusting the incoming thread identifier bound by each upgrading command in the command recording script.
At least one preset thread adjusting information can be preset in the preset adjusting strategy, and each preset thread adjusting information corresponds to one preset device capability information and the pre-estimated size of the upgrade package.
The preset device capability information and the upgrade package estimated size which are matched with each other can be determined from the preset adjustment strategy, and the preset thread adjustment information corresponding to the matched preset device capability information and upgrade package estimated size, namely the preset thread adjustment information matched with the current device capability information and upgrade package estimated size, is obtained.
And adjusting the number of incoming threads required by the script interpreter according to the matched preset incoming thread adjusting information, and adjusting the incoming thread identifier bound by each ascending command in the command recording script.
In one embodiment, the adjusting the number of incoming threads required by the script interpreter according to the device capability information and the upgrade package pre-estimated size, and adjusting the incoming thread identifier bound to each upgrade command in the command record script includes:
according to the equipment capability information and the estimated size of the upgrade package, determining a target reference equipment matched locally from reference equipment with equipment upgrade scores higher than a preset threshold value in a reference library; and according to the equipment incoming line adjustment information corresponding to the target reference equipment, adjusting the number of incoming lines required by the script interpreter, and adjusting the incoming line identification bound by each ascending order command in the command recording script.
In this embodiment, the reference devices in the reference library with preset device upgrade scores above a predetermined threshold may be rated by the relevant user or by a relevant scoring policy. Each reference device of the reference library may be associated with corresponding device capability information and upgrade package pre-estimated size and device threading adjustment information.
From the reference devices of the reference library, the reference device associated with the current device capability information and the upgrade package predicted size may be determined as the locally matched target reference device. The target reference equipment is the reference equipment with the upgrade score higher than a preset threshold and matched with the local, so that the number of incoming threads required by the script interpreter can be reliably regulated according to equipment incoming thread regulation information corresponding to the target reference equipment, and the incoming thread identification bound by each upgrade command in the command record script is regulated.
In one embodiment, the upgrade incoming line process includes a plurality of upgrade processes, and each upgrade command marks a corresponding process identifier; the controlling each upgrade command to be executed in a corresponding upgrade thread comprises: and controlling each upgrading command to be executed in the upgrading process corresponding to the corresponding process identifier.
In the embodiment, by creating a plurality of upgrading processes, each upgrading command is controlled to be executed in the upgrading process corresponding to the corresponding process identifier, so that the concurrent upgrading of the plurality of processes is realized.
In one embodiment, the upgrade access thread includes a plurality of upgrade threads under a single process, and each upgrade command marks a corresponding thread identifier; the controlling each upgrade command to be executed in a corresponding upgrade thread comprises: and controlling each upgrading command to be executed in the upgrading thread corresponding to the corresponding thread identifier.
In the embodiment, by creating a plurality of upgrading threads under a single process, each upgrading command is controlled to be executed in the upgrading thread corresponding to the corresponding process identifier, so that multi-thread concurrent upgrading is realized.
In one embodiment, after the controlling each of the upgrade commands is performed in the corresponding upgrade in thread, the method may further include: scoring a local equipment upgrading process to obtain a local corresponding equipment upgrading score; and if the equipment upgrading score corresponding to the local is higher than a preset threshold, the current thread adjusting information, the equipment capability information, the estimated size of the upgrading packet and the equipment information corresponding to the local are associated and recorded to a reference library.
In this embodiment, the local device upgrade process is further scored to obtain a local corresponding device upgrade score, and if the local device upgrade score is higher than a predetermined threshold, the local device is recorded in the reference library as a reference device, so that other devices can refer to the reference library during upgrade. The current thread adjusting information corresponding to the local may include the number of threads and the thread identifier corresponding to each upgrade command mark.
The method for scoring the local equipment upgrading process to obtain the local corresponding equipment upgrading score can be that the user is prompted to score through an interface to obtain the local corresponding equipment upgrading score assessed by the user. The local equipment upgrading process is scored to obtain the local corresponding equipment upgrading score, or the score corresponding to the preset range where the local actual total upgrading time is located is used as the local corresponding equipment upgrading score.
In order to facilitate better implementation of the device upgrading method provided by the embodiment of the application, the embodiment of the application also provides a device upgrading device based on the device upgrading method. Where the meaning of the terms is the same as in the device upgrade method described above, specific implementation details may be referred to in the description of the method embodiments. Fig. 3 shows a block diagram of a device upgrade apparatus according to one embodiment of the present application.
As shown in fig. 3, the device upgrade apparatus 300 may include: the obtaining module 210 may be configured to obtain a device remote upgrade package, where the device remote upgrade package includes a meta information record file, a script interpreter, and a command record script, where the meta information record file records a number of incoming threads required by the script interpreter, and the command record script marks an incoming thread identifier for each upgrade command; the creation module 220 may be configured to create a corresponding number of upgrade incoming threads according to the incoming thread number in the meta-information record file; the execution module 230 may be configured to control, by using the script interpreter, each upgrade command to execute in a corresponding upgrade thread according to the incoming thread identifier corresponding to each upgrade command in the command record script.
In some embodiments of the present application, the apparatus further comprises a fabrication module for: acquiring equipment capacity information corresponding to local and acquiring the estimated size of an upgrade package of the equipment remote upgrade package; according to the equipment capability information and the pre-estimated size of the upgrade package, adjusting the number of incoming threads required by a script interpreter, and adjusting the incoming thread identifier bound by each upgrade order in an order recording script; and recording the thread number in the meta-information record file, and aiming at the thread identification corresponding to each upgrading command mark in the command record script.
In some embodiments of the present application, the upgrade incoming thread includes a plurality of upgrade processes, and each upgrade command marks a corresponding process identifier; the execution module is used for: and controlling each upgrading command to be executed in the upgrading process corresponding to the corresponding process identifier.
In some embodiments of the present application, the upgrade access thread includes a plurality of upgrade threads under a single process, and each upgrade command marks a corresponding thread identifier; the execution module is used for: and controlling each upgrading command to be executed in the upgrading thread corresponding to the corresponding thread identifier.
In some embodiments of the present application, the fabrication module is configured to: according to a preset regulation strategy, determining preset thread regulation information of the equipment capacity information matched with the estimated size of the upgrade package; and adjusting the number of incoming threads required by the script interpreter according to the preset incoming thread adjusting information, and adjusting the incoming thread identifier bound by each upgrading command in the command recording script.
In some embodiments of the present application, the fabrication module is configured to: according to the equipment capability information and the estimated size of the upgrade package, determining a target reference equipment matched locally from reference equipment with equipment upgrade scores higher than a preset threshold value in a reference library; and according to the equipment incoming line adjustment information corresponding to the target reference equipment, adjusting the number of incoming lines required by the script interpreter, and adjusting the incoming line identification bound by each ascending order command in the command recording script.
In some embodiments of the present application, the apparatus further comprises a scoring module for: scoring a local equipment upgrading process to obtain a local corresponding equipment upgrading score; and if the equipment upgrading score corresponding to the local is higher than a preset threshold, the current thread adjusting information, the equipment capability information, the estimated size of the upgrading packet and the equipment information corresponding to the local are associated and recorded to a reference library.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, in accordance with embodiments of the present application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, the embodiment of the application further provides an electronic device, which may be a terminal or a server, as shown in fig. 4, which shows a schematic structural diagram of the electronic device according to the embodiment of the application, specifically:
the electronic device may include one or more processing cores 'processors 301, one or more computer-readable storage media's memory 302, power supply 303, and input unit 304, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the processor 301 is the control center of the electronic device, connects the various parts of the overall computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 302, and invoking data stored in the memory 302, thereby performing overall monitoring of the electronic device. Optionally, processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user pages, applications, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301.
The memory 302 may be used to store software programs and modules, and the processor 301 executes various functional applications and data processing by executing the software programs and modules stored in the memory 302. The memory 302 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
The electronic device further comprises a power supply 303 for powering the various components, preferably the power supply 303 is logically connected to the processor 301 by a power management system, whereby the functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 303 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 304, which input unit 304 may be used for receiving input digital or character information and for generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 301 in the electronic device loads executable files corresponding to the processes of one or more computer programs into the memory 302 according to the following instructions, and the processor 301 executes the computer programs stored in the memory 302, so as to implement the functions in the foregoing embodiments of the present application, where the processor 301 may perform the following steps:
acquiring a remote equipment upgrading package, wherein the remote equipment upgrading package comprises a meta information record file, a script interpreter and a command record script, the meta information record file records the number of incoming threads required by the script interpreter, and the command record script marks an incoming thread identifier for each upgrading command; establishing a corresponding number of upgrading threads according to the number of the threads in the meta-information record file; and controlling each upgrading command to be executed in a corresponding upgrading thread by the script interpreter according to the incoming thread identifier corresponding to each upgrading command in the command record script.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present embodiments also provide a storage medium having stored therein a computer program that can be loaded by a processor to perform the steps of any of the methods provided by the embodiments of the present application.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Since the computer program stored in the storage medium may perform any of the steps in the method provided in the embodiment of the present application, the beneficial effects that can be achieved by the method provided in the embodiment of the present application may be achieved, which are detailed in the previous embodiments and are not described herein.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It will be understood that the present application is not limited to the embodiments that have been described above and shown in the drawings, but that various modifications and changes can be made without departing from the scope thereof.
Claims (10)
1. A method of upgrading a device, comprising:
acquiring a remote equipment upgrading package, wherein the remote equipment upgrading package comprises a meta information record file, a script interpreter and a command record script, the meta information record file records the number of incoming threads required by the script interpreter, and the command record script marks an incoming thread identifier for each upgrading command;
establishing a corresponding number of upgrading threads according to the number of the threads in the meta-information record file;
and controlling each upgrading command to be executed in a corresponding upgrading thread by the script interpreter according to the incoming thread identifier corresponding to each upgrading command in the command record script.
2. The method of claim 1, wherein the device remote upgrade package is made by:
acquiring equipment capacity information corresponding to local and acquiring the estimated size of an upgrade package of the equipment remote upgrade package;
according to the equipment capability information and the pre-estimated size of the upgrade package, adjusting the number of incoming threads required by a script interpreter, and adjusting the incoming thread identifier bound by each upgrade order in an order recording script;
and recording the thread number in the meta-information record file, and aiming at the thread identification corresponding to each upgrading command mark in the command record script.
3. The method of claim 1, wherein the upgrade incoming thread comprises a plurality of upgrade processes, each upgrade command marking a corresponding process identification;
the controlling each upgrade command to be executed in a corresponding upgrade thread comprises:
and controlling each upgrading command to be executed in the upgrading process corresponding to the corresponding process identifier.
4. The method of claim 1, wherein the upgrade in thread comprises a plurality of upgrade threads in a single process, each upgrade command marking a corresponding thread identification;
the controlling each upgrade command to be executed in a corresponding upgrade thread comprises:
and controlling each upgrading command to be executed in the upgrading thread corresponding to the corresponding thread identifier.
5. The method of claim 2, wherein adjusting the number of threads required by the script interpreter and adjusting the thread identifier bound to each upgrade order in the order record script according to the device capability information and the upgrade package pre-estimated size comprises:
according to a preset regulation strategy, determining preset thread regulation information of the equipment capacity information matched with the estimated size of the upgrade package;
and adjusting the number of incoming threads required by the script interpreter according to the preset incoming thread adjusting information, and adjusting the incoming thread identifier bound by each upgrading command in the command recording script.
6. The method of claim 2, wherein adjusting the number of threads required by the script interpreter and adjusting the thread identifier bound to each upgrade order in the order record script according to the device capability information and the upgrade package pre-estimated size comprises:
according to the equipment capability information and the estimated size of the upgrade package, determining a target reference equipment matched locally from reference equipment with equipment upgrade scores higher than a preset threshold value in a reference library;
and according to the equipment incoming line adjustment information corresponding to the target reference equipment, adjusting the number of incoming lines required by the script interpreter, and adjusting the incoming line identification bound by each ascending order command in the command recording script.
7. The method of any of claims 1-6, wherein after said controlling each of said upgrade commands is performed in a corresponding upgrade-in thread, the method further comprises:
scoring a local equipment upgrading process to obtain a local corresponding equipment upgrading score;
and if the equipment upgrading score corresponding to the local is higher than a preset threshold, the current thread adjusting information, the equipment capability information, the estimated size of the upgrading packet and the equipment information corresponding to the local are associated and recorded to a reference library.
8. An apparatus upgrade device, comprising:
the device comprises an acquisition module, a command record script and a remote upgrading module, wherein the acquisition module is used for acquiring a device remote upgrading package, the device remote upgrading package comprises a meta information record file, a script interpreter and a command record script, the number of incoming threads required by the script interpreter is recorded in the meta information record file, and the command record script marks an incoming thread identifier for each upgrading command;
the creation module is used for creating a corresponding number of upgrading threads according to the number of the threads in the meta-information record file;
and the execution module is used for controlling each upgrade command to be executed in the corresponding upgrade thread according to the incoming thread identifier corresponding to each upgrade command in the command record script by the script interpreter.
9. A storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method of any of claims 1 to 7.
10. An electronic device, comprising: a memory storing a computer program; a processor reading a computer program stored in a memory to perform the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310288319.8A CN117407012A (en) | 2023-03-16 | 2023-03-16 | Equipment upgrading method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310288319.8A CN117407012A (en) | 2023-03-16 | 2023-03-16 | Equipment upgrading method and device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117407012A true CN117407012A (en) | 2024-01-16 |
Family
ID=89495064
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310288319.8A Pending CN117407012A (en) | 2023-03-16 | 2023-03-16 | Equipment upgrading method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117407012A (en) |
-
2023
- 2023-03-16 CN CN202310288319.8A patent/CN117407012A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102490908B1 (en) | Resource scheduling method and terminal device | |
CN105302478B (en) | A kind of date storage method and electronic equipment | |
US9176869B2 (en) | Memory use for garbage collected computer environments | |
CN109271253A (en) | A kind of resource allocation method, apparatus and system | |
CN114461382A (en) | Flexibly configurable computing power scheduling implementation method and device and storage medium | |
CN111338803B (en) | Thread processing method and device | |
CN114647550A (en) | Process control method, device, storage medium and electronic equipment | |
CN108255735A (en) | Associated environment test method, electronic device and computer readable storage medium | |
CN111381953B (en) | Process management method and device, storage medium and electronic equipment | |
KR100493893B1 (en) | System and method of shortening class loading process in java program | |
CN117407012A (en) | Equipment upgrading method and device, storage medium and electronic equipment | |
CN105549857A (en) | Control method for electronic terminal and electronic terminal | |
CN111008079B (en) | Process management method, device, storage medium and electronic equipment | |
CN114020208B (en) | Data garbage collection method, device, computer equipment and storage medium | |
CN114090054A (en) | Intelligent equipment upgrading method and device, storage medium and electronic equipment | |
CN114416542A (en) | Data reporting method and device, storage medium and electronic equipment | |
CN109656708B (en) | Animation playing limiting method for Android, storage medium, electronic equipment and system | |
CN114296907A (en) | Method and device for process control | |
CN110474941A (en) | The implementation method for being synchronized to server-side is got in a kind of log ready | |
CN117170697A (en) | Display interface updating method and device, storage medium and electronic equipment | |
CN111562986B (en) | Memory allocation method, memory allocation device, electronic equipment and computer readable storage medium | |
CN111782501B (en) | Management method and device of software specification, medium and electronic equipment | |
CN114089877B (en) | Application control method and device, storage medium and electronic equipment | |
CN116400871B (en) | Defragmentation method, defragmentation device, storage medium and electronic device | |
CN114244950B (en) | Data switching method, device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |