CN110716734A - Software upgrading method and device, electronic equipment and medium - Google Patents

Software upgrading method and device, electronic equipment and medium Download PDF

Info

Publication number
CN110716734A
CN110716734A CN201910890350.2A CN201910890350A CN110716734A CN 110716734 A CN110716734 A CN 110716734A CN 201910890350 A CN201910890350 A CN 201910890350A CN 110716734 A CN110716734 A CN 110716734A
Authority
CN
China
Prior art keywords
software
upgraded
downloading
hardware architecture
latest version
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.)
Granted
Application number
CN201910890350.2A
Other languages
Chinese (zh)
Other versions
CN110716734B (en
Inventor
徐俊俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910890350.2A priority Critical patent/CN110716734B/en
Publication of CN110716734A publication Critical patent/CN110716734A/en
Application granted granted Critical
Publication of CN110716734B publication Critical patent/CN110716734B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The embodiment of the application provides a method, a device, electronic equipment and a medium for software upgrading, which relate to the technical field of computers, and the scheme of the application comprises the following steps: the method comprises the steps of obtaining hardware architecture information applicable to the latest version of software to be upgraded, generating a downloading task if the hardware architecture information applicable to the latest version of the software to be upgraded comprises hardware architecture information of edge equipment, wherein the downloading task is used for downloading a mirror image file corresponding to the latest version of the software to be upgraded, downloading the mirror image file from a server according to the downloading task, and operating the mirror image file in a containerization operating environment so as to realize upgrading operation of the software to be upgraded. By adopting the method and the device, the complexity of software maintenance can be reduced.

Description

Software upgrading method and device, electronic equipment and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for upgrading software, an electronic device, and a medium.
Background
At present, more and more intelligent edge devices, such as intelligent sound boxes, intelligent routers or intelligent storage gateways, have different hardware model parameters, software systems and versions among different edge devices.
For the above differences, it is currently necessary to maintain different versions of software for different edge devices, and in order to apply the same version of software to different edge devices as much as possible, related technologies often reduce the differences between the edge devices to make different edge devices compatible with the same version of software, thereby reducing the complexity of maintaining the software.
However, it is difficult to reduce the complexity of maintaining software because it is difficult to reduce the difference between different edge devices due to objective factors such as functional limitations, system differences, and manufacturer differences.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus, an electronic device, and a medium for upgrading software, so as to reduce the complexity of maintaining the software. The specific technical scheme is as follows:
in a first aspect, a method for upgrading software is provided, where the method is applied to a system including a server and at least two edge devices, each of the edge devices is provided with an edge component, and the edge component is used to carry a containerized operating environment, and the method is performed on the edge component, and the method includes:
acquiring hardware architecture information applicable to the latest version of software to be upgraded;
if the hardware architecture information applicable to the latest version of the software to be upgraded comprises the hardware architecture information of the edge device, generating a downloading task, wherein the downloading task is used for downloading the image file corresponding to the latest version of the software to be upgraded;
downloading the mirror image file from the server according to the downloading task;
and operating the image file in the containerization operating environment to realize the upgrading operation of the software to be upgraded.
Optionally, the download task includes a download mode, where the download mode is a peer-to-peer network download mode or a hypertext transfer protocol download mode; the downloading the image file from the server according to the downloading task comprises:
if the downloading mode is a peer-to-peer network downloading mode, downloading the image file from other edge equipment through the peer-to-peer network downloading mode;
and if the downloading mode information is a hypertext transfer protocol downloading mode, downloading the image file from the server through the hypertext transfer protocol downloading mode.
Optionally, the obtaining of the hardware architecture information applicable to the latest version of the software to be upgraded includes:
receiving a software upgrading message sent by a server, wherein the software upgrading message comprises hardware architecture information applicable to the latest version of the software to be upgraded;
and acquiring the hardware architecture information applicable to the latest version corresponding to the software to be upgraded from the software upgrading message.
Optionally, before receiving the software upgrade message sent by the server, the method further includes:
and if the time length between the last time of upgrading the software to be upgraded and the current time is greater than or equal to the preset time length, sending an upgrading request to the server, wherein the upgrading request is used for requesting the server to acquire hardware architecture information applicable to the latest version of the software to be upgraded.
Optionally, before the obtaining of the hardware architecture information applicable to the latest version of the software to be upgraded, the method further includes:
if the current system version does not support the bearing containerization operating environment, acquiring hardware architecture information and system version information applicable to the latest version of an upgrade file corresponding to the software to be upgraded;
if the hardware architecture information applicable to the latest version of the software to be upgraded comprises the hardware architecture information of the edge device, and the system version information comprises the system version of the edge device, generating a downloading task, wherein the downloading task is used for downloading an upgrading file corresponding to the software to be upgraded;
according to the downloading task, downloading an upgrading file corresponding to the software to be upgraded from the server;
and running the upgrade file corresponding to the software to be upgraded in the system process corresponding to the current system version. In a second aspect, an apparatus for software upgrade is provided, where the apparatus is applied to a system including a server and at least two edge devices, each of the edge devices is provided with an edge component, and the edge component is used to carry a containerized operating environment, and the apparatus is executed in the edge component, and the apparatus includes:
the acquisition module is used for acquiring hardware architecture information applicable to the latest version of the software to be upgraded;
the generation module is used for generating a downloading task if the hardware architecture information applicable to the latest version of the software to be upgraded comprises the hardware architecture information of the edge device, wherein the downloading task is used for downloading the image file corresponding to the latest version of the software to be upgraded;
the downloading module is used for downloading the mirror image file from the server according to the downloading task;
and the operation module is used for operating the image file in the containerization operation environment so as to realize the upgrading operation of the software to be upgraded.
Optionally, the download task includes a download mode, where the download mode is a peer-to-peer network download mode or a hypertext transfer protocol download mode; the download module is specifically configured to:
if the downloading mode is a peer-to-peer network downloading mode, downloading the image file from other edge equipment through the peer-to-peer network downloading mode;
and if the downloading mode information is a hypertext transfer protocol downloading mode, downloading the image file from the server through the hypertext transfer protocol downloading mode.
Optionally, the obtaining module is specifically configured to:
receiving a software upgrading message sent by a server, wherein the software upgrading message comprises hardware architecture information applicable to the latest version of the software to be upgraded;
and acquiring the hardware architecture information applicable to the latest version corresponding to the software to be upgraded from the software upgrading message.
Optionally, the apparatus further comprises: a request module;
the request module is configured to send an upgrade request to the server if a time length between a time when the software to be upgraded is upgraded last time and a current time is greater than or equal to a preset time length, where the upgrade request is used to request the server to acquire hardware architecture information applicable to a latest version of the software to be upgraded.
Alternatively to this, the first and second parts may,
the obtaining module is further configured to obtain hardware architecture information and system version information applicable to the latest version of an upgrade file corresponding to the software to be upgraded, if the current system version does not support a load-bearing containerized operating environment;
the generation module is further configured to generate a download task if the hardware architecture information applicable to the latest version of the software to be upgraded includes the hardware architecture information of the edge device, and the system version information includes the system version of the edge device, where the download task is used to download an upgrade file corresponding to the software to be upgraded;
the download module is further used for downloading the upgrade file corresponding to the software to be upgraded from the server according to the download task;
the running module is further configured to run the upgrade file corresponding to the software to be upgraded in the system process corresponding to the current system version.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of the first aspect when executing the program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when being executed by a processor, carries out the method steps of the first aspect.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
In the method, the apparatus, the electronic device, and the medium for software upgrade provided by the embodiments of the present application, edge devices in the embodiments of the present application are all provided with edge components, and compared with the prior art that different versions of software need to be maintained for edge devices of different software system kernel versions, in the embodiments of the present application, each edge component bears a containerization operating environment, and the containerization operating environment can operate software of the same version and the same image file, so that during software upgrade, if hardware architecture information applicable to the latest version of software to be upgraded includes hardware architecture information of the edge device, a download task can be generated and an image file corresponding to the software to be upgraded is downloaded, and even if system versions of each edge device are different, each edge device can operate the same image file through the containerization operating environment, so that the present application does not need to maintain different versions of software for edge devices of different software system kernel versions, the complexity of maintaining the software is greatly reduced.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic view of an edge assembly provided in accordance with an embodiment of the present application;
fig. 2 is a flowchart of a method for upgrading software according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of another method for upgrading software provided by an embodiment of the present application;
fig. 4 is a schematic structural diagram of a device for software upgrade according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for software upgrade according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a software upgrading method, which is applied to a system comprising a server and at least two edge devices, wherein each edge device is provided with an edge component, the edge components are used for bearing containerization operating environments, and the method is executed on the edge components. The edge device may be a home intelligent edge device, such as a smart speaker, a smart router, or a smart storage gateway, and the edge device may also be a device that provides an entry point to an enterprise or a service provider core network.
The edge devices may form a system with a server, in which the server may provide image files for software upgrade to each edge device under the server, so that the edge devices may update the software to be upgraded in the edge devices.
As shown in fig. 1, fig. 1 is a schematic view of an edge assembly according to an embodiment of the present disclosure. The edge assembly includes: the system comprises a long connection module, a timing upgrade module, a download engine module, an Application Programming Interface (API) and a service engine module, wherein the service engine module comprises an open source engine submodule and a native engine submodule.
The long connection module is used for receiving a software upgrading message sent by the server, establishing a downloading task for downloading the image file of the latest version of the software to be upgraded according to the software upgrading message, and sending the downloading task to the downloading engine module.
The timing upgrading module is used for accessing the upgrading link at regular intervals, the edge device can send an upgrading request to the server in a mode of accessing the upgrading link at regular intervals, a downloading task for downloading the image file of the latest version of the software to be upgraded is established according to the upgrading message sent by the server, and the downloading task is sent to the downloading engine module.
When the download engine module receives the download task, the image file of the latest version of the software to be upgraded can be downloaded and verified through a download mode (such as a peer-to-peer network download mode or a hypertext transfer protocol download mode) included in the download task.
After the verification is that the downloading is completed, the edge component checks whether the file is operated correctly.
After the verification of the edge device, if the image file is consistent with the image file which should be downloaded by the downloading task, the downloading engine module sends the image file of the latest version of the software to be upgraded to the API.
The API is used to connect different components of the software system, and when the API receives the image file sent by the download engine, the API can send the image file to the service engine module.
The service engine module is used for managing software in the edge device, the service engine module comprises an open source engine submodule and a native engine submodule, each sub-module corresponds to an operation mode, and the edge device can automatically select one of the two submodules to operate according to an upgrading message sent by the server.
The open source engine submodule is suitable for edge equipment with a software system kernel version of 3.10 version and more than 3.10 version according to respective operation modes of the two submodules, can bear a containerized operation environment, and operates a mirror image file in the borne containerized operation environment, so that the aim of enabling the mirror image file to be compatible with the software system is fulfilled. The functions of the open source engine submodule can also comprise: and starting, ending, restarting, upgrading, allocating resources and the like to the software in the edge device.
The native engine submodule is suitable for the edge device with the kernel version lower than 3.10 version of the software system, and the functions of the native engine submodule can comprise: and starting, ending, restarting, upgrading and the like are carried out on the software in the edge equipment.
A method for upgrading software provided in the embodiment of the present application will be described in detail below with reference to specific embodiments, where the method is performed on an edge component shown in fig. 1, as shown in fig. 2, and the specific steps are as follows:
step 201, obtaining the hardware architecture information applicable to the latest version of the software to be upgraded.
Step 201 may be performed by the long connection module or the timing upgrade module in fig. 1.
The hardware architecture of The edge device may include an architecture of a processor, for example, The architecture of The processor may be an x86 architecture (The x86 architecture), an arm architecture (atomic Reduced Instruction Set computing machine), a mirple architecture (Microprocessor with interleaved staged architecture), or The like.
Step 202, if the hardware architecture information applicable to the latest version of the software to be upgraded includes the hardware architecture information of the edge device, a download task is generated.
Wherein step 202 can be performed by the long connection module or the timing upgrade module in fig. 1.
If the hardware architecture information applicable to the latest version of the software to be upgraded includes the hardware architecture information of the edge device, it is indicated that the latest version of the software to be upgraded is applicable to the hardware architecture of the edge device.
Furthermore, the edge component can establish a downloading task for downloading the image file corresponding to the latest version of the software to be upgraded according to the software upgrading message.
The downloading task is used for downloading an image file corresponding to the latest version of the software to be upgraded, and the image file can be an installation file of the software to be upgraded of the latest version, which is required to be installed by the edge device.
For example, if the hardware architecture information applicable to the latest version of the software to be upgraded is a processor of an x86 architecture, and the hardware architecture information of the edge device is a processor of an x86 architecture, the edge component may generate a download task for downloading the image file.
And step 203, downloading the mirror image file from the server according to the downloading task.
Wherein step 203 may be performed by the download engine module of fig. 1.
And step 204, operating the image file in the containerization operating environment.
Wherein step 204 may be performed by the service engine module in fig. 1.
Specifically, after the download engine submodule downloads the image file from the server, the download engine submodule may send the image file to the API, and when the API receives the image file sent by the download engine, the API may send the image file to the service engine module.
When the service engine module receives the image file, the service engine module can operate the image file through the open source engine submodule, and the open source engine submodule can operate the image file in a loaded containerization operation environment on the basis of an interface of the open source engine submodule, so that the upgrading operation of the software to be upgraded is realized.
According to the content described in fig. 1, if the software system kernel version of the edge device to which the edge component belongs is 3.10 version or a version above 3.10 version, the open source engine submodule may run the downloaded image file in the loaded containerization running environment.
If the open source engine sub-module bears the same containerization operating environment in the edge devices with the same hardware architecture and different software system versions, the edge devices with the same hardware architecture and different software system versions can operate the software with the same version.
In the method for upgrading software provided by the embodiment of the application, the edge devices in the embodiment of the application are all provided with the edge components, and compared with the prior art that the edge devices with different software system kernel versions need to maintain the software with different versions, because each edge component bears the containerization operating environment which can operate the software with the same version and the same mirror image file, when the software is upgraded, if the hardware architecture information applicable to the latest version of the software to be upgraded comprises the hardware architecture information of the edge devices, a downloading task can be generated and the mirror image file corresponding to the software to be upgraded is downloaded, and even if the system versions of the edge devices are different, each edge device can operate the same mirror image file through the containerization operating environment, so that the method for upgrading software does not need to maintain the software with different versions for the edge devices with different software system kernel versions, the complexity of maintaining the software is greatly reduced.
In the embodiment of the application, the container technology is applied to the edge device, so that a uniform containerization operating environment can be provided on a large number of edge devices, and because the number of the maintained software versions is reduced by the method, the cost of maintaining the software can be reduced, and the management and upgrading efficiency of the server on the software in the edge devices is improved.
In practical application, the method provided by the embodiment of the present application may be applied to an intelligent device, for example: the smart device may be a home smart device in which an edge component may be located.
The server can issue various application software to the home intelligent device, so that the home intelligent device can realize various functions, such as video playing, file storage, server and the like.
By the method provided by the embodiment of the application, the management efficiency and the issuing efficiency of the server to the application software can be improved.
Optionally, in the step 201, a specific implementable manner of obtaining the hardware architecture information applicable to the latest version of the software to be upgraded is as follows:
and receiving a software upgrading message sent by the server, and acquiring the hardware architecture information applicable to the latest version corresponding to the software to be upgraded from the software upgrading message.
When the latest version of software to be upgraded is online in the server, the server may send a software upgrading message corresponding to the latest version of software to be upgraded to the edge components in each edge device, where the software upgrading message includes hardware architecture information applicable to the latest version of the software to be upgraded.
When the latest version of software to be upgraded is online in the server, the server can send an upgrade message to the edge device below the server, so that the edge device below the server can be upgraded. If the server sends the upgrading information to each edge device under the server while the latest version of software to be upgraded is on line, the purpose of real-time updating can be achieved.
Therefore, the edge component can realize the timely upgrading of the software to be upgraded on line in the latest version of the software to be upgraded through the process, and the timeliness of the software updating of the edge component is ensured.
In the embodiment of the application, the upgrading message can be uniformly issued to each edge device under the server by the server in a long connection mode, so that the software resource management efficiency is greatly improved.
Optionally, in another possible implementation manner, if a time length between a time when the software to be upgraded is upgraded last time and a current time is greater than or equal to a preset time length, an upgrade request is sent to the server, and an upgrade message sent by the server is received.
The upgrade request is used to request to acquire hardware architecture information corresponding to the latest version of the software to be upgraded, and the server may send an upgrade response to the edge component after receiving the upgrade request.
In order to deal with the situation that the edge component does not receive the upgrade message actively sent by the server, the edge component can send an upgrade request to the server periodically to ensure that the edge component avoids missing the upgrade.
Based on the above, the upgrade message specifically includes the following contents, as an example:
name of service or software to be upgraded: the service a is a service of the service a,
software system of edge device: in the case of the Linux system,
a processor of the edge device: an arm32 bit processor for processing,
the service engine module operates the sub-modules: a docker (application container engine) engine submodule,
download address of image file: http:// update. XXX. com/agent/,
information summary in upgrade message: dzuviysgmgqqb + k2SOAxQ ═ q,
the downloading mode of the edge component for downloading the mirror image file is as follows: HyperText transfer protocol (http) download mode,
version information of the image file: 682e45 c.
Optionally, the download task established by the edge component includes a download mode, the download mode may be a peer-to-peer network download mode or a hypertext transfer protocol download mode, and the edge component may determine the download mode according to the download mode specified by the server in the upgrade message.
Based on the difference of the downloading manners, in step 203, the image file is downloaded from the server according to the downloading task, which may specifically include the following two downloading manners:
and in the first mode, if the downloading mode is a peer-to-peer network downloading mode, downloading the mirror image file from other edge equipment in the peer-to-peer network downloading mode.
The peer-to-peer network is a distributed application architecture for distributing tasks and workloads among peers, and is a networking or network form formed by a peer-to-peer computing model in an application layer. By adopting a peer-to-peer network downloading mode, the edge component can acquire resources from other edge devices, so that the downloading speed can be increased, the downloading success rate can be ensured, and the pressure of a downloading server can be reduced.
And secondly, if the downloading mode information is a hypertext transfer protocol downloading mode, downloading the mirror image file from the server in the hypertext transfer protocol downloading mode.
In the embodiment of the application, after the edge component downloads the image file corresponding to the latest version of the software to be upgraded, whether the image file is consistent with the image file which should be downloaded by the edge component can be detected.
When the image file to be downloaded establishes a download task for the edge device, the image file corresponding to the download task may be mistaken during downloading or the download path may be maliciously tampered with, so that the edge component may detect whether the downloaded image file is consistent with the image file to be downloaded by the edge component after the downloading is completed.
For example, after the edge component downloads the image file corresponding to the latest version of the software to be upgraded, the information digest in the downloaded image file may be determined, and if the information digest in the downloaded image file is consistent with the information digest of the image file that the edge component should download, it is verified that the downloaded image file is consistent with the image file that the edge component should download.
If the downloaded image file is not consistent with the image file which the edge component should download, the edge component can report an error to the server and regenerate a downloading task for downloading the image file corresponding to the latest version of the software to be upgraded.
The Message Digest may be generated by a Message Digest5 Algorithm (MD 5), and the Message Digest may be used to detect whether the downloaded image file is consistent with the image file to be downloaded, where the Message Digest is composed of a string of characters unique to the image file, and thus the Message Digest has a function of detecting consistency.
Optionally, before the step 201, obtaining the hardware architecture information applicable to the latest version of the software to be upgraded, if the software system kernel version of the edge device is lower than the 3.10 version, the server may specify the edge component to run the native engine sub-module through the upgrade message.
In practical application, a small part of edge devices still adopt system cores with versions lower than 3.10, so that the flow shown in fig. 3 is provided in the embodiment of the present application to ensure that all edge devices can be upgraded smoothly.
As shown in fig. 3, the process of the edge component upgrading the software to be upgraded through the native engine sub-module may specifically include the following steps:
step 301, if the current system version does not support the load-bearing containerization operating environment, acquiring hardware architecture information and system version information applicable to the latest version of the upgrade file corresponding to the software to be upgraded.
Step 302, if the hardware architecture information applicable to the latest version of the software to be upgraded includes the hardware architecture information of the edge device, and the system version information includes the system version of the edge device, a download task is generated.
And the downloading task is used for downloading an upgrading file corresponding to the software to be upgraded.
And 303, downloading an upgrade file corresponding to the software to be upgraded from the server according to the download task.
And step 304, running an upgrade file corresponding to the software to be upgraded in a system process corresponding to the current system version.
Wherein the process shown in fig. 3 is directed to a software upgrade process for an edge device with a system kernel version lower than version 3.10.
Based on the same technical concept, an embodiment of the present application further provides a device for upgrading software, as shown in fig. 4, the device includes: an acquisition module 401, a generation module 402, a download module 403 and an operation module 404;
an obtaining module 401, configured to obtain hardware architecture information applicable to a latest version of software to be upgraded;
a generating module 402, configured to generate a download task if the hardware architecture information applicable to the latest version of the software to be upgraded includes the hardware architecture information of the edge device, where the download task is used to download the image file corresponding to the latest version of the software to be upgraded;
a downloading module 403, configured to download the image file from the server according to the downloading task;
and the running module 404 is configured to run the image file in the containerization running environment to implement an upgrade operation of the software to be upgraded.
Optionally, the downloading task includes a downloading mode, where the downloading mode is a peer-to-peer network downloading mode or a hypertext transfer protocol downloading mode; the downloading module 403 is specifically configured to:
if the downloading mode is a peer-to-peer network downloading mode, downloading the mirror image file from other edge equipment in the peer-to-peer network downloading mode;
and if the downloading mode information is a hypertext transfer protocol downloading mode, downloading the mirror image file from the server in the hypertext transfer protocol downloading mode.
Optionally, the obtaining module 401 is specifically configured to:
receiving a software upgrading message sent by a server, wherein the software upgrading message comprises hardware architecture information applicable to the latest version of software to be upgraded;
and acquiring the hardware architecture information applicable to the latest version corresponding to the software to be upgraded from the software upgrading message.
Optionally, as shown in fig. 5, the apparatus further includes: a request module 405;
the request module 405 is configured to send an upgrade request to the server if a time duration between a time when the software to be upgraded is updated last time and a current time is greater than or equal to a preset time duration, where the upgrade request is used to request the server to acquire hardware architecture information applicable to a latest version of the software to be upgraded.
Alternatively to this, the first and second parts may,
the obtaining module 401 is further configured to obtain hardware architecture information and system version information applicable to the latest version of an upgrade file corresponding to software to be upgraded, if the current system version does not support a load-bearing containerization operating environment;
the generating module 402 is further configured to generate a downloading task if the hardware architecture information applicable to the latest version of the software to be upgraded includes the hardware architecture information of the edge device, and the system version information includes the system version of the edge device, where the downloading task is used to download an upgrade file corresponding to the software to be upgraded;
the downloading module 403 is further configured to download, according to the downloading task, an upgrade file corresponding to the software to be upgraded from the server;
the running module 404 is further configured to run an upgrade file corresponding to the software to be upgraded in a system process corresponding to the current system version.
In the device for software upgrade provided by the embodiment of the present application, edge devices are all provided with edge components, and compared with the prior art that different versions of software need to be maintained for edge devices of different software system kernel versions, each edge component in the embodiment of the present application bears a containerization operating environment, and the containerization operating environment can operate software of the same version and the same image file, so that during software upgrade, if the hardware architecture information applicable to the latest version of the software to be upgraded includes the hardware architecture information of the edge device, a download task can be generated and the image file corresponding to the software to be upgraded is downloaded, and even if the system versions of each edge device are different, each edge device can operate the same image file through the containerization operating environment, so that the present application does not need to maintain different versions of software for edge devices of different software system kernel versions, the complexity of maintaining the software is greatly reduced.
The embodiment of the present application further provides an electronic device, as shown in fig. 6, which includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
acquiring hardware architecture information applicable to the latest version of software to be upgraded;
if the hardware architecture information applicable to the latest version of the software to be upgraded comprises the hardware architecture information of the edge device, generating a downloading task, wherein the downloading task is used for downloading the image file corresponding to the latest version of the software to be upgraded;
downloading the mirror image file from the server according to the downloading task;
and operating the image file in the containerization operating environment to realize the upgrading operation of the software to be upgraded.
It should be noted that, when the processor 601 is configured to execute the program stored in the memory 603, it is also configured to implement other steps described in the foregoing method embodiment, and reference may be made to the relevant description in the foregoing method embodiment, which is not described herein again.
The communication bus mentioned in the network device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the network device and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, or discrete hardware components.
Based on the same technical concept, the embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of the software upgrade.
Based on the same technical concept, the embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, causes the computer to perform the above-mentioned method steps of software upgrade.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (12)

1. A method for upgrading software, the method being applied to a system including a server and at least two edge devices, each of the edge devices having an edge component disposed therein, the edge component being configured to carry a containerized operating environment, the method being performed by the edge component, the method including:
acquiring hardware architecture information applicable to the latest version of software to be upgraded;
if the hardware architecture information applicable to the latest version of the software to be upgraded comprises the hardware architecture information of the edge device, generating a downloading task, wherein the downloading task is used for downloading the image file corresponding to the latest version of the software to be upgraded;
downloading the mirror image file from the server according to the downloading task;
and operating the image file in the containerization operating environment to realize the upgrading operation of the software to be upgraded.
2. The method according to claim 1, wherein the download task comprises a download mode, the download mode being a peer-to-peer network download mode or a hypertext transfer protocol download mode; the downloading the image file from the server according to the downloading task comprises:
if the downloading mode is a peer-to-peer network downloading mode, downloading the image file from other edge equipment through the peer-to-peer network downloading mode;
and if the downloading mode information is a hypertext transfer protocol downloading mode, downloading the image file from the server through the hypertext transfer protocol downloading mode.
3. The method of claim 1, wherein the obtaining hardware architecture information applicable to the latest version of the software to be upgraded comprises:
receiving a software upgrading message sent by a server, wherein the software upgrading message comprises hardware architecture information applicable to the latest version of the software to be upgraded;
and acquiring the hardware architecture information applicable to the latest version corresponding to the software to be upgraded from the software upgrading message.
4. The method of claim 3, wherein prior to receiving the software upgrade message sent by the server, the method further comprises:
and if the time length between the last time of upgrading the software to be upgraded and the current time is greater than or equal to the preset time length, sending an upgrading request to the server, wherein the upgrading request is used for requesting the server to acquire hardware architecture information applicable to the latest version of the software to be upgraded.
5. The method of claim 1, wherein prior to said obtaining hardware architecture information applicable to a latest version of software to be upgraded, the method further comprises:
if the current system version does not support the bearing containerization operating environment, acquiring hardware architecture information and system version information applicable to the latest version of an upgrade file corresponding to the software to be upgraded;
if the hardware architecture information applicable to the latest version of the software to be upgraded comprises the hardware architecture information of the edge device, and the system version information comprises the system version of the edge device, generating a downloading task, wherein the downloading task is used for downloading an upgrading file corresponding to the software to be upgraded;
according to the downloading task, downloading an upgrading file corresponding to the software to be upgraded from the server;
and running the upgrade file corresponding to the software to be upgraded in the system process corresponding to the current system version.
6. An apparatus for software upgrade, the apparatus being applied to a system including a server and at least two edge devices, each of the edge devices having an edge component disposed therein, the edge component being configured to carry a containerized operating environment, the apparatus being implemented in the edge component, the apparatus comprising:
the acquisition module is used for acquiring hardware architecture information applicable to the latest version of the software to be upgraded;
the generation module is used for generating a downloading task if the hardware architecture information applicable to the latest version of the software to be upgraded comprises the hardware architecture information of the edge device, wherein the downloading task is used for downloading the image file corresponding to the latest version of the software to be upgraded;
the downloading module is used for downloading the mirror image file from the server according to the downloading task;
and the operation module is used for operating the image file in the containerization operation environment so as to realize the upgrading operation of the software to be upgraded.
7. The apparatus according to claim 6, wherein the download task comprises a download mode, the download mode being a peer-to-peer network download mode or a hypertext transfer protocol download mode; the download module is specifically configured to:
if the downloading mode is a peer-to-peer network downloading mode, downloading the image file from other edge equipment through the peer-to-peer network downloading mode;
and if the downloading mode information is a hypertext transfer protocol downloading mode, downloading the image file from the server through the hypertext transfer protocol downloading mode.
8. The apparatus of claim 6, wherein the obtaining module is specifically configured to:
receiving a software upgrading message sent by a server, wherein the software upgrading message comprises hardware architecture information applicable to the latest version of the software to be upgraded;
and acquiring the hardware architecture information applicable to the latest version corresponding to the software to be upgraded from the software upgrading message.
9. The apparatus of claim 8, further comprising: a request module;
the request module is configured to send an upgrade request to the server if a time length between a time when the software to be upgraded is upgraded last time and a current time is greater than or equal to a preset time length, where the upgrade request is used to request the server to acquire hardware architecture information applicable to a latest version of the software to be upgraded.
10. The apparatus of claim 6,
the obtaining module is further configured to obtain hardware architecture information and system version information applicable to the latest version of an upgrade file corresponding to the software to be upgraded, if the current system version does not support a load-bearing containerized operating environment;
the generation module is further configured to generate a download task if the hardware architecture information applicable to the latest version of the software to be upgraded includes the hardware architecture information of the edge device, and the system version information includes the system version of the edge device, where the download task is used to download an upgrade file corresponding to the software to be upgraded;
the download module is further used for downloading the upgrade file corresponding to the software to be upgraded from the server according to the download task;
the running module is further configured to run the upgrade file corresponding to the software to be upgraded in the system process corresponding to the current system version.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN201910890350.2A 2019-09-20 2019-09-20 Method, device, electronic equipment and medium for upgrading software Active CN110716734B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910890350.2A CN110716734B (en) 2019-09-20 2019-09-20 Method, device, electronic equipment and medium for upgrading software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910890350.2A CN110716734B (en) 2019-09-20 2019-09-20 Method, device, electronic equipment and medium for upgrading software

Publications (2)

Publication Number Publication Date
CN110716734A true CN110716734A (en) 2020-01-21
CN110716734B CN110716734B (en) 2024-04-23

Family

ID=69209978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910890350.2A Active CN110716734B (en) 2019-09-20 2019-09-20 Method, device, electronic equipment and medium for upgrading software

Country Status (1)

Country Link
CN (1) CN110716734B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611003A (en) * 2020-05-26 2020-09-01 网神信息技术(北京)股份有限公司 Offline upgrading method and device, electronic equipment and computer readable storage medium
CN112653573A (en) * 2020-11-26 2021-04-13 深圳泰首智能技术有限公司 Face recognition data upgrading method and device and face recognition system
WO2022226703A1 (en) * 2021-04-25 2022-11-03 西门子股份公司 Software module deployment method, apparatus, computing device, and storage medium
CN116603245A (en) * 2023-07-21 2023-08-18 腾讯科技(深圳)有限公司 Program version adjustment method, device, equipment and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470609A (en) * 2007-12-28 2009-07-01 Tcl集团股份有限公司 Software upgrading method, system and electronic equipment thereof
CN102546207A (en) * 2010-12-23 2012-07-04 中兴通讯股份有限公司 Distributed centralized scheduling upgrading method and system for network element software version
CN102571446A (en) * 2012-02-08 2012-07-11 华为技术有限公司 Method, device and system for upgrading network device
WO2014176832A1 (en) * 2013-04-28 2014-11-06 烽火通信科技股份有限公司 System and method for intelligent terminal to manage home gateway
CN105099774A (en) * 2015-07-08 2015-11-25 上海斐讯数据通信技术有限公司 Router software upgrading method and system
CN107621937A (en) * 2017-08-16 2018-01-23 珠海格力电器股份有限公司 The methods, devices and systems of software program upgrading
CN108259231A (en) * 2017-12-27 2018-07-06 生迪智慧科技有限公司 Method for upgrading software, gateway, server and the system of smart machine
CN109766108A (en) * 2018-12-12 2019-05-17 北京梧桐车联科技有限责任公司 Vehicle terminal software upgrade-system, method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101470609A (en) * 2007-12-28 2009-07-01 Tcl集团股份有限公司 Software upgrading method, system and electronic equipment thereof
CN102546207A (en) * 2010-12-23 2012-07-04 中兴通讯股份有限公司 Distributed centralized scheduling upgrading method and system for network element software version
CN102571446A (en) * 2012-02-08 2012-07-11 华为技术有限公司 Method, device and system for upgrading network device
WO2014176832A1 (en) * 2013-04-28 2014-11-06 烽火通信科技股份有限公司 System and method for intelligent terminal to manage home gateway
CN105099774A (en) * 2015-07-08 2015-11-25 上海斐讯数据通信技术有限公司 Router software upgrading method and system
CN107621937A (en) * 2017-08-16 2018-01-23 珠海格力电器股份有限公司 The methods, devices and systems of software program upgrading
CN108259231A (en) * 2017-12-27 2018-07-06 生迪智慧科技有限公司 Method for upgrading software, gateway, server and the system of smart machine
CN109766108A (en) * 2018-12-12 2019-05-17 北京梧桐车联科技有限责任公司 Vehicle terminal software upgrade-system, method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李云峰;: "把路由器的"耳朵"叫醒――升级路由器", 电脑爱好者 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611003A (en) * 2020-05-26 2020-09-01 网神信息技术(北京)股份有限公司 Offline upgrading method and device, electronic equipment and computer readable storage medium
CN112653573A (en) * 2020-11-26 2021-04-13 深圳泰首智能技术有限公司 Face recognition data upgrading method and device and face recognition system
WO2022226703A1 (en) * 2021-04-25 2022-11-03 西门子股份公司 Software module deployment method, apparatus, computing device, and storage medium
CN116603245A (en) * 2023-07-21 2023-08-18 腾讯科技(深圳)有限公司 Program version adjustment method, device, equipment and readable storage medium
CN116603245B (en) * 2023-07-21 2023-09-29 腾讯科技(深圳)有限公司 Program version adjustment method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN110716734B (en) 2024-04-23

Similar Documents

Publication Publication Date Title
CN110716734B (en) Method, device, electronic equipment and medium for upgrading software
US10419289B2 (en) System and method for configuration management service
US11924068B2 (en) Provisioning a service
CN109787830B (en) Gray scale distribution control method, device, system, electronic device and storage medium
CN102413022B (en) Application debugging method and system
US20120233299A1 (en) Managing configurations of system management agents in a distributed environment
JP6859340B2 (en) Equipment, systems and methods for retrieving, processing and updating global information
JP2010508581A (en) Offline execution of web-based applications
TW200412509A (en) Autonomic provisioning of network-accessible service behaviors within a federated grid infrastructure
CA2415314A1 (en) Dynamic deployment of services in a computing network
CN114398176A (en) Service access method, device, electronic equipment and storage medium
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN112702195A (en) Gateway configuration method, electronic device and computer readable storage medium
CN112015454B (en) System upgrade package generation method and device, electronic equipment and storage medium
CN111897565A (en) Data processing method, device and equipment based on Internet of things
CN108418857B (en) Zookeeper cluster system and connection method and device thereof
CN113949708B (en) Service bus design method supporting gray scale upgrade access flow control
CN114221996A (en) Service calling method and device, electronic equipment and storage medium
CN111506846B (en) Web page generation method and device, electronic equipment and storage medium
CN115686813A (en) Resource scheduling method and device, electronic equipment and storage medium
CN113992622A (en) Multi-template aggregation message notification sending system and method based on unified model
CN115102854B (en) Remote procedure call route management control method, system and equipment for micro-service
JP7456507B2 (en) Information distribution device, information distribution method and program
US11860752B2 (en) Agentless system and method for discovering and inspecting applications and services in compute environments
CN113014411B (en) Method, device and system for managing network device

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
GR01 Patent grant
GR01 Patent grant