Software version changing method and device, equipment and storage medium

Through the interaction between the central server and the sub-server, the consistency of software versions between computer devices is achieved, the problems of low efficiency and high complexity of manual operations are solved, the risks of unstable software operation and business interruption are reduced, and the efficiency of software version changes is improved.

CN119576382APending Publication Date: 2025-03-07GUANGZHOU LEICHEN INTELLIGENT EQUIP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311137723.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-05
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In complex network scenarios, the consistency of software versions needs to be maintained between computer devices, manual operation is inefficient, high complexity, and there is a risk of software operation instability and business interruption.

Method used

Through the interaction between the central server and the sub-server, synchronous changes in the software version are achieved. The specific steps include the front-end device sending a software change request, the central server obtaining the target software version, and sending a change request to the sub-server. The central server updates its software version only when the subserver feedback changes are successful.

Benefits of technology

The synchronized software version changes of the central server and sub-server are realized, reducing compatibility issues, reducing complexity and risks, and improving the efficiency of software version changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576382A_ABST
    Figure CN119576382A_ABST
Patent Text Reader

Abstract

The invention discloses a software version changing method and device, equipment and a storage medium. The method comprises the steps that a target software version is obtained according to a first software change request sent by front-end equipment, and the first software change request is used for indicating a central server to change a current software version in the central server into the target software version; a second software change request is sent to the connected sub-server, the second software change request comprises the target software version, and the second software change request is used for indicating the sub-server to change the current software version in the sub-server into the target software version; and changing the current software version in the central server into the target software version when determining that the change of the sub-server succeeds according to the change result of the software version fed back by the sub-server. The software changing method provided by the embodiment of the invention is relatively high in efficiency and relatively low in complexity, and the risks of unstable software operation and business interruption are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a software version changing method, device, equipment and storage medium. Background Art

[0002] The software version in the computer device needs to be upgraded or rolled back according to actual needs. With the development of computer technology, the changes in the software version in the computer device are becoming more and more frequent.

[0003] Currently, when changing the software version of a computer device, the operation is generally performed manually.

[0004] However, in a complex network scenario where a computer device is connected to multiple lower-level computer devices, the consistency of software versions must be maintained between these computer devices. Manual operation is inefficient on the one hand, and increases the complexity of software version management and coordination between various computer devices on the other hand, which may increase the risk of software instability and business interruption in computer devices. Summary of the invention

[0005] The present invention provides a software version change method, device, equipment and storage medium to solve the technical problems of low efficiency, high complexity and high risk of software version change methods in related technologies.

[0006] According to one aspect of the present invention, a method for changing a software version is provided, which is applied to a central server and includes:

[0007] Obtaining a target software version according to a first software change request sent by a front-end device; wherein the first software change request is used to instruct the central server to change the current software version in the central server to the target software version;

[0008] Sending a second software change request to the connected sub-server; wherein the second software change request includes the target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version;

[0009] When it is determined that the sub-server is successfully changed according to the change result of the software version fed back by the sub-server, the current software version in the central server is changed to the target software version.

[0010] According to another aspect of the present invention, a method for changing a software version is provided, which is applied to a sub-server, and the method comprises:

[0011] Receiving a second software change request sent by the central server; wherein the second software change request includes a target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version;

[0012] According to the second software change request, the current software version in the sub-server is changed to the target software version, and a software version change result is generated;

[0013] Feedback the change result of the software version to the central server.

[0014] According to another aspect of the present invention, a software version changing device is provided, the device is arranged in a central server, and the device comprises:

[0015] An acquisition module, configured to acquire a target software version according to a first software change request sent by a front-end device; wherein the first software change request is used to instruct the central server to change a current software version in the central server to a target software version;

[0016] a sending module, configured to send a second software change request to the connected sub-server; wherein the second software change request includes the target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version;

[0017] The changing module is used to change the current software version in the central server to the target software version when it is determined that the sub-server is changed successfully according to the change result of the software version fed back by the sub-server.

[0018] According to another aspect of the present invention, there is provided a software version changing device, the device being arranged in a sub-server, the device comprising:

[0019] A receiving module, configured to receive a second software change request sent by the central server; wherein the second software change request includes a target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version;

[0020] a change module, configured to change the current software version in the sub-server to the target software version according to the second software change request, and generate a software version change result;

[0021] The feedback module is used to feed back the change result of the software version to the central server.

[0022] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0023] at least one processor; and

[0024] a memory communicatively connected to the at least one processor; wherein,

[0025] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the software version changing method described in any embodiment of the present invention.

[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the software version changing method described in any embodiment of the present invention when executed.

[0027] The technical solution of an embodiment of the present invention includes: obtaining a target software version according to a first software change request sent by a front-end device, wherein the first software change request is used to instruct a central server to change a current software version in the central server to a target software version; sending a second software change request to a connected sub-server, wherein the second software change request includes the target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version; and when it is determined that the sub-server change is successful based on the software version change result fed back by the sub-server, changing the current software version in the central server to the target software version. The invention has the following technical effects: on the one hand, the synchronous software version change of the central server and the sub-server is realized through the interaction between the front-end device, the central server and the sub-server, thereby reducing the compatibility problems caused by inconsistent software versions, and the complexity is low, while improving the efficiency of software version change; on the other hand, the central server is realized to distribute the target software version to the distributed sub-servers, ensuring that the software version change operations of all sub-servers can be notified and coordinated in time during the software version change process, thereby avoiding conflicts and errors caused by the deployment of different software versions, and reducing the risks of unstable software operation and business interruption; on the other hand, the central server changes the current software version in the central server to the target software version only when it determines that the sub-server change is successful based on the software version change result fed back by the sub-server, thereby avoiding the situation where the software version in the central server is changed first and then the software in the sub-server needs to be restored after the sub-server change fails, thereby further improving the efficiency of software change.

[0028] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1 A flowchart of a software version changing method provided according to an embodiment of the present invention;

[0031] Figure 2A A schematic diagram of an application scenario of a software version change method provided by an embodiment;

[0032] Figure 2B Another schematic diagram of an application scenario of the software version change method provided by an embodiment;

[0033] Figure 2C A schematic diagram of another application scenario of the software version change method provided by an embodiment;

[0034] Figure 3 A flowchart of another software version changing method provided according to an embodiment of the present invention;

[0035] Figure 4 A flowchart of another software version changing method provided according to an embodiment of the present invention;

[0036] Figure 5 A flowchart of another software version change method provided according to an embodiment of the present invention;

[0037] Figure 6 A schematic diagram of the structure of a software version changing device provided according to an embodiment of the present invention;

[0038] Figure 7 A schematic diagram of the structure of another software version changing device provided according to an embodiment of the present invention;

[0039] Figure 8 It is a structural schematic diagram of an electronic device for implementing the software version changing method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0041] It should be noted that the terms "target" and "current" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0042] Figure 1 The flowchart of a method for changing a software version according to an embodiment of the present invention is provided. This embodiment is applicable to the case where the software version in an electronic device is changed. The method can be executed by a software version changing device, which can be implemented in the form of hardware and / or software, and the software version changing device can be configured in an electronic device, for example, in a server. The server in this embodiment can be a central server. Figure 1 As shown, the method comprises the following steps:

[0043] Step 101: Obtain a target software version according to a first software change request sent by a front-end device.

[0044] The first software change request is used to instruct the central server to change the current software version in the central server to the target software version.

[0045] The central server in this embodiment refers to a server that can connect to a sub-server and forward a received query request to the sub-server. The number of sub-servers connected to the central server in this embodiment can be at least one.

[0046] The front-end device in this embodiment refers to the device that issues the first software change request. In some scenarios, the front-end device can be the user's front end.

[0047] The software change in this embodiment refers to software version upgrade or software version rollback. Among them, software version upgrade refers to the process of changing to a software version higher than the current software version. Software version rollback refers to the process of changing to a software version lower than the current software version.

[0048] The current software version of the central server in this embodiment refers to the software version currently running in the central server. The target software version in this embodiment refers to the software version to be changed to. After the software version change is completed, the target software version is running in the central server.

[0049] The first software change request in this embodiment can be sent by the front-end device. The user can input software change information in the front-end device according to actual needs. The front-end device generates the first software change request according to the software change information input by the user.

[0050] In this embodiment, the first software change request may be transmitted via the Hypertext Transfer Protocol (HTTP), or via the Google Remote Procedure Call (gRPC), or via the ZeroMQ message transmission protocol.

[0051] Optionally, the first software change request in this embodiment may include: an identifier of a target software version. Further, the identifier of a target software version in this embodiment may include: a version number of the target software version and a software type.

[0052] Optionally, the central server can obtain the target software version locally. The central server pre-stores various software versions. The storage process can be that the central server downloads and saves from other servers according to the download address of the software version.

[0053] In order to further ensure data integrity and security during the software version change process, one implementation method of step 101 can be: after determining that the target software version exists locally on the central server based on the identifier of the target software version, verify the target software version; after determining that the target software version verification passes, obtain the target software version.

[0054] Optionally, when it is determined according to the identifier of the target software version that the target software version does not exist locally in the central server, error information is fed back to the front-end device.

[0055] More specifically, the target software version can be verified using the MD5 message digest algorithm. If the verification passes, it means that the target software version stored in the central server is a correct and complete software version. If the verification fails, it means that the target software version stored in the central server is an erroneous or incomplete software version. In this embodiment, when the target software version verification fails, the software version change process is terminated to ensure the security of the software version change process.

[0056] The following is a schematic diagram of an application scenario of the software version changing method provided in this embodiment.

[0057] Figure 2A A schematic diagram of an application scenario of a software version change method provided by an embodiment. Figure 2A As shown, in this scenario, the central server is connected to both the front-end device and the sub-server. Exemplarily, in this scenario, the number of sub-servers is one. The number of front-end devices can be at least one. Figure 2A In the example, two front-end devices are used as examples. In this scenario, the front-end device can send a request to the central server. After receiving the request, the central server can forward the request to the sub-server. The sub-server determines the return content based on the request. And sends the return content to the central server. The central server sends the return content to the front-end device to complete an access. For example, the request here can be to query the status of the board on the current production line.

[0058] Figure 2B Another schematic diagram of an application scenario of a software version change method provided by an embodiment. Figure 2B As shown in the figure, in this scenario, the central server is connected to the front-end device and the sub-server. Figure 2A The difference of the scenario shown is that the central server in this scenario is connected to multiple sub-servers. Figure 2B The number of sub-servers is 3 for exemplary description. In this scenario, after receiving the request sent by the front-end device, the central server can forward the request to the corresponding sub-server for processing according to the content in the request. The corresponding sub-server determines the return content according to the request. And sends the return content to the central server. The central server sends the return content to the front-end device to complete an access. The content in the request here can be an Internet protocol address and / or port, etc.

[0059] Figure 2C Another schematic diagram of an application scenario of the software version change method provided by an embodiment. Figure 2CAs shown, in this scenario, a front-end server is also included. The front-end server and the central server are deployed on the same physical machine. The front-end device is connected to the front-end server. The front-end server is connected to the central server. The central server is connected to multiple sub-servers. The front-end server in this embodiment stores front-end resources, more specifically, network (web) front-end resources. The front-end resources here can include icons, static files and other contents. The front-end resources in this embodiment are used to beautify the content returned to the front-end device. In this scenario, the front-end device sends a request to the front-end server. The front-end server forwards the request to the central server. After receiving the request sent by the front-end device, the central server can forward the request to the corresponding sub-server for processing according to the content in the request. The corresponding sub-server determines the return content according to the request. And sends the return content to the central server. The central server sends the return content to the front-end server. After the front-end server beautifies the return content according to the front-end resources, it sends the beautified return content to the front-end device to complete a visit.

[0060] exist Figure 2A , Figure 2B as well as Figure 2C In , the front-end device can send requests through HTTP, gRPC or ZeroMQ message transmission protocol.

[0061] The software version change method provided in this embodiment can be applied to Figure 2A , Figure 2B as well as Figure 2C In any one or more of the scenarios. In a scenario with a front-end server, the front-end device sends the first software change request to the front-end server. The front-end server sends the first software change request to the central server.

[0062] Step 102: Send a second software change request to the connected sub-server.

[0063] The second software change request includes a target software version, and is used to instruct the subserver to change the current software version of at least two subservers that have been successfully changed to the target software version when the number of successful change results in the subservers meets a preset condition.

[0064] Step 103: When it is determined that the sub-server change is successful based on the software version change result fed back by the sub-server, the current software version in the central server is changed to the target software version.

[0065] In this embodiment, after receiving the first software change request, the central server does not change its current software version first, but first executes step 102 and then executes step 103. That is, when the central server determines that the sub-server change is successful based on the software version change result fed back by the sub-server, the central server changes the current software version in the central server to the target software version, avoiding the situation where the software version in the central server is changed first and then the software in the sub-server needs to be restored after the sub-server change fails, reducing the risk of software operation instability and business interruption, and at the same time, improving the efficiency of software change.

[0066] In one implementation, when the central server determines that the software version change results fed back by all sub-servers are successful, it is determined that the sub-server change is successful.

[0067] In another implementation, when the central server determines the number of successful change results in the software version change results fed back by the sub-server, when it is determined that the number of successful change results meets a preset condition, it is determined that the sub-server change is successful. This implementation will be described in detail in subsequent embodiments.

[0068] In step 103, after determining that the sub-server has been successfully changed based on the software version change result fed back by the sub-server, before changing the current software version in the central server to the target software version, the method further includes: performing a restart operation. The restart operation of the central server in this embodiment is an automatic restart. More specifically, it is an automatic software restart. After the central server is restarted, it loads the target software version to implement the software version change.

[0069] exist Figure 2C In the scenario shown, the first software change request is also used to instruct the central server to change the current front-end resources corresponding to the current software version in the front-end server to the target front-end resources corresponding to the target software version. Correspondingly, after the central server in this embodiment changes the current software version in the central server to the target software version, it can also perform the following operations: change the current front-end resources to the target front-end resources. The specific process can be to replace the current front-end resources with the target front-end resources. This implementation method can realize the synchronous change of the central server, sub-servers and front-end resources, and reduce the compatibility problems caused by the inconsistency of software versions and front-end resources.

[0070] Optionally, in order to further improve the accuracy and security of software version changes, the central server can also back up the current front-end resources.

[0071] In order to let the front-end device know the software change result to improve the user experience, in this embodiment, after step 103, the central server may further perform the following operations: generating change result information, wherein the change result information includes the change result, and when the change result indicates that the change fails, the change result information also includes error information; sending the change result information to the front-end device. Exemplarily, the error information may include the reason for the software version change failure, the identifier of the server where the software version change failed, etc.

[0072] Optionally, the central server can send change result information via HTTP, gRPC, or ZeroMQ message transmission protocol.

[0073] The above process is described below with a specific example.

[0074] The central server and the sub-server are both installed with Automated Optical Inspection (AOI) software. Assume that the current software version of the AOI software is AOI software version 1.0. The target software version is AOI software version 1.1. AOI software version 1.1 is pre-stored locally on the central server.

[0075] When the software version needs to be changed, the front-end device can send a first software change request via http, and the first software change request is used to instruct the central server to change the AOI software version 1.0 in the central server to AOI software version 1.1.

[0076] After receiving the first software change request, the central server can determine that the target software version is AOI software version 1.1 based on the first software change request. After the central server determines that AOI software version 1.1 exists locally on the central server, it verifies AOI software version 1.1; after determining that AOI software version 1.1 has passed the verification, it obtains AOI software version 1.1. After that, a second software change request is sent to the sub-server. The second software change request includes AOI software version 1.1. The second software change request is used to instruct the sub-server to change the AOI software version 1.0 in the sub-server to AOI software version 1.1. After the change, the sub-server feeds back the result of the software version change to the central server. When the central server determines that the sub-server change is successful based on the result of the software version change fed back by the sub-server, it changes the AOI software version 1.0 in the central server to AOI software version 1.1. Furthermore, in Figure 2C In the scenario shown, the central server can also replace the front-end resources corresponding to AOI software version 1.0 with the front-end resources corresponding to AOI software version 1.1. After the change is completed, the central server can also generate change result information and send the change result information to the front-end device.

[0077] The software version change method provided in this embodiment includes: obtaining a target software version according to a first software change request sent by a front-end device, wherein the first software change request is used to instruct a central server to change a current software version in the central server to a target software version; sending a second software change request to a connected sub-server, wherein the second software change request includes a target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version; when it is determined that the sub-server change is successful based on the software version change result fed back by the sub-server, the current software version in the central server is changed to the target software version. The invention has the following technical effects: on the one hand, the synchronous software version change of the central server and the sub-server is realized through the interaction between the front-end device, the central server and the sub-server, which reduces the compatibility problems caused by inconsistent software versions, has low complexity and improves the efficiency of software version change; on the other hand, the central server distributes the target software version to the distributed sub-servers, ensuring that the software version change operations of all sub-servers can be notified and coordinated in time during the software version change process, thereby avoiding conflicts and errors caused by the deployment of different software versions, and reducing the risks of unstable software operation and business interruption; on the other hand, the central server changes the current software version in the central server to the target software version when it determines that the sub-server has been successfully changed based on the software version change result fed back by the sub-server, avoiding the situation where the software version in the central server is changed first and then the software in the sub-server needs to be restored after the sub-server change fails, thereby further improving the efficiency of software change.

[0078] Figure 3 Flow chart of another software version change method provided according to an embodiment of the present invention. Figure 1 Based on the illustrated embodiment and various optional implementation schemes, in a scenario where the number of sub-servers is at least two, a detailed description is given on how to determine whether a sub-service is successfully changed. Figure 3 As shown, the software version change method provided in this embodiment includes the following steps:

[0079] Step 301: Obtain a target software version according to a first software change request sent by a front-end device.

[0080] The first software change request is used to instruct the central server to change the current software version in the central server to the target software version.

[0081] Step 302: Send a second software change request to the connected sub-server.

[0082] The second software change request includes a target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version.

[0083] The implementation process and technical principle of step 301 and step 101, and step 302 and step 102 are similar, and will not be repeated here.

[0084] Step 303: Count the number of successful change results among the software version change results fed back by at least two sub-servers.

[0085] The change success result is used to indicate that the sub-server change is successful.

[0086] Step 304: When it is determined that the number of successful change results meets a preset condition, it is determined that at least two sub-servers are changed successfully.

[0087] The preset condition is that the number of successful change results is greater than a preset number threshold, or the ratio of the number of successful change results to the total number of sub-servers is greater than a preset ratio threshold.

[0088] In this implementation, the preset quantity threshold may be 10, for example.

[0089] Optionally, the preset ratio threshold value can be any value between 90% and 100%. When the preset ratio threshold value is 100%, it means that when all sub-servers are successfully changed, the central server determines that at least two sub-servers are successfully changed. When the preset ratio threshold value is 95%, it means that when 95% of the sub-servers are successfully changed, the central server determines that at least two sub-servers are successfully changed. The remaining 5% of sub-servers that have not been successfully changed can change their software versions in other ways.

[0090] Step 305: Change the current software version in the central server to the target software version.

[0091] The technical principle and implementation process of step 305 are similar to those of "changing the current software version in the central server to the target software version" in step 103, and will not be repeated here.

[0092] In the software version change method provided in this embodiment, when determining whether the sub-server is changed successfully, the number of successful change results is counted among the software version change results fed back by at least two sub-servers. When it is determined that the number of successful change results meets the preset conditions, it is determined that at least two sub-servers have been changed successfully. This implementation method has low complexity and high efficiency, which further improves the efficiency of software version change.

[0093] Figure 4This is a flowchart of another software version change method provided according to an embodiment of the present invention. This embodiment is applicable to the case of changing the software version in an electronic device. The method can be executed by a software version change device, which can be implemented in the form of hardware and / or software. The software version change device can be configured in an electronic device, for example, in a server. The server in this embodiment can be a sub-server connected to a central server. Figure 4 As shown, the method comprises the following steps:

[0094] Step 401: Receive a second software change request sent by a central server.

[0095] The second software change request includes a target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version.

[0096] The process of how the central server sends the second software change request is similar to step 102 and will not be repeated here.

[0097] Step 402: According to the second software change request, the current software version in the sub-server is changed to the target software version, and a software version change result is generated.

[0098] Optionally, the change result includes: a change success result and / or a change failure result.

[0099] The implementation process of step 402 may be: when the current software version in the sub-server is successfully changed to the target software version, a change success result is generated; when the process of changing the current software version in the sub-server to the target software version fails, a change failure result is generated.

[0100] Optionally, after step 401 and before step 402, the sub-server may further perform the following operations: perform a restart operation. The restart operation of the sub-server in this embodiment is an automatic restart. More specifically, it is an automatic software restart. After the restart, the sub-server loads the target software version to implement the change of the software version.

[0101] Step 403: Feedback the change result of the software version to the central server.

[0102] The software version change method provided in this embodiment includes: receiving a second software change request sent by a central server; changing the current software version in the sub-server to a target software version according to the second software change request, and generating a software version change result; and feeding back the software version change result to the central server. It has the following technical effects: on the one hand, the synchronous software version change of the central server and the sub-server is realized through the interaction between the central server and the sub-server, reducing the compatibility problems caused by inconsistent software versions and improving the efficiency of software version change; on the other hand, the central server is realized to distribute the target software version to the distributed sub-servers, ensuring that the software version change operations of all sub-servers can be notified and coordinated in time during the software version change process, thereby avoiding conflicts and errors caused by deploying different software versions, reducing the risks of unstable software operation and business interruption; on the other hand, the central server changes the current software version in the central server to the target software version when it determines that the sub-server has been successfully changed based on the software version change result fed back by the sub-server, avoiding the situation where the software version in the central server is changed first and then the software in the sub-server needs to be restored after the sub-server change fails, further improving the efficiency of software change.

[0103] Figure 5 FIG. 1 is a flow chart of another software version change method according to an embodiment of the present invention. Figure 5 As shown, this embodiment describes the process of the software version change method provided by this embodiment from the perspective of the interaction between the front-end device, the sub-server and the central server. In this example, it is assumed that the number of sub-servers is two. Figure 5 As shown, the software version change method provided in this embodiment includes the following steps:

[0104] Step 501: The front-end device sends a first software change request to the central server.

[0105] The first software change request is used to instruct the central server to change the current software version in the central server to the target software version.

[0106] Step 502: The central server receives a first software change request sent by a front-end device.

[0107] Step 503: The central server verifies the target software version by using the MD5 verification algorithm according to the first software change request sent by the front-end device, after determining that the target software version exists locally. After the verification passes, the target software version is obtained.

[0108] Step 504: The central server sends a second software change request to the connected first sub-server, and sends a second software change request to the second sub-server.

[0109] Step 505a: The first sub-server receives the second software change request sent by the central server.

[0110] Step 506a: The first sub-server changes the current software version in the sub-server to the target software version according to the second software change request, and generates a software version change result.

[0111] Step 507a: The first sub-server feeds back the change result of the software version to the central server.

[0112] Step 505b: The second sub-server receives the second software change request sent by the central server.

[0113] Step 506b: The second sub-server changes the current software version in the sub-server to the target software version according to the second software change request, and generates a software version change result.

[0114] Step 507b: The second sub-server feeds back the change result of the software version to the central server.

[0115] Step 508: The central server receives the software version change results fed back by the first sub-server and the second sub-server.

[0116] Step 509: When the central server determines that the sub-server change is successful based on the software version change result fed back by the sub-server, the central server changes the current software version in the central server to the target software version.

[0117] Step 510: The central server changes the current front-end resource to the target front-end resource.

[0118] Step 511: The central server performs a backup operation on the current front-end resources.

[0119] Step 512: The central server sends change result information to the front-end device.

[0120] The software version change method provided in this embodiment has the following technical effects: First, it realizes the synchronous upgrade and rollback of the front-end and back-end versions: This embodiment not only supports the upgrade and rollback of the back-end subserver, but also supports the synchronous upgrade and rollback of the front-end resources with the back-end subserver and the central server, which can realize the synchronous upgrade and rollback of the entire application and reduce the compatibility problems caused by inconsistent versions; Second, it realizes the distribution processing of distributed deployed back-end software: This embodiment can distribute and process the distributed deployed back-end software to ensure that the upgrade and rollback operations of all sub-servers can be notified and coordinated in time during the upgrade and rollback process, thereby avoiding conflicts and errors caused by different deployments; Third, it supports data security and integrity: This embodiment ensures the integrity and correctness of the downloaded version file through the MD5 verification algorithm, thereby ensuring the security and integrity of the data during the upgrade and rollback process.

[0121] Figure 6 1 is a schematic diagram of the structure of a software version change device provided according to an embodiment of the present invention. The software version change device provided in this embodiment is arranged in a central server. Figure 6 As shown, the software version changing device provided in this embodiment includes: an acquisition module 61 , a sending module 62 and a changing module 63 .

[0122] The acquisition module 61 is used to acquire the target software version according to the first software change request sent by the front-end device.

[0123] The first software change request is used to instruct the central server to change the current software version in the central server to the target software version.

[0124] The sending module 62 is used to send a second software change request to the connected sub-server.

[0125] The second software change request includes the target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version.

[0126] The changing module 63 is used to change the current software version in the central server to the target software version when it is determined that the sub-server is changed successfully according to the change result of the software version fed back by the sub-server.

[0127] In one embodiment, the first software change request is further used to instruct the central server to change the current front-end resource corresponding to the current software version in the front-end server to the target front-end resource corresponding to the target software version. The change module 63 is also used to: change the current front-end resource to the target front-end resource.

[0128] In one embodiment, the first software change request includes an identifier of the target software version. The acquisition module 61 is specifically used to: after determining that the target software version exists locally on the central server according to the identifier of the target software version, verify the target software version; after determining that the target software version passes the verification, acquire the target software version.

[0129] In one embodiment, the number of the sub-servers is at least two. In terms of determining that the sub-server has been successfully changed according to the software version change results fed back by the sub-servers, the change module 63 is specifically used to: count the number of successful change results among the software version change results fed back by at least two of the sub-servers, wherein the successful change results are used to indicate that the sub-server has been successfully changed; and when it is determined that the number of successful change results meets a preset condition, determine that at least two of the sub-servers have been successfully changed, wherein the preset condition is that the number of successful change results is greater than a preset number threshold, or that the ratio of the number of successful change results to the total number of the sub-servers is greater than a preset ratio threshold.

[0130] In one embodiment, the device further includes a restart module for performing a restart operation.

[0131] In one embodiment, the device further includes a backup module for performing a backup operation on the current front-end resources.

[0132] In one embodiment, the device also includes a result feedback module for generating change result information, wherein the change result information includes a change result, and when the change result indicates that the change fails, the change result information also includes error information; and the change result information is sent to the front-end device.

[0133] The software version changing device provided in the embodiment of the present invention can execute the software version changing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0134] Figure 7 FIG. 1 is a schematic diagram of the structure of another software version change device provided according to an embodiment of the present invention. The software version change device provided in this embodiment is arranged in a sub-server. Figure 7 As shown, the software version changing device provided in this embodiment includes: a receiving module 71 , a changing module 72 and a feedback module 73 .

[0135] The receiving module 71 is used to receive a second software change request sent by the central server.

[0136] The second software change request includes a target software version. The second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version.

[0137] The changing module 72 is used to change the current software version in the sub-server to the target software version according to the second software change request, and generate a software version change result.

[0138] The feedback module 73 is used to feed back the change result of the software version to the central server.

[0139] In one embodiment, the change result includes: a change success result and / or a change failure result. The change module 72 is specifically used to: generate a change success result when the current software version in the sub-server is successfully changed to the target software version; and generate a change failure result when the process of changing the current software version in the sub-server to the target software version fails.

[0140] In one embodiment, the device further includes a restart module for performing a restart operation.

[0141] The software version changing device provided in the embodiment of the present invention can execute the software version changing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0142] Figure 8 It is a structural diagram of an electronic device that implements the software version change method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The server here can be a central server or a sub-server in the present embodiment. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0143] like Figure 8As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0144] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0145] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a software version change method.

[0146] In some embodiments, the software version change method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the software version change method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the software version change method in any other appropriate manner (e.g., by means of firmware).

[0147] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0148] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0149] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0150] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0151] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server) or a computing system that includes middleware components (e.g., an application server) or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein) or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0152] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0153] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0154] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for changing a software version, characterized in that: Applied in a central server, the method comprises: Obtaining a target software version according to a first software change request sent by a front-end device; wherein the first software change request is used to instruct the central server to change the current software version in the central server to the target software version; Sending a second software change request to the connected sub-server; wherein the second software change request includes the target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version; When it is determined that the sub-server is successfully changed according to the change result of the software version fed back by the sub-server, the current software version in the central server is changed to the target software version.

2. The method according to claim 1, characterized in that The first software change request is also used to instruct the central server to change the current front-end resources corresponding to the current software version in the front-end server to target front-end resources corresponding to the target software version; After the current software version in the central server is changed to the target software version, the method further includes: The current front-end resource is changed to the target front-end resource.

3. The method according to claim 1, characterized in that The first software change request includes an identifier of the target software version; The step of obtaining a target software version according to the first software change request sent by the front-end device includes: After determining that the target software version exists locally on the central server according to the identifier of the target software version, verifying the target software version; After determining that the target software version has passed verification, the target software version is obtained.

4. The method according to any one of claims 1 to 3, characterized in that: The number of the sub-servers is at least two; The determining, based on the software version change result fed back by the sub-server, that the sub-server change is successful includes: Counting the number of successful change results among the software version change results fed back by at least two of the sub-servers; wherein the successful change result is used to indicate that the sub-server change is successful; When it is determined that the number of successful change results meets the preset conditions, it is determined that at least two of the sub-servers have been changed successfully; wherein the preset conditions are that the number of successful change results is greater than a preset number threshold, or that the ratio of the number of successful change results to the total number of sub-servers is greater than a preset ratio threshold.

5. A method for changing a software version, characterized in that: Applied in a sub-server, the method comprises: Receiving a second software change request sent by the central server; wherein the second software change request includes a target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version; According to the second software change request, the current software version in the sub-server is changed to the target software version, and a software version change result is generated; Feedback the change result of the software version to the central server.

6. The method according to claim 5, characterized in that The change result includes: a change success result and / or a change failure result; The step of changing the current software version in the sub-server to the target software version according to the second software change request and generating a software version change result includes: When the current software version in the sub-server is successfully changed to the target software version, a change success result is generated; When the process of changing the current software version in the sub-server to the target software version fails, a change failure result is generated.

7. A software version changing device, characterized in that: The device is arranged in a central server, and comprises: An acquisition module, configured to acquire a target software version according to a first software change request sent by a front-end device; wherein the first software change request is used to instruct the central server to change a current software version in the central server to a target software version; a sending module, configured to send a second software change request to the connected sub-server; wherein the second software change request includes the target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version; The changing module is used to change the current software version in the central server to the target software version when it is determined that the sub-server is changed successfully according to the change result of the software version fed back by the sub-server.

8. A software version changing device, characterized in that: The device is arranged in a sub-server, and comprises: A receiving module, configured to receive a second software change request sent by the central server; wherein the second software change request includes a target software version, and the second software change request is used to instruct the sub-server to change the current software version in the sub-server to the target software version; a change module, configured to change the current software version in the sub-server to the target software version according to the second software change request, and generate a software version change result; The feedback module is used to feed back the change result of the software version to the central server.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the software version changing method described in any one of claims 1 to 4, or execute the software version changing method described in claim 5 or 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the software version changing method described in any one of claims 1 to 4 when executed, or to execute the software version changing method described in claim 5 or 6.