Request processing method and device, computer device, storage medium and program product
By obtaining the target version number and table structure update service data, and calling the target resource to process the request based on the version information, the problem of version inconsistency after the scheduling system is updated is solved, and stable compatibility of the server cluster is achieved.
Patent Information
- Application Number
- CN202411975540.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2044-12-30
AI Technical Summary
After the scheduling system of the server cluster is updated, the updated version of the scheduling system may be inconsistent with the version of the scheduling system stored in the server cluster, making it unable to process requests sent by clients or compute agent nodes and affecting running jobs.
By obtaining the updated target version number of the scheduling system and the target table structure of the data table, the service data of the server cluster is updated, and the corresponding target resource is called to process the request according to the version information of the service request. The target resources include different versions of the scheduling system and service data to achieve version compatibility.
Without shutting down the server cluster, compatibility with different versions of the scheduling system and service data was achieved, avoiding request processing failures caused by version inconsistencies and ensuring the stability and reliability of the system.
Smart Images

Figure CN119988001B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a request processing method and device, computer equipment, a computer readable storage medium, and a computer program product. BACKGROUND
[0002] A scheduling system in a server cluster can ensure that a received request is run on a suitable node and improve the overall utilization efficiency of the server cluster by allocating computing nodes, memory, storage resources, and the like to the received request. However, as the running demand of the server cluster increases, the scheduling system needs to be updated and upgraded.
[0003] However, after the scheduling system is updated, the version of the updated scheduling system can be inconsistent with the version of the scheduling system stored in the server cluster, which can cause the updated scheduling system to be unable to process a request sent by a client or a computing agent node. SUMMARY
[0004] Therefore, it is necessary to provide a request processing method, device, computer equipment, computer readable storage medium, and computer program product that can process a request sent by a client or a computing agent node through an updated scheduling system.
[0005] In a first aspect, the present application provides a request processing method. The method comprises:
[0006] In the case of updating a scheduling system of a server cluster, a target version number corresponding to the updated scheduling system and a target table structure of a data table are obtained;
[0007] The service data of the server cluster is updated according to the target version number and the target table structure.
[0008] According to the version information of the received service request, a target resource corresponding to the version information is called to process the service request; the target resource includes a first resource or a second resource, the first resource includes the scheduling system and the service data, and the second resource includes an updated scheduling system and updated service data.
[0009] In one embodiment, the service data includes a storage file and / or a data table; and the updating of the service data of the server cluster according to the target version number and the target table structure comprises:
[0010] The version number of the storage file is updated to the target version number; the storage file is stored in a memory of the server cluster; and / or
[0011] According to the target table structure, a table structure of the data table is updated.
[0012] In one of the embodiments, the updating of the table structure of the data table according to the target table structure comprises:
[0013] In a case where the table structure of the data table is inconsistent with the target table structure, the table structure of the data table is updated to the target table structure.
[0014] In one of the embodiments, the method further comprises:
[0015] According to the version information, a version number corresponding to a resource processing the service request is determined;
[0016] According to the version number, the target resource is determined.
[0017] In one of the embodiments, the determining of the target resource according to the version number comprises:
[0018] If the version number is the target version number, the target resource is determined as the second resource;
[0019] If the version number is an initial version number of the scheduling system, the target resource is determined as the first resource.
[0020] In one of the embodiments, the method further comprises:
[0021] According to binary bit information of a native version number of the scheduling system, a protocol version number corresponding to the native version number is determined;
[0022] The protocol version number and the native version number are subjected to XOR processing to generate the target version number.
[0023] In one of the embodiments, the method further comprises:
[0024] According to bit number information of a binary bit of a native version number of the scheduling system, a baseline version number corresponding to the native version number is determined;
[0025] The baseline version number and the native version number are subjected to AND processing to generate the target version number.
[0026] In a second aspect, the application further provides a request processing device. The device comprises:
[0027] An obtaining module is configured to, in a case where a scheduling system of a server cluster is updated, obtain a target version number corresponding to the updated scheduling system and a target table structure of a data table;
[0028] an updating module, configured to update service data of the server cluster according to the target version number and the target table structure;
[0029] a processing module, configured to invoke a target resource corresponding to version information of a received service request to process the service request according to the version information; the target resource includes a first resource or a second resource; the first resource includes the scheduling system and the service data; and the second resource includes an updated scheduling system and updated service data.
[0030] In a third aspect, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, steps of the method in the first aspect are implemented.
[0031] In a fourth aspect, a computer readable storage medium is provided. The computer readable storage medium stores a computer program. When the computer program is executed by a processor, steps of the method in the first aspect are implemented.
[0032] In a fifth aspect, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, steps of the method in the first aspect are implemented.
[0033] The request processing method and device, the computer device, the computer readable storage medium, and the computer program product. In the case of updating the scheduling system of the server cluster, the management node first acquires a target version number corresponding to the updated scheduling system and a target table structure of a data table, then updates service data of the server cluster according to the target version number and the target table structure, and then invokes a target resource corresponding to version information of a received service request to process the service request according to the version information. The target resource includes a first resource or a second resource. The first resource includes the scheduling system and the service data. The second resource includes an updated scheduling system and updated service data. Because the service data of the server cluster is updated according to the target version number and the target table structure, the target resource can include the scheduling system and the service data before the update, or the updated scheduling system and the service data. Therefore, in the case that the version information of the service request is inconsistent with the version information of the updated scheduling system, the target resource corresponding to the version information of the service request can be invoked to process the service request, thereby avoiding the problem that the service request cannot be processed due to the inconsistency of the versions, and achieving compatibility with different versions. BRIEF DESCRIPTION OF DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other related drawings can be obtained without creative labor on the basis of these drawings.
[0035] Figure 1 For an application environment diagram of the request processing method in one embodiment;
[0036] Figure 2 For a flowchart of the request processing method in one embodiment;
[0037] Figure 3 For a flowchart of the request processing method in another embodiment;
[0038] Figure 4 For a flowchart of the request processing method in another embodiment;
[0039] Figure 5 For a flowchart of the request processing method in another embodiment;
[0040] Figure 6 For a flowchart of the request processing method in another embodiment;
[0041] Figure 7 For a structural block diagram of the request processing device in one embodiment;
[0042] Figure 8 For a structural block diagram of the request processing device in another embodiment;
[0043] Figure 9 For an internal structure diagram of the computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0045] A server cluster is a system composed of multiple high-performance computing nodes (usually servers) interconnected through a high-speed network, working collaboratively to perform large-scale parallel computing tasks. For example, a High-Performance Computing Cluster (HPC) is usually composed of several core components: computing nodes, high-speed networks, storage systems, management nodes, and scheduling systems. Among them, the HPC cluster manages and allocates cluster resources through the scheduling system (such as SLURM, PBS, LSF), ensuring that each job can utilize the cluster's resources fairly and efficiently.
[0046] In a server cluster, due to limited computing nodes, memory, storage, and other resources, and the large number of jobs submitted by users with varying needs, intelligent allocation of cluster resources through the scheduling system can ensure that each job runs on the appropriate node and improve the overall utilization efficiency of the server cluster. The scheduling system can queue user-submitted jobs based on priority, resource requirements, and other factors, and determine when and on which nodes to run the jobs based on the current cluster load. This not only avoids resource conflicts but also reduces node idle time by optimizing resource allocation, maximizing the computing power of the cluster. For example, the scheduling system can support parallel computing, allowing large-scale computing tasks to be split into multiple subtasks running in parallel on different nodes, significantly reducing computing time. The scheduling system also provides job dependency management to ensure that jobs with dependencies are executed in order. In a multi-user environment, the scheduling system can use a fair sharing strategy to allocate resources reasonably and prevent some users' jobs from occupying too many resources, affecting other users' jobs. The scheduling system also provides fault tolerance mechanisms to allow automatic recovery of jobs in the event of hardware failure or job interruption, especially for long-running tasks, thereby improving job success rates. The scheduling system also provides job monitoring and logging functions to help users and administrators track job execution status and provide resource usage reports. Therefore, the scheduling system is an indispensable tool for maintaining the stable and efficient operation of a server computing cluster.
[0047] As the server cluster continues to run, the demand for operation and maintenance increases, and functional or performance defects in the server cluster during use will gradually appear, such as software vulnerabilities, performance bottlenecks, security risks, etc. In addition, new functions need to be provided to improve user experience and optimization. Therefore, it is necessary to regularly upgrade and update the scheduling system in the server cluster.
[0048] Generally, a scheduling system needs to be responsible for scheduling and managing thousands of parallel tasks, which often take a long time, even run for several days or weeks. If the scheduling system is interrupted, the job being executed can be paused or even failed, resulting in the task needing to be restarted or recovered from a checkpoint, thereby wasting time and resources. For example, for tasks such as scientific research and engineering simulation that require accurate calculation and long execution time, if the scheduling system is interrupted, it can cause huge losses. In the traditional technology, the scheduling system is upgraded in the case that the server cluster stops running, however, the scheduling system upgrading method affects the running efficiency of the job. If the scheduling system is updated during the running of the server cluster, there is a problem that the version of the updated scheduling system is inconsistent with the version of the scheduling system stored in the server cluster, resulting in that the updated scheduling system cannot process the request sent by the client or the computing agent node, and further can cause the scheduling system to be interrupted, thereby affecting other running jobs. Based on this, the present application provides a request processing method to process the request sent by the client or the computing agent node through the updated scheduling system.
[0049] The request processing method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 . The server cluster includes a management node 102 and other computing agent nodes 104, the management node 102 communicates with the other computing agent nodes 104 through a network, and the server cluster also communicates with a client 106 through the network. A data storage system can store data required to be processed by the server cluster. The data storage system can be integrated on the server cluster, or placed on a cloud or other network server. The management node 102 deploys a scheduling system of the server cluster, the management node 102 can receive a request sent by the client 106, and according to resources required to process the request, allocate the request to other computing agent nodes 104 matching the required resources. In the case of updating the scheduling system of the server cluster, a target version number and a target table structure of a data table corresponding to the updated scheduling system are obtained, then, according to the target version number and the target table structure, the service data of the server cluster is updated, and then, according to the version information of the received service request, a target resource corresponding to the version information is called to process the service request; the target resource includes a first resource or a second resource, the first resource includes the scheduling system and the service data; the second resource includes the updated scheduling system and the updated service data.
[0050] In an exemplary embodiment, as shown in Figure 2 , a request processing method is provided, which is applied to the management node in Figure 1 for example, including the following steps:
[0051] S201, in the case of updating the scheduling system of the server cluster, obtaining a target version number corresponding to the updated scheduling system and a target table structure of a data table.
[0052] The scheduling system is a system deployed on a management node in the server cluster, which manages and allocates resources in the server cluster to ensure reasonable allocation and use of resources. The management node can be a single server in the server cluster, or the management node can be multiple servers in the server cluster. The main functions of the scheduling system can include task scheduling, time scheduling, and plan scheduling. The scheduling system can include a scheduling service and an accounting service, wherein the scheduling service provides specific scheduling functions, and the accounting service provides database management functions.
[0053] It should be noted that the embodiments of the present application can be developed on the original version of the scheduling system, thereby updating the scheduling system in the scenario. In order to distinguish the original version and the multiple versions obtained by secondary development, the version number can be customized, for example, if the version number of the original version is 2023, the version numbers of the versions obtained by secondary development can be 2023.1, 2023.2, 2023.3, etc. Therefore, the updated scheduling system will correspond to a unique version number, and in this embodiment, the version number corresponding to the updated scheduling system is taken as the target version number.
[0054] The data table is a data table in the database in the server cluster, which can be composed of a table name, fields in the table, and records of the table. The table structure of the data table includes the number of fields, field names, data types of stored data, indexes, and constraint conditions of data. In this embodiment, the table structure of the data table corresponding to the updated scheduling system is taken as the target table structure.
[0055] It can be understood that after updating the scheduling system of the server cluster, the target version number corresponding to the updated scheduling system is different from the version number before the update, and the target table structure corresponding to the updated scheduling system can also change, therefore, the service data of the server cluster can be updated according to the target version number corresponding to the updated scheduling system and the target table structure of the data table.
[0056] In this embodiment, the management node obtains the target version number corresponding to the updated scheduling system and the target table structure of the data table from the storage space of the server cluster in the case of updating the scheduling system of the server cluster.
[0057] S202, according to the target version number and the target table structure, updating the service data of the server cluster.
[0058] It can be understood that after the scheduling system is updated, the table structure of the data table corresponding to the target version number of the updated scheduling system is different from the table structure of the data table corresponding to the initial version number of the scheduling system before the update, and therefore, the service data can be updated according to the difference between the target table structure corresponding to the target version number and the service data corresponding to the initial version number. It should be noted that, since the embodiments of the present application can update the service data by using the target version number and the target table structure, the service data can be updated without stopping the server cluster, and therefore, the service request can be responded and processed by using the updated service data when the service request is received.
[0059] The service data of the server cluster can include data in a database, log data, job runtime temporary files, application program data, backup data, and the like.
[0060] In the embodiment, the management node can compare the target version number with the version number corresponding to the service data stored by the server cluster, and update the service data of the server cluster by using the target version number and the target table structure according to the comparison result. Alternatively, if the two version numbers are inconsistent, the table structure of the data table of the service data stored by the server cluster can be updated and adjusted according to the target table structure; or if the two version numbers are consistent, the updating operation is stopped.
[0061] S203, according to the version information of the received service request, calling the target resource corresponding to the version information to process the service request; the target resource includes the first resource or the second resource, the first resource includes the scheduling system and the service data; the second resource includes the updated scheduling system and the updated service data.
[0062] The service request can be a request sent by a client to the server cluster, or the service request can also be a request sent by another computing agent node in the server cluster to the management node. It should be noted that, in order to ensure the reliability of the server cluster processing the service request, the service request sent by the client or the other computing agent node can carry version information, which is the version information of the scheduling system that can normally respond to the service request. Exemplarily, the version information of the service request can include a version number.
[0063] The target resource refers to a processing resource responding to the service request, for example, the processing resource can include service data, service cache information, a communication message structure, etc. According to different versions of the scheduling system, the processing resource can be divided into a first resource and a second resource. The first resource can include the scheduling system and the service data before updating, and the first resource can also include the service cache information and the communication message structure corresponding to the scheduling system before updating. The second resource can include the scheduling system and the service data after updating, and the second resource can also include the service cache information and the communication message structure corresponding to the scheduling system after updating. In this embodiment, the processing resource corresponding to the version information of the service request is taken as the target resource, so that the target resource can be determined as the first resource or the second resource according to the version information of the service request.
[0064] In this embodiment, the management node can obtain the version information of the service request from the received service request, and then determine whether the scheduling system corresponding to the version information is the scheduling system before updating or the scheduling system after updating. Then, the first resource corresponding to the scheduling system before updating is called as the target resource to process the service request, or the second resource corresponding to the scheduling system after updating is called as the target resource to process the service request.
[0065] As a possible implementation, after the management node calls the target resource to process the service request, a response message is returned to the client, or a response message can also be returned to other computing agent nodes in the case of needing to return a response message.
[0066] In the above request processing method, in the case of updating the scheduling system of the server cluster, the management node first obtains the target version number and the target table structure of the data table corresponding to the scheduling system after updating, then updates the service data of the server cluster according to the target version number and the target table structure, and then calls the target resource corresponding to the version information of the received service request to process the service request. The target resource includes the first resource or the second resource, the first resource includes the scheduling system and the service data, and the second resource includes the scheduling system after updating and the service data after updating. Since the service data of the server cluster is updated according to the target version number and the target table structure, the target resource can include the scheduling system and the service data before updating, or the scheduling system and the service data after updating, so that in the case that the version information of the service request is inconsistent with the version information of the scheduling system after updating, the target resource corresponding to the version information of the service request can be called to process the service request, thereby avoiding the problem that the service request cannot be processed due to version inconsistency, and realizing compatibility of different versions.
[0067] In the scenario of updating the service data of the server cluster according to the target version number and the target table structure, the service data includes the storage file and / or the data table, and the management node can update the storage file and / or the data table respectively. In an exemplary embodiment, as shown in FIG. 2, S202 includes: Figure 3 S202 includes:
[0068] S301, updating the version number of the storage file to the target version number; the storage file is stored in the memory of the server cluster.
[0069] The storage file refers to a temporary file used to store data during the running of a job, for example, the storage file can be a cache file, a log file, etc. According to the storage file, the running state of the server cluster, the resources used by the job, etc. during the running of the job can be determined. In the server cluster, the storage file can be stored in the memory, for example, the memory can be a random access memory, or the memory can also be a permanent memory.
[0070] In this embodiment, the management node can obtain the version number of the storage file from the memory, and then compare the version number with the target version number of the updated scheduling system. If the version number is less than the target version number, it can be determined that the version number of the storage file is a low version number. Then, the management node can call the data structure of the low version number to parse the storage file, obtain the data in the storage file from the parsing result, and then obtain a new storage file according to the target version number and the obtained data, so as to update the version number of the storage file to the target version number.
[0071] As a possible implementation, if the version number of the storage file is equal to the target version number of the scheduling system, the target version number can be compared with the version number of the native version of the scheduling system. If the target version number is consistent with the version number of the native version, the data structure corresponding to the target version number is called to parse the storage file, and the data in the storage file is obtained from the parsing result. If the target version number is not consistent with the version number of the native version, the data structure corresponding to the native version number is called to parse the storage file, and the data in the storage file is obtained from the parsing result.
[0072] S302, updating the table structure of the data table according to the target table structure.
[0073] The data table refers to a data table in a database in the server cluster, which is used to store business data, log data, configuration data, etc.
[0074] It can be understood that, after the scheduling system is updated, the target table structure corresponding to the billing service of the scheduling system can also be updated, so that the target table structure is different from the table structure before the update; or, after the scheduling system is updated, the target table structure corresponding to the billing service of the scheduling system can also not be updated. Therefore, the table structure of the data table can be updated according to the difference between the target table structure and the table structure of the data table.
[0075] In one possible implementation, the S302 includes: in a case where the table structure of the data table is inconsistent with the target table structure, updating the table structure of the data table to the target table structure.
[0076] In the embodiment, the management node can compare the table structure of the data table with the target table structure, and then adjust the table structure of the data table according to the changes between the target table structure and the table structure of the data table in a case where the comparison result indicates that the table structure of the data table is inconsistent with the target table structure, so as to update the table structure of the data table to the target table structure.
[0077] As one possible implementation, if the target table structure is consistent with the table structure of the data table, the table structure of the data table can not be updated.
[0078] In the above implementation, the management node can update the table structure of the data table to the target table structure in a case where the table structure of the data table is inconsistent with the target table structure, so as to avoid the problem that the data cannot be stored into the database due to the inconsistency of the table structure, and further improve the reliability of data storage in the updated scheduling system.
[0079] In the embodiment, the management node updates the version number of the storage file to the target version number, and stores the storage file in the memory of the server cluster; and / or updates the table structure of the data table according to the target table structure, so as to update the version number of the storage file in the memory and the table structure of the data table that has changed in a case where the target version number is obtained by updating the scheduling system, thereby updating the service data in the server cluster, and realizing the compatibility of the service data in the server cluster.
[0080] In the above scenario of invoking the target resource corresponding to the version information to process the service request according to the received version information, the management node can determine the target resource according to the version information. In one exemplary embodiment, as shown in Figure 4 The method further includes:
[0081] S401, determining a version number corresponding to a resource for processing the service request according to the version information.
[0082] The resource for processing the service request can include service data, service cache information, a communication message structure, and the like. It can be understood that the version number corresponding to the resource for processing the service request can be the version number of the updated scheduling system, or the version number corresponding to the resource for processing the service request can also be the version number of the scheduling system before the update. The version information is version information of the scheduling system for normally responding to and processing the service request, and can include, for example, a version number, a version update date, version update content, and the like.
[0083] In this embodiment, the management node can parse the version information to obtain a parsing result, acquire the version information of the scheduling system from the parsing result, determine the version information of the resource for processing the service request according to the version information of the scheduling system, and then determine the version number corresponding to the resource for processing the service request according to the version information.
[0084] S402, determining the target resource according to the version number.
[0085] It should be noted that after the scheduling system is updated, low-version service data, low-version service cache information, low-version communication message structure, and the like in the scheduling system before the update can be stored in the scheduling system to enable compatibility with low-version service requests.
[0086] Therefore, the target resource determined according to the version number can be the first resource, or the target resource determined according to the version number can also be the second resource. The specific process of determining the target resource in the above two manners is described in detail below in two embodiments:
[0087] In one embodiment, if the version number is the target version number, the target resource is determined to be the second resource.
[0088] In this embodiment, the management node can compare the size of the version number and the target version number, and if the comparison result indicates that the size of the version number is the same as that of the target version number, it can be determined that the version number of the service request is the target version number, and the target resource can be determined to be the second resource.
[0089] In another embodiment, if the version number is an initial version number of the scheduling system, the target resource is determined to be the first resource.
[0090] The initial version number refers to the version number before the scheduling system is updated.
[0091] In this embodiment, the management node can compare the size of the version number and the target version number, and if the comparison result indicates that the version number is smaller than the target version number, it can be determined that the version number is a historical version number, and the target resource can be determined to be the first resource.
[0092] It can be understood that in the above two embodiments of determining the target resource, the management node can determine the target resource as the second resource when the version number is the target version number, and determine the target resource as the first resource when the version number is the initial version number of the scheduling system, so that the corresponding target resource can be called to process the service request for different version numbers of the service request, thereby realizing the compatibility of the service request of the low version.
[0093] In the embodiment, the management node can determine the version number corresponding to the resource processing the service request according to the version information, so as to determine the target resource according to the version number. Since each version of the scheduling system corresponds to a unique version number, the resource for processing the service request in the scheduling system also corresponds to a unique version number, so that the target resource can be quickly and accurately determined according to the version number, and the efficiency of determining the target resource is improved.
[0094] In the above scenario of obtaining the target version number corresponding to the updated scheduling system, the target version number corresponding to the updated scheduling system can be obtained by setting the protocol version number in the process of updating the scheduling system of the server cluster. The process of obtaining the target version number corresponding to the updated scheduling system according to the set protocol version number is described in detail below.
[0095] In an exemplary embodiment, as shown in Figure 5 The above method further includes:
[0096] S501, determining the protocol version number corresponding to the original version number according to the binary bit information of the original version number of the scheduling system.
[0097] The original version number refers to the version number of the original version of the scheduling system, and the original version number can be represented by binary. It should be noted that the update of the scheduling system of the server cluster in the embodiment of the application can be a secondary development of the original version of the scheduling system. In order to ensure the compatibility of the versions between the original version and the plurality of secondary development versions, the protocol version number can be set on the basis of the original version number. The protocol version number needs to ensure that the binary bits are not conflicted with the original version number.
[0098] In the embodiment, the management node can determine the number of binary bits of the original version number according to the binary bit information of the original version number of the scheduling system, and then set binary bits with the same number of bits as the protocol version number.
[0099] S502, performing XOR processing on the protocol version number and the original version number to generate a target version number.
[0100] In the embodiment, the management node can perform XOR operation on the protocol version number and the native version number, and take the result of the XOR operation as the target version number.
[0101] As a possible implementation, when updating the scheduling system of the server cluster for the first time, a first protocol version number can be set, and then XOR operation is performed on the first protocol version number and the native version number to generate a first target version number. When updating the scheduling system of the server cluster for the second time, the first protocol version number can be increased by 1 to obtain a second protocol version number, and then XOR operation is performed on the second protocol version number and the native version number to generate a second target version number. In this way, the target version number after each update of the scheduling system of the server cluster can be obtained. For example, if the native version number is 2023, the first target version number can be 2023.1, the second target version number can be 2023.2, and the third target version number can be 2023.3.
[0102] In the embodiment, the management node determines the protocol version number corresponding to the native version number according to the binary bit information of the native version number of the scheduling system, and then performs XOR operation on the protocol version number and the native version number to generate the target version number. Since the protocol version number is determined according to the binary bit information of the native version number, the target version number associated with the native version number can be obtained by performing XOR operation on the protocol version number and the native version number. Therefore, the service data can be updated using the target version number, and the low-version service request can be compatible with the updated service data and the updated scheduling system.
[0103] In another exemplary embodiment, as shown in Figure 6 the above method further comprises:
[0104] S601, determining a baseline version number corresponding to the native version number of the scheduling system according to the bit number information of the binary bits of the native version number.
[0105] It should be noted that in the application of using binary bits to represent the native version number, part of the binary bits can be used as valid bits, and the other binary bits can be used as invalid bits. For example, if the binary bits of the native version number include 16 bits, the first 8 bits are valid bits, and the last 8 bits are invalid bits. Therefore, the bit number information of the valid bits of the baseline version number can be determined according to the bit number information of the valid bits of the native version number.
[0106] In this embodiment, the management node can determine the valid bits capable of representing the native version number according to the bit number information of the binary bits of the native version number of the scheduling system, and then determine the baseline version number according to the total bit number of the binary bits of the native version number and the bit number of the valid bits. Exemplarily, the native version number is 1011001100000000, and the baseline version number can be 0000000011100001.
[0107] S602, performing XOR processing on the baseline version number and the native version number to generate a target version number.
[0108] In this embodiment, the management node can perform XOR processing on the baseline version number and the native version number, and take the result of the XOR processing as the target version number.
[0109] As a possible implementation, when the scheduling system of the server cluster is updated for the first time, a first baseline version number can be set, and then XOR processing is performed on the first protocol version number and the native version number to generate a first target version number. When the scheduling system of the server cluster is updated for the second time, the first baseline version number can be increased by 1 to obtain a second baseline version number, and then XOR processing is performed on the second baseline version number and the native version number to generate a second target version number. In this way, the target version number after each update of the scheduling system of the server cluster can be obtained.
[0110] In this embodiment, the management node can determine the baseline version number corresponding to the native version number of the scheduling system according to the bit number information of the binary bits of the native version number of the scheduling system, and then perform XOR processing on the baseline version number and the native version number to generate the target version number. Since the baseline version number is determined according to the bit number information of the binary bits of the native version number, the target version number associated with the native version number can be obtained by performing XOR processing on the baseline version number and the native version number, so that the service data can be updated by using the target version number, and the low-version service request can be compatible by using the updated service data and the updated scheduling system.
[0111] For the convenience of those skilled in the art, the request processing method provided in the present application is described in detail below. The method can include:
[0112] S1, in the case of updating the scheduling system of the server cluster, determining the protocol version number corresponding to the native version number of the scheduling system according to the binary bit information of the native version number of the scheduling system, performing XOR processing on the protocol version number and the native version number to generate a target version number; or determining the baseline version number corresponding to the native version number of the scheduling system according to the bit number information of the binary bits of the native version number of the scheduling system; performing XOR processing on the baseline version number and the native version number to generate a target version number.
[0113] S2, obtaining a target version number corresponding to the updated scheduling system and a target table structure of the data table.
[0114] S3, updating the version number of the storage file to the target version number.
[0115] S4, in a case where the table structure of the data table is inconsistent with the target table structure, updating the table structure of the data table to the target table structure.
[0116] S5, receiving a service request sent by a client or other computing agent node.
[0117] S6, determining a version number corresponding to a resource for processing the service request according to version information of the service request, wherein:
[0118] If the version number is the target version number, it is determined that the target resource is a second resource, and the second resource includes the updated scheduling system and the updated service data.
[0119] If the version number is the initial version number of the scheduling system, it is determined that the target resource is a first resource, and the first resource includes the scheduling system and the service data.
[0120] S7, calling the target resource corresponding to the version information to process the service request.
[0121] It should be noted that the description in S1-S7 above can refer to the related description in the above embodiments, and the effects are similar, and the present embodiment will not be repeated here.
[0122] It should be understood that, although each step in the flowchart involved in the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise stated herein, the execution of these steps has no strict order limitation, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.
[0123] Based on the same inventive concept, the embodiments of the present application also provide a request processing apparatus for implementing the above-mentioned request processing method. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, so the specific limitations in one or more request processing apparatus embodiments provided below can refer to the limitations of the request processing method in the above text, and will not be repeated here.
[0124] In one embodiment, as shown in Figure 7 A request processing apparatus is provided, comprising an obtaining module 11, an updating module 12, and a processing module 13, wherein:
[0125] The obtaining module 11 is configured to, in a case where a scheduling system of a server cluster is updated, obtain a target version number corresponding to the updated scheduling system and a target table structure of a data table;
[0126] The updating module 12 is configured to update service data of the server cluster according to the target version number and the target table structure;
[0127] The processing module 13 is configured to, according to version information of a received service request, invoke a target resource corresponding to the version information to process the service request; the target resource comprises a first resource or a second resource, the first resource comprises the scheduling system and the service data, and the second resource comprises the updated scheduling system and updated service data.
[0128] The request processing apparatus provided in this embodiment can execute the method embodiments described above, and has similar implementation principles and technical effects, which will not be described here again.
[0129] In one embodiment, as shown in Figure 8 The service data comprises a storage file and / or a data table, and the updating module 12 comprises a first updating unit 121 and a second updating unit 122, wherein:
[0130] The first updating unit 121 is configured to update a version number of the storage file to the target version number; the storage file is stored in a memory of the server cluster; and / or,
[0131] The second updating unit 122 is configured to update a table structure of the data table according to the target table structure.
[0132] The request processing apparatus provided in this embodiment can execute the method embodiments described above, and has similar implementation principles and technical effects, which will not be described here again.
[0133] In one embodiment, please continue to refer to Figure 8 The second updating unit 122 is specifically configured to:
[0134] In a case where the table structure of the data table is inconsistent with the target table structure, update the table structure of the data table to the target table structure.
[0135] The request processing apparatus provided in this embodiment can execute the method embodiments described above, and has similar implementation principles and technical effects, which will not be described here again.
[0136] In one embodiment, please continue to refer to Figure 8The apparatus comprises a first determining module 14 and a second determining module 15, wherein:
[0137] The first determining module 14 is configured to determine a version number corresponding to a resource for processing the service request according to the version information.
[0138] The second determining module 15 is configured to determine the target resource according to the version number.
[0139] The request processing apparatus provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0140] In one embodiment, please continue to refer to Figure 8 The second determining module 15 comprises a first determining unit 151 and a second determining unit 152, wherein:
[0141] The first determining unit 151 is configured to determine that the target resource is the second resource if the version number is the target version number.
[0142] The second determining unit 152 is configured to determine that the target resource is the first resource if the version number is an initial version number of the scheduling system.
[0143] The request processing apparatus provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0144] In one embodiment, please continue to refer to Figure 8 The apparatus further comprises a third determining module 16 and a first generating module 17, wherein:
[0145] The third determining module 16 is configured to determine a protocol version number corresponding to a native version number of the scheduling system according to binary bit information of the native version number.
[0146] The first generating module 17 is configured to perform XOR processing on the protocol version number and the native version number to generate a target version number.
[0147] The request processing apparatus provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0148] In one embodiment, please continue to refer to Figure 8 The apparatus further comprises a fourth determining module 18 and a second generating module 19, wherein:
[0149] The fourth determining module 18 is configured to determine a baseline version number corresponding to the native version number of the scheduling system according to bit number information of a binary bit of the native version number.
[0150] The second generation module 19 is configured to generate a target version number by processing the baseline version number and the native version number.
[0151] The request processing apparatus provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described herein again.
[0152] The modules in the request processing apparatus can be implemented by software, hardware, or a combination thereof. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in the computer device in software form, so as to be called and executed by the processor to perform operations corresponding to the modules.
[0153] In an exemplary embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 9 The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store service data of a scheduling system. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a request processing method.
[0154] Those skilled in the art can understand that Figure 9 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0155] In an embodiment, a computer device is provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the following steps:
[0156] In the case of updating the scheduling system of the server cluster, the target version number corresponding to the updated scheduling system and the target table structure of the data table are obtained;
[0157] updating service data of the server cluster according to the target version number and the target table structure;
[0158] according to the version information of the received service request, calling a target resource corresponding to the version information to process the service request; the target resource includes a first resource or a second resource; the first resource includes a scheduling system and service data; and the second resource includes an updated scheduling system and updated service data.
[0159] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0160] updating the version number of the storage file to the target version number; the storage file is stored in a memory of the server cluster; and / or,
[0161] updating a table structure of the data table according to the target table structure.
[0162] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0163] updating the table structure of the data table to the target table structure when the table structure of the data table is inconsistent with the target table structure.
[0164] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0165] determining a version number corresponding to a resource processing the service request according to the version information;
[0166] determining the target resource according to the version number.
[0167] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0168] if the version number is the target version number, determining that the target resource is the second resource;
[0169] if the version number is an initial version number of the scheduling system, determining that the target resource is the first resource.
[0170] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0171] determining a protocol version number corresponding to the native version number according to binary bit information of the native version number of the scheduling system;
[0172] performing XOR processing on the protocol version number and the native version number to generate the target version number.
[0173] In one embodiment, the processor, when executing the computer program, further implements the following steps:
[0174] According to the bit number information of the binary bits of the original version number of the scheduling system, a baseline version number corresponding to the original version number is determined.
[0175] The baseline version number and the original version number are processed to generate a target version number.
[0176] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium has stored thereon a computer program, and the computer program is executed by a processor to implement the following steps:
[0177] In the case of updating the scheduling system of the server cluster, a target version number and a target table structure of a data table corresponding to the updated scheduling system are obtained;
[0178] According to the target version number and the target table structure, the service data of the server cluster is updated;
[0179] According to the version information of the received service request, a target resource corresponding to the version information is called to process the service request; the target resource includes a first resource or a second resource, the first resource includes the scheduling system and the service data; and the second resource includes the updated scheduling system and the updated service data.
[0180] In one embodiment, the computer program is executed by the processor to further implement the following steps:
[0181] The version number of the storage file is updated to the target version number; the storage file is stored in the memory of the server cluster; and / or,
[0182] According to the target table structure, the table structure of the data table is updated.
[0183] In one embodiment, the computer program is executed by the processor to further implement the following steps:
[0184] In the case that the table structure of the data table is inconsistent with the target table structure, the table structure of the data table is updated to the target table structure.
[0185] In one embodiment, the computer program is executed by the processor to further implement the following steps:
[0186] According to the version information, a version number corresponding to a resource processing the service request is determined;
[0187] According to the version number, a target resource is determined.
[0188] In one embodiment, the computer program is executed by the processor to further implement the following steps:
[0189] If the version number is the target version number, it is determined that the target resource is the second resource;
[0190] If the version number is an initial version number of the scheduling system, the target resource is determined as the first resource.
[0191] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0192] According to binary bit information of the native version number of the scheduling system, a protocol version number corresponding to the native version number is determined.
[0193] The protocol version number and the native version number are XOR processed to generate the target version number.
[0194] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0195] According to bit number information of the binary bits of the native version number of the scheduling system, a baseline version number corresponding to the native version number is determined.
[0196] The baseline version number and the native version number are AND processed to generate the target version number.
[0197] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:
[0198] In the case of updating the scheduling system of the server cluster, the target version number and the target table structure of the data table corresponding to the updated scheduling system are obtained.
[0199] According to the target version number and the target table structure, the service data of the server cluster is updated.
[0200] According to the version information of the received service request, the target resource corresponding to the version information is called to process the service request; the target resource includes the first resource or the second resource, the first resource includes the scheduling system and the service data; and the second resource includes the updated scheduling system and the updated service data.
[0201] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0202] The version number of the storage file is updated to the target version number; the storage file is stored in the memory of the server cluster; and / or,
[0203] According to the target table structure, the table structure of the data table is updated.
[0204] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0205] In the case that the table structure of the data table is inconsistent with the target table structure, the table structure of the data table is updated to the target table structure.
[0206] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0207] According to the version information, determine the version number corresponding to the resource processing the service request;
[0208] According to the version number, determine the target resource.
[0209] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0210] If the version number is the target version number, determine that the target resource is the second resource;
[0211] If the version number is the initial version number of the scheduling system, determine that the target resource is the first resource.
[0212] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0213] According to the binary bit information of the native version number of the scheduling system, determine the protocol version number corresponding to the native version number;
[0214] XOR process the protocol version number and the native version number to generate the target version number.
[0215] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0216] According to the binary bit information of the native version number of the scheduling system, determine the baseline version number corresponding to the native version number;
[0217] AND process the baseline version number and the native version number to generate the target version number.
[0218] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0219] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0220] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A request processing method, characterized in that, The method includes: When updating the scheduling system of the server cluster, the target version number corresponding to the updated scheduling system is obtained, as well as the target table structure of the data table associated with the accounting service of the scheduling system is obtained; wherein, the target version number is a derived version number generated by binary bit operations based on the initial version number of the scheduling system; the target version number is used to represent secondary development on the scheduling system; Update the service data of the server cluster according to the target version number and the target table structure; If the version number corresponding to the version information of the received service request is the target version number, then the target resource corresponding to the version information is determined to be a second resource including the updated scheduling system and the updated service data; if the version number corresponding to the version information is the initial version number, then the target resource is determined to be a first resource including the scheduling system and the service data; the target resource corresponding to the version information is invoked to process the service request.
2. The method according to claim 1, characterized in that, The service data includes storage files and / or data tables; updating the service data of the server cluster according to the target version number and the target table structure includes: Update the version number of the stored file to the target version number; the stored file is stored in the memory of the server cluster; and / or, Update the table structure of the data table according to the target table structure.
3. The method according to claim 2, characterized in that, The step of updating the table structure of the data table according to the target table structure includes: If the table structure of the data table is inconsistent with the target table structure, the table structure of the data table will be updated to the target table structure.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Based on the version information, determine the version number corresponding to the resource that processes the service request; The target resource is determined based on the version number.
5. The method according to claim 4, characterized in that, Determining the target resource based on the version number includes: If the version number is the target version number, then the target resource is determined to be the second resource; If the version number is the initial version number of the scheduling system, then the target resource is determined to be the first resource.
6. The method according to claim 1, characterized in that, The method further includes: Based on the binary information of the native version number of the scheduling system, the protocol version number corresponding to the native version number is determined; The target version number is generated by performing an XOR operation on the protocol version number and the native version number.
7. The method according to claim 1, characterized in that, The method further includes: Based on the bit information of the binary bits of the native version number of the scheduling system, determine the baseline version number corresponding to the native version number; The baseline version number and the native version number are ANDed to generate the target version number.
8. A service request processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire, when updating the scheduling system of the server cluster, the target version number corresponding to the updated scheduling system, and the target table structure of the data table associated with the accounting service of the scheduling system; wherein, the target version number is a derived version number generated by binary bit operations based on the initial version number of the scheduling system; the target version number is used to represent secondary development on the scheduling system; The update module is used to update the service data of the server cluster according to the target version number and the target table structure; The processing module is configured to: if the version number corresponding to the version information of the received service request is the target version number, then determine that the target resource corresponding to the version information is a second resource including the updated scheduling system and the updated service data; if the version number corresponding to the version information is the initial version number, then determine that the target resource is a first resource including the scheduling system and the service data; and call the target resource corresponding to the version information to process the service request.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data upgrading and querying method and device
CN111782235A
Kubernetes cluster upgrading method, system and device and storage medium
CN114172808A