CN115248694A - Cluster cooperative upgrading method and device and readable storage medium - Google Patents

Cluster cooperative upgrading method and device and readable storage medium Download PDF

Info

Publication number
CN115248694A
CN115248694A CN202110465013.6A CN202110465013A CN115248694A CN 115248694 A CN115248694 A CN 115248694A CN 202110465013 A CN202110465013 A CN 202110465013A CN 115248694 A CN115248694 A CN 115248694A
Authority
CN
China
Prior art keywords
upgrading
upgrade
data
equipment
upgraded
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
CN202110465013.6A
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN202110465013.6A priority Critical patent/CN115248694A/en
Publication of CN115248694A publication Critical patent/CN115248694A/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
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/161Computing infrastructure, e.g. computer clusters, blade chassis or hardware partitioning

Abstract

The embodiment of the invention provides a cluster cooperative upgrading method, equipment and a readable storage medium, wherein the method applied to the side of equipment to be upgraded comprises the following steps: when the upgrade is confirmed to be needed, detecting the current upgrade capability and acquiring the upgrade capability requirement of the current available upgrade version; when the current upgrading capability does not meet the upgrading capability requirement, sending a cooperative upgrading request to cluster equipment which is in the same network environment with the equipment to be upgraded; establishing connection with at least one auxiliary upgrading device in the cluster device according to the cooperative upgrading request; and entering an upgrading mode, receiving upgrading data sent by the upgrading assisting equipment, and writing the upgrading data into a system partition. The embodiment of the invention receives the upgrading data sent by the upgrading assisting equipment through establishing connection with the upgrading assisting equipment in the cluster equipment, and directly writes the upgrading data into the system partition to complete upgrading, thereby solving the problem that upgrading cannot be realized due to insufficient resources caused by intermediate processes of downloading, caching, data processing and the like of the upgrading data in the prior art.

Description

Cluster cooperative upgrading method and device and readable storage medium
Technical Field
The embodiment of the invention relates to but is not limited to the technical field of communication, in particular to but not limited to a cluster collaborative upgrading method, device and readable storage medium.
Background
The OTA upgrading capability of the existing equipment is the basic capability which various equipment needs to have, and the OTA upgrading capability can effectively reduce the maintenance cost of the product and improve the competitiveness of the product. In addition, with the popularization of intelligent devices, cluster networking environments in various places are increasingly popularized, such as networking of various intelligent electronic products in personal home environments, networking of various modules in vehicle-mounted environments and the like. Due to the fact that the data processing capacities of the cluster networking devices are different, the upgrading requirement or the cost requirement of the cluster networking devices is limited.
Disclosure of Invention
The embodiment of the invention provides a cluster collaborative upgrading method, equipment and a readable storage medium, which mainly solve the technical problem that upgrading can be realized by using other equipment in cluster networking equipment under the condition of insufficient upgrading capability of the equipment, so that the problem that upgrading cannot be realized due to insufficient resources of the equipment to be upgraded is solved.
In order to solve the above technical problem, an embodiment of the present invention provides a cluster collaborative upgrade method, which is applied to a device side to be upgraded, and includes: when the upgrade is confirmed to be needed, detecting the current upgrade capability and acquiring the upgrade capability requirement of the current available upgrade version; when the current upgrading capability does not meet the upgrading capability requirement, sending a cooperative upgrading request to cluster equipment which is in the same network environment with the equipment to be upgraded; establishing connection with at least one assistant upgrading device in the cluster device according to the cooperative upgrading request; and entering an upgrading mode, receiving upgrading data sent by the upgrading assisting equipment, and writing the upgrading data into a system partition.
The embodiment of the invention also provides a cluster collaborative upgrading method, which is applied to the side assisting the upgrading equipment and comprises the following steps: when a cooperative upgrading request sent by equipment to be upgraded in the same network environment in cluster equipment is monitored, detecting the current assistance upgrading capability according to the cooperative upgrading request; when the current assistance upgrading capability meets the upgrading capability corresponding to the cooperative upgrading request, establishing connection with the equipment to be upgraded; and entering a collaborative upgrading mode, and sending upgrading data to the equipment to be upgraded so that the equipment to be upgraded writes the upgrading data into a system partition of the equipment to be upgraded to finish upgrading.
The embodiment of the invention also provides terminal equipment, which comprises a processor, a memory and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is used for executing one or more first computer programs stored in the memory so as to realize the steps of the cluster collaborative upgrading method applied to the side of the equipment to be upgraded; and/or the processor is configured to execute one or more second computer programs stored in the memory to implement the steps applied to the cluster collaborative upgrade method for assisting the upgrade device side.
An embodiment of the present invention further provides a computer-readable storage medium, where one or more first computer programs and one or more second computer programs are stored, and the one or more first computer programs may be executed by one or more processors to implement the foregoing steps of the cluster collaborative upgrade method applied to the device side to be upgraded; alternatively, the one or more second computer programs may be executable by one or more processors to implement the aforementioned steps applied to the cluster collaborative upgrade method for assisting the upgrade device side.
According to the cluster cooperative upgrading method, the cluster cooperative upgrading device and the readable storage medium provided by the embodiment of the invention, at the side of the device to be upgraded, by detecting the current upgrading capability, when the current upgrading capability does not meet the upgrading capability requirement of upgrading to an available upgrading version, the connection is established with the upgrading assisting device in the cluster device, so that the upgrading data sent by the upgrading assisting device is received and is directly written into the system partition, and the upgrading is completed, so that the problem that the upgrading cannot be realized due to insufficient resources caused by intermediate processes such as downloading, caching and data processing of the upgrading data in the prior art is solved.
Additional features and corresponding advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a schematic diagram of a device networking structure according to a first embodiment of the present invention;
FIG. 2 is a basic flowchart of a first embodiment of the present invention;
fig. 3 is a schematic diagram of a networking structure of a device to be upgraded and an assisting device according to a first embodiment of the present invention;
FIG. 4 is a flowchart of a write upgrade data according to a first embodiment of the present invention;
FIG. 5 is a basic flowchart of a second embodiment of the present invention;
fig. 6 is a basic flow chart of a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The first embodiment is as follows:
with the popularization of intelligent devices, cluster networking environments in various places are becoming more and more popular, for example, in the personal home environment shown in fig. 1, various intelligent electronic product networking environments are realized, and each device is connected to a router in a wired or wireless manner to realize network access. The OTA upgrade of the existing equipment can be realized, but with the cost requirement of products, the design of single equipment in cluster equipment can optimize resources, reduce storage and computing power and the like, so that when a user needs larger storage resources or more computing power during upgrade, the single equipment cannot complete the upgrade. In order to solve the problem, an embodiment of the present invention provides a scheme for assisting in upgrading by using other devices in a cluster, so as to complete upgrading of a device to be upgraded. Since there may be multiple types of devices within a cluster, some of which may have better computing or storage capabilities, upgrades may be done with these devices. By the mode, the problem that single equipment cannot be upgraded due to insufficient capacity can be solved, high extra resources are not needed to be configured for upgrading the equipment, and cost and convenience in subsequent maintenance are both considered.
The embodiment provides a cluster collaborative upgrade method, as shown in fig. 2, which is applied to a device side to be upgraded, and includes:
s201, when the upgrade is confirmed to be needed, detecting the current upgrade capability, and acquiring the upgrade capability requirement of the current available upgrade version.
S202, when the current upgrading capability does not meet the upgrading capability requirement, sending a cooperative upgrading request to cluster equipment which is in the same network environment with the equipment to be upgraded;
s203, establishing connection with at least one auxiliary upgrading device in the cluster device according to the cooperative upgrading request;
and S204, entering an upgrading mode, receiving upgrading data sent by the upgrading assisting equipment, and writing the upgrading data into a system partition.
In this embodiment, when it is determined that upgrade is required, the current upgrade capability is detected. For example, when the device to be upgraded monitors an available upgrade version, or receives an upgrade notification message sent by a server, it indicates that the device to be upgraded needs to be upgraded, and the device to be upgraded may detect its CPU load, ROM information and RAM information required to upgrade to the available upgrade version, and the like. If the upgrade capability requirement required for upgrading to the available upgrade version cannot be met, sending a collaborative upgrade request to other devices in the cluster device, for example, a priority table may be preset in the cluster device, and the collaborative upgrade request may be sent according to one or more devices with the upgrade capability earlier in the selected priority table, or the collaborative upgrade request may be directly sent to all other devices or a specified device, and the sending of the collaborative upgrade request may use a specified data format, data content, and broadcast mode. The cooperative upgrade request at least comprises a download address of the available upgrade version, required ROM information, required RAM information and equipment connection information. Where the device connection information referred to in this example is the connection information needed by the other cluster devices to respond. As shown in fig. 3, the device to be upgraded and the assisted upgrading device are in the same local area network, and after responding to the other devices in the cluster, the device to be upgraded and the assisted upgrading device establish a connection with at least one assisted upgrading device in the cluster device, enter an upgrading mode, and receive upgrading data sent by the assisted upgrading device.
According to the embodiment, the upgrading data sent by the upgrading assisting equipment is directly written in, so that version upgrading is completed, and the problem that upgrading cannot be achieved due to insufficient resources caused by the fact that the upgrading data need to be downloaded, cached, processed and the like in the middle process in the prior art is solved.
In an example, after establishing a connection with at least one upgrade assisting device of the cluster devices, the cluster cooperative upgrade method further includes:
generating a digital certificate;
and sending the digital certificate to the upgrade assisting equipment so that the upgrade assisting equipment encrypts upgrade data according to the digital certificate.
In this example, after the device to be upgraded receives the response of the upgrade assisting device, the digital certificate is generated and sent to the upgrade assisting device, and of course, the indication data may also be sent together, where the indication data is used to indicate to the upgrade assisting device that the device to be upgraded needs to assist in upgrading. The upgrading assisting equipment can store the digital certificate, upgrade data sent by the upgrading assisting equipment is encrypted by the digital certificate, and the equipment to be upgraded can decrypt the encrypted upgrade data by the digital certificate, so that the upgrade data can be verified.
In an example, as shown in fig. 4, the receiving upgrade data sent by the upgrade assisting apparatus and writing the upgrade data into a system partition includes:
s401, receiving encrypted upgrading data sent by the upgrading assisting equipment;
s402, decrypting the encrypted upgrading data by using the digital certificate to obtain upgrading data;
and S403, writing the upgrade data into a system partition.
As an exemplary manner of writing data, in the process of assisting the upgrade device to send the upgrade data of the available version to the device to be upgraded, a part of the upgrade data may be acquired at one side of the device to be upgraded according to its current upgrade capability. Since the upgrade assisting device encrypts the upgrade data by using the digital certificate, in this example, a part of the obtained encrypted upgrade data may be decrypted by using the data certificate to obtain a part of the upgrade data, and then the part of the upgrade data is written into the system partition.
As another exemplary data writing manner, an encrypted upgrade data packet sent after assisting one side of the upgrade device to split the upgrade data of the available version in advance may be received, the basis of the data splitting may be the upgrade capability of the upgrade assisting device or may be the preset split into N upgrade data sub-packets, and the device to be upgraded only needs to decrypt the received encrypted upgrade data packet and then writes the decrypted upgrade data packet into the system partition. After the writing is finished, the equipment to be upgraded can verify the data written into the system partition, so that the data writing is ensured to be abnormal, and after the upgrading is finished, the equipment to be upgraded is restarted to enter a new system to finish the system upgrading. If the exception exists, the upgrade can be carried out again or the auxiliary upgrade equipment is requested to restore the system data.
The problem of insufficient cache space of the equipment to be upgraded can be further solved through the writing-in mode, and meanwhile, the digital certificate verifies the received upgrading data by using the digital certificate generated in the equipment discovery stage, so that the data written into the system partition is reliable and complete.
In an example, the establishing a connection with at least one assisting upgrading device in the cluster device comprises:
under the condition that two or more devices in the cluster device respond to the cooperative upgrading request, selecting one device meeting preset conditions from the two or more devices as the upgrade assisting device;
and under the condition that the cluster equipment fails to respond to the cooperative upgrading request within preset time, the upgrading is abandoned.
In this example, the device information in response is received within a certain time, if there are multiple cluster devices responding, one device is selected as an upgrade assisting device according to a preset condition, and a digital certificate is sent to the device, and the data of the end is sent to the other responding devices. The process of establishing connection with the selected assistant upgrading device also comprises the steps of starting an upgrading program to enter an upgrading mode and accessing the address and the port which are sent by the assistant device and need to be connected in the upgrading mode. The upgrade program in this example refers to a program that causes a device to be upgraded to enter an upgrade mode, where the device may implement upgrading of a system partition in the upgrade mode and may only receive data on a trusted device, and the device may implement networking in a wired or wireless manner in the upgrade mode, but the started application program only includes the upgrade program and does not start other application programs.
If no device response is received within a certain time, the upgrade is abandoned, and the cooperative upgrade request can be sent after waiting between presets.
In conclusion, the method can realize the upgrading of the equipment under the condition that the resources of the equipment cannot be upgraded, and the hardware cost and the subsequent maintenance cost of the product are considered.
The second embodiment:
this embodiment provides a method for cluster cooperative upgrade, as shown in fig. 5, which is applied to an upgrade assisting device side and includes:
s501, when a cooperative upgrading request sent by equipment to be upgraded in the same network environment in cluster equipment is monitored, detecting the current assistance upgrading capability according to the cooperative upgrading request;
s502, when the current assistance upgrading capability meets the upgrading capability corresponding to the cooperative upgrading request, establishing connection with the equipment to be upgraded;
s503, entering a collaborative upgrading mode, and sending upgrading data to the equipment to be upgraded so that the equipment to be upgraded writes the upgrading data into a system partition of the equipment to be upgraded to complete upgrading.
In this example, other devices in the cluster may first determine whether the devices themselves support the function of assisting in upgrading, if so, the devices start a monitor program for local area network broadcasting, monitor a cooperative upgrade request sent by the devices to be upgraded in a specified data format, data content, and broadcasting manner, and when monitoring the cooperative upgrade request sent by the devices to be upgraded in the cluster devices, analyze available version upgrade information of the devices to be upgraded, such as required ROM, RAM space, firmware download address, and connection information (e.g., port) of the devices to be upgraded from the received cooperative upgrade request, and comprehensively determine whether the devices themselves satisfy the upgrade capability corresponding to the cooperative upgrade request according to the upgrade information of the devices to be upgraded. If so, establishing connection with the equipment to be upgraded according to the cooperative upgrade request, for example, establishing connection with the equipment to be upgraded according to the port of the equipment to be upgraded of the cooperative upgrade request. If it is determined that the upgrade cannot be assisted, no information is sent to the upgraded device.
The process of establishing connection with the device to be upgraded may include establishing connection with the device to be upgraded after receiving indication data sent by the device to be upgraded, where the indication data is used to identify whether the device to be upgraded needs to assist in upgrading.
After the connection with the equipment to be upgraded is established, the upgrading assisting equipment can enter the upgrading assisting mode, acquire upgrading data corresponding to the available version and send the upgrading data to the equipment to be upgraded. Of course, after the connection with the device to be upgraded is established, the upgrade data corresponding to the available version may be acquired, and then the assisted upgrade mode is entered to send the upgrade data to the device to be upgraded. The specific order of obtaining the upgrade data corresponding to the available version is not limited herein.
After sending upgrade data to the equipment to be upgraded, the equipment to be upgraded writes the upgrade data into a system partition of the equipment to be upgraded, and upgrading is completed.
According to the method and the device, the upgrading data which can be directly written in are directly sent to the device to be upgraded by the aid of the upgrading device, and the device to be upgraded completes upgrading by writing the upgrading data into the system partition of the device to be upgraded. Therefore, the problem that resources of the equipment to be upgraded in the prior art need to download, cache and process the upgrading data in the middle process is solved, the process is completed by the aid of the upgrading equipment with processing capacity, and the upgrading threshold of the equipment to be upgraded is lowered.
In an example, after the connection is established with the device to be upgraded, the cluster collaborative upgrade method further includes:
receiving a digital certificate sent by the equipment to be upgraded;
encrypting the upgrading data by using the digital certificate to obtain encrypted data;
and sending the encrypted data to the equipment to be upgraded so that the equipment to be upgraded decrypts the encrypted data according to the digital certificate to obtain the upgrading data.
In this example, the indication data sent from the device to be upgraded is received, if the indication data indicates that the upgrade needs to be assisted, the received digital certificate is saved, and the address and the port which need to be connected in the upgrade mode are sent to the device to be upgraded.
And then encrypting the upgrade data by using the received digital certificate to obtain encrypted data, and sending the encrypted data to the equipment to be upgraded, wherein the specific sending mode can be that the encrypted data are sequentially sent to the equipment to be upgraded, so that the equipment to be upgraded decrypts the encrypted data according to the digital certificate to obtain the upgrade data, and the upgrade data are directly written into a system partition. Certainly, the encrypted data may also be divided into N upgrade data sub-packets according to a preset division scheme, and then the N upgrade data sub-packets are sent to the device to be upgraded in a data sub-packet manner according to a certain sequence, and after receiving the data sub-packets, the device to be upgraded writes the data packets correspondingly. In this example, the upgrade data is verified using a digital certificate to ensure that the data written to the system partition is reliable and complete.
In an example, before sending upgrade data to the device to be upgraded, the cluster collaborative upgrade method further includes:
acquiring the upgrading data according to the download address of the available upgrading version in the cooperative upgrading request;
or;
backing up original version data of the equipment to be upgraded, acquiring a differential upgrade package according to a download address of an available upgrade version in the cooperative upgrade request, and combining the original version data and the differential upgrade package into the upgrade data;
or;
and detecting current version information, and extracting the upgrade data from the local area if the current version information is adapted to the version information corresponding to the cooperative upgrade request.
Before sending the upgrade data to the device to be upgraded, several ways of obtaining the upgrade data of the device to be upgraded by the cooperative upgrade device are introduced in this example.
As an exemplary manner of obtaining the upgrade data, in this example, the upgrade data may be obtained directly by using the download address of the available upgrade version in the collaborative upgrade request. That is, the download address of the available upgrade version in the cooperative upgrade request is used to obtain the complete upgrade data. Therefore, the complete available upgrade version can be obtained without other data processing, such as data synthesis, and after the complete upgrade data is obtained, the upgrade data can be encrypted through the digital certificate and then sent.
As an exemplary manner of obtaining the upgrade data, in this example, the original version data of the device to be upgraded may be backed up, and the backup method may be to read a system partition of the device to be upgraded, so as to obtain the original data of the device to be upgraded. And then, acquiring differential upgrading data by using the download address of the available upgrading version in the cooperative upgrading request, and synthesizing the differential upgrading data and the original version data by using a differential synthesis algorithm to obtain upgrading data. And then the upgrading data is encrypted by the digital certificate and then sent. The method of the embodiment can reduce the network flow usage and the bandwidth occupation of the equipment to be upgraded.
As an exemplary manner of obtaining upgrade data, if the device to be upgraded and the upgrade assisting device are the same device, version information of the upgrade assisting device may also be detected, and if the version information of the upgrade assisting device is adapted to the version information corresponding to the cooperative upgrade request, the upgrade data may be directly extracted locally from the upgrade assisting device.
The above-mentioned upgrade data acquisition process may be performed after establishing connection with the device to be upgraded, or may be performed after assisting the upgrade device to enter the cooperative upgrade mode.
In an example, after sending upgrade data to the device to be upgraded, the cluster collaborative upgrade method further includes:
reading write-in data written in a system partition of the equipment to be upgraded;
checking the written data, and repeatedly upgrading the equipment to be upgraded under the condition that the written data are determined to be abnormal;
alternatively, the first and second liquid crystal display panels may be,
and restoring the equipment to be upgraded by using the original version data.
In this example, the written data is further verified, the written data written into the system partition of the device to be upgraded is read, data verification is performed, whether the upgraded data is normal or not is confirmed, and if the verification is abnormal, the upgrading process can be performed again. Or restoring the equipment to be upgraded by using the original version data backed up in advance. If the verification is normal, the equipment to be upgraded is upgraded, and a new system version can be entered.
When the resources of the equipment to be upgraded are insufficient, the equipment to be upgraded is synthesized and stored by assisting the available resources of the equipment to be upgraded, the characteristics of the cluster environment can be fully utilized, and the equipment to be upgraded is upgraded, so that the problem that the equipment to be upgraded cannot be upgraded due to insufficient resources originally is solved. The auxiliary upgrading equipment meeting the conditions can be quickly acquired from the cluster by using the specified data format, the data content and the broadcasting mode, wherein the defined connection method of the upgraded equipment and other equipment in the cluster can more efficiently complete the connection of useful equipment, and avoid invalid connection. By using the auxiliary upgrading device, the system restoration under the condition that the equipment to be upgraded fails to be upgraded or is abnormal can be realized, and the condition that the upgraded equipment has to be returned to the factory for maintenance once the upgraded equipment is abnormal (cannot normally enter the system) in the existing upgrading process is also improved. The auxiliary upgrading device utilizes the difference upgrading packet and the original system data of the device to be upgraded to realize the synthesis of the target data, so that the bandwidth pressure of downloading the system data from the Internet environment can be effectively reduced, and the pressure of the server is reduced.
Example three:
the embodiment provides an implementation case of a cluster collaborative upgrade method, as shown in fig. 6, which includes the following steps:
s601, when a certain device (device to be upgraded) in the cluster finds that an available upgrading version exists on the server, judging whether the device can complete upgrading.
If the upgrade can be completed by the user, the upgrade is realized by using a traditional upgrade scheme;
if not, the available version upgrading information is sent to other connected devices in the cluster in a local area network broadcasting mode, and the available version upgrading information comprises a downloading address of the version, required ROM and RAM space and other possible information; the sent collaborative upgrading request can also contain connection information required by other devices in response, and the connection information is used by other devices in the cluster in response.
S602, if other devices in the cluster support the upgrade assisting function, the devices start a monitoring program for local area network broadcasting, and the program can monitor the cooperative upgrade requests sent by other devices.
Analyzing the required ROM and RAM space from the received cooperative upgrading request, analyzing the connection information (such as a port) of the upgraded equipment, and judging whether the upgraded equipment can be assisted according to the condition of the residual ROM and RAM of the assisted upgrading equipment; if yes, using the connection information to send the ROM and RAM information of the upgrading device and computing capacity information (if no connection information exists, assisting the upgrading device to send the ROM and RAM and computing capacity information of the upgrading device to a default port); if the upgrade cannot be assisted, no information is sent to the upgraded device.
And S603, the equipment to be upgraded receives the information of other equipment in the cluster in response within a certain time.
If a plurality of other devices respond, one device is selected as an auxiliary upgrading device according to preset conditions, a digital certificate and indicating data are sent to the device, the digital certificate is used for receiving and checking subsequent upgrading packet data, and the ending data are sent to the other responding devices.
If no device response is received within a certain time, the upgrade is aborted.
S604, assisting the upgrading device to receive indication data sent from the upgraded device.
If the indication data indicate that the upgrading is needed to be assisted, the received digital certificate is stored, and the address and the port of the equipment to be upgraded, which need to be connected in the upgrading mode, are sent.
If the received data indicates that an upgrade does not need assistance, the process ends.
And S605, the equipment to be upgraded enters an upgrading mode.
In the upgrade mode, only an upgrade program is started, which is connected to the auxiliary upgrade apparatus via a network (connected according to connection information acquired from the auxiliary upgrade apparatus), and receives upgrade data transmitted from the auxiliary upgrade apparatus.
And S606, the assistant upgrading device enters an assistant upgrading process and marks the assistant device in the cluster device.
And S607, assisting the upgrading equipment to start an auxiliary upgrading program.
And monitoring whether the equipment to be upgraded is connected to the address and the port corresponding to the upgrading assisting equipment, and downloading the differential upgrading packet according to the download address of the available version acquired from the equipment to be upgraded.
And S608, after the differential upgrade package is downloaded, and the device to be upgraded is accessed in the upgrade mode, the upgrade device is assisted to read data from the system partition of the device to be upgraded.
And synthesizing target data by using a differential synthesis algorithm through the read original system data and the downloaded differential upgrade package, encrypting the data by using a digital certificate acquired from the equipment to be upgraded, sequentially transmitting the encrypted upgrade data to the equipment to be upgraded, and repeatedly executing an upgrade data transmission process until the upgrade data transmission is completed.
And S609, the equipment to be upgraded decrypts the received encrypted upgrade data by using the digital certificate.
And ensuring that the data comes from the auxiliary upgrading equipment, writing the data into the system partition after the data is correct, realizing system upgrading, sequentially receiving the upgrading data and writing the upgrading data into the system partition until the upgrading data is transmitted.
S610, the equipment to be upgraded checks the data written into the system partition to ensure that the data are written in abnormally, and the equipment to be upgraded is restarted to enter a new system after the upgrading is completed to complete the system upgrading.
If the exception exists, the upgrade can be carried out again or the auxiliary upgrade equipment is requested to restore the system data.
S611, assisting the upgrading device to read the data written into the system partition from the device to be upgraded and checking the data.
And confirming whether the upgrade data is normal or not, if not, entering the upgrade flow again, or performing system version restoration on the upgraded equipment by using the original system data of the upgraded equipment read in the second step. If the upgrade is normal, the upgrade flow is ended.
When the resources of the equipment to be upgraded are insufficient, the equipment to be upgraded is synthesized and stored by assisting the available resources of the equipment to be upgraded, the characteristics of the cluster environment can be fully utilized, and the equipment to be upgraded is upgraded, so that the problem that the equipment to be upgraded cannot be upgraded due to insufficient resources originally is solved. By using the auxiliary upgrading device, the system restoration under the condition that the equipment to be upgraded fails to be upgraded or is abnormal can be realized, and the condition that the upgraded equipment has to be returned to the factory for maintenance once the upgraded equipment is abnormal (cannot normally enter the system) in the existing upgrading process is also improved. The auxiliary upgrading device utilizes the difference upgrading packet and the original system data of the device to be upgraded to realize the synthesis of the target data, so that the bandwidth pressure of downloading the system data from the Internet environment can be effectively reduced, and the pressure of a server is reduced.
The embodiment also provides terminal equipment, which comprises a processor, a memory and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute one or more first computer programs stored in the memory to implement the steps of the cluster collaborative upgrade method according to the first embodiment; and/or the processor is configured to execute one or more second computer programs stored in the memory to implement the steps of the cluster co-upgrade method according to the second embodiment.
The embodiment of the present invention further provides a computer-readable storage medium, where one or more first computer programs and one or more second computer programs are stored, where the one or more first computer programs are executable by one or more processors to implement the steps of the cluster collaborative upgrade method according to the first embodiment; or, the one or more second computer programs may be executed by one or more processors to implement the steps of the cluster collaborative upgrade method according to the second embodiment.
The present embodiments also provide a computer-readable storage medium including volatile or non-volatile, removable or non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, computer program modules or other data. Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact disk Read-Only Memory), digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
It will be apparent to those skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software (which may be implemented as computer program code executable by a computing device), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit.
In addition, communication media typically embodies computer readable instructions, data structures, computer program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to one of ordinary skill in the art. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of embodiments of the present invention, and the present invention is not to be considered limited to such descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (11)

1. A cluster cooperative upgrading method is applied to a device side to be upgraded and comprises the following steps:
when the upgrade is confirmed to be needed, detecting the current upgrade capability and acquiring the upgrade capability requirement of the current available upgrade version;
when the current upgrading capability does not meet the upgrading capability requirement, sending a cooperative upgrading request to cluster equipment which is in the same network environment with the equipment to be upgraded;
establishing connection with at least one auxiliary upgrading device in the cluster device according to the cooperative upgrading request;
and entering an upgrading mode, receiving upgrading data sent by the upgrading assisting equipment, and writing the upgrading data into a system partition.
2. The cluster cooperative upgrade method according to claim 1, wherein after establishing a connection with at least one assisting upgrade device in the cluster devices, the cluster cooperative upgrade method further comprises:
generating a digital certificate;
and sending the digital certificate to the upgrade assisting equipment so that the upgrade assisting equipment encrypts upgrade data according to the digital certificate.
3. The cluster cooperative upgrade method according to claim 2, wherein the receiving upgrade data sent by the upgrade assisting apparatus and writing the upgrade data into a system partition comprises:
receiving encrypted upgrading data sent by the upgrading assisting equipment;
decrypting the encrypted upgrading data by using the digital certificate to obtain upgrading data;
and writing the upgrade data into a system partition.
4. The cluster collaborative upgrade method according to any one of claims 1 to 3, wherein the establishing a connection with at least one assisting upgrade device of the cluster devices comprises:
under the condition that two or more devices in the cluster device respond to the cooperative upgrading request, selecting one device meeting preset conditions from the two or more devices as the upgrading assisting device;
and under the condition that the cluster equipment fails to respond to the cooperative upgrading request within preset time, giving up upgrading.
5. The cluster cooperative upgrade method according to any one of claims 1 to 3, wherein the cooperative upgrade request includes at least one of the following information: the download address of the available upgrade version, the required ROM information, the required RAM information and the device connection information.
6. A cluster cooperative upgrading method is applied to an auxiliary upgrading device side and comprises the following steps:
when a cooperative upgrading request sent by equipment to be upgraded in the same network environment in cluster equipment is monitored, detecting the current assistance upgrading capability according to the cooperative upgrading request;
when the current assistance upgrading capability meets the upgrading capability corresponding to the cooperative upgrading request, establishing connection with the equipment to be upgraded;
and entering a collaborative upgrading mode, and sending upgrading data to the equipment to be upgraded so that the equipment to be upgraded writes the upgrading data into a system partition of the equipment to be upgraded to finish upgrading.
7. The cluster cooperative upgrade method according to claim 6, wherein after the connection is established with the device to be upgraded, the cluster cooperative upgrade method further comprises:
receiving a digital certificate sent by the equipment to be upgraded;
encrypting the upgrading data by using the digital certificate to obtain encrypted data;
and sending the encrypted data to the equipment to be upgraded so that the equipment to be upgraded decrypts the encrypted data according to the digital certificate to obtain the upgrading data.
8. The cluster cooperative upgrade method according to claim 7, wherein before sending upgrade data to the device to be upgraded, the cluster cooperative upgrade method further comprises:
acquiring the upgrading data according to the download address of the available upgrading version in the cooperative upgrading request;
or;
backing up original version data of the equipment to be upgraded, acquiring a differential upgrade package according to a download address of an available upgrade version in the cooperative upgrade request, and combining the original version data and the differential upgrade package into upgrade data;
or;
and detecting current version information, and if the current version information is adaptive to the version information corresponding to the collaborative upgrading request, extracting the upgrading data from the local.
9. The cluster cooperative upgrade method according to claim 8, wherein after sending upgrade data to the device to be upgraded, the cluster cooperative upgrade method further comprises:
reading write-in data written in a system partition of the equipment to be upgraded;
checking the written data, and repeatedly upgrading the equipment to be upgraded under the condition that the written data are determined to be abnormal;
alternatively, the first and second electrodes may be,
and restoring the equipment to be upgraded by using the original version data.
10. A terminal device comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more first computer programs stored in the memory to implement the steps of the cluster co-upgrade method according to any one of claims 1 to 5;
and/or the presence of a gas in the gas,
the processor is configured to execute one or more second computer programs stored in the memory to implement the steps of the cluster co-upgrade method according to any one of claims 6 to 9.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more first computer programs and one or more second computer programs, the one or more first computer programs being executable by one or more processors to implement the steps of the cluster co-upgrade method as claimed in any one of claims 1 to 5;
or the like, or, alternatively,
the one or more second computer programs are executable by one or more processors to implement the steps of the cluster co-upgrade method as claimed in any one of claims 6 to 9.
CN202110465013.6A 2021-04-28 2021-04-28 Cluster cooperative upgrading method and device and readable storage medium Pending CN115248694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110465013.6A CN115248694A (en) 2021-04-28 2021-04-28 Cluster cooperative upgrading method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110465013.6A CN115248694A (en) 2021-04-28 2021-04-28 Cluster cooperative upgrading method and device and readable storage medium

Publications (1)

Publication Number Publication Date
CN115248694A true CN115248694A (en) 2022-10-28

Family

ID=83696082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110465013.6A Pending CN115248694A (en) 2021-04-28 2021-04-28 Cluster cooperative upgrading method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN115248694A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166298A (en) * 2023-03-16 2023-05-26 北京百度网讯科技有限公司 Firmware upgrading method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166298A (en) * 2023-03-16 2023-05-26 北京百度网讯科技有限公司 Firmware upgrading method, device, equipment and storage medium
CN116166298B (en) * 2023-03-16 2024-03-01 北京百度网讯科技有限公司 Firmware upgrading method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US20190057214A1 (en) Update control device, terminal, and method of controlling
US11178121B2 (en) Secure software updates
US9100696B2 (en) System and method for upgrading a multiprocessor set-top box device with a monolithic firmware image
CN112073433B (en) SSL certificate updating method and device, electronic equipment and storage medium
JP2013246718A (en) Control system and program updating method
CN111459524A (en) Software upgrading method, device and system
CN114880011A (en) OTA (over the air) upgrading method and device, electronic equipment and readable storage medium
CN115248694A (en) Cluster cooperative upgrading method and device and readable storage medium
CN112636984B (en) Federation chain configuration updating method, equipment and computer medium
JP5219615B2 (en) COMMUNICATION DEVICE, ROAD SIDE, OBE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
US20090158395A1 (en) Method and apparatus for detecting downloadable conditional access system host with duplicated secure micro
CN110134419B (en) System upgrading method, device, equipment and storage medium for double-sided cabinet
CN109871227B (en) Software upgrading method and device based on second-order differential increment
US11962465B2 (en) Control system, electronic device, and control method
KR101199159B1 (en) Method for installing file based on online and device controlling thereof
CN114039723A (en) Method and device for generating shared key, electronic equipment and storage medium
CN111897562A (en) Program upgrading method and device
CN110825406A (en) Software upgrading method and related equipment
US20230185560A1 (en) Information processing device, information processing system and non-transitory computer readable medium
CN113691981A (en) Equipment network access method, device, terminal equipment and storage medium
WO2023033728A2 (en) Method and apparatus for controlling devices, and device and storage medium thereof
CN116069356A (en) System upgrading method and device, readable storage medium and electronic equipment
CN114895926A (en) Application program installation method and device, electronic equipment and storage medium
CN117521073A (en) Secure boot method, embedded device, electronic device, and storage medium
CN117579605A (en) Automated encryption upgrading method and system

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