CN114489711A - Terminal upgrading method and device and storage medium - Google Patents

Terminal upgrading method and device and storage medium Download PDF

Info

Publication number
CN114489711A
CN114489711A CN202111550883.XA CN202111550883A CN114489711A CN 114489711 A CN114489711 A CN 114489711A CN 202111550883 A CN202111550883 A CN 202111550883A CN 114489711 A CN114489711 A CN 114489711A
Authority
CN
China
Prior art keywords
upgrading
upgrade
upgraded
terminal
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
Application number
CN202111550883.XA
Other languages
Chinese (zh)
Inventor
韦诚
卢大勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mgga Technology Co ltd
Original Assignee
Beijing Mgga Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mgga Technology Co ltd filed Critical Beijing Mgga Technology Co ltd
Priority to CN202111550883.XA priority Critical patent/CN114489711A/en
Publication of CN114489711A publication Critical patent/CN114489711A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of computers, in particular to a terminal upgrading method, a terminal upgrading device and a storage medium. The method comprises the following steps: acquiring upgrading task information, wherein the upgrading task information comprises an upgrading packet; determining equipment to be upgraded in the terminal according to the upgrading task information, and generating an upgrading message corresponding to the equipment to be upgraded; and sending an upgrading message to the shadow theme subscribed by the equipment to be upgraded so as to obtain upgrading task information through the shadow theme under the condition that the equipment to be upgraded is in an online state, and upgrading the version. According to the scheme, the upgrading information issued by the server cannot be missed even in the off-line state through the shadow theme, and the upgrading task information corresponding to the upgrading information issued by the server can be acquired through the shadow theme under the condition that the terminal is in the on-line state, so that the version is upgraded, the processing pressure of the server is prevented from increasing, the bandwidth pressure of the server is reduced, and the upgrading efficiency of the terminal is improved.

Description

Terminal upgrading method and device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a terminal upgrading method, a terminal upgrading apparatus, and a machine-readable storage medium.
Background
With the development of computer technology, the shipment volume of terminal equipment is also increasing, such as retail equipment in new retail fields. Such as coffee-type appliances and the like. Due to the increase of the number of devices, the devices are distributed all over the area, and when a software system built in the devices has problems such as bug or function upgrade, if an after-sales engineer artificially updates the system or repairs the bug for each device, a large amount of time and money are required to be invested.
To solve this problem, in the prior art, a technical solution for upgrading a device based on an HTTP request manner is provided. When the terminal is powered on, the terminal may send a request to the server to determine if an upgrade package is available on the server. If yes, downloading the whole upgrade package, and installing the upgrade package to upgrade the version. However, in this way, the terminal is upgraded based on fixed judgment after starting up, when the number of terminals is large, a large number of terminals access the server in a short time due to consistent time of accessing the server by the terminal, so that the response time of the server is increased, the processing efficiency of the server is slowed down, the bandwidth pressure on the server is large, and the processing of the server on the bug is not timely enough.
Disclosure of Invention
The embodiment of the application aims to provide a terminal upgrading method, a terminal upgrading device, a storage medium and a processor. In order to achieve the above object, a first aspect of the present application provides a terminal upgrading method, which is applied to a server, and the terminal upgrading method includes:
acquiring upgrading task information, wherein the upgrading task information comprises an upgrading packet;
determining equipment to be upgraded in the terminal according to the upgrading task information, and generating an upgrading message corresponding to the equipment to be upgraded;
and sending an upgrading message to the shadow theme subscribed by the equipment to be upgraded so as to obtain upgrading task information through the shadow theme under the condition that the equipment to be upgraded is in an online state, and upgrading the version.
In one embodiment of the application, upgrade feedback information reported by equipment to be upgraded is received; and updating the version number of the equipment to be upgraded under the condition that the equipment to be upgraded is determined to be successfully upgraded according to the upgrade feedback information.
In an embodiment of the present application, when it is determined that the device to be upgraded fails to be upgraded according to the upgrade feedback information, the upgrade message is sent to the shadow theme subscribed by the device to be upgraded again, so that the device to be upgraded obtains the upgrade task information through the shadow theme, and performs the version upgrade until the device to be upgraded is successfully upgraded.
In one embodiment of the application, under the condition that the equipment to be upgraded fails to be upgraded according to the upgrade feedback information, reminding information of the failure of upgrading is sent to the equipment to be upgraded; and obtaining an upgrade log of the equipment to be upgraded so as to determine the reason of upgrade failure.
In an embodiment of the present application, sending an upgrade message to a shadow theme subscribed by a device to be upgraded includes: and sending an upgrading message to the shadow theme subscribed by the equipment to be upgraded through a message queue telemetry transmission protocol.
In an embodiment of the present application, the terminal includes a plurality of devices, the upgrade task information further includes additional information, the device to be upgraded in the terminal is determined according to the upgrade task information, and generating an upgrade message corresponding to the device to be upgraded includes: acquiring the current version number of each device; determining equipment to be upgraded in the plurality of equipment according to the current version number and version number information in the upgrading task information; and generating an upgrade message corresponding to each device to be upgraded according to the additional information and the upgrade package, wherein the upgrade package is used for completing an upgrade task, and the additional information is used for describing the upgrade package.
In one embodiment of the present application, the upgrade package is an incremental upgrade package.
A second aspect of the present application provides a terminal upgrading method, which is applied to a terminal, and the terminal upgrading method includes:
obtaining an upgrading message by subscribing the shadow theme;
when the mobile terminal is online, receiving an upgrading message according to the shadow theme to acquire upgrading task information, wherein the upgrading task information comprises an upgrading packet;
and upgrading the version according to the upgrading task information.
In an embodiment of the present application, in case of successful upgrade, upgrade feedback information of successful upgrade is sent to the server, so as to update the version number through the server.
In one embodiment of the application, under the condition of upgrade failure, upgrade feedback information of the upgrade failure is sent to a server; and obtaining upgrading task information corresponding to the upgrading message from the server through the upgrading message issued by the shadow theme obtaining server according to the upgrading feedback information failed in upgrading, and upgrading the version according to the upgrading task information until the upgrading is successful.
In one embodiment of the application, under the condition of upgrade failure, upgrade feedback information of the upgrade failure is sent to a server; acquiring reminding information sent by a server according to upgrade feedback information failed in upgrading; and uploading the upgrade log to a server to determine the reason of the upgrade failure.
In an embodiment of the present application, an upgrade message sent by a message queue telemetry transmission protocol is obtained by a shadow theme obtaining server.
In an embodiment of the present application, the upgrade task information includes additional information, the terminal includes a plurality of devices, and acquiring the upgrade message through the subscribed shadow theme further includes: for each device, uploading a device identifier and a current version number of the device to a server; after the server determines equipment to be upgraded according to the current version number and the version number in the upgrade task information, the server acquires an upgrade message generated by the server according to the additional information and the upgrade package through the shadow theme; the upgrade package is used for completing an upgrade task, and the additional information is used for describing the upgrade package.
In one embodiment of the present application, the upgrade package is an incremental upgrade package.
A third aspect of the present application provides a terminal upgrading apparatus, which is applied to a server, and includes:
the data acquisition module is used for acquiring upgrading task information which comprises an upgrading packet;
the upgrading device determining module is used for determining the device to be upgraded in the terminal according to the upgrading task information and generating upgrading information corresponding to the device to be upgraded;
the first upgrading module is used for sending an upgrading message to a shadow theme subscribed by the equipment to be upgraded so as to enable the equipment to be upgraded to acquire upgrading task information through the shadow theme under the online state and upgrade the version.
The fourth aspect of the present application provides a terminal upgrading apparatus, which is applied to a terminal, and the terminal upgrading apparatus includes:
the message monitoring module is used for acquiring an upgrading message through a subscribed shadow theme;
the data acquisition module is used for acquiring upgrading task information according to the upgrading message received by the shadow theme when the mobile terminal is online, wherein the upgrading task information comprises an upgrading packet;
and the second upgrading module is used for upgrading the version according to the upgrading task information.
A fifth aspect of the present application provides a machine-readable storage medium having stored thereon instructions, which when executed by a processor, cause the processor to be configured to perform the terminal upgrade method of any one of the above.
According to the technical scheme, the server can determine the equipment to be upgraded in the terminal according to the obtained upgrading task information and generate the upgrading message corresponding to the equipment to be upgraded, after the server sends the upgrading message to the shadow theme subscribed by the equipment to be upgraded, the equipment to be upgraded can obtain the upgrading task information through the shadow theme and upgrade the version, and the server can update the version number of the equipment to be upgraded when receiving the upgrading feedback information reported by the equipment to be upgraded and determining that the equipment to be upgraded is upgraded successfully according to the upgrading feedback information, namely the version number of the terminal is upgraded. According to the method, the terminal can achieve the offline state through the shadow theme without missing the upgrading message issued by the server, under the condition that the terminal is in the online state, the upgrading task information corresponding to the upgrading message issued by the server can be obtained through the shadow theme to achieve the upgrading of the version, the upgrading of the terminal can be achieved in the mode without causing a large number of terminals to visit the server at the same time, the processing pressure of the server is increased, meanwhile, the terminal also has upgrading autonomy, the version can be upgraded according to the self condition, the bandwidth pressure of the server is effectively reduced, and the upgrading efficiency of the terminal is improved.
Additional features and advantages of embodiments of the present application will be described in detail in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the embodiments of the disclosure, but are not intended to limit the embodiments of the disclosure. In the drawings:
fig. 1 schematically shows a schematic flow chart of a terminal upgrade method according to an embodiment of the present invention;
fig. 2 schematically shows a schematic flow chart of a terminal upgrade method according to another embodiment of the present invention;
fig. 3 schematically shows a block diagram of a terminal upgrade apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram schematically showing the construction of a terminal upgrade apparatus according to another embodiment of the present invention;
fig. 5 schematically shows an internal structure diagram of a computer apparatus according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present application will be made with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present application, are given by way of illustration and explanation only, and are not intended to limit the present application.
It should be noted that if directional indications (such as up, down, left, right, front, and back … …) are referred to in the embodiments of the present application, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are changed accordingly.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present application, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
As shown in fig. 1, a flowchart of a terminal upgrading method according to an embodiment of the present application is schematically shown. As shown in fig. 1, in an embodiment of the present application, a terminal upgrade method is provided, which is applied to a server, and includes the following steps:
step 101, obtaining upgrade task information, wherein the upgrade task information comprises an upgrade package;
step 102, determining equipment to be upgraded in the terminal according to the upgrade task information, and generating an upgrade message corresponding to the equipment to be upgraded;
103, sending an upgrade message to the shadow theme subscribed by the device to be upgraded so as to obtain upgrade task information through the shadow theme under the online state of the device to be upgraded, and upgrading the version.
In one embodiment, the upgrade message includes at least one of an identification of the upgrade package, a version number of the upgrade package, an address of the upgrade package, an update level of the upgrade package, and a release time of the upgrade package.
The upgrade message generated by the server and corresponding to the device to be upgraded in the terminal may include: at least one of an identification of the upgrade package, a version number of the upgrade package, an address of the upgrade package, an update level of the upgrade package, and a release time of the upgrade package. Wherein, the update level of the upgrade package includes: direct update, idle update, restart update a set of forced updates.
In one embodiment, the upgrade package is an incremental upgrade package.
The server can obtain the upgrade task information of the terminal device to be upgraded, wherein the upgrade task information can include an upgrade package, the upgrade package is an incremental upgrade package and is not a full upgrade package, that is, the upgrade package only replaces part of modified files in an upgrade adding mode, and network overhead between the terminal and the server is reduced. After receiving the upgrade task information, the server can confirm the equipment to be upgraded in the terminal according to the received upgrade task information, and determine the equipment to be upgraded. After the server determines the device to be upgraded, an upgrade message corresponding to the device to be upgraded may be generated.
In one embodiment, the terminal includes a plurality of devices, the upgrade task information further includes additional information, determining a device to be upgraded in the terminal according to the upgrade task information, and generating an upgrade message corresponding to the device to be upgraded includes: acquiring the current version number of each device; determining equipment to be upgraded in the plurality of equipment according to the current version number and version number information in the upgrading task information; and generating an upgrade message corresponding to each device to be upgraded according to the additional information and the upgrade package, wherein the upgrade task information comprises the upgrade package and the additional information, the upgrade package is used for completing the upgrade task, and the additional information is used for describing the upgrade package.
In one embodiment, the additional information includes at least one of a version number of the upgrade package, an update level of the upgrade package, and an update log.
In one embodiment, the update level includes at least one of direct update, idle update, restart update, and forced update, and the device to be upgraded performs version upgrade according to the selected update level after acquiring the upgrade task information of the upgrade package.
The server may obtain upgrade task information, where the upgrade task information may include an upgrade package, and the upgrade package is an incremental upgrade package and is not a full upgrade package. Additional information may also be included in the upgrade task information. The additional information may include at least one of a version number of the upgrade package, an update level of the upgrade package, and an update log. The additional information in the upgrade task information may be used to describe attributes, update levels, and metadata information of the upgrade update, where the metadata information of the upgrade update may include time, publisher information, and the like. The update level of the upgrade package may include at least one of a direct update, an idle update, a restart update, and a set of forced updates.
The terminal may include a plurality of devices, and the server may obtain a current version number of each device, compare the obtained current version number of each device in the terminal with version number information in the upgrade task information according to the received upgrade task information, thereby determining a device to be upgraded in the terminal according to the received upgrade task information, and determining the device to be upgraded. The server can generate an upgrade message corresponding to each device to be upgraded according to the additional information and the upgrade package in the upgrade task information. The upgrade package is used for completing an upgrade task of the equipment to be upgraded, and the additional information is used for describing relevant information of the upgrade package. For example, the additional information may be used to describe attributes of the upgrade package, an update level, and metadata information of the upgrade update, where the metadata information of the upgrade update may include time, publisher information, and the like.
In one embodiment, after the upgrade message corresponding to each device to be upgraded is generated according to the additional information and the upgrade package, the upgrade package is saved; acquiring user information for inputting additional information; and creating a corresponding upgrade record according to the user information, the upgrade message and the generation time of the upgrade message.
And the server can store the upgrade package after generating the upgrade message corresponding to each device to be upgraded in the terminal according to the additional information in the upgrade task information and the upgrade package. And acquiring corresponding user information of the input additional information, and creating a corresponding upgrade record according to the user information, the upgrade message and the generation time of the upgrade message. The upgrade record may include upgrade information, user information, i.e., a creator, generation time of the upgrade information, and the like.
The server can send the determined upgrading message corresponding to the equipment to be upgraded to the shadow theme subscribed by the equipment to be upgraded. When the equipment to be upgraded in the terminal is in an online state, the upgrading message sent by the server can be acquired through the shadow theme, so that the upgrading task information is acquired. And upgrading the version according to the acquired task information. When the version of the device to be upgraded is upgraded according to the obtained task information, the version of the device to be upgraded can be upgraded according to the update level of the upgrade package, wherein the update level can be at least one of direct update, idle update, restart update and forced update.
In one embodiment, sending the upgrade message to the shadow themes subscribed by the device to be upgraded comprises: and sending an upgrading message to the shadow theme subscribed by the equipment to be upgraded through a message queue telemetry transmission protocol.
The server can send the upgrading message to the shadow theme subscribed by the equipment to be upgraded through the message queue telemetry transmission protocol, so that the equipment to be upgraded in the terminal can obtain the upgrading task information through the shadow theme, and the version is upgraded.
In one embodiment, upgrade feedback information reported by equipment to be upgraded is received; and updating the version number of the equipment to be upgraded under the condition that the equipment to be upgraded is determined to be successfully upgraded according to the upgrade feedback information.
After the device to be upgraded in the terminal acquires the upgrade task information through the shadow theme and upgrades the version, the upgrade feedback information can be sent to the server. After receiving the upgrade feedback information reported by the equipment to be upgraded, the server can judge whether the equipment to be upgraded is successfully upgraded according to the upgrade feedback information, and under the condition that the server determines that the equipment to be upgraded is successfully upgraded according to the received upgrade feedback information, the server can update the version number of the equipment to be upgraded.
In one embodiment, upgrade feedback information reported by equipment to be upgraded through an upgrade theme is received, and the upgrade feedback information carries an equipment identifier of the equipment to be upgraded and an upgrade task identifier corresponding to an upgrade message.
The server can receive upgrade feedback information reported by the equipment to be upgraded through the shadow theme subscribed by the upgrading equipment. The upgrade feedback information reported by the device to be upgraded can carry the identifier of the device to be upgraded and the identifier of the upgrade task corresponding to the upgrade message. That is, the device to be upgraded in the terminal can report the upgrade progress and the upgrade result of the device to the server through the upgrade feedback information.
In one embodiment, under the condition that the upgrading of the device to be upgraded is determined to be failed according to the upgrading feedback information, the upgrading information is sent to the shadow theme subscribed by the device to be upgraded again, so that the device to be upgraded obtains the upgrading task information through the shadow theme, and the version is upgraded until the device to be upgraded is upgraded successfully.
The equipment to be upgraded in the terminal acquires the upgrade task information through the shadow theme, and can report the specific upgrade condition to the server through the upgrade feedback information after the version is upgraded. The server determines that the equipment to be upgraded is in the condition of failed equipment upgrading through the received upgrading feedback information, and the server can send the upgrading information to the shadow theme subscribed by the holy grail to be upgraded again, so that the equipment to be upgraded can obtain the upgrading task information sent by the server through the shadow theme again, and upgrade the version according to the obtained upgrading task information. And the server determines that the equipment to be upgraded is successfully upgraded according to the upgrade feedback information, so that the upgrading information can not be sent to the shadow theme subscribed by the equipment to be upgraded any more.
In one embodiment, under the condition that the equipment to be upgraded fails to be upgraded according to the upgrade feedback information, reminding information of the failure of upgrading is sent to the equipment to be upgraded; and obtaining an upgrade log of the equipment to be upgraded so as to determine the reason of upgrade failure.
The server can send prompting information of the upgrade failure to the device to be upgraded under the condition that the server determines that the upgrade of the device to be upgraded fails according to the upgrade feedback information uploaded by the device to be upgraded, so that an upgrade log of the device to be upgraded is obtained, and the reason of the upgrade failure of the device to be upgraded is determined according to the obtained upgrade log.
According to the technical scheme, the server can determine the equipment to be upgraded in the terminal according to the obtained upgrading task information and generate the upgrading message corresponding to the equipment to be upgraded, after the server sends the upgrading message to the shadow theme subscribed by the equipment to be upgraded, the equipment to be upgraded can obtain the upgrading task information through the shadow theme and upgrade the version, and the server can update the version number of the equipment to be upgraded when receiving the upgrading feedback information reported by the equipment to be upgraded and determining that the equipment to be upgraded is upgraded successfully according to the upgrading feedback information, namely the version number of the terminal is upgraded. According to the method, the terminal can achieve the offline state through the shadow theme without missing the upgrading message issued by the server, under the condition that the terminal is in the online state, the upgrading task information corresponding to the upgrading message issued by the server can be obtained through the shadow theme to achieve the upgrading of the version, the upgrading of the terminal can be achieved in the mode without causing a large number of terminals to visit the server at the same time, the processing pressure of the server is increased, meanwhile, the terminal also has upgrading autonomy, the version can be upgraded according to the self condition, the bandwidth pressure of the server is effectively reduced, and the upgrading efficiency of the terminal is improved.
As shown in fig. 2, a flowchart of a terminal upgrading method according to an embodiment of the present application is schematically shown. As shown in fig. 2, in an embodiment of the present application, a terminal upgrade method is provided, which is applied to a terminal, and includes the following steps:
step 201, obtaining an upgrade message through a subscribed shadow theme;
step 202, when online, receiving an upgrade message according to the shadow theme to obtain upgrade task information, wherein the upgrade task information comprises an upgrade package.
In one embodiment, the upgrade message sent by the transmission protocol is telemetered through a message queue by the shadow theme acquisition server.
And step 203, upgrading the version according to the upgrading task information.
Because the terminal subscribes to the shadow theme, the terminal can acquire the message of the shadow theme in real time. After the shadow theme receives the upgrading message sent by the server, the terminal can acquire the upgrading message through the subscribed shadow theme. When the terminal is on line, the equipment to be upgraded in the terminal can acquire the upgrading message issued by the server through the message queue remote sensing transmission protocol through the shadow theme. After the device to be upgraded in the terminal acquires the upgrade message of the device to be upgraded through the shadow theme, the device to be upgraded can acquire upgrade task information corresponding to the upgrade message from the server according to the upgrade message received by the shadow theme, wherein the upgrade task information comprises an upgrade package. And upgrading the version of the equipment to be upgraded in the terminal according to the upgrading task information.
In one embodiment, the upgrade task information includes additional information, the terminal includes a plurality of devices, and acquiring the upgrade message through the subscribed shadow theme further includes: for each device, uploading a device identifier and a current version number of the device to a server; after the server determines equipment to be upgraded according to the current version number and the version number in the upgrade task information, the server acquires an upgrade message generated by the server according to the additional information and the upgrade package through the shadow theme; the upgrade package is used for completing an upgrade task, and the additional information is used for describing the upgrade package.
The terminal comprises a plurality of devices, and the device identification and the current version number of the device are uploaded to the server aiming at each device in the terminal. After receiving the identifier of each device uploaded by the terminal and the current version number, the server can determine the device to be upgraded in the terminal according to the current version number and the version number in the upgrade task information. The upgrade task information may include an upgrade package. After the server determines the equipment to be upgraded, the upgrading information can be generated according to the upgrading packet and the additional information in the upgrading task information, and the equipment to be upgraded in the terminal can obtain the upgrading information through the shadow theme. The upgrade package is used for completing an upgrade task, the additional information is used for describing relevant information of the upgrade package, such as attributes, update levels and metadata information of the upgrade update, and the metadata information of the upgrade update comprises time, publisher and the like.
In one embodiment, the upgrade message carries at least one of an identification of the upgrade package, a version number of the upgrade package, an address of the upgrade package, an update level of the upgrade package, and a release time of the upgrade package.
The upgrade message acquired by the device to be upgraded may carry at least one of an identifier of the upgrade package, a version number of the upgrade package, an address of the upgrade package, an update level of the upgrade package, and a release time of the upgrade package. Wherein the update level of the upgrade package may include at least one of a direct update, an idle update, a restart update, and a forced update.
In one embodiment, the upgrade package is an incremental upgrade package.
The upgrade package in the upgrade task information is an increment upgrade package instead of a full upgrade package, and the increment upgrade package only replaces part of modified files in an increase upgrade mode, so that the network overhead between the terminal and the server can be reduced.
In one embodiment, in case of successful upgrade, upgrade feedback information of successful upgrade is sent to the server to update the version number through the server.
The terminal can upgrade the equipment to be upgraded according to the upgrade task information, and under the condition that the equipment to be upgraded is successfully upgraded, the equipment to be upgraded in the terminal can send upgrade feedback information which is successfully upgraded to the server, so that the version number is updated through the server, and the version number is updated to be the version number which is successfully upgraded.
In one embodiment, under the condition of upgrading failure, upgrading feedback information of the upgrading failure is sent to a server; and obtaining upgrading task information corresponding to the upgrading message from the server through the upgrading message issued by the shadow theme obtaining server according to the upgrading feedback information failed in upgrading until the upgrading is successful according to the upgrading task information.
If the equipment to be upgraded in the terminal fails to be upgraded, the terminal can send upgrade feedback information of the failed upgrade to the server. After receiving the upgrade feedback information of the upgrade failure, the server can send the upgrade message to the shadow theme again, so that the equipment to be upgraded in the terminal can obtain the upgrade message sent by the server through the shadow theme again after the upgrade failure, obtain the upgrade task information corresponding to the upgrade message from the server, and upgrade the version according to the obtained upgrade task information. Until the equipment to be upgraded is upgraded successfully.
In one embodiment, in case of upgrade failure, sending upgrade feedback information of the upgrade failure to a server; acquiring reminding information sent by a server according to upgrade feedback information failed in upgrading; and uploading the upgrade log to a server to determine the reason of the upgrade failure.
And under the condition that the equipment to be upgraded in the terminal fails to be upgraded, the upgrading feedback information which fails to be upgraded can be sent to the server. After receiving the upgrade feedback information of the upgrade failure, the server can send the prompt information of the upgrade failure to the terminal. After the device to be upgraded in the terminal receives the reminding information sent by the server, the upgrading log can be uploaded to the server, so that the server can determine the reason of upgrading failure from the upgrading log.
As shown in fig. 3, a block diagram schematically illustrating a structure of a terminal upgrading device according to an embodiment of the present application is shown. As shown in fig. 3, in an embodiment of the present application, a terminal upgrading apparatus 300 is provided, which is applied to a server, and includes:
the data acquisition module 301 is configured to acquire upgrade task information, where the upgrade task information includes an upgrade package;
an upgrade device determining module 302, configured to determine a device to be upgraded in the terminal according to the upgrade task information, and generate an upgrade message corresponding to the device to be upgraded;
the first upgrading module 303 is configured to send an upgrading message to a shadow theme subscribed by the device to be upgraded, so that the device to be upgraded acquires upgrading task information through the shadow theme in an online state, and performs version upgrading.
The terminal upgrading device 300 includes a data obtaining module 301, and the data obtaining module 301 may obtain upgrading task information, where the upgrading task information includes an upgrading packet. The upgrade package can be an incremental upgrade package, that is, the upgrade package only replaces part of modified files in an upgrade adding mode, so that the network overhead between the terminal and the server is reduced. The upgrade task information further includes additional information, wherein the additional information may include at least one of a version number of the upgrade package, an update level of the upgrade package, and an update log.
The upgrade apparatus determining module 302 may determine an apparatus to be upgraded in the terminal according to the upgrade task information, and the upgrade apparatus determining module 302 may obtain a current version number of each apparatus of the terminal, and compare the current version number with the version number in the upgrade task information obtained by the data obtaining module 301, thereby determining the apparatus to be upgraded in the plurality of apparatuses in the terminal. After determining the device to be upgraded in the terminal, the upgrade device determination module 302 may generate an upgrade message corresponding to each device to be upgraded according to the additional information in the upgrade task information and the upgrade package, where the upgrade message includes at least one of an identifier of the upgrade package, a version number of the upgrade package, an address of the upgrade package, an update level of the upgrade package, and a release time of the upgrade package. The upgrade package is used for completing an upgrade task, the additional information is used for describing the upgrade package, such as attributes, update levels and metadata information of the upgrade update, and the metadata information of the upgrade update includes time, publisher and the like.
After the upgrade information corresponding to each device to be upgraded is generated according to the additional information and the upgrade package, the upgrade package is saved, the user information of the input additional information is acquired, and a corresponding upgrade record can be created according to the acquired user information, the upgrade information, and the generation time of the upgrade information.
After the upgrade device determining module 302 generates the corresponding upgrade message, the first upgrade module 303 may send the upgrade message to the shadow theme subscribed by the device to be upgraded through the message queue telemetry transport protocol, so that the upgrade task information may be obtained through the shadow theme under the on-line state of the device to be upgraded, and the version may be upgraded according to the obtained upgrade task information.
Specifically, for example, the first upgrade module 303 in the server sends the upgrade message to the terminal, the device to be upgraded in the terminal may determine how to process the update according to the version number and the update level included in the upgrade message, and if the update level is a direct update, it means that the update does not need to be restarted, and the normal operation of the terminal device is not affected. If the update level is idle, the terminal starts to judge the version number of the equipment to be upgraded when the production task is stopped, if the version number is a new version, the terminal equipment downloads an upgrade package and starts the upgrade task, and if the version number is small or the same, the terminal equipment sends an upgrade result and refuses the upgrade. If the update level is the restart update, the terminal sets a task at the restart, the version number is judged when the terminal equipment is powered off, if the version number is a new version, the terminal equipment downloads an upgrade package, starts the upgrade task, finishes the upgrade and then powers off, finishes the upgrade when the terminal equipment is powered on next time, and if the version number is small or the same, sends the upgrade result, refuses the upgrade and then powers off. If the update level is forced update, the terminal can ignore the version number verification, ignore whether the terminal equipment works or not, directly pause the current task and start forced update.
The first upgrade module 303 may receive upgrade feedback information reported by the device to be upgraded, where the upgrade feedback information carries the device identifier of the device to be upgraded and an upgrade task identifier corresponding to the upgrade message. And under the condition that the equipment to be upgraded is determined to be upgraded successfully according to the upgrade feedback information, updating the version number of the equipment to be upgraded according to the upgrade feedback information. If the upgrading of the equipment is determined to be failed according to the upgrading feedback information of the equipment to be upgraded, the first upgrading module 303 may send the upgrading message to the shadow theme subscribed by the equipment to be upgraded again through the message queue telemetry transmission protocol, so that the equipment to be upgraded acquires the upgrading task information through the shadow theme and upgrades the version until the equipment to be upgraded is successfully upgraded. When the first upgrading module 303 determines that the equipment to be upgraded fails to be upgraded according to the upgrading feedback information, sending reminding information of the failure to be upgraded to the equipment to be upgraded; and obtaining an upgrade log of the equipment to be upgraded so as to determine the reason of upgrade failure.
As shown in fig. 4, a block diagram schematically illustrating a structure of a terminal upgrading device according to an embodiment of the present application is shown. As shown in fig. 4, in an embodiment of the present application, a terminal upgrade apparatus 400 is provided, which is applied to a terminal, and includes:
a message monitoring module 401, configured to obtain an upgrade message through a subscribed shadow theme;
the data acquisition module 402 is configured to acquire upgrade task information according to an upgrade message received by a shadow theme when the device is online, where the upgrade task information includes an upgrade package;
and a second upgrading module 403, configured to upgrade a version according to the upgrade task information.
The terminal may subscribe to the message of the shadow topic through the message listening module 401. And determining whether the server sends an upgrading message to the shadow theme or not through the message subscribed to the shadow theme.
After determining that the shadow theme receives the upgrade message issued by the server through the message monitoring module 401, the terminal may obtain the upgrade message through the shadow theme through the data obtaining module 402, and obtain upgrade task information according to the received upgrade message, where the upgrade task information includes an upgrade package. The terminal includes a plurality of devices, and for each device in the terminal, the data acquisition module 402 may upload the device identifier and the current version number of the device to the server. After the server determines the equipment to be upgraded according to the version number of the current equipment and the version number of the equipment in the upgrade task information, the server can generate an upgrade message according to an upgrade packet and additional information in the upgrade task information. The data obtaining module 402 may obtain, through the shadow theme, an upgrade message generated by the server according to the additional information and the upgrade package, where the upgrade message carries at least one of an identifier of the upgrade package, a version number of the upgrade package, an address of the upgrade package, an update level of the upgrade package, and a release time of the upgrade package. The upgrade package is an increment upgrade package and is used for completing an upgrade task, and the increment upgrade package only replaces part of modified files in an upgrading increasing mode, so that network overhead of the terminal and the server is reduced. The additional information is used to describe the upgrade package.
After the terminal acquires the upgrade message through the data acquisition module 402, the second upgrade module 403 may acquire upgrade task information corresponding to the upgrade message from the server, so as to upgrade the version of the device to be upgraded. And under the condition that the equipment to be upgraded is upgraded successfully, sending upgrade feedback information indicating the server, so that the version number is updated through the server. If the equipment to be upgraded in the terminal fails to be upgraded, the second upgrade module 403 may send upgrade feedback information of the failed upgrade to the server. After receiving the upgrade feedback information of the upgrade failure, the server can send the upgrade message to the shadow theme again. Therefore, the message monitoring module 401 may monitor the upgrade message received by the shadow theme, the terminal acquires the upgrade message again through the shadow theme when the shadow theme receives the upgrade message issued by the server through the data acquisition module 402, and the second upgrade module 403 upgrades the version according to the upgrade message acquired again by the data acquisition module 402, knowing that the upgrade of the device to be upgraded is successful.
And under the condition of failed upgrade, the second upgrade module can also send upgrade feedback information of failed upgrade to the server. After receiving the upgrade feedback information of the upgrade failure, the server can send the prompt information of the upgrade failure to the terminal. After receiving the reminding information sent by the server, the second upgrade module 403 may upload the upgrade log to the server, so that the server may determine the reason for the upgrade failure from the upgrade log.
An embodiment of the present application provides a storage medium, on which a program is stored, and the program, when executed by a processor, implements the above-described terminal upgrade method.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor a01, a network interface a02, a memory (not shown), and a database (not shown) connected by a system bus. Wherein processor a01 of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises an internal memory a03 and a non-volatile storage medium a 04. The nonvolatile storage medium a04 stores an operating system B01, a computer program B02, and a database (not shown in the figure). The internal memory a03 provides an environment for the operation of the operating system B01 and the computer programs B02 in the non-volatile storage medium a 04. The database of the computer device is used for storing data related to the upgrade information. The network interface a02 of the computer device is used for communication with an external terminal through a network connection. The computer program B02 is adapted to be executed by the processor a01 for implementing a method for upgrading a terminal.
Those skilled in the art will appreciate that the architecture shown in figure Y is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (18)

1. A terminal upgrading method is applied to a server and comprises the following steps:
acquiring upgrading task information, wherein the upgrading task information comprises an upgrading packet;
determining equipment to be upgraded in a terminal according to the upgrading task information, and generating an upgrading message corresponding to the equipment to be upgraded;
and sending the upgrading message to a shadow theme subscribed by the equipment to be upgraded so as to obtain the upgrading task information through the shadow theme under the condition that the equipment to be upgraded is in an online state, and upgrading the version.
2. The terminal upgrading method according to claim 1, further comprising:
receiving upgrade feedback information reported by the equipment to be upgraded;
and updating the version number of the equipment to be upgraded under the condition that the equipment to be upgraded is determined to be successfully upgraded according to the upgrade feedback information.
3. The terminal upgrading method according to claim 2, further comprising:
and under the condition that the upgrading of the equipment to be upgraded is determined to be failed according to the upgrading feedback information, sending the upgrading message to the shadow theme subscribed by the equipment to be upgraded again so that the equipment to be upgraded acquires the upgrading task information through the shadow theme and upgrades the version until the equipment to be upgraded is upgraded successfully.
4. The terminal upgrading method according to claim 3, further comprising:
sending reminding information of the upgrade failure to the equipment to be upgraded under the condition that the upgrade failure of the equipment to be upgraded is determined according to the upgrade feedback information;
and obtaining an upgrade log of the equipment to be upgraded so as to determine the reason of upgrade failure.
5. The terminal upgrading method according to claim 1, wherein the sending of the upgrading message to the shadow theme subscribed by the device to be upgraded comprises:
and sending an upgrading message to the shadow theme subscribed by the equipment to be upgraded through a message queue telemetry transmission protocol.
6. The terminal upgrading method according to claim 1, wherein the terminal includes a plurality of devices, the upgrade task information further includes additional information, the determining a device to be upgraded in the terminal according to the upgrade task information, and generating an upgrade message corresponding to the device to be upgraded includes:
acquiring the current version number of each device;
determining equipment to be upgraded in the plurality of equipment according to the current version number and version number information in the upgrading task information;
and generating an upgrade message corresponding to each device to be upgraded according to the additional information and the upgrade package, wherein the upgrade package is used for completing the upgrade task, and the additional information is used for describing the upgrade package.
7. The terminal upgrading method according to any one of claims 1 to 6, characterized in that the upgrade package is an incremental upgrade package.
8. A terminal upgrading method is applied to a terminal, and the terminal upgrading method comprises the following steps:
obtaining an upgrading message through a subscribed shadow theme;
when the mobile terminal is online, receiving an upgrading message according to the shadow theme to acquire upgrading task information, wherein the upgrading task information comprises an upgrading packet;
and upgrading the version according to the upgrading task information.
9. The terminal upgrading method according to claim 8, further comprising:
and under the condition of successful upgrading, sending upgrading feedback information of successful upgrading to the server so as to update the version number through the server.
10. The terminal upgrading method according to claim 8, further comprising:
under the condition of upgrading failure, sending upgrading feedback information of the upgrading failure to the server;
and obtaining the upgrading message issued by the server according to the upgrading feedback information failed in upgrading through the shadow theme again, obtaining upgrading task information corresponding to the upgrading message from the server, and upgrading the version according to the upgrading task information until the upgrading is successful.
11. The terminal upgrading method according to claim 10, further comprising:
under the condition of upgrading failure, sending upgrading feedback information of the upgrading failure to the server;
acquiring reminding information sent by the server according to the upgrading feedback information of the upgrading failure;
and uploading the upgrade log to the server to determine the reason of the upgrade failure.
12. The terminal upgrading method according to claim 8, wherein the obtaining the upgrading message through the shadow theme comprises:
and obtaining the upgrading message sent by the server through the message queue remote measuring transmission protocol through the shadow theme.
13. The terminal upgrading method according to claim 8, wherein the upgrading task information includes additional information, the terminal includes a plurality of devices, and the obtaining of the upgrading message through the subscribed shadow theme further includes:
for each device, uploading a device identifier and a current version number of the device to the server;
after the server determines equipment to be upgraded according to the current version number and the version number in the upgrading task information, obtaining an upgrading message generated by the server according to the additional information and the upgrading packet through a shadow theme;
the upgrade package is used for completing the upgrade task, and the additional information is used for describing the upgrade package.
14. The terminal upgrade method according to any one of claims 8 to 13, wherein the upgrade package is an incremental upgrade package.
15. A terminal upgrading device is applied to a server, and comprises:
the data acquisition module is used for acquiring upgrading task information, and the upgrading task information comprises an upgrading packet;
the upgrading device determining module is used for determining the device to be upgraded in the terminal according to the upgrading task information and generating an upgrading message corresponding to the device to be upgraded;
and the first upgrading module is used for sending the upgrading message to a shadow theme subscribed by the equipment to be upgraded so as to enable the equipment to be upgraded to acquire the upgrading task information through the shadow theme under the online state and upgrade the version.
16. A terminal upgrading device is applied to a terminal, and comprises:
the message monitoring module is used for acquiring an upgrading message through a subscribed shadow theme;
the data acquisition module is used for acquiring upgrading task information according to the upgrading message received by the shadow theme when the software is online, wherein the upgrading task information comprises an upgrading packet;
and the second upgrading module is used for upgrading the version according to the upgrading task information.
17. A machine-readable storage medium having instructions stored thereon, which when executed by a processor causes the processor to be configured to perform a terminal upgrade method according to any one of claims 1 to 7.
18. A machine-readable storage medium having instructions stored thereon, which when executed by a processor causes the processor to be configured to perform a terminal upgrade method according to any one of claims 8 to 14.
CN202111550883.XA 2021-12-17 2021-12-17 Terminal upgrading method and device and storage medium Pending CN114489711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111550883.XA CN114489711A (en) 2021-12-17 2021-12-17 Terminal upgrading method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111550883.XA CN114489711A (en) 2021-12-17 2021-12-17 Terminal upgrading method and device and storage medium

Publications (1)

Publication Number Publication Date
CN114489711A true CN114489711A (en) 2022-05-13

Family

ID=81494444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111550883.XA Pending CN114489711A (en) 2021-12-17 2021-12-17 Terminal upgrading method and device and storage medium

Country Status (1)

Country Link
CN (1) CN114489711A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978902A (en) * 2022-05-18 2022-08-30 阿里云计算有限公司 Information processing method, apparatus, device, storage medium, and program product
CN117834649A (en) * 2024-03-01 2024-04-05 荣耀终端有限公司 Data transmission method and related device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978902A (en) * 2022-05-18 2022-08-30 阿里云计算有限公司 Information processing method, apparatus, device, storage medium, and program product
CN114978902B (en) * 2022-05-18 2024-05-14 阿里云计算有限公司 Information processing method, apparatus, device, storage medium, and program product
CN117834649A (en) * 2024-03-01 2024-04-05 荣耀终端有限公司 Data transmission method and related device

Similar Documents

Publication Publication Date Title
CN107608689B (en) Method and device for updating application program on client and electronic equipment
CN101571809B (en) Implementation method of plug-in registration and device thereof
US20060156129A1 (en) System for maintaining data
CN114489711A (en) Terminal upgrading method and device and storage medium
CN110837388B (en) Software upgrading method of robot, upgrading server, robot and storage medium
CN107066300B (en) Firmware upgrading method of storage device and storage device
CN108509215B (en) System software replacing method and device, terminal equipment and storage medium
CN109871225B (en) Electronic control unit ECU upgrading method and ECU
CN104067276A (en) Client-side minimal download and simulated page navigation features
CN110855746A (en) Middleware management method, electronic device and storage medium
CN111651304B (en) Software recovery method and device based on double-core intelligent ammeter and computer equipment
CN113760333A (en) Software upgrading method and device, electronic equipment and computer readable storage medium
CN112702195A (en) Gateway configuration method, electronic device and computer readable storage medium
CN110493644B (en) Television application upgrading method, television terminal and server
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN115129574A (en) Code testing method and device
KR20120117504A (en) Communication system and method for updating software thereof
CN116126379A (en) BIOS firmware upgrading method, device, equipment and storage medium
CN114895933A (en) System upgrade method, network device, medium, and electronic device
CN113448609A (en) Container upgrading method, device, equipment and storage medium
CN114879977A (en) Application deployment method, device and storage medium
CN116820663A (en) Mirror image construction method, device, storage medium and apparatus
CN113608831A (en) Plug-in instance management method, system, storage medium and equipment
CN113422791A (en) Cloud service configuration method and device, electronic equipment and computer-readable storage medium
CN117453257B (en) Upgrading method based on hierarchical management, terminal equipment and 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