Multi-cluster based client upgrade method, device and electronic equipment

By obtaining and comparing version number and ownership information from the cluster client login request, the system automatically determines the client to be upgraded, solving the problem of difficult cluster client upgrades and achieving efficient client upgrades.

CN115981690BActive Publication Date: 2025-11-04BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211676729.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2025-11-04
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

Existing technologies present challenges in upgrading cluster clients, including high upgrade difficulty and repetitive handling of client-related issues.

Method used

By obtaining the file version number and ownership information from the client login request, and comparing the pre-transmitted version number and ownership information, it is determined whether to send the login request to the target server or upgrade the client. The pre-transmitted version number and ownership information are used to determine the client upgrade in advance.

Benefits of technology

It reduces the difficulty of upgrading cluster clients, enables automated client upgrades, and improves upgrade efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115981690B_ABST
    Figure CN115981690B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on multi-cluster client upgrade method, device and electronic equipment.The method comprises the following steps: in the case where receiving the login request of client, the file version number and the attribution information of client are obtained from login request, wherein the login request is used to login the target server of target cluster in multiple clusters;Compare file version number and pre-transmission version number, and compare attribution information and pre-transmission attribution information, obtain comparison result, wherein pre-transmission version number is the version number of target file received in advance, and pre-transmission attribution information is the attribution information of client needing to be upgraded using target file;According to comparison result, it is determined that login request is sent to target server or client is upgraded using target file.The present application solves the technical problem that it is difficult to upgrade the client in cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of clustering, and more specifically, to a client upgrade method, apparatus, and electronic device based on multiple clusters. Background Technology

[0002] In existing technologies, when upgrading clients in a cluster, upgrades are typically performed only on the clients experiencing problems. After one client resolves its issue, other clients may encounter the same problem, requiring repeated processing.

[0003] In other words, existing technologies present a significant challenge in upgrading the clients of a cluster. Summary of the Invention

[0004] This invention provides a client upgrade method, apparatus, and electronic device based on multiple clusters, to at least solve the technical problem of the difficulty in upgrading clients in a cluster.

[0005] According to one aspect of the present invention, a client upgrade method based on multiple clusters is provided, comprising: upon receiving a login request from a client, obtaining the client's file version number and ownership information from the login request, wherein the login request is used to log in to a target server of a target cluster in multiple clusters; comparing the file version number with a pre-transmitted version number, and comparing the ownership information with the pre-transmitted ownership information to obtain a comparison result, wherein the pre-transmitted version number is the version number of a target file received in advance, and the pre-transmitted ownership information is the ownership information of the client that needs to be upgraded using the target file; and determining, based on the comparison result, whether to send the login request to the target server or upgrade the client using the target file.

[0006] According to another aspect of the present invention, a client upgrade apparatus based on multiple clusters is provided, comprising: an acquisition module, configured to acquire, upon receiving a client's login request, a file version number and ownership information of the client from the login request, wherein the login request is used to log in to a target server of a target cluster in multiple clusters; a comparison module, configured to compare the file version number and the pre-transmitted version number, and to compare the ownership information and the pre-transmitted ownership information, to obtain a comparison result, wherein the pre-transmitted version number is the version number of the target file received in advance, and the pre-transmitted ownership information is the ownership information of the client that needs to be upgraded using the target file; and a processing module, configured to determine, based on the comparison result, whether to send the login request to the target server or to upgrade the client using the target file.

[0007] As an optional example, the attribution information includes the cluster identifier of the attribution cluster, the user set identifier of the attribution user set, and the user identifier. The comparison module includes: a comparison unit, used to determine that the comparison result is to send the login request to the target server when the file version number and the pre-transmission version number are consistent; and to compare the cluster identifier with the pre-transmission cluster identifier in the pre-transmission attribution information, compare the user set identifier with the pre-transmission user set identifier in the pre-transmission attribution information, and compare the user identifier with the pre-transmission user identifier in the pre-transmission attribution information, to obtain the comparison result.

[0008] As an optional example, the comparison unit includes: a comparison subunit, configured to determine, when the pre-transmission attribution information does not include a pre-transmission cluster identifier, that the comparison result indicates the client should be upgraded using the target file; or, when the pre-transmission attribution information includes a pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information does not include a pre-transmission user set identifier, that the comparison result indicates the client should be upgraded using the target file; or, when the pre-transmission attribution information includes a pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information includes a pre-transmission user set identifier and the pre-transmission user set identifier matches the user set identifier, and the pre-transmission attribution information does not include a pre-transmission user identifier, that the comparison result indicates the client should be upgraded using the target file; or, when the pre-transmission attribution information includes a pre-transmission cluster identifier and the pre-transmission user set identifier matches the user set identifier, and the pre-transmission attribution information does not include a pre-transmission user identifier, that the comparison result indicates the client should be upgraded using the target file; or, when the pre-transmission attribution information includes a pre-transmission cluster identifier and the pre-transmission user set identifier matches the user set identifier, and the pre-transmission user set identifier does not include a pre-transmission user identifier, that the comparison result indicates the client should be upgraded using the target file; or, when the pre-transmission attribution information includes a pre-transmission cluster identifier and the pre-transmission user set identifier matches the cluster identifier, ... If the group identifier and cluster identifier are the same, and the pre-transmitted attribution information includes the pre-transmitted user set identifier, and the pre-transmitted user set identifier and user set identifier are the same, and the pre-transmitted user identifier and user identifier are the same, the comparison result will determine that the client should be upgraded using the target file; or if the pre-transmitted attribution information includes the pre-transmitted cluster identifier, and the pre-transmitted cluster identifier and cluster identifier are different, the comparison result will determine that the login request should be sent to the target server; or if the pre-transmitted attribution information includes the pre-transmitted user set identifier, and the pre-transmitted user set identifier and user set identifier are different, the comparison result will determine that the login request should be sent to the target server; or if the pre-transmitted attribution information includes the pre-transmitted user identifier, and the pre-transmitted user identifier and user identifier are different, the comparison result will determine that the login request should be sent to the target server.

[0009] As an optional example, the comparison module further includes: a processing unit, configured to add a pre-transmission cluster identifier to the pre-transmission attribution information according to a predetermined rule before comparing the attribution information and the pre-transmission attribution information; or add a pre-transmission user set identifier to the pre-transmission attribution information according to a predetermined rule; or add a pre-transmission user identifier to the pre-transmission attribution information according to a predetermined rule.

[0010] As an optional example, the predefined rules include: the number of pre-transmitted cluster identifiers added each time is greater than the number of pre-transmitted cluster identifiers added in the previous time; or the number of pre-transmitted user set identifiers added each time is greater than the number of pre-transmitted user set identifiers added in the previous time; or the number of pre-transmitted user identifiers added each time is greater than the number of pre-transmitted user identifiers added in the previous time.

[0011] As an optional example, the comparison module further includes: a deletion unit, used to delete all pre-transmission cluster identifiers in the pre-transmission attribution information if the number of pre-transmission cluster identifiers in the pre-transmission attribution information is greater than a first threshold before comparing the attribution information and the pre-transmission attribution information; or delete all pre-transmission user set identifiers in the pre-transmission attribution information if the number of pre-transmission user identifiers in the pre-transmission attribution information is greater than a second threshold; or delete all pre-transmission user identifiers in the pre-transmission attribution information if the number of pre-transmission user identifiers in the pre-transmission attribution information is greater than a third threshold.

[0012] As an optional example, the apparatus further includes: a receiving module for receiving a file upload request before receiving a client's login request, wherein the file upload request includes a target file to be uploaded, a pre-upload version number of the target file, and pre-upload ownership information of the client that needs to use the target file for upgrade; and a storage module for storing the target file, the pre-upload version number, and the pre-upload ownership information locally, and synchronizing the target file to each of the multiple clusters.

[0013] According to another aspect of the present invention, a storage medium is also provided, wherein a computer program is stored in the storage medium, and the computer program is executed by a processor to perform the above-described multi-cluster-based client upgrade method.

[0014] According to another aspect of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described multi-cluster-based client upgrade method via the computer program.

[0015] In this embodiment of the invention, upon receiving a client's login request, the method involves obtaining the client's file version number and ownership information from the login request. The login request is used to log in to the target server of a target cluster in multiple clusters. The method compares the file version number with the pre-transmitted version number, and compares the ownership information with the pre-transmitted ownership information to obtain a comparison result. The pre-transmitted version number is the version number of the target file received in advance, and the pre-transmitted ownership information is the ownership information of the client that needs to be upgraded using the target file. Based on the comparison result, the method determines whether to send the login request to the target server or upgrade the client using the target file. Because in this method, for clients to be upgraded, the pre-transmitted version number and pre-transmitted ownership information are uploaded in advance, it determines which clients need to be upgraded. When a client requests to log in to the server, the client to be upgraded is automatically upgraded, thereby reducing the difficulty of upgrading clients and solving the technical problem of high difficulty in upgrading clients in a cluster. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0017] Figure 1 This is a flowchart of an optional client upgrade method based on a multi-cluster according to an embodiment of the present invention;

[0018] Figure 2 This is a diagram showing the relationship between clusters, user sets, and users in an optional multi-cluster-based client upgrade method according to an embodiment of the present invention.

[0019] Figure 3 This is a schematic diagram of client upgrade comparison for an optional multi-cluster-based client upgrade method according to an embodiment of the present invention;

[0020] Figure 4 This is a client login flowchart of an optional multi-cluster-based client upgrade method according to an embodiment of the present invention;

[0021] Figure 5 This is a user set login flowchart of an optional multi-cluster-based client upgrade method according to an embodiment of the present invention;

[0022] Figure 6 This is a schematic diagram of an optional multi-cluster-based client upgrade device according to an embodiment of the present invention;

[0023] Figure 7 This is a schematic diagram of an optional electronic device according to an embodiment of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] According to a first aspect of the present invention, a client upgrade method based on a multi-cluster architecture is provided, optionally, as follows: Figure 1 As shown, the above method includes:

[0027] S102, upon receiving a login request from a client, obtain the client's file version number and ownership information from the login request, wherein the login request is used to log in to the target server of the target cluster in multiple clusters;

[0028] S104. Compare the file version number and the pre-transmission version number, and compare the attribution information and the pre-transmission attribution information to obtain the comparison result. The pre-transmission version number is the version number of the target file received in advance, and the pre-transmission attribution information is the attribution information of the client that needs to use the target file for upgrade.

[0029] S106, Based on the comparison results, determine whether to send the login request to the target server or upgrade the client using the target file.

[0030] Optionally, the clusters in this embodiment can correspond to regions, with each region potentially corresponding to a different cluster. A region can be a physical area, such as a province or city. Each cluster can contain multiple servers to provide cluster services. Each cluster can include multiple user sets. A user set can be a collection of multiple users, such as a company, a group, or an organization. Each user set includes multiple users. Each user corresponds to a client. The target cluster mentioned above can be the cluster corresponding to the region where the client is located.

[0031] In this embodiment, there can be a control center, which can be a server, that communicates with clients. The control center can communicate with each cluster. When a client wants to log in to a server in the cluster, the login request can be obtained by the control center, which then determines whether to upgrade the client based on the client's file version number and ownership information. If an upgrade is required, the control center sends the target file to the client for the upgrade. If no upgrade is needed, the client's login request is sent to the target server.

[0032] In this embodiment, the attribution information may include the client's user identifier, the user set identifier of the user's user group, and the cluster identifier of the cluster to which the client belongs. When requesting to log in to the target server, the client may include the cluster identifier, user set identifier, and user identifier in the login request. The file version number can be a unique identifier for the file, used to mark the file version. The pre-transfer version number can be the file version number of the target file that has been pre-uploaded. The pre-transfer attribution information is the attribution information of the client that needs to upgrade using the target file. The pre-transfer attribution information may include the pre-transfer cluster identifier, or it may include the pre-transfer cluster identifier and the pre-transfer user set identifier, or it may include the pre-transfer cluster identifier, the pre-transfer user set identifier, and the pre-transfer user identifier, or it may not include any of the three. There may be multiple pre-transfer cluster identifiers, each representing a different cluster. There may be multiple pre-transfer user set identifiers, each representing a different user set, and there may be multiple pre-transfer user identifiers, each representing a different user.

[0033] The above method involves uploading a pre-uploaded version number and ownership information for each client to be upgraded, thus determining which clients need upgrading. When a client requests to log in to the server, the client to be upgraded is automatically upgraded, reducing the difficulty of upgrading clients and solving the technical problem of the high difficulty of upgrading clients in a cluster.

[0034] As an optional example, the attribution information includes the cluster identifier of the attribution cluster, the user set identifier of the attribution user set, and the user identifier. The comparison involves comparing the file version number and the pre-transmission version number, as well as comparing the attribution information and the pre-transmission attribution information. The comparison result includes: if the file version number and the pre-transmission version number are consistent, the comparison result is to send the login request to the target server; if the file version number and the pre-transmission version number are inconsistent, the comparison involves comparing the cluster identifier with the pre-transmission cluster identifier in the pre-transmission attribution information, comparing the user set identifier with the pre-transmission user set identifier in the pre-transmission attribution information, and comparing the user identifier with the pre-transmission user identifier in the pre-transmission attribution information, to obtain the comparison result.

[0035] Optionally, in this embodiment, if the file version number and the pre-transmission version number are the same, it means that the client does not need to upgrade. If they are inconsistent, the pre-transmission attribution information and the attribution information can be compared to determine whether the client needs to upgrade. When comparing the pre-transmission attribution information and the attribution information, the comparison includes comparing the pre-transmission cluster identifier in the pre-transmission attribution information with the cluster identifier in the attribution information, comparing the user set identifier in the pre-transmission attribution information with the user set identifier in the attribution information, and comparing the user identifier in the pre-transmission attribution information with the user identifier in the attribution information. The comparison process can include a specific order, such as comparing the cluster identifier first, then the user set identifier, and finally the user identifier.

[0036] As an optional example, comparing the cluster identifier with the pre-transmission cluster identifier in the pre-transmission attribution information, comparing the user set identifier with the pre-transmission user set identifier in the pre-transmission attribution information, and comparing the user identifier with the pre-transmission user identifier in the pre-transmission attribution information, the comparison results include: if the pre-transmission cluster identifier is not included in the pre-transmission attribution information, the comparison result determines that the target file is used to upgrade the client; or if the pre-transmission cluster identifier is included in the pre-transmission attribution information and the pre-transmission cluster identifier is consistent with the cluster identifier, and the pre-transmission user set identifier is not included in the pre-transmission attribution information, the comparison result determines that the target file is used to upgrade the client; or if the pre-transmission cluster identifier is included in the pre-transmission attribution information and the pre-transmission cluster identifier is consistent with the cluster identifier, and the pre-transmission user set identifier is included in the pre-transmission attribution information and the pre-transmission user set identifier is consistent with the user set identifier, and the pre-transmission user identifier is not included in the pre-transmission attribution information, the comparison result determines that the target file is used to upgrade the client; The comparison result is determined as follows: Upgrade the client using the target file; or, if the pre-transmitted attribution information includes a pre-transmitted cluster identifier and the pre-transmitted cluster identifier matches the cluster identifier, and the pre-transmitted user set identifier matches the user set identifier, and the pre-transmitted user identifier matches the user identifier, the comparison result is determined as upgrading the client using the target file; or, if the pre-transmitted attribution information includes a pre-transmitted cluster identifier and the pre-transmitted cluster identifier does not match the cluster identifier, the comparison result is determined as sending the login request to the target server; or, if the pre-transmitted attribution information includes a pre-transmitted user set identifier and the pre-transmitted user set identifier does not match the user set identifier, the comparison result is determined as sending the login request to the target server; or, if the pre-transmitted attribution information includes a pre-transmitted user identifier and the pre-transmitted user identifier does not match the user identifier, the comparison result is determined as sending the login request to the target server.

[0037] Optionally, in this embodiment, the comparison between the pre-transmitted attribution information and the actual attribution information determines whether to upgrade the client. If the pre-transmitted attribution information does not include any cluster identifier, then all clients in all clusters need to be upgraded. If the pre-transmitted attribution information includes a cluster identifier but not a user set identifier, then all clients in all user sets under the cluster identifier need to be upgraded. If it includes both the cluster identifier and the user set identifier but not the user identifier, then all users under the user set identifier under the cluster identifier need to be upgraded.

[0038] As an optional example, before comparing the attribution information and the pre-transmission attribution information, the above method further includes: adding a pre-transmission cluster identifier to the pre-transmission attribution information according to a predetermined rule; or adding a pre-transmission user set identifier to the pre-transmission attribution information according to a predetermined rule; or adding a pre-transmission user identifier to the pre-transmission attribution information according to a predetermined rule.

[0039] Optionally, in this embodiment, the number of pre-transmission cluster identifiers, pre-transmission user set identifiers, and pre-transmission user identifiers in the pre-transmission attribution information is not fixed. For example, the pre-transmission cluster identifier includes two cluster identifiers, which can be increased, decreased, or changed to other cluster identifiers. The three identifiers in the pre-transmission attribution information can be adjusted by adjustment commands or automatically increased according to predetermined rules.

[0040] As an optional example, the predefined rules include: the number of pre-transmitted cluster identifiers added each time is greater than the number of pre-transmitted cluster identifiers added in the previous time; or the number of pre-transmitted user set identifiers added each time is greater than the number of pre-transmitted user set identifiers added in the previous time; or the number of pre-transmitted user identifiers added each time is greater than the number of pre-transmitted user identifiers added in the previous time.

[0041] Optionally, in this embodiment, there can be multiple predetermined rules. The general idea is that the number of identifiers added each time is greater than the number added the previous time. For example, if two are added the first time, the number added the second time must be greater than two. Therefore, the slope of the identifier growth curve is greater than 1. The purpose of this is to improve the efficiency of upgrading clients. Because the number added each time is greater than the previous time, the number of clients requiring upgrades also increases. Compared to adding a fixed number of clients each time, the upgrade efficiency is higher.

[0042] As an optional example, before comparing the attribution information and the pre-transmission attribution information, the above method further includes: deleting all pre-transmission cluster identifiers in the pre-transmission attribution information if the number of pre-transmission cluster identifiers in the pre-transmission attribution information is greater than a first threshold; or deleting all pre-transmission user set identifiers in the pre-transmission attribution information if the number of pre-transmission user set identifiers in the pre-transmission attribution information is greater than a second threshold; or deleting all pre-transmission user identifiers in the pre-transmission attribution information if the number of pre-transmission user identifiers in the pre-transmission attribution information is greater than a third threshold.

[0043] Optionally, in this embodiment, when upgrading clients, if the pre-transmitted ownership information does not include a cluster identifier, then clients under all clusters are upgraded. Therefore, a first threshold can be preset. If the number of pre-transmitted cluster identifiers exceeds the first threshold, it indicates that the number of pre-transmitted cluster identifiers is large, involving many clients in the clusters to be upgraded. The upgrade of the target file is error-free. Therefore, clients in all clusters can be allowed to upgrade. This is achieved by setting the pre-transmitted cluster identifier to empty. No pre-transmitted cluster identifier means that clients in all clusters need to be upgraded. The same applies to pre-transmitted user set identifiers and pre-transmitted user identifiers. By not adding a pre-transmitted user set identifier, clients in all pre-transmitted user sets are upgraded; by not adding a pre-transmitted user identifier, clients in all users are upgraded.

[0044] As an optional example, before receiving the client's login request, the above method further includes: receiving a file upload request, wherein the file upload request includes the target file to be uploaded, the pre-upload version number of the target file, and the pre-upload ownership information of the client that needs to use the target file for upgrade; saving the target file, the pre-upload version number, and the pre-upload ownership information locally, and synchronizing the target file to each of the multiple clusters.

[0045] Optionally, in this embodiment, the file upload request can be a request sent by a client developing or transmitting the target file. The file upload request may include the target file, its version number, and ownership information. The ownership information indicates which clients need to upgrade. After receiving the target file and version number, the target file can be saved locally. When a client sends a login request to the target server in the cluster, if the client needs to upgrade, the target file is returned to the client. Simultaneously, the target file is synchronized to every server in every cluster. The server can store both the old and new versions of the target file for access by clients that have not upgraded and those that have upgraded.

[0046] For example, consider a server cluster corresponding to each region. Each region includes multiple organizations, each organization corresponds to a user set, each organization corresponds to multiple users, and each user corresponds to a client. Figure 2 As shown, Figure 2 This is a schematic diagram illustrating the relationship between a cluster, user set, and users in this embodiment. Files requiring updates are managed by version number and uploaded to the configuration center. The configuration center then determines which region the upgrade will be rolled out to; which organization within which region; and finally, which user within which organization within which region.

[0047] After the target file is uploaded, the patch configuration center manages the file upgrade rules. Consistent management primarily involves three fields: GrayQYBM, GrayJGBM, and GrayUser. These represent the pre-transmission cluster identifier, pre-transmission user set identifier, and pre-transmission user identifier, respectively. User login requests carry fields such as version number (version), region code (QYBM), organization code (JGBM), and user code (UserBM). The system sequentially checks the organization (QYBM, JGBM, UserBM, etc.) according to matching rules. Figure 3As shown, after the client sends a login request, it first compares the cluster identifier with the pre-transmitted cluster identifier. If the pre-transmitted cluster identifier is empty, all clients in the cluster must upgrade. Therefore, the client currently sending the login request will definitely upgrade. If the pre-transmitted cluster identifier is not empty and matches the cluster identifier, it continues to compare the pre-transmitted user set identifier with the user set identifier to check whether to upgrade clients in all user sets under that cluster. If the pre-transmitted user set identifier is empty, all clients in all user sets under that cluster must upgrade. The client currently sending the login request will definitely upgrade. If the pre-transmitted user set identifier is not empty and matches the user set identifier, it compares the pre-transmitted user identifier with the user identifier to check whether to upgrade clients of all users under that user set in that cluster. If the pre-transmitted user identifier is empty, all clients under that user set in that cluster are upgraded. If the pre-transmitted user identifier is not empty and matches the user identifier, the client sending the login request must upgrade. If, during this process, the pre-transmitted cluster identifier is inconsistent with the cluster identifier, or the pre-transmitted user set identifier is inconsistent with the user set identifier, or the pre-transmitted user identifier is inconsistent with the user identifier, then the client will not perform an upgrade.

[0048] Figure 4 The process of sending login requests to user clients. There are two scenarios: first, if the match fails, the client does not upgrade and directly logs into the server; second, if the match succeeds, the client is upgraded. The target file is downloaded from the patch upgrade center and extracted for the upgrade.

[0049] Figure 5 In the case of upgrading an organization (i.e., a user set), a client within that organization sends a login request. If the request matches, it means the pre-transmitted cluster identifier is not empty, the pre-transmitted cluster identifier matches the cluster identifier, and the pre-transmitted user set identifier is empty. In this case, every client within the organization is upgraded. If the request does not match, no client within the organization is upgraded.

[0050] In this embodiment, developers can upload the target file and its version number to the patch upgrade center. When uploading, they can select the target file and enter its version number. Then, they can choose cluster synchronization. Selecting cluster synchronization synchronizes the target file to every server in every cluster. Finally, the cluster's clients can be upgraded. By inputting or setting pre-transmission attribution information, it is determined which clients should be upgraded and which should not. It should be noted that the pre-transmission attribution information can be automatically determined by the system and added according to predetermined rules, requiring no manual intervention.

[0051] 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 the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0052] According to another aspect of the embodiments of this application, a client upgrade device based on a multi-cluster architecture is also provided, such as... Figure 6 As shown, it includes:

[0053] The acquisition module 602 is used to obtain the client's file version number and ownership information from the login request when a login request is received from the client, wherein the login request is used to log in to the target server of the target cluster in multiple clusters;

[0054] The comparison module 604 is used to compare the file version number and the pre-transmission version number, as well as the ownership information and the pre-transmission ownership information, to obtain the comparison result. The pre-transmission version number is the version number of the target file received in advance, and the pre-transmission ownership information is the ownership information of the client that needs to use the target file for upgrade.

[0055] Processing module 606 is used to determine, based on the comparison results, whether to send the login request to the target server or to upgrade the client using the target file.

[0056] Optionally, the clusters in this embodiment can correspond to regions, with each region potentially corresponding to a different cluster. A region can be a physical area, such as a province or city. Each cluster can contain multiple servers to provide cluster services. Each cluster can include multiple user sets. A user set can be a collection of multiple users, such as a company, a group, or an organization. Each user set includes multiple users. Each user corresponds to a client. The target cluster mentioned above can be the cluster corresponding to the region where the client is located.

[0057] In this embodiment, there can be a control center, which can be a server, that communicates with clients. The control center can communicate with each cluster. When a client wants to log in to a server in the cluster, the login request can be obtained by the control center, which then determines whether to upgrade the client based on the client's file version number and ownership information. If an upgrade is required, the control center sends the target file to the client for the upgrade. If no upgrade is needed, the client's login request is sent to the target server.

[0058] In this embodiment, the attribution information may include the client's user identifier, the user set identifier of the user's user group, and the cluster identifier of the cluster to which the client belongs. When requesting to log in to the target server, the client may include the cluster identifier, user set identifier, and user identifier in the login request. The file version number can be a unique identifier for the file, used to mark the file version. The pre-transfer version number can be the file version number of the target file that has been pre-uploaded. The pre-transfer attribution information is the attribution information of the client that needs to upgrade using the target file. The pre-transfer attribution information may include the pre-transfer cluster identifier, or it may include the pre-transfer cluster identifier and the pre-transfer user set identifier, or it may include the pre-transfer cluster identifier, the pre-transfer user set identifier, and the pre-transfer user identifier, or it may not include any of the three. There may be multiple pre-transfer cluster identifiers, each representing a different cluster. There may be multiple pre-transfer user set identifiers, each representing a different user set, and there may be multiple pre-transfer user identifiers, each representing a different user.

[0059] The above method involves uploading a pre-uploaded version number and ownership information for each client to be upgraded, thus determining which clients need upgrading. When a client requests to log in to the server, the client to be upgraded is automatically upgraded, reducing the difficulty of upgrading clients and solving the technical problem of the high difficulty of upgrading clients in a cluster.

[0060] For other examples of this embodiment, please refer to the examples above, which will not be repeated here.

[0061] Figure 7 This is a schematic diagram of an optional electronic device according to an embodiment of this application, such as... Figure 7 As shown, it includes a processor 702, a communication interface 704, a memory 706, and a communication bus 708. The processor 702, communication interface 704, and memory 706 communicate with each other via the communication bus 708.

[0062] Memory 706 is used to store computer programs;

[0063] When processor 702 executes a computer program stored in memory 706, it performs the following steps:

[0064] Upon receiving a login request from a client, the file version number and ownership information of the client are obtained from the login request. The login request is used to log in to the target server of the target cluster in multiple clusters.

[0065] The comparison results are obtained by comparing the file version number with the pre-transmission version number, and by comparing the attribution information with the pre-transmission attribution information. The pre-transmission version number is the version number of the target file received in advance, and the pre-transmission attribution information is the attribution information of the client that needs to use the target file for upgrade.

[0066] Based on the comparison results, determine whether to send the login request to the target server or upgrade the client using the target file.

[0067] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0068] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0069] As an example, the memory 706 described above may include, but is not limited to, the acquisition module 602, the comparison module 604, and the processing module 606 in the aforementioned multi-cluster-based client upgrade device. Furthermore, it may include, but is not limited to, other module units in the aforementioned multi-cluster-based client upgrade device, which will not be elaborated upon in this example.

[0070] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0071] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0072] Those skilled in the art will understand that Figure 7The structure shown is for illustrative purposes only. The device implementing the above-described multi-cluster-based client upgrade method can be a terminal device, such as a smartphone (e.g., Android phone, iOS phone), tablet computer, PDA, mobile Internet Devices (MID), PAD, etc. Figure 7 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 7 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 7 The different configurations shown.

[0073] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.

[0074] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is executed by a processor to perform the steps in the above-described multi-cluster-based client upgrade method.

[0075] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0076] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0077] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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 storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0078] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0079] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0080] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0081] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0082] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A client upgrade method based on multiple clusters, characterized in that, include: Upon receiving a login request from a client, the file version number and ownership information of the client are obtained from the login request, wherein the login request is used to log in to the target server of the target cluster in multiple clusters; The file version number and the pre-transmission version number are compared, and the attribution information and the pre-transmission attribution information are compared to obtain the comparison result. The pre-transmission version number is the version number of the target file received in advance, and the pre-transmission attribution information is the attribution information of the client that needs to use the target file for upgrade. Based on the comparison results, it is determined whether to send the login request to the target server or upgrade the client using the target file; The attribution information includes the cluster identifier of the attribution cluster, the user set identifier of the attribution user set, and the user identifier. The comparison between the file version number and the pre-transmission version number, and the comparison between the attribution information and the pre-transmission attribution information, yields the following comparison results: when the file version number and the pre-transmission version number are inconsistent: If the pre-transmission attribution information does not include a pre-transmission cluster identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transmission attribution information includes the pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information does not include a pre-transmission user set identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transmission attribution information includes the pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information includes the pre-transmission user set identifier and the pre-transmission user set identifier matches the user set identifier, and the pre-transmission attribution information does not include a pre-transmission user identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transmission attribution information includes the pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information does not include a pre-transmission user identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transmission attribution information includes the pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information does not include a pre-transmission user identifier, the comparison result determines that the client should be upgraded using the target file; If the information includes the pre-transfer user set identifier and the pre-transfer user set identifier matches the user set identifier, and the pre-transfer attribution information includes the pre-transfer user identifier and the pre-transfer user identifier matches the user identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transfer attribution information includes the pre-transfer cluster identifier and the pre-transfer cluster identifier does not match the cluster identifier, the comparison result determines that the login request should be sent to the target server; if the pre-transfer attribution information includes the pre-transfer user set identifier and the pre-transfer user set identifier does not match the user set identifier, the comparison result determines that the login request should be sent to the target server; if the pre-transfer attribution information includes the pre-transfer user identifier and the pre-transfer user identifier does not match the user identifier, the comparison result determines that the login request should be sent to the target server.

2. The method according to claim 1, characterized in that, The comparison results obtained by comparing the attribution information and the pre-transmission attribution information include: If the file version number and the pre-transmission version number are consistent, the comparison result is determined to send the login request to the target server.

3. The method according to claim 1, characterized in that, Before comparing the attribution information and the pre-transmission attribution information, the method further includes: Add the pre-transmission cluster identifier to the pre-transmission attribution information according to predetermined rules; or Add the pre-transmission user set identifier to the pre-transmission attribution information according to predetermined rules; or The pre-transmission user identifier is added to the pre-transmission attribution information according to the predetermined rules.

4. The method according to claim 3, characterized in that, The predetermined rules include: The number of pre-transmitted cluster identifiers added each time is greater than the number of pre-transmitted cluster identifiers added in the previous time; or The number of pre-transmission user set identifiers added each time is greater than the number of pre-transmission user set identifiers added in the previous time; or The number of pre-transmitted user identifiers added each time is greater than the number of pre-transmitted user identifiers added in the previous time.

5. The method according to claim 1, characterized in that, Before comparing the attribution information and the pre-transmission attribution information, the method further includes: If the number of pre-transmission cluster identifiers in the pre-transmission attribution information exceeds a first threshold, delete all pre-transmission cluster identifiers in the pre-transmission attribution information; or If the number of pre-transmission user set identifiers in the pre-transmission attribution information exceeds a second threshold, delete all pre-transmission user set identifiers in the pre-transmission attribution information; or If the number of pre-transmission user identifiers in the pre-transmission attribution information exceeds a third threshold, all pre-transmission user identifiers in the pre-transmission attribution information are deleted.

6. The method according to claim 1, characterized in that, Before receiving the client's login request, the method further includes: Receive a file upload request, wherein the file upload request includes the target file to be uploaded, the pre-upload version number of the target file, and the pre-upload ownership information of the client that needs to use the target file for upgrade; The target file, the pre-transmission version number, and the pre-transmission ownership information are stored locally, and the target file is synchronized to each of the multiple clusters.

7. A client upgrade device based on a multi-cluster architecture, characterized in that, include: The acquisition module is used to obtain the file version number and ownership information of the client from the login request when a login request is received from the client, wherein the login request is used to log in to the target server of the target cluster in multiple clusters; The comparison module is used to compare the file version number and the pre-transmission version number, and to compare the attribution information and the pre-transmission attribution information to obtain the comparison result. The pre-transmission version number is the version number of the target file received in advance, and the pre-transmission attribution information is the attribution information of the client that needs to use the target file for upgrade. The processing module is configured to determine, based on the comparison result, whether to send the login request to the target server or to upgrade the client using the target file; The attribution information includes the cluster identifier of the attribution cluster, the user set identifier of the attribution user set, and the user identifier. The comparison between the file version number and the pre-transmission version number, and the comparison between the attribution information and the pre-transmission attribution information, yields the following comparison results: when the file version number and the pre-transmission version number are inconsistent: If the pre-transmission attribution information does not include a pre-transmission cluster identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transmission attribution information includes the pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information does not include a pre-transmission user set identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transmission attribution information includes the pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information includes the pre-transmission user set identifier and the pre-transmission user set identifier matches the user set identifier, and the pre-transmission attribution information does not include a pre-transmission user identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transmission attribution information includes the pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information does not include a pre-transmission user identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transmission attribution information includes the pre-transmission cluster identifier and the pre-transmission cluster identifier matches the cluster identifier, and the pre-transmission attribution information does not include a pre-transmission user identifier, the comparison result determines that the client should be upgraded using the target file; If the information includes the pre-transfer user set identifier and the pre-transfer user set identifier matches the user set identifier, and the pre-transfer attribution information includes the pre-transfer user identifier and the pre-transfer user identifier matches the user identifier, the comparison result determines that the client should be upgraded using the target file; if the pre-transfer attribution information includes the pre-transfer cluster identifier and the pre-transfer cluster identifier does not match the cluster identifier, the comparison result determines that the login request should be sent to the target server; if the pre-transfer attribution information includes the pre-transfer user set identifier and the pre-transfer user set identifier does not match the user set identifier, the comparison result determines that the login request should be sent to the target server; if the pre-transfer attribution information includes the pre-transfer user identifier and the pre-transfer user identifier does not match the user identifier, the comparison result determines that the login request should be sent to the target server.

8. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the method described in any one of claims 1 to 6.

9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Client updating control method and device, storage medium and server

    CN111736876A