Server updating method and device, equipment, storage medium and program product

By automating the generation of server update paths, the problem of low server update efficiency is solved, enabling efficient and accurate updates of massive numbers of servers and avoiding errors and resource waste caused by manual operation.

CN121125481APending Publication Date: 2025-12-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511230005.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing technologies have low server update efficiency, requiring manual processing on a per-server basis, which leads to inefficiency and is prone to update errors.

Method used

By determining the server's location and system information, an update path is automatically generated, and an update command including the target version information and target address is sent to the server, enabling automatic batch updates of massive numbers of servers and automatically generating differentiated update paths for different types or versions of servers.

Benefits of technology

It improves the accuracy and efficiency of server updates, avoids errors caused by manual operation, optimizes resource utilization, and ensures the stability and reliability of the update process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125481A_ABST
    Figure CN121125481A_ABST
Patent Text Reader

Abstract

The invention provides a server updating method and device, equipment, a storage medium and a program product, and relates to the field of financial science and technology or other related fields. The method comprises the following steps: determining position information of a plurality of first servers and current first system information of the plurality of servers; determining to-be-updated target version information of the plurality of first servers based on the plurality of pieces of first system information; determining a plurality of first servers to obtain a target address of the target version based on the plurality of pieces of position information; the updating instruction is sent to the multiple first servers, the updating instruction comprises the information of the target version corresponding to the first server and the target address, and the server updating efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology or other related fields, and in particular to a server update method, apparatus, device, storage medium and program product. Background Technology

[0002] As the number of users and the scale of data increase, the size of the servers also continues to expand. In order to ensure that each server can operate safely, it is necessary to update each server periodically.

[0003] In related technologies, server updates are usually performed manually. Specifically, staff need to update a large number of servers one by one. However, the above method requires manual updating of each server, resulting in low efficiency of server updates. Summary of the Invention

[0004] This application provides a server update method, apparatus, device, storage medium, and program product to solve the technical problem of low efficiency in server updates.

[0005] Firstly, this application provides a server update method, including:

[0006] Determine the location information of multiple primary servers and the current primary system information of multiple servers;

[0007] Based on information from multiple primary systems, the target version information to be updated for multiple primary servers is determined.

[0008] Based on multiple location information, the target addresses for multiple first servers to obtain the target version are determined.

[0009] Update commands are sent to multiple primary servers. The update commands include information about the target version and the target address corresponding to the primary server.

[0010] Secondly, this application provides a server update apparatus, comprising: a first determining module, a second determining module, a third determining module, and a sending module, wherein,

[0011] The first determining module is used to determine the location information of multiple first servers and the current first system information of the multiple servers;

[0012] The second determining module is used to determine the target version information to be updated for multiple first system information based on multiple first system information.

[0013] The third determining module is used to determine the target address for multiple first servers to obtain the target version based on multiple location information.

[0014] The sending module is used to send update instructions to multiple first servers. The update instructions include information about the target version and the target address corresponding to the first server.

[0015] Thirdly, embodiments of this application provide a server update method, comprising: at least one processor and a memory; the memory storing computer-executable instructions; at least one processor executing the computer-executable instructions stored in the memory, causing at least one processor to perform the server update method as described in the first aspect above and any one of the first aspects.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the server update method described in the first aspect above and any one of the first aspects.

[0017] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the server update method as described in the first aspect and any one of the first aspects.

[0018] The server update method, apparatus, device, storage medium, and program product provided in this application, when a server needs to be updated, determine the location information of multiple first servers and the current first system information of multiple servers; based on the multiple first system information, determine the target version information to be updated for multiple first servers; based on the multiple location information, determine the target address for multiple first servers to obtain the target version; and send update instructions to multiple first servers, the update instructions including the target version information and target address corresponding to the first server. In the above method, the electronic device can generate update paths according to the location information and system information of each server, realizing automatic batch updates of massive servers without manual intervention. Furthermore, this method can automatically generate differentiated update paths for different types or versions of servers, avoiding update errors caused by manual operation, and improving the efficiency of server updates while improving the accuracy of server updates. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] Figure 1 This is a schematic diagram of the system architecture provided for an embodiment of this application;

[0021] Figure 2 A schematic flowchart illustrating a server update method provided in an embodiment of this application;

[0022] Figure 3 A schematic diagram illustrating the process of a method for sending update instructions to multiple first servers according to an embodiment of this application;

[0023] Figure 4 A schematic diagram illustrating the process of determining the target address of a target version by multiple first servers as provided in the embodiments of this application;

[0024] Figure 5 A flowchart illustrating another server update method provided in this application embodiment;

[0025] Figure 6 This is a schematic diagram of the structure of a server update device provided in an embodiment of this application;

[0026] Figure 7 This is a schematic diagram of another server update device provided in an embodiment of this application;

[0027] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0028] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.

[0031] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.

[0032] It should be noted that the server update method, apparatus, device, storage medium and program product provided in this application can be used in the field of fintech, or in any field other than fintech. The application field of the server update method, apparatus, device, storage medium and program product in this application is not limited.

[0033] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0034] To facilitate understanding, the following will be combined with... Figure 1 The system architecture applicable to the embodiments of this application will be described.

[0035] Figure 1 This is a schematic diagram of the system architecture provided for an embodiment of this application. Please refer to [link / reference]. Figure 1 It includes an electronic device 101 and multiple servers 102, wherein the electronic device 101 can be a device with on-device computing capabilities, such as a server.

[0036] A two-way communication connection is established between electronic device 101 and server 102. Electronic device 101 can send instructions to server 102, and server 102 can perform corresponding operations based on the received instructions. It can also send processing information to electronic device 101.

[0037] In practical applications, when multiple servers 102 need to be updated, the electronic device 101 can send update instructions to the multiple servers 102. The multiple servers 102 can perform update processing based on the received instructions and send the server update information to the electronic device 101.

[0038] In related technologies, server updates are usually performed manually. Specifically, staff need to update a large number of servers one by one. However, the above method requires manual updating of each server, resulting in low efficiency of server updates.

[0039] To address the aforementioned technical problems, in this embodiment, when a server needs to be updated, the location information and system information of multiple first servers are determined. Based on the system information of the multiple first servers, the target version information to be updated is determined, and based on the location information of the multiple first servers, the target address of the target version is determined. An update instruction including the target version information and the target address is then sent to each first server. In this method, the electronic device can generate update paths based on the location and system information of each server, enabling automatic batch updates of massive servers without manual intervention. It can also automatically generate differentiated update paths for different types or versions of servers, avoiding update errors caused by manual operation. Furthermore, during the server update process, the electronic device can dynamically adjust the update batches of multiple servers based on the business time period and network bandwidth status, enabling time-segmented and batch-segmented updates of massive servers. This avoids network congestion and excessive server load, effectively reducing resource consumption and improving the stability and reliability of the server update process. Therefore, in this case, this process improves both the accuracy and efficiency of server updates.

[0040] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0041] Figure 2 This is a flowchart illustrating a server update method provided in an embodiment of this application. Please refer to [link / reference]. Figure 2 As shown, the method may include the following steps:

[0042] S201. Determine the location information of multiple first servers and the current first system information of multiple servers.

[0043] The execution subject of this application embodiment can be an electronic device or a data server update device installed in an electronic device. The server update device can be implemented by software or by a combination of software and hardware.

[0044] The first server can refer to the server that is to be updated.

[0045] Location information can refer to the deployment area of ​​the first server. Specifically, electronic devices can determine the deployment area of ​​the first server based on its Internet Protocol (IP) address.

[0046] The first system information can refer to the operating system information of the first server. Specifically, the operating system information includes the operating system version and the operating system type. For example, the operating system type can be a Linux system, and the operating system version can be Linux 6.0.

[0047] In some embodiments, a preset script library can be configured before server updates are performed. The preset script library is used to store possible cases and includes at least one automated deployment management script. In this way, electronic devices can determine the first system information of multiple first servers based on the preset script library. For example, in a financial scenario, the preset script library can be WIDE to manage all scripts and distribute scripts to each server.

[0048] In some embodiments, the preset script library includes multiple system information (operating system version and operating system type) that meet the update requirements. That is, the electronic device can determine whether each operating system version meets the system version requirements in the preset script library based on the operating system versions of multiple servers, determine multiple servers that meet the system version requirements, and determine whether each operating system type meets the system type requirements in the preset script library based on the operating system types corresponding to the multiple servers that meet the system version requirements, thereby determining multiple servers that meet both the system version requirements and the system type requirements, i.e., multiple first servers.

[0049] In some embodiments, after the electronic device identifies multiple first servers that meet the system version and system type requirements, the electronic device can obtain the IP addresses of the multiple first servers and determine the location information of each first server based on the multiple IP addresses.

[0050] S202. Based on multiple first system information, determine the target version information to be updated for multiple first servers.

[0051] The target version can refer to the version of the patch file that the server needs to be updated with. The patch file is used to fix vulnerabilities in the server that is to be updated.

[0052] In some embodiments, a patch repair platform can be pre-configured for managing and performing patch identification tasks. The patch repair platform includes a patch database, which can be used to store information about the target version corresponding to each server. In this way, the electronic device can determine the information of the target version to be updated of the first server from the patch database based on the first system information of the first server.

[0053] In some embodiments, a correspondence between server system information and patch file versions can be pre-established based on a patch database to enable rapid identification and deployment of patch files. Specifically, the patch repair platform can query and identify the information of the corresponding patch file, i.e., the information of the target version to be updated, based on the current status and vulnerability issues of the first server and the first system information of each first server in the patch database.

[0054] In some embodiments, the patch database can be updated periodically. Specifically, the electronic device can store the first system information of each first server and the information of the corresponding target version to be updated into the patch database, so that the patch database can be synchronized with the server updates.

[0055] In some embodiments, the electronic device can determine information about multiple target versions to be updated on multiple first servers based on multiple transmission methods. The transmission methods may include the wide service and the Secure Shell (SSH) service. The SSH service is a service deployed on the server to enable the electronic device and the server to establish a connection via the SSH protocol. Specifically, if the transmission method is the wide service, the electronic device can determine information about multiple target versions to be updated on multiple first servers in the WIDE script library based on the wide service. If the transmission method is the SSH service, the electronic device can determine information about multiple target versions to be updated on multiple first servers in the patch database of the patch repair platform based on the SSH service.

[0056] In some embodiments, when the electronic device determines the transmission method of each first server, the electronic device may determine the corresponding transmission method based on the status of the agent service, which may be a normal status or an abnormal status.

[0057] Specifically, if the agent service is in a normal state, the wide service is selected as the transmission method for the first server. This means the target version information to be updated can be determined from the wide script library using the wide service. If the agent service is in an abnormal state, the SSH service is selected as the transmission method for the first server. This means the target version information to be updated can be determined from the patch database using the SSH service. This dual transmission path of wide / SSH services, with automatic switching between methods based on actual conditions, reduces the risk of server update failures due to anomalies in a single transmission path, ensuring a high overall task success rate.

[0058] S203. Based on multiple location information, determine the target address for multiple first servers to obtain the target version.

[0059] The target address can refer to the location where the patch file corresponding to the first server is obtained.

[0060] In some embodiments, since there are a large number of first servers and each first server has a different operating system version and corresponding patch files, the location where each first server obtains the target version may be different.

[0061] In practical applications, the target address for each first server to obtain the target version is usually the patch server in its deployment area (location information). The patch server is used to store patch media. Electronic devices can determine the target address for multiple first servers to obtain the target version based on the connection status between each first server and the patch server in the corresponding deployment area.

[0062] Specifically, for any first server, if the connection status between the first server and the patch server of the corresponding deployment area is normal, it indicates that the first server and the patch server of the deployment area can establish a communication connection. That is, the deployment area is the target address, and the electronic device can obtain the corresponding patch file from the patch server based on the target version information to be updated on the first server.

[0063] For any given first server, if the connection status between the first server and the patch server of the corresponding deployment area is abnormal, it indicates that the first server cannot establish a communication connection with the patch server of the deployment area. That is, the electronic device can obtain other deployment areas (location information) that are close to the first server based on the deployment area of ​​the first server, and determine the connection status of the first server with the patch servers of other deployment areas. When the connection status is normal, the electronic device can obtain the corresponding patch file from the patch server of the corresponding deployment area based on the target version information to be updated of the first server.

[0064] For example, if the deployment region of the first server is A, and the connection between the first server and the patch server in region A is normal, then deployment region A is the target address for the first server to obtain the target version. If the connection between the first server and the patch server in region A is abnormal, but the connection with the patch server in deployment region B is normal, then deployment region B is the target address for the first server to obtain the target version.

[0065] S204. Send update commands to multiple primary servers.

[0066] The update instruction includes information about the target version and target address corresponding to the first server.

[0067] In some embodiments, the electronic device sends update instructions to multiple first servers. After receiving the update instructions, each first server obtains a patch file corresponding to the target version information from the target address based on the target version information in the update instructions, so as to perform server update.

[0068] In some embodiments, before each first server receives an update instruction and performs a server update, due to the significant differences in the system versions of the servers, the information of the version of the first server before the update can be stored and backed up, and the backup record can be saved locally. This facilitates batch automated differential rollback after an anomaly occurs. In this way, when batch automated differential rollback occurs, the rollback version of the first server (the information of the version before the update) can be determined based on the local backup record, and the version of the first server can be downgraded to ensure that it is restored to the stable state before the update, thereby reducing business interruption time and maintenance workload.

[0069] In some embodiments, when an electronic device sends update instructions to multiple first servers, the electronic device needs to determine the time period for sending the update instructions. Specifically, the electronic device can send update instructions to each first server based on a preset time period. The preset time period refers to a pre-set off-peak business period. In this way, it can avoid occupying a large amount of network bandwidth during transmission, effectively reduce resource consumption, and improve the efficiency of server updates.

[0070] In this embodiment, when a server needs to be updated, the location information and system information of multiple first servers are determined. Based on the system information of the multiple first servers, the target version information to be updated is determined, and based on the location information of the multiple first servers, the target address of the target version is determined. An update instruction including the target version information and the target address is sent to each first server. In the above method, the electronic device can generate an update path according to the location information and system information of each server, realizing automatic batch updates of massive servers without manual intervention. It can also automatically generate differentiated update paths for different types or versions of servers, avoiding update errors caused by manual operation. Furthermore, during the server update process, the electronic device can dynamically adjust the update batches of multiple servers based on the business time period and network bandwidth status, realizing time-sharing and batch updates of massive servers, avoiding network congestion and excessive server load, effectively reducing resource consumption, and improving the stability and reliability of the server update process. Therefore, in this case, this process improves the efficiency of server updates while improving the accuracy of server updates.

[0071] exist Figure 2 Based on the embodiments shown, the following, in conjunction with Figure 3The method of sending update instructions to multiple first servers in the above server update method ( Figure 2 The S204 example will be described in detail.

[0072] Figure 3 This is a schematic diagram illustrating the process of a method for sending update instructions to multiple first servers, as provided in an embodiment of this application. Figure 3 In the embodiments, please refer to Figure 3 ,include:

[0073] S301. Obtain the current time and update time period of multiple first servers.

[0074] The current time can refer to the current time of the region where the first server is located. For example, the current time can be 8:00.

[0075] In some embodiments, since the location information of each first server is different and the deployment area is also different, the current time collected by each first server at the same time may be different. The electronic device can select the hour (24-hour format) of the current time of each first server as the current time. For example, if the current time (12-hour format) is 6:00 pm, then the converted current time (24-hour format) is 18:00.

[0076] The update period can refer to the update time range of multiple first servers. For example, the update period can be from 01:00 to 07:30.

[0077] In some embodiments, since the server has a busy time period, which is from 08:00 to 18:00 standard time, the electronic device can determine the update time period of multiple first servers in addition to the busy time period. For example, the update time period can be from 03:00 to 06:00 standard time.

[0078] In some embodiments, the electronic device can determine the start and end times of the update period based on the current time of each first server. The start time refers to the time during which the update operation is performed within the update period, and the end time refers to the time during which the update operation is completed within the update period. For example, if the update period is from 03:00 to 04:00 standard time, then the start time is 03:00 and the end time is 04:00.

[0079] In some embodiments, the electronic device may sort the current times of each first server in order from earliest to latest based on multiple current times, determine the latest current time among the multiple first servers as the start update time, and determine the end update time according to the update status of the servers in actual application.

[0080] S302. Among multiple first servers, determine the second server that is currently within the update period.

[0081] The second server can refer to the first server that is capable of performing update operations.

[0082] In some embodiments, if the current time of the first server is within a busy business period, the update operation of the first server is suspended.

[0083] For example, if there are four first servers, namely first server A, first server B, first server C and first server D, and the current time of first server A is 15:00, the current time of first server B is 18:12, the current time of first server C is 18:50 and the current time of first server D is 19:30, then the first servers and their corresponding current times can be shown in Table 1:

[0084] Table 1

[0085]

[0086] According to Table 1, during peak business hours, the update operation of the first server A can be paused. The current time of the first server D is 19:30, which is the latest time, so 19:30 can be set as the start time of the update. If the update process of each first server takes 4 hours, then 23:30 can be set as the end time of the update. Thus, the update period of each first server can be from 19:30 to 23:30. The second server includes the first server B, the first server C, and the first server D.

[0087] S303, Send update commands to multiple secondary servers.

[0088] The electronic device can send update instructions to multiple second servers based on the following feasible implementation: determining a first number of second servers and the current network bandwidth; and sending update instructions to multiple second servers based on the first number and network bandwidth.

[0089] The first quantity can refer to the total number of second servers in the current update period. For example, if the number of first servers is 800, and 600 of them are in the current update period, then the first quantity of second servers is 600.

[0090] Network bandwidth refers to the amount of data that can be transmitted per unit of time.

[0091] In some embodiments, network bandwidth is used to indicate the maximum number of servers that can be supported per unit time. For example, if the current network bandwidth is 1000Mbps and the bandwidth required for each second server to update is 2Mbps, then the network bandwidth can support a maximum of 500 second servers to perform update operations simultaneously per unit time. In this way, electronic devices can send update instructions to 500 second servers.

[0092] In some embodiments, the electronic device may determine the execution order of each second server by combining the total number of second servers and the maximum number of servers supported by the network bandwidth, and send update instructions to multiple second servers sequentially based on the execution order.

[0093] The electronic device can send update instructions to multiple second servers based on a first quantity and network bandwidth in the following feasible implementation: determining a second quantity based on network bandwidth; sending update instructions to multiple second servers when the first quantity is less than or equal to the second quantity; and dividing the multiple second servers into multiple server sets when the first quantity is greater than the second quantity, and sending update instructions to multiple second servers based on the multiple server sets.

[0094] The second number is the number of servers that can currently be updated.

[0095] In some embodiments, the electronic device can determine the number of second servers that can be updated per unit time, i.e., the second number, based on network bandwidth. If the first number is less than or equal to the second number, it indicates that the current network bandwidth can support all second servers to update simultaneously, i.e., the electronic device can send update instructions to all second servers. If the first number is greater than the second number, it indicates that the current network bandwidth cannot support all second servers to update simultaneously. In this case, the electronic device can divide the multiple second servers into multiple server sets based on the first number, so that the electronic device can send update instructions to each server set in sequence.

[0096] For example, if the first quantity is 800 and the second quantity is 1000, and the first quantity is less than the second quantity, the electronic device can send update instructions to 800 second servers. If the first quantity is 1000 and the second quantity is 800, it can be divided into multiple server sets based on the first quantity. For example, it can include two server sets: server set 1 includes 600 second servers, and 600 is less than the second quantity (800); server set 2 includes 400 second servers, and 400 is less than the second quantity (800). In this way, after the electronic device sends an update instruction to server set 1, the electronic device can send an update instruction to server set 2 to reduce the large amount of network bandwidth occupied during transmission and improve the efficiency of server updates.

[0097] Electronic devices can divide multiple second servers into multiple server sets based on the following feasible implementation: obtaining the Internet Protocol (IP) addresses corresponding to multiple second servers; and dividing multiple second servers into multiple server sets based on multiple IP addresses.

[0098] In some embodiments, after the electronic device obtains the IP addresses corresponding to multiple second servers, the electronic device can divide the multiple second servers into multiple server sets based on the fourth segment of the IP address, wherein the IP address consists of four decimal values, for example, the IP address is 198.168.1.100, and the fourth segment is 100.

[0099] In some embodiments, the electronic device can determine multiple server sets based on a preset partition interval. The preset partition interval refers to a pre-defined range corresponding to each server set. For example, if the preset partition interval is 20, then the range corresponding to each server set is 1-20, 21-40, etc. In this way, the electronic device can process a large number of servers in batches, thereby avoiding the problem of occupying a large amount of network bandwidth and optimizing resource utilization.

[0100] For example, if there are six second servers, namely second server A, second server B, second server C, second server D, and second server E, with the IP address of second server A being 198.168.1.1, second server B being 198.168.1.2, second server C being 198.168.1.60, second server D being 198.168.1.70, and second server E being 198.168.1.100, then if the preset division interval is 50, the second servers with the fourth segment of IP address from 1 to 50 can be divided into server set 1, and the second servers with the fourth segment of IP address from 51 to 100 can be divided into server set 2. That is, server set 1 includes second server A and second server B, and server set 2 includes second server C, second server D, and second server E.

[0101] The electronic device can send update instructions to multiple second servers based on multiple server sets in the following feasible implementation: for the i-th server set; send the corresponding update instructions to the second servers in the i-th server set; after the second servers in the i-th server set have completed the update, send the corresponding update instructions to the second servers in the (i+1)-th server set.

[0102] Where i takes the values ​​1, 2, ..., N in sequence, and N is the number of servers in the set.

[0103] In some embodiments, for the first server set, the electronic device can send update instructions to multiple second servers in the first server set. After the second servers in the second server set have completed the update, each second server sends an update completion message to the electronic device. After receiving the update completion message, the electronic device sends update instructions to each second server in the second server set, and so on, until the electronic device receives update completion instructions from each second server in the Nth server set. The entire operation is pushed through the server central terminal through an automatic queuing mechanism.

[0104] In this embodiment, by obtaining the current time and update period of multiple first servers, a second server within the update period is determined. Based on the number of second servers and network bandwidth, the number of servers that can be updated is determined. When the number of servers exceeds the range supported by the network bandwidth, the servers can be divided into multiple server sets, and the server sets are updated sequentially. In the above method, electronic devices can avoid peak business periods by setting update periods and dynamically adjust the number of servers to be updated in combination with network bandwidth, effectively reducing network bandwidth pressure, optimizing network resource utilization, and improving the stability and security of server updates. Furthermore, electronic devices can orderly divide servers based on IP addresses, so that the number of updates in each batch matches network resources. In this case, this method, through a time-sharing and batch-based server update strategy, significantly improves the efficiency of server updates and network resource utilization while achieving automated batch updates, ensuring business continuity and the coordinated execution of update tasks.

[0105] Based on any of the above embodiments, the following, in conjunction with Figure 4 The process of determining the target address of multiple first servers to obtain the target version of an electronic device based on multiple location information. Figure 2 The embodiment of S203 will be described in detail.

[0106] Figure 4 This is a schematic diagram illustrating the process of determining the target address of a target version using multiple first servers provided in embodiments of this application. Please refer to... Figure 4 For any given first server, the method may include:

[0107] S401. Obtain the first connection status of the first resource library and the second connection status of the second resource library corresponding to the first server and the location information.

[0108] The first and second resource repositories include the target version.

[0109] Both the first and second resource repositories are used to store patch files to be updated on the first server, as well as the dependency packages associated with those patch files.

[0110] In some embodiments, a unified two-set yum source approach can be adopted. Specifically, a first resource repository and a second resource repository can be configured in the patch server based on the deployment region (location information) where the first server is located. Specifically, the first resource repository can be a yum source and the second resource repository can be a zypper source, wherein the first resource repository is the primary acquisition source and the second resource repository is the secondary acquisition source.

[0111] The first connection status is used to indicate the communication status between the first server and the first resource library in the corresponding deployment area.

[0112] The second connection status is used to indicate the communication status between the first server and the second resource library in the corresponding deployment area.

[0113] In some embodiments, a server in a deployment area can typically access the patch server in that deployment area and obtain the target version from the patch server. The patch server includes a first resource repository and a second resource repository. Therefore, before the electronic device obtains the first connection status and the second connection status, the electronic device needs to verify the firewall connectivity of ports 21 / 22 from the first server to the patch server, that is, to determine the connection status between the first server and the patch server with the corresponding location information. If the first server receives a response from the patch server, it indicates that the communication connection between the first server and the patch server is normal. If the first server receives an error message from the patch server, it indicates that the first server and the patch server have not established a communication connection.

[0114] S402. When the first connection state is normal, determine the target address as the address of the first resource library.

[0115] In some embodiments, when it is determined that the connection status between the first server and the patch server is normal, and the first connection status is normal, it indicates that the first server can obtain the target version from the yum source, that is, the address of the yum source can be determined as the target address.

[0116] S403. When the first connection state is abnormal and the second connection state is normal, the target address is determined to be the address of the second resource library.

[0117] In some embodiments, when the first connection state is an abnormal state and the second connection state is a normal state, it indicates that the first server has not established a connection with the yum source, and the target version can be obtained from the zypper source, that is, the address of the zypper source can be determined as the target address.

[0118] In some embodiments, if the connection status between the first server and the patch server is abnormal, it indicates that the first server cannot communicate with the patch server corresponding to the location information. The electronic device can test the connection status between the first server and the first resource repository (yum source) and the second resource repository (zypper source) of the deployment area of ​​the other first server based on the IP address of the first server, until it is determined that the connection status between the first server and the yum source or zypper source of the other deployment area is normal.

[0119] In this embodiment, by obtaining the first connection status of the first resource library corresponding to the first server and the second connection status of the second resource library, when the first connection status is normal, the target address is determined to be the address of the first resource library; when the first connection status is abnormal and the second connection status is normal, the target address is determined to be the address of the second resource library. In the above method, the electronic device can automatically switch the acquisition path according to the real-time status of the resource library. At the same time, by utilizing cross-regional connection to the resource library, the reliability of patch acquisition is significantly improved, avoiding update failures caused by the abnormality of a single acquisition source, ensuring the continuity of server update tasks, and further enhancing the stability of the update process. In this case, the method effectively improves the efficiency of server updates and reduces operation and maintenance costs and complexity.

[0120] Based on any of the above embodiments, the following, in conjunction with Figure 5 The process of updating the server is explained in detail.

[0121] Figure 5 This is a flowchart illustrating another server update method provided in an embodiment of this application. Please refer to... Figure 5 The method may include:

[0122] S501: Obtain secondary system information from multiple third-party servers.

[0123] The third server can refer to the server that needs to update the target version.

[0124] The second system information can refer to the operating system version and operating system type of the third server.

[0125] S502. Based on information from multiple second systems, identify multiple first servers that meet the update conditions among multiple third servers.

[0126] In some embodiments, combined with Figure 2In S201 of the embodiment, the electronic device can determine multiple first servers based on the WIDE script library. Specifically, it can sequentially determine whether the system version and system type of the third server meet the system version and system type requirements in the WIDE script library, and then determine multiple first servers that meet the update conditions among the multiple third servers.

[0127] S503. Determine the location information of multiple first servers and the current first system information of multiple servers.

[0128] It should be noted that the execution process of S503 can be found in the execution process of S201, and will not be repeated here.

[0129] S504. Based on multiple first system information, determine the target version information to be updated for multiple first servers.

[0130] It should be noted that the execution process of S504 can be found in the execution process of S202, and will not be repeated here.

[0131] S505. Based on multiple location information, determine the target address for multiple first servers to obtain the target version.

[0132] It should be noted that the execution process of S505 can be found in the execution processes of S401-S403, and will not be repeated here.

[0133] S506: Obtain the current time and update time period of multiple first servers.

[0134] S507. Among multiple first servers, determine the second server that is currently within the update period.

[0135] S508: Send update commands to multiple secondary servers.

[0136] In some embodiments, for any second server, after receiving an update instruction, the second server can, based on the local installation package situation, query the packages and their dependencies recorded in the yum or zypper source, compare the installation requirements of the target version, then obtain the target version and associated dependency packages from the yum or zypper source and download them, update the server according to the installation requirements and installation order, and store the installation information and installation results in the local implementation log. Then, the installation results are centrally uploaded to the electronic device for centralized management. If the installation result is an installation failure, a manual second installation confirmation can be performed.

[0137] In this embodiment, when a server needs to be updated, the location information and system information of multiple first servers are determined, the target version information to be updated is determined based on the system information of multiple first servers, and the target address of the target version is determined based on the location information of multiple first servers. An update instruction including the target version information and the target address is then sent to each first server. In the above method, electronic devices can perform batch patch installation and deployment on massive servers, and achieve automatic rollback and automatic upgrade during the update process. This solves the problem of automated batch patch installation and automatic rollback for hundreds of thousands of servers on a data center open platform. It can be applied to other similar terminal program deployment and self-maintenance tasks, improving the efficiency of server updates.

[0138] Figure 6 This is a schematic diagram of a server update device provided in an embodiment of this application. Please refer to... Figure 6 The data processing device 10 includes: a first determining module 11, a second determining module 12, a third determining module 13, and a sending module 14, wherein...

[0139] The first determining module 11 is used to determine the location information of multiple first servers and the current first system information of the multiple servers;

[0140] The second determining module 12 is used to determine the target version information of multiple first system information to be updated on multiple first servers;

[0141] The third determining module 13 is used to determine the target address for multiple first servers to obtain the target version based on multiple location information.

[0142] The sending module 14 is used to send update instructions to multiple first servers, the update instructions including the target version information and target address corresponding to the first server.

[0143] The server update device provided in this application embodiment can execute the method shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0144] In one possible implementation, the sending module 14 is specifically used for:

[0145] Get the current time and update time period of multiple first servers;

[0146] Among multiple first servers, determine the second server that is currently within the update period;

[0147] Send update commands to multiple secondary servers.

[0148] In one possible implementation, the sending module 14 is specifically used for:

[0149] Determine the initial number of the second server and the current network bandwidth;

[0150] Based on the initial quantity and network bandwidth, update commands are sent to multiple secondary servers.

[0151] In one possible implementation, the sending module 14 is specifically used for:

[0152] Based on network bandwidth, a second quantity is determined, which is the number of servers that can currently be updated;

[0153] When the first quantity is less than or equal to the second quantity, send update instructions to multiple second servers;

[0154] When the first number is greater than the second number, the multiple second servers are divided into multiple server sets, and update instructions are sent to the multiple second servers based on the multiple server sets.

[0155] In one possible implementation, the sending module 14 is specifically used for:

[0156] For the i-th server set;

[0157] Send the corresponding update command to the second server in the i-th server set;

[0158] After the second server in the i-th server set has finished updating, send the corresponding update command to the second server in the (i+1)-th server set;

[0159] i takes the values ​​1, 2, ..., N in sequence, where N is the number of servers in the set.

[0160] In one possible implementation, the sending module 14 is specifically used for:

[0161] Obtain the Internet Protocol (IP) addresses corresponding to multiple second servers;

[0162] Based on multiple IP addresses, multiple secondary servers are divided into multiple server sets.

[0163] In one possible implementation, the third determining module 13 is specifically used for:

[0164] Obtain the first connection status of the first resource library and the second connection status of the second resource library corresponding to the first server and location information. The first and second resource libraries include the target version.

[0165] When the first connection state is normal, the target address is determined to be the address of the first resource library;

[0166] When the first connection state is abnormal and the second connection state is normal, the target address is determined to be the address of the second resource library.

[0167] Figure 7 This is a schematic diagram of another server update device provided in an embodiment of this application. Figure 6 Based on the illustrated embodiments, please refer to Figure 7 The data processing device 10 further includes an acquisition module 15 and a fourth determination module 16, wherein,

[0168] Module 15 is used to: acquire secondary system information from multiple third servers;

[0169] The fourth determining module 16 is also used to: determine, among multiple third servers, multiple first servers that meet the update conditions based on multiple second system information.

[0170] The server update device provided in this application embodiment can execute the method shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0171] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 8 As shown, the electronic device 10 may include: a transceiver 21, a processor 22, and a memory 23.

[0172] Processor 22 executes computer execution instructions stored in memory, causing processor 22 to perform the scheme in the above embodiments. Processor 22 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0173] The memory 23 is connected to the processor 22 via the system bus and completes communication between them. The memory 23 is used to store computer program instructions.

[0174] Transceiver 21 can be used to obtain the task to be run and the configuration information of the task to be run.

[0175] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.

[0176] The electronic device provided in this application embodiment can be the terminal device described in the above embodiments.

[0177] This application also provides a chip for executing instructions, which is used to execute the server update method described in the above embodiments.

[0178] This application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer performs the technical solution of the server update method described in the above embodiments.

[0179] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solution of the server update method in the above embodiments.

[0180] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0181] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0182] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0183] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0184] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.

[0185] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0186] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0187] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0188] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A server update method, characterized in that, include: Determine the location information of multiple primary servers and the current primary system information of multiple servers; Based on information from multiple primary systems, the target version information to be updated for multiple primary servers is determined. Based on multiple location information, the target address for obtaining the target version is determined by multiple first servers; An update instruction is sent to the plurality of first servers, the update instruction including information about the target version corresponding to the first server and the target address.

2. The method according to claim 1, characterized in that, Send update instructions to the plurality of first servers, including: Get the current time and update time period of multiple first servers; Among the plurality of first servers, determine the second server that is currently within the update period; The update command is sent to the plurality of second servers.

3. The method according to claim 2, characterized in that, Sending the update instruction to the plurality of second servers includes: Determine the first number of the second servers and the current network bandwidth; Based on the first quantity and the network bandwidth, the update instruction is sent to the plurality of second servers.

4. The method according to claim 3, characterized in that, Based on the first quantity and the network bandwidth, the update instruction is sent to the plurality of second servers, including: Based on the network bandwidth, a second quantity is determined, which is the number of servers that can currently be updated; When the first quantity is less than or equal to the second quantity, the update instruction is sent to the plurality of second servers; When the first quantity is greater than the second quantity, the plurality of second servers are divided into a plurality of server sets, and the update instruction is sent to the plurality of second servers based on the plurality of server sets.

5. The method according to claim 4, characterized in that, Based on multiple server sets, the update instruction is sent to the multiple second servers, including: For the i-th server set; Send the corresponding update instruction to the second server in the i-th server set; After the second server in the i-th server set has finished updating, the corresponding update command is sent to the second server in the (i+1)-th server set. The number i takes the values ​​1, 2, ..., N in sequence, where N is the number of servers in the set.

6. The method according to claim 4, characterized in that, The plurality of second servers are divided into multiple server sets, including: Obtain the Internet Protocol (IP) addresses corresponding to multiple second servers; Based on multiple IP addresses, the multiple second servers are divided into multiple server sets.

7. The method according to any one of claims 1-6, characterized in that, Before determining the location information of multiple first servers and the current first system information of the multiple servers, the method further includes: Obtain secondary system information from multiple third-party servers; Based on information from multiple second systems, multiple first servers that meet the update conditions are identified among multiple third servers.

8. The method according to any one of claims 1-6, characterized in that, For any given first server; based on the multiple location information, determine the target address for multiple first servers to obtain the target version, including: Obtain the first connection status of the first resource library and the second connection status of the second resource library corresponding to the first server and the location information, wherein the first resource library and the second resource library include the target version; When the first connection state is normal, the target address is determined to be the address of the first resource library; When the first connection state is abnormal and the second connection state is normal, the target address is determined to be the address of the second resource library.

9. A server update device, characterized in that, include: The system comprises a first determining module, a second determining module, a third determining module, and a sending module, wherein... The first determining module is used to determine the location information of multiple first servers and the current first system information of the multiple servers; The second determining module is used to determine the target version information of multiple first server to be updated based on multiple first system information. The third determining module is used to determine the target address for multiple first servers to obtain the target version based on multiple location information. The sending module is used to send update instructions to the plurality of first servers, wherein the update instructions include information about the target version corresponding to the first server and the target address.

10. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 8.

12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.