Node determination method and system
By analyzing the transmission protocol field in the scheduling server to obtain target scheduling information and calculate the hash value, and dynamically selecting the computing nodes, the problem of not being able to customize the selection of computing nodes in the existing technology is solved, and flexible load balancing and efficient computing resources are achieved. distribute.
Patent Information
- Application Number
- CN202310969267.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2025-02-14
AI Technical Summary
The existing load balancing technology cannot customize the selection of computing nodes based on different scenario needs, and cannot meet the flexible needs of users.
By receiving the client's data processing request in the scheduling server, analyzing the transmission protocol field to obtain the target scheduling information, calculating the target hash value, and selecting the target computing node in the computing node cluster based on the hash value.
The function of user-defined selection of computing nodes is realized, and the computing nodes are dynamically adjusted according to different scenario needs, improving the flexibility and efficiency of load balancing.
Smart Images

Figure CN119449793A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the technical field of load scheduling, and in particular to a node determination method and a protocol processing method. Background Art
[0002] With the gradual development and application of random computer networks, more and more enterprises have greater and greater demands for network computing and traffic usage. In order to meet the increasing needs of users, multiple computing nodes will be selected to provide computing services in a distributed manner. In the distributed computing process of multiple computing nodes, in order to prevent the load pressure of the same computing node from being too high and causing the service to crash, load balancing optimization is required to ensure that multiple computing nodes in the computing node cluster can average the load pressure, so as to provide users with corresponding services normally. Currently, the commonly used load balancing adopts the consistent hashing algorithm, but with the continuous growth of enterprise projects and the continuous expansion of user needs, it is necessary to perform consistent hashing algorithms according to different scenarios. In the face of this situation, the existing hashing method cannot meet the needs of users and cannot provide users with a method for selecting computing nodes according to scenario requirements. Therefore, how to provide a load scheduling solution for users to customize the selection of computing nodes and determine computing nodes according to user needs is a problem that needs to be solved urgently. Summary of the invention
[0003] In view of this, the embodiments of this specification provide a node determination method and a protocol processing method. One or more embodiments of this specification also involve a node determination device, a protocol processing device, a node determination system, a protocol processing system, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects existing in the prior art.
[0004] According to a first aspect of an embodiment of this specification, a node determination method is provided, which is applied to a scheduling server, including:
[0005] Receive a data processing request sent by a target client, and determine a transmission protocol field carried in the data processing request;
[0006] Parsing the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by node change information associated with the target client;
[0007] A target hash value corresponding to the target scheduling information is calculated, and a target computing node is selected from a computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request.
[0008] According to a second aspect of an embodiment of this specification, a node determination method is provided, which is applied to a scheduling server, including:
[0009] Receive a data query request sent by a target client, and determine a transmission protocol field carried in the data query request;
[0010] Parsing the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by node change information associated with the target client;
[0011] A target hash value corresponding to the target scheduling information is calculated, and a target computing node is selected from a computing node cluster according to the target hash value, wherein the target computing node is used to process the data query request.
[0012] According to a third aspect of the embodiments of this specification, a protocol processing method is provided, which is applied to a client and includes:
[0013] In response to the node change instruction submitted by the target user, determining the node change information corresponding to the node change instruction, wherein the node change information includes a scheduling identifier to be updated and length information to be updated;
[0014] A scheduling information registration request is generated based on the node change information, and the scheduling information registration request is sent to a scheduling server, wherein the scheduling information registration request is used to register the scheduling identifier to be updated and the length information to be updated in a registered scheduling information set of the scheduling server.
[0015] According to a fourth aspect of the embodiments of this specification, a protocol processing method is provided, which is applied to a client and includes:
[0016] In response to a data processing instruction submitted by a target user, determining target scheduling information corresponding to the data processing instruction, wherein the target scheduling information includes a target scheduling identifier, target length information, and target scheduling value information;
[0017] Adding the target scheduling information to the initial transmission protocol field to generate a transmission protocol field, wherein the transmission protocol field includes source port information, destination port information, field descriptor information, option data information and application layer data information, and the option data information includes preset option information and target scheduling value information;
[0018] A data processing request is generated based on the transmission protocol field and sent to the scheduling server.
[0019] According to a fifth aspect of the embodiments of this specification, a node determination system is provided, the system comprising a scheduling server, a computing node cluster and a client, wherein:
[0020] The client is used to generate a data processing request in response to a data processing instruction submitted by a target user, and forward the data processing request to the scheduling server;
[0021] The scheduling server is used to receive the data processing request sent by the target client, determine the transmission protocol field carried in the data processing request, parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client, calculate the target hash value corresponding to the target scheduling information, and select a target computing node in the computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request and forward the data processing request to the target computing node;
[0022] The target computing node is used to determine target response data in response to the data processing request, and send the target response data to the client.
[0023] According to a sixth aspect of the embodiments of this specification, a node determination system is provided, the system comprising a scheduling server, a computing node cluster and a client, wherein:
[0024] The client is used to generate a data query request in response to a data query instruction submitted by a target user, and forward the data query request to the scheduling server;
[0025] The scheduling server is used to receive the data query request sent by the target client, determine the transmission protocol field carried in the data query request, parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client, calculate the target hash value corresponding to the target scheduling information, and select a target computing node in the computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request and forward the data processing request to the target computing node;
[0026] The target computing node is used to determine target query data in response to the data query request, and send the target query data to the client.
[0027] According to a seventh aspect of the embodiments of this specification, a protocol processing system is provided, the system comprising a client and a scheduling server, wherein:
[0028] The client is used to respond to the node change instruction submitted by the target user, determine the node change information corresponding to the node change instruction, generate a scheduling information registration request based on the node change information, and send the scheduling information registration request to the scheduling server;
[0029] The scheduling server is used to parse the scheduling information registration request to obtain node change information, and based on the node change information, update the to-be-updated scheduling identifier and to-be-updated length information corresponding to the node change information in the registered scheduling information set.
[0030] According to an eighth aspect of an embodiment of this specification, a node determination device is provided, which is applied to a scheduling server, including:
[0031] A receiving module is configured to receive a data processing request sent by a target client and determine a transmission protocol field carried in the data processing request;
[0032] A parsing module, configured to parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client;
[0033] The computing module is configured to calculate a target hash value corresponding to the target scheduling information, and select a target computing node in a computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request.
[0034] According to a ninth aspect of an embodiment of this specification, a node determination device is provided, which is applied to a scheduling server, including:
[0035] A receiving module is configured to receive a data query request sent by a target client and determine a transmission protocol field carried in the data query request;
[0036] A parsing module, configured to parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client;
[0037] The computing module is configured to calculate a target hash value corresponding to the target scheduling information, and select a target computing node in a computing node cluster according to the target hash value, wherein the target computing node is used to process the data query request.
[0038] According to a tenth aspect of an embodiment of this specification, a protocol processing device is provided, which is applied to a client, including:
[0039] A determination module is configured to determine, in response to a node change instruction submitted by a target user, node change information corresponding to the node change instruction, wherein the node change information includes a scheduling identifier to be updated and length information to be updated;
[0040] The sending module is configured to generate a scheduling information registration request based on the node change information, and send the scheduling information registration request to the scheduling server, wherein the scheduling information registration request is used to register the scheduling identifier to be updated and the length information to be updated in the registered scheduling information set of the scheduling server.
[0041] According to an eleventh aspect of the embodiments of this specification, a protocol processing device is provided, which is applied to a client, including:
[0042] A determination module is configured to determine target scheduling information corresponding to the data processing instruction in response to the data processing instruction submitted by the target user, wherein the target scheduling information includes a target scheduling identifier, target length information, and target scheduling value information;
[0043] a generating module, configured to add the target scheduling information to an initial transmission protocol field to generate a transmission protocol field, wherein the transmission protocol field includes source port information, destination port information, field descriptor information, option data information and application layer data information, and the option data information includes preset option information and target scheduling value information;
[0044] The sending module is configured to generate a data processing request based on the transmission protocol field and send the request to the scheduling server.
[0045] According to a twelfth aspect of the embodiments of this specification, a computing device is provided, including:
[0046] Memory and processor;
[0047] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above-mentioned node determination method are implemented.
[0048] According to the thirteenth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned node determination method are implemented.
[0049] According to a fourteenth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned node determination method.
[0050] An embodiment of the present specification implements receiving a data processing request sent by a target client through a scheduling server, determining a transmission protocol field carried in the data processing request, and obtaining target scheduling information through the transmission protocol field, so that the user's needs can be determined based on the target scheduling information, and then the corresponding target hash value can be calculated based on the target scheduling information, and the target computing node is selected in the computing node cluster based on the target hash value, so that the user can select different computing nodes by changing the target scheduling information, providing a user with a method for customizing the selection of computing nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a schematic diagram of a scenario of a node determination method provided by an embodiment of this specification;
[0052] Figure 2 is a flowchart of a node determination method provided by an embodiment of this specification;
[0053] Figure 3 is a process flow chart of a node determination method provided by an embodiment of this specification;
[0054] Figure 4 is a flowchart of another node determination method provided by an embodiment of this specification;
[0055] Figure 5 is a flowchart of a protocol processing method provided by an embodiment of this specification;
[0056] Figure 6 is a flowchart of a protocol processing method provided by an embodiment of this specification;
[0057] Figure 7 is a flow chart of a node determination system provided by an embodiment of this specification;
[0058] Figure 8 is a flowchart of another node determination system provided by an embodiment of this specification;
[0059] Fig. 9 is a flow chart of a protocol processing system provided by an embodiment of this specification;
[0060] Fig.10 It is a structural diagram of a node determination device provided by an embodiment of this specification;
[0061] Fig.11 It is a structural diagram of a node determination device provided by an embodiment of this specification;
[0062] Fig.12It is a structural diagram of a protocol processing device provided by an embodiment of this specification;
[0063] Fig.13 It is a structural diagram of a protocol processing device provided by an embodiment of this specification;
[0064] Fig.14 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0065] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0066] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0067] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0068] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0069] First, the terms involved in one or more embodiments of this specification are explained.
[0070] Transmission Control Protocol: (TCP) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. TCP is designed to adapt to the layered protocol hierarchy that supports multiple network applications. TCP provides reliable communication services between pairs of processes in host computers connected to different but interconnected computer communication networks.
[0071] Consistent hashing algorithm: The consistent hashing algorithm is a special algorithm that aims to solve the problem of distributed caching. When removing or adding a computing node, it can change the mapping relationship between existing service requests and the computing nodes that process the requests as little as possible.
[0072] Currently, the consistent hashing algorithm only provides three different ways to perform calculations: 1. Consistent hashing based on the source IP (Internet Protocol, which is the network layer protocol in the TCP / IP system) address. This method allows the same source IP address to be scheduled to the same computing node. 2. Consistent hashing based on the four-tuple (source IP + destination IP + source port + destination port). This method allows the same stream to be scheduled to the same computing node. 3. Consistent hashing based on the connection identifier of QUIC (QuickUDP Internet Connections). The same connection identifier will be scheduled to the same computing node. The above three consistent hashing methods are suitable for hashing methods with fixed scenarios, which makes them not flexible enough in support. With the continuous growth of enterprise projects and the continuous expansion of user needs, users need to perform consistent hashing according to different scenarios, which fails to meet user needs.
[0073] Based on this, this specification provides a node determination method and a protocol processing method. This specification also involves a node determination device, a protocol processing device, a node determination system, a protocol processing system, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0074] See also Figure 1 , Figure 1A schematic diagram of a node determination method provided according to an embodiment of the present specification is shown, wherein the target client can be understood as a client used by a user, and the user can access the computing node through the client and use the corresponding computing service through the computing node. The user can submit a data processing request through the target client, and the data processing request can be a data query request, that is, querying the corresponding data from the computing node, or a data storage request, that is, storing the corresponding data in the computing node. The target client will send the data processing request submitted by the target user to the scheduling server, and the scheduling server can determine the transmission protocol field based on the data processing request, and parse the transmission protocol field to obtain the target scheduling information, and calculate the corresponding target hash value based on the target scheduling information, and select the target computing node in the computing node cluster through the target hash value, so that the target user can adjust the target scheduling information in the transmission protocol field through the node change information, thereby realizing the user's customized selection of the target computing node. The subsequent scheduling server can forward the data processing request to the target computing node, and the target computing node provides the user with the corresponding computing service.
[0075] See also Figure 2 , Figure 2 A flowchart of a node determination method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0076] Step 202: Receive a data processing request sent by a target client, and determine a transmission protocol field carried in the data processing request.
[0077] The target client can be understood as the client used by the target user. The target user can access the computing node through the target client, and the computing node interacts with the target client to provide corresponding services for the target user. For example, when the target user has a data query demand, the target user can submit a data query request through the client, and the client will send the data query request to the computing node, which will respond to the data query request and feed back the query data corresponding to the data query request to the target client, thereby meeting the user's needs. The data processing request is a processing request submitted by the target user based on the demand. After the target client receives the data processing request, it will forward the data processing request to the computing node, and the computing node will complete the actual data processing operation.
[0078] In practical applications, due to the growth of users and data volume, it is necessary to deploy multiple computing nodes to build a computing node cluster to realize data interaction for multiple clients at the same time. In order to prevent the computing pressure of the same computing node from being too high, resulting in the inability to provide normal services to users, it is necessary to perform load balancing scheduling for the computing node cluster, that is, it is necessary to ensure that the load pressure of each computing node in the computing node cluster is average. In order to deploy a corresponding scheduling server for the computing node cluster, the scheduling server will realize which computing node will process each data processing request, and then forward the data processing request to the corresponding computing node. Therefore, after the target client sends the data processing request, the scheduling server can first receive the data processing request. After the scheduling server determines the target computing node in the computing node cluster based on the data processing request according to the load balancing scheduling strategy, it forwards the data processing request to the target computing node. The target computing node responds to the data processing operation corresponding to the data processing request, and feeds back the data processing operation results to the target client, thereby providing normal services to users.
[0079] In the specific implementation, since the client is connected to the scheduling server or computing node based on the transmission control protocol, in order to meet the user's need to customize the selection of computing nodes, the user-defined scheduling information can be added to the protocol message of the transmission control protocol, and the subsequent scheduling server will select and determine the target computing node according to the scheduling information. Specifically, the message format of the transmission control protocol is divided into a fixed header part and an option part. There is no modification and customization space for the fixed header part, so the user can customize the setting for the option part field in the protocol message. After the user customizes the setting, the scheduling server will determine the transmission protocol field carried in the data processing request after receiving the data processing request. The transmission protocol field is the protocol message corresponding to the transmission control protocol. Through the user-defined field in the protocol message, the corresponding computing node can be selected according to the user-defined setting. Specifically, the transmission protocol field includes source port information, destination port information, field descriptor information, option data information and application layer data information, and the option data information includes preset option information and target scheduling value information.
[0080] Among them, the source port information can be understood as 16-bit initialization communication port information, and the source port and source IP address are used to identify the return address of the message; the destination port information can be understood as 16-bit destination port field information, indicating the application address interface of the message receiving computer; the field descriptor information can include a 32-bit sequence number, a 32-bit confirmation sequence number, a 4-bit header length, a 6-bit reserved information, a 6-bit flag field, a 16-bit window size, a 16-bit checksum, and a 16-bit urgent pointer. Option data information can be understood as the TCP transmission protocol designed to adapt to complex network environments and better serve the application layer, which is used to improve TCP transmission performance; application layer data information can be understood as data information of the TCP protocol packet load. In actual applications, the option data information has modification and customization space, so that user-defined data can be placed in the option data information. The option data information of TCP is a TLV (Type type, Length length, Value value) format. At present, some common option fields are defined in the TCP protocol, see Table 1, Table 1 shows a preset option field in a node determination method provided in an embodiment of this specification. The first byte of each option data is the type Type, indicating the type of the option data, and the length is the overall length Length of the option data of this type. In addition to the above defined option data, users can also customize option data and use the option data registered in advance in the scheduling server as customized option data.
[0081] Table 1
[0082]
[0083]
[0084] In a specific embodiment of the present specification, the target user associates a data query request through the target client and wants to query the database corresponding to the computing node A. The scheduling information can be customized in the transmission control protocol. After receiving the data query request, the scheduling server will determine the transmission protocol field in the data query request. Subsequently, the user's expected computing node can be selected based on the target scheduling information in the transmission protocol field, that is, the user-defined scheduling information.
[0085] Step 204: Parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client.
[0086] Among them, the target scheduling information is the scheduling information customized by the target user. The user can store the target scheduling information in the option data in the transmission protocol field. The option data in the transmission protocol field is a tlv format, that is, it includes kind, length, and value, where kind is the type of option data, length is the length of option data, and value is the value corresponding to the option data. Through user-defined option data, the scheduling server can parse the corresponding option data from the transmission protocol field as the target scheduling information.
[0087] In actual applications, when a user wants to select a corresponding computing node to process a request submitted by the user, the user can associate the node change information through the target client, and the node change information is used to adjust the target scheduling information.
[0088] In a specific embodiment of the present specification, the scheduling server parses the transmission protocol field and obtains the option data in the transmission protocol field as the target scheduling information. The target scheduling information is "000010110000000101100100". The corresponding computing node can be selected based on the target scheduling information.
[0089] Furthermore, in order to avoid the scheduling server being unable to correctly parse and extract the target scheduling information from the transmission protocol field, the user is required to register option data in the scheduling server in advance as option information for consistent hashing. Specifically, the scheduling server stores a registered scheduling information set; parses the transmission protocol field to obtain the target scheduling information, including: parsing the transmission protocol field to obtain the target scheduling identifier in the transmission protocol field; determining the target length information corresponding to the target scheduling identifier in the registered scheduling information set, and determining the scheduling value information in the transmission protocol field based on the target length information; and generating the target scheduling information based on the target scheduling identifier, the target length information and the scheduling value information.
[0090] Among them, in order to avoid the scheduling server being unable to correctly parse and extract the target scheduling information from the transmission protocol field, the user needs to register the option data in the scheduling server in advance as the option information of the consistent hash, that is, register the kind information and length information on the scheduling server, so that after the scheduling server determines the transmission protocol field in the data processing request, it can determine the validity of the target scheduling information of the transmission protocol field in the current processing request based on the registered scheduling information, thereby providing the user with a customized determination of the computing node. Therefore, the scheduling server stores the registered scheduling information, and the registered scheduling information can be understood as part of the option data preset by the user on the scheduling server in advance. The target scheduling identifier can be understood as the kind information in the transmission protocol field carried in the data processing request, the registered scheduling identifier can be understood as the preset kind information registered by the user in advance on the scheduling server, and the target length information can be understood as the length information of the option data in the transmission protocol field. According to the target length information, the scheduling value information can be determined in the transmission protocol field, and the scheduling value information is the value in the transmission protocol field.
[0091] In actual applications, in order to meet the needs of users to customize the selection of computing nodes, when the user adds scheduling information to the option data part in the transmission protocol field, the scheduling server needs to match the target scheduling identifier in the option data in the transmission protocol field with the registered scheduling identifier in the registered scheduling information. If the match is consistent, it means that the user has registered the corresponding king information and length information on the scheduling server in advance. Then, the target length information corresponding to the target scheduling identifier can be determined in the registered scheduling information set, and the scheduling value information can be determined in the transmission protocol field according to the target length information, and the target scheduling identifier, target length information and scheduling value information are used as the target scheduling information.
[0092] In a specific embodiment of the present specification, the scheduling server parses the transmission protocol field to obtain the target scheduling identifier in the transmission protocol field, the target scheduling identifier is 11, and compares the target scheduling identifier with the registered scheduling identifier in the registered scheduling information set one by one. When the comparison result is that the registered scheduling identifier is also 11 in the registered scheduling information set, it means that the match is successful, and the length information corresponding to the registered scheduling identifier is obtained as the target length information corresponding to the target scheduling identifier. If the target length information is 4, the scheduling value information value is determined in the transmission protocol field according to the target length information, and the corresponding target computing node can be selected subsequently according to the scheduling value information.
[0093] Based on this, by allowing users to register the corresponding registration scheduling information in the scheduling server in advance, subsequent users can add target scheduling information in the transmission protocol field, providing users with the function of customizing the selection of computing nodes, thereby improving the processing efficiency of users selecting different computing nodes for processing in different project scenarios.
[0094] Step 206: Calculate a target hash value corresponding to the target scheduling information, and select a target computing node in a computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request.
[0095] Among them, after obtaining the target scheduling information, the scheduling server can perform hash calculation on the target scheduling information to obtain the corresponding target hash value. The target hash value can be understood as the hash value obtained by hashing the scheduling value information in the target scheduling information. Subsequently, the target computing node can be selected from the computing nodes based on the target hash value according to the consistent hashing algorithm, so that the target computing node can process the data processing request.
[0096] In actual applications, after the scheduling server parses the transmission protocol field to obtain the target scheduling information, it can perform hash calculation on the scheduling value information in the target scheduling information to obtain the target hash value, and then select the corresponding target computing node in the consistent computing node cluster based on the consistent target hash value.
[0097] In a specific embodiment of the present specification, a target hash value corresponding to the target scheduling information is calculated, and a target computing node is selected from the computing node cluster based on the target hash value. The target computing node is computing node A. The subsequent scheduling server can forward the data query request to computing node A, and computing node A responds to the data query request to complete the actual data query operation.
[0098] Furthermore, in order to ensure that the scheduling server can correctly select the target computing node from the computing node cluster, it is necessary to perform hash processing on the scheduling value information in the target scheduling information to obtain the target hash value. The specific calculation of the target hash value corresponding to the target scheduling information includes: extracting the scheduling value information from the target scheduling information; performing consistent hash processing on the scheduling value information to obtain a consistent hash value and use it as the target hash value corresponding to the target scheduling information.
[0099] The scheduling value information is the value in the transmission protocol field. By performing consistent hashing on the scheduling value, a target hash value can be obtained. The target hash value user selects a target computing node in a consistent computing node cluster.
[0100] In a specific embodiment of the present specification, the scheduling server performs a hash calculation on the scheduling value information in the target scheduling information to obtain a target hash value, then selects a target computing node in the computing node cluster based on the target hash value, and forwards the data query request to the data processing node.
[0101] Based on this, through the scheduling value information of the option data field in the transmission protocol field, based on the consistent hashing strategy, the target computing node that meets the user's needs can be correctly selected in the consistent computing node cluster according to the target hash value obtained by calculating the scheduling value.
[0102] Furthermore, in order to ensure that the scheduling server can correctly select the target computing node in the computing node cluster based on the target hash value, it is also necessary to select according to the computing node identifier of the target computing node. Specifically, selecting the target computing node in the computing node cluster according to the target hash value includes: obtaining the corresponding computing node identifier in the computing node cluster; selecting the target computing node in the computing node cluster based on the target hash value and the computing node identifier.
[0103] Among them, the computing node identifier can be understood as the corresponding identifier of the computing node cluster in the consistent hashing strategy. For example, there are 3 computing nodes in the computing node cluster, namely computing node A, computing node B, and computing node C. The computing node identifier corresponding to computing node A is 1, the computing node identifier corresponding to computing node B is 2, and the computing node identifier corresponding to computing node C is C. If the target hash value is 1.5, the target computing node selected in the computing node cluster is computing node B.
[0104] In a specific embodiment of the present specification, a corresponding computing node identifier in a computing node cluster is obtained, and a target computing node is selected in the computing node cluster based on a target hash value and the computing node identifier, and the target computing node is computing node A in the computing node cluster.
[0105] Based on this, the correct computing node can be selected in the computing node cluster through the target hash value and the computing node identifier, thereby meeting user expectations and improving user usage.
[0106] Furthermore, in order to satisfy the user's ability to customize and adjust scheduling information, the scheduling server can also update the registered scheduling information set based on the node change request submitted by the user. The specific method also includes: receiving and parsing the node change request sent by the target client, and obtaining the target node change information corresponding to the node change request; based on the target node change information in the registered scheduling information set, updating the to-be-updated scheduling identifier and to-be-updated length information corresponding to the target node change information.
[0107] Among them, the node change request can be understood as a scheduling information registration request or a scheduling information update request submitted by the target user through the client. After the scheduling server receives the node change request, the target node change information corresponding to the node change request can be obtained by parsing the node change request. The target node change information includes the corresponding change scheduling identifier to be updated and the length information to be updated. Based on the target node change information, the target registration scheduling information is updated or added to the registered scheduling information set, which is used for the subsequent scheduling server to match the scheduling information based on the target registration scheduling information.
[0108] In actual applications, when the to-be-updated dispatch identifier in the target node change information is consistent with the registered dispatch information in the registered dispatch information set stored by the dispatch server, it means that the user has registered the dispatch information of the corresponding dispatch identifier, and this node change request is used to update the length information of the dispatch identifier; when the changed dispatch identifier in the target node change information is inconsistent with the registered dispatch information in the registered dispatch information set stored by the dispatch server, it means that the user has not registered the dispatch information of the corresponding dispatch identifier, and this node change request is used to register the to-be-updated dispatch identifier and the to-be-updated length information in the registered dispatch information set. Specifically, it includes: determining the to-be-updated dispatch identifier and the to-be-updated length information based on the target node change information; when there is a historical dispatch identifier identical to the to-be-updated dispatch identifier in the registered dispatch information set, replacing the historical dispatch identifier based on the to-be-updated dispatch identifier, and replacing the historical length information corresponding to the historical dispatch identifier based on the to-be-updated length information; when there is no historical dispatch identifier identical to the to-be-updated dispatch identifier in the registered dispatch information set, adding the to-be-updated dispatch identifier and the to-be-updated length information to the registered dispatch information set.
[0109] Among them, the historical dispatch identifier can be understood as the dispatch identifier previously registered by the user, and the historical length information corresponding to the historical dispatch identifier can be understood as the length information previously registered by the user. When the historical dispatch identifier exists in the registered dispatch information set, the historical dispatch identifier and historical length information in the registered dispatch information set can be updated using the dispatch identifier to be updated and the length information to be updated; when the historical dispatch identifier does not exist in the registered dispatch information set, the dispatch identifier to be updated and the length information to be updated are added to the registered dispatch information set for registration.
[0110] In a specific embodiment of the present specification, a node change request sent by a target client is received, and corresponding target node change information is determined in response to the node change request, the target node change information includes target registration scheduling information to be registered by the user, the target registration scheduling information includes a scheduling identifier to be updated, i.e., kind information, and length information to be updated, i.e., length information, there is no historical scheduling identifier consistent with the scheduling identifier to be updated in the registration scheduling information set, and the scheduling identifier to be updated and the length information to be updated corresponding to the target node change information are added to the registration scheduling information set.
[0111] In another specific embodiment of the present specification, a node change request sent by a target client is received, and corresponding target node change information is determined in response to the node change request, wherein the target node change information includes target registration scheduling information to be registered by the user, and the target registration scheduling information includes a scheduling identifier to be updated, namely, kind information, and length information to be updated, namely, length information, and there is a historical scheduling identifier consistent with the scheduling identifier to be updated in the registration scheduling information set, and the historical scheduling identifier is updated using the scheduling identifier to be updated, and the historical length information is updated using the length information to be updated.
[0112] Based on this, the node change request submitted by the user is to add or update the target registration scheduling information in the registration scheduling information set stored in the scheduling server, thereby providing the user with the function of customizing the selection of computing nodes.
[0113] Furthermore, in order to ensure that corresponding processing services are provided to users, the scheduling server also needs to forward the data processing request to the target computing node. Specifically, after selecting the target computing node in the computing node cluster according to the target hash value, the method also includes: forwarding the data processing request to the target computing node.
[0114] In actual applications, after the scheduling server determines the target computing node in the computing node cluster, it can forward the data processing request to the target computing node, so that the target computing node can respond to the data processing request to complete the corresponding processing operation and send the feedback data corresponding to the data processing request to the target client.
[0115] In a specific embodiment of the present specification, the scheduling server determines that the target computing node is computing node A, forwards the data query request to computing node A, and computing node A responds to the data query request by querying the corresponding database, obtains the query data, and returns the query data to the client.
[0116] A node determination method provided in this specification is applied to a scheduling server, including: receiving a data processing request sent by a target client, and determining a transmission protocol field carried in the data processing request; parsing the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client; calculating a target hash value corresponding to the target scheduling information, and selecting a target computing node in a computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request. The scheduling server receives the data processing request sent by the target client, determines the transmission protocol field carried in the data processing request, and obtains the target scheduling information through the transmission protocol field, so that the user's needs can be determined according to the target scheduling information, and the corresponding target hash value can be calculated according to the target scheduling information, and the target computing node is selected in the computing node cluster based on the target hash value, so that the user can select different computing nodes by changing the target scheduling information, providing a user with a method for customizing the selection of computing nodes.
[0117] The following combination Figure 3 , taking the application of the node determination method provided in this specification in storing data as an example, the node determination method is further described. Figure 3 A processing flow chart of a node determination method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0118] Step 302: Receive a data processing request sent by a target client, and determine a transmission protocol field carried in the data processing request.
[0119] In one feasible method, the scheduling server receives a data storage request sent by the target client. The user wants to store the data to be stored in the database corresponding to the computing node A. After receiving the data storage request, the scheduling server determines the transmission protocol field carried in the data processing request. The transmission protocol field is a TCP message. The TCP message includes the source port number, the destination port number, the field descriptor, and the option data.
[0120] Step 304: Parse the transmission protocol field to obtain the target scheduling identifier in the transmission protocol field, and compare the target scheduling identifier with the registered scheduling identifier in the registered scheduling information set.
[0121] In one achievable manner, the scheduling server parses the transmission protocol field to obtain the target scheduling identifier in the option data in the transmission protocol field, where the target scheduling identifier is 100, and compares the target scheduling identifier with the registered scheduling identifier in the registered scheduling information set.
[0122] Step 306: Determine the target length information corresponding to the target scheduling identifier according to the comparison result, and determine the scheduling value information in the transmission protocol field according to the target length information.
[0123] In one feasible manner, the scheduling server determines the target length information corresponding to the target scheduling identifier based on the comparison result, and if the target length information is 4, the scheduling value information is determined in the transmission protocol field based on the target length information, and the scheduling value information is value.
[0124] Step 308: Generate target scheduling information according to the target scheduling identifier, target length information and scheduling value information.
[0125] Step 310: Determine the scheduling value information in the target scheduling information, perform hash processing on the scheduling value information, and obtain a target hash value.
[0126] In one achievable manner, the scheduling server performs hash calculation on the scheduling value information to obtain a target hash value of 0.8.
[0127] Step 312: Obtain a corresponding computing node identifier in the computing node cluster, and select a target computing node in the computing node cluster based on the target hash value and the computing node identifier.
[0128] In one achievable manner, the scheduling server obtains a computing node identifier corresponding to each computing node in the computing node cluster, and selects a target computing node in the computing node cluster according to a target hash value and the computing node identifier corresponding to each computing node, wherein the target computing node is computing node A.
[0129] Step 314: Forward the data processing request to the target computing node.
[0130] In one achievable manner, the scheduling server forwards the data storage request to the target computing node, and the target computing node responds to the data query request.
[0131] This specification provides a node determination method, which receives a data processing request sent by a target client through a scheduling server, determines the transmission protocol field carried in the data processing request, and obtains target scheduling information through the transmission protocol field, so that the user's needs can be determined according to the target scheduling information, and then the corresponding target hash value can be calculated according to the target scheduling information, and the target computing node is selected in the computing node cluster based on the target hash value, so that the user can select different computing nodes by changing the target scheduling information, providing a user with a method for customizing the selection of computing nodes.
[0132] The following combination Figure 4 , taking the application of the node determination method provided in this specification in querying data as an example, the node determination method is further described. Figure 4 A processing flow chart of another node determination method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0133] Step 402: Receive a data query request sent by a target client, and determine a transmission protocol field carried in the data query request.
[0134] Step 404: Parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client.
[0135] Step 406: Calculate a target hash value corresponding to the target scheduling information, and select a target computing node in a computing node cluster according to the target hash value, wherein the target computing node is used to process the data query request.
[0136] This specification provides a node determination method, which receives a data query request sent by a target client through a scheduling server, determines the transmission protocol field carried in the data query request, and obtains target scheduling information through the transmission protocol field, so that the user's needs can be determined according to the target scheduling information, and then the corresponding target hash value can be calculated according to the target scheduling information, and the target computing node is selected in the computing node cluster based on the target hash value, so that the user can select different computing nodes by changing the target scheduling information, providing a user with a method for customizing the selection of computing nodes.
[0137] See also Figure 5 , Figure 5 A flowchart of a protocol processing method provided according to an embodiment of the present specification is shown. The method is applied to a client and specifically includes the following steps:
[0138] Step 502: In response to the node change instruction submitted by the target user, determine the node change information corresponding to the node change instruction, wherein the node change information includes a scheduling identifier to be updated and length information to be updated.
[0139] Among them, the node change instruction can be understood as an instruction submitted by the target user to dynamically modify the computing node in use. After receiving the node change instruction submitted by the target user, the scheduling information corresponding to the target user can be modified based on the node change instruction. When the user sends a request later, the corresponding target computing node can also be determined by the modified scheduling information, so that the target computing node provides computing services for the target user. The node change information can be understood as the information submitted by the target user for registration on the scheduling server. The node change information includes the scheduling identifier to be updated and the length information to be updated. The scheduling identifier to be updated is the option type Type information of the option data, and the length information to be updated is the length Length information of the option data.
[0140] In actual applications, when the target user needs to adjust the computing node for project needs, he or she can negotiate and register the option data with the scheduling server in advance, and register the to-be-updated scheduling identifier and to-be-updated length information in the node change information to the scheduling server by submitting the node change information. When the target user subsequently sends a project-related data processing request, the computing node corresponding to the target user will be determined based on the scheduling information carried in the request, and the data processing request will be processed by the computing node.
[0141] In a specific embodiment of the present specification, since the target user of the project adjustment needs to adjust the computing node, computing node A is selected to be responsible for processing, and a node change instruction is submitted to determine the corresponding node change information. The node includes the scheduling identifier to be updated "20" and the length information to be updated "2". The node change information is used for the target user to register the negotiation information in advance on the scheduling server.
[0142] Step 504: Generate a scheduling information registration request based on the node change information, and send the scheduling information registration request to the scheduling server, wherein the scheduling information registration request is used to register the scheduling identifier to be updated and the length information to be updated in the registered scheduling information set of the scheduling server.
[0143] Among them, the scheduling information registration request can be understood as a request to register option data on the scheduling server. After receiving the scheduling information registration request, the scheduling server will register the option data in response to the scheduling information registration request. The registered scheduling information set can be understood as a set of registered scheduling information stored on the scheduling server. The registered scheduling information set includes option data registered by multiple different users. When the user subsequently sends a data processing request, it is also necessary to compare the scheduling identifier carried in the request with the scheduling identifier in the registered scheduling information set. If the comparison is successful, it means that it has been registered in advance and the subsequent allocation of computing nodes can be determined.
[0144] In actual applications, the client generates a scheduling information registration request based on the node change information and sends it to the scheduling server. After the scheduling server responds to the scheduling information registration request to determine the scheduling identifier to be updated and the length information to be updated carried by it, it will determine whether the corresponding scheduling identifier has been registered in advance in the registered scheduling information set. If it has been registered, the information corresponding to the scheduling identifier to be updated will be updated; if it has not been registered, the scheduling identifier to be updated will be stored in the registered scheduling information set.
[0145] In a specific embodiment of the present specification, the client generates a scheduling information registration request based on the node change information, the scheduling information registration request carries the scheduling identifier to be updated and the length information to be updated, and sends the scheduling information registration request to the scheduling server, so that the scheduling server registers the scheduling identifier to be updated and the length information to be updated in the registered scheduling information set based on the scheduling information registration request.
[0146] A protocol processing method provided in this specification is applied to a client, including responding to a node change instruction submitted by a target user, determining the node change information corresponding to the node change instruction, wherein the node change information includes a scheduling identifier to be updated and length information to be updated; generating a scheduling information registration request based on the node change information, and sending the scheduling information registration request to a scheduling server, wherein the scheduling information registration request is used to register the scheduling identifier to be updated and the length information to be updated in the registered scheduling information set of the scheduling server. The client determines the node change information and generates a scheduling information registration request and sends it to the scheduling server, so that the scheduling server can register the scheduling identifier to be updated and the length information to be updated based on the scheduling information registration request. When the client subsequently sends a data processing request, the scheduling server can allocate the corresponding computing node to it based on the scheduling information registered in advance, so that the target user can actively modify the scheduling information, thereby selecting different computing nodes for service.
[0147] See also Figure 6 , Figure 6 A flowchart of a protocol processing method provided according to an embodiment of the present specification is shown. The method is applied to a client and specifically includes the following steps:
[0148] Step 602: In response to a data processing instruction submitted by a target user, determine target scheduling information corresponding to the data processing instruction, wherein the target scheduling information includes a target scheduling identifier, target length information, and target scheduling value information.
[0149] Among them, the data processing instruction can be understood as the instruction issued by the target user for the project data. If the project needs to query data, the target user can submit the data query instruction to the client. After receiving the data processing instruction submitted by the target user, the client will determine the corresponding target scheduling information, which includes the target scheduling identifier, target length information and target scheduling value. The target scheduling information is the option data information, the target scheduling identifier is the option type Type, the target length information is the option length Length, and the target scheduling value information is the option value Value.
[0150] In actual applications, the target scheduling information can be determined according to the user's identification or the client's identification. Taking the client identification as an example, when the user sends a data processing request through the client, the request carries the preset scheduling information corresponding to the client, so that the corresponding computing node processes all requests sent by the client.
[0151] In a specific embodiment of the present specification, in response to a data query instruction submitted by a target user, the client uses preset scheduling information as target scheduling information corresponding to the data processing instruction, including target scheduling identifier Type, target length information Length, and target scheduling value information Value.
[0152] Step 604: Add the target scheduling information to the initial transmission protocol field to generate a transmission protocol field, wherein the transmission protocol field includes source port information, destination port information, field descriptor information, option data information and application layer data information, and the option data information includes preset option information and target scheduling information.
[0153] Among them, the initial transmission protocol field can be understood as the transmission protocol field corresponding to the data processing instruction. The option data in the initial transmission protocol field has not yet been added with the preset custom option data. Therefore, after determining the target scheduling information, the client will add the target scheduling information to the initial transmission protocol field to obtain the transmission protocol field. The specific client will add the target scheduling information to the option data information of the initial protocol field. The transmission protocol field includes source port information, destination disconnection information, field descriptor information, option data information and application layer data information, among which the option data information includes preset option information and target scheduling information, and the target scheduling information is the custom option data.
[0154] In a specific embodiment of the present specification, the target scheduling information "Type, Length, Value" is added to the option data information in the initial transmission protocol field to generate the transmission protocol field.
[0155] Step 606: Generate a data processing request based on the transmission protocol field and send it to the scheduling server.
[0156] Among them, the data processing request can be understood as a request sent to the scheduling server for response. The data processing request is a request corresponding to the data processing instruction submitted by the target user. After generating the transmission protocol field, the client can generate a data processing request based on the transmission protocol field and send the data processing request to the scheduling server so that the scheduling server can determine the corresponding computing node for processing based on the data processing request.
[0157] In a specific embodiment of the present specification, the client generates a data query request based on the transmission protocol field and sends the data query request to the scheduling server. The scheduling server responds to the data query request, determines the target scheduling information carried in the request, and determines the computing node corresponding to the request based on the target scheduling information. The data query request is forwarded to the computing node so that the data query request is actually processed by the computing node, and the query data corresponding to the request is returned to the client.
[0158] A protocol processing method provided in this specification is applied to a client, including responding to a data processing instruction submitted by a target user, determining the target scheduling information corresponding to the data processing instruction, wherein the target scheduling information includes a target scheduling identifier, a target length information, and a target scheduling value information; adding the target scheduling information to the initial transmission protocol field to generate a transmission protocol field, wherein the transmission protocol field includes source port information, destination port information, field descriptor information, option data information, and application layer data information, wherein the option data information includes preset option information and target scheduling information; generating a data processing request based on the transmission protocol field and sending it to a scheduling server. By adding the customized target scheduling information to the initial transmission protocol field, after the transmission protocol field is generated, a data processing request is generated based on the transmission protocol field and sent to the scheduling server, so that the scheduling server can select the corresponding computing node based on the target scheduling information in the transmission protocol field, thereby enabling the user to customize and modify the transmission protocol field and select different computing nodes for service.
[0159] See also Figure 7 , Figure 7 A flowchart of a node determination system provided according to an embodiment of the present specification is shown. The system includes a client 702, a scheduling server 704, and a computing node cluster 706. The system specifically includes the following steps.
[0160] The client 702 is used to generate a data processing request in response to a data processing instruction submitted by a target user, and forward the data processing request to the scheduling server;
[0161] The scheduling server 704 is used to receive the data processing request sent by the target client, determine the transmission protocol field carried in the data processing request, parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client, calculate the target hash value corresponding to the target scheduling information, and select a target computing node in the computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request and forward the data processing request to the target computing node;
[0162] The target computing node 706 is used to determine target response data in response to the data processing request, and send the target response data to the client.
[0163] Optionally, the scheduling server 704 stores a registered scheduling information set, and is further used to parse the transmission protocol field to obtain a target scheduling identifier in the transmission protocol field, and compare the target scheduling identifier with the registered scheduling identifier in the registered scheduling information set; determine the target length information corresponding to the target scheduling identifier based on the comparison result, and determine the scheduling value information in the transmission protocol field based on the target length information; generate the target scheduling information based on the target scheduling identifier, the target length information and the scheduling value information.
[0164] Optionally, the scheduling server 704 is further used to determine the scheduling value information in the target scheduling information; and perform hash processing on the scheduling value information to obtain a target hash value.
[0165] Optionally, the scheduling server 704 is further configured to obtain a corresponding computing node identifier in a computing node cluster; and select a target computing node in the computing node cluster based on the target hash value and the computing node identifier.
[0166] Optionally, the system also includes receiving a node change request sent by a target client, and determining target node change information corresponding to the node change request; and adding target registration scheduling information corresponding to the node change information to the registration scheduling information set based on the node change information.
[0167] Optionally, the scheduling server 704 is further configured to forward the data processing request to the target computing node.
[0168] The present specification provides a node determination system, which includes a scheduling server, a computing node cluster and a client, wherein the client is used to generate a data processing request in response to a data processing instruction submitted by a target user, and forward the data processing request to the scheduling server; the scheduling server is used to receive the data processing request sent by the target client, and determine the transmission protocol field carried in the data processing request, parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client, calculate the target hash value corresponding to the target scheduling information, and select a target computing node in the computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request and forward the data processing request to the target computing node; the target computing node is used to determine target response data in response to the data processing request, and send the target response data to the client. The scheduling server receives the data processing request sent by the target client, determines the transmission protocol field carried in the data processing request, and obtains the target scheduling information through the transmission protocol field, so that the user's needs can be determined according to the target scheduling information. Subsequently, the corresponding target hash value can be calculated according to the target scheduling information, and the target computing node is selected in the computing node cluster based on the target hash value, so that the user can select different computing nodes by changing the target scheduling information, providing users with a way to customize the selection of computing nodes.
[0169] See also Figure 8 , Figure 8 A flowchart of another node determination system provided according to an embodiment of the present specification is shown. The system includes a client 802, a scheduling server 804, and a computing node cluster 806. The system specifically includes the following steps.
[0170] The client 802 is used to generate a data query request in response to a data query instruction submitted by a target user, and forward the data query request to the scheduling server;
[0171] The scheduling server 804 is used to receive the data query request sent by the target client, determine the transmission protocol field carried in the data query request, parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client, calculate the target hash value corresponding to the target scheduling information, and select a target computing node in the computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request and forward the data processing request to the target computing node;
[0172] The target computing node 806 is used to determine target query data in response to the data query request, and send the target query data to the client.
[0173] A node determination system provided in this specification receives a data query request sent by a target client through a scheduling server, determines the transmission protocol field carried in the data query request, and obtains target scheduling information through the transmission protocol field, so that the user's needs can be determined according to the target scheduling information, and then the corresponding target hash value can be calculated according to the target scheduling information, and the target computing node is selected in the computing node cluster based on the target hash value, so that the user can select different computing nodes by changing the target scheduling information, providing a user with a method for customizing the selection of computing nodes.
[0174] See also Fig. 9 , Fig. 9 A flowchart of a protocol processing system provided according to an embodiment of the present specification is shown. The system includes a client 902 and a scheduling server 904. The system specifically includes the following steps.
[0175] The client 902 is used to respond to the node change instruction submitted by the target user, determine the node change information corresponding to the node change instruction, generate a scheduling information registration request based on the node change information, and send the scheduling information registration request to the scheduling server;
[0176] The scheduling server 904 is used to parse the scheduling information registration request to obtain node change information, and based on the node change information, update the to-be-updated scheduling identifier and to-be-updated length information corresponding to the node change information in the registered scheduling information set.
[0177] A protocol processing system provided in this specification includes a client and a scheduling server, wherein the client is used to respond to a node change instruction submitted by a target user, determine the node change information corresponding to the node change instruction, generate a scheduling information registration request based on the node change information, and send the scheduling information registration request to the scheduling server; the scheduling server is used to parse the scheduling information registration request to obtain the node change information, and update the to-be-updated scheduling identifier and to-be-updated length information corresponding to the node change information in the registered scheduling information set based on the node change information. The client determines the node change information and generates a scheduling information registration request and sends it to the scheduling server, so that the scheduling server can register the to-be-updated scheduling identifier and to-be-updated length information based on the scheduling information registration request. When the client subsequently sends a data processing request, the scheduling server can allocate the corresponding computing node to it based on the scheduling information registered in advance, so that the target user can actively modify the scheduling information, thereby selecting different computing nodes for service.
[0178] Corresponding to the above method embodiment, this specification also provides a node determination device embodiment, Fig.10 FIG. 2 shows a schematic diagram of the structure of a node determination device provided by an embodiment of the present specification. Fig.10 As shown, the device comprises:
[0179] The receiving module 1002 is configured to receive a data processing request sent by a target client and determine a transmission protocol field carried in the data processing request;
[0180] The parsing module 1004 is configured to parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client;
[0181] The calculation module 1006 is configured to calculate a target hash value corresponding to the target scheduling information, and select a target computing node in a computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request.
[0182] Optionally, the parsing module 1004 is further configured to parse the transmission protocol field to obtain a target scheduling identifier in the transmission protocol field, and compare the target scheduling identifier with a registered scheduling identifier in the registered scheduling information set; determine the target length information corresponding to the target scheduling identifier based on the comparison result, and determine the scheduling value information in the transmission protocol field based on the target length information; and generate the target scheduling information based on the target scheduling identifier, the target length information and the scheduling value information.
[0183] Optionally, the calculation module 1006 is further configured to determine the scheduling value information in the target scheduling information; and perform hash processing on the scheduling value information to obtain a target hash value.
[0184] Optionally, the computing module 1006 is further configured to obtain a corresponding computing node identifier in a computing node cluster; and select a target computing node in the computing node cluster based on the target hash value and the computing node identifier.
[0185] Optionally, the device also includes a change module, which is configured to receive a node change request sent by a target client and determine the target node change information corresponding to the node change request; and add the target registration scheduling information corresponding to the node change information to the registration scheduling information set based on the node change information.
[0186] Optionally, the device further includes a forwarding module configured to forward the data processing request to the target computing node.
[0187] A node determination device provided in this specification is applied to a scheduling server, including: a receiving module, configured to receive a data processing request sent by a target client, and determine the transmission protocol field carried in the data processing request; a parsing module, configured to parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client; a computing module, configured to calculate a target hash value corresponding to the target scheduling information, and select a target computing node in a computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request. The scheduling server receives the data processing request sent by the target client, determines the transmission protocol field carried in the data processing request, and obtains the target scheduling information through the transmission protocol field, so that the user's needs can be determined according to the target scheduling information, and the corresponding target hash value can be calculated according to the target scheduling information, and the target computing node is selected in the computing node cluster based on the target hash value, so that the user can select different computing nodes by changing the target scheduling information, providing a user with a method for customizing the selection of computing nodes.
[0188] Corresponding to the above method embodiment, this specification also provides a node determination device embodiment, Fig.11 FIG. 2 shows a schematic diagram of the structure of a node determination device provided by an embodiment of the present specification. Fig.11 As shown, the device comprises:
[0189] The receiving module 1102 is configured to receive a data query request sent by a target client and determine a transmission protocol field carried in the data query request;
[0190] The parsing module 1104 is configured to parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client;
[0191] The calculation module 1106 is configured to calculate a target hash value corresponding to the target scheduling information, and select a target computing node in a computing node cluster according to the target hash value, wherein the target computing node is used to process the data query request.
[0192] The above is a schematic scheme of a node determination device of this embodiment. It should be noted that the technical scheme of the node determination device and the technical scheme of the node determination method described above belong to the same concept, and the details not described in detail in the technical scheme of the node determination device can be referred to the description of the technical scheme of the node determination method described above.
[0193] Corresponding to the above method embodiment, this specification also provides a protocol processing device embodiment, Fig.12 FIG. 2 shows a schematic diagram of the structure of a protocol processing device provided by an embodiment of the present specification. Fig.12 As shown, the device comprises:
[0194] The determination module 1202 is configured to determine, in response to the node change instruction submitted by the target user, the node change information corresponding to the node change instruction, wherein the node change information includes a scheduling identifier to be updated and length information to be updated;
[0195] The sending module 1204 is configured to generate a scheduling information registration request based on the node change information, and send the scheduling information registration request to the scheduling server, wherein the scheduling information registration request is used to register the scheduling identifier to be updated and the length information to be updated in the registered scheduling information set of the scheduling server.
[0196] The above is a schematic scheme of a node determination device of this embodiment. It should be noted that the technical scheme of the protocol processing device and the technical scheme of the node determination method described above belong to the same concept, and the details not described in detail in the technical scheme of the protocol processing device can be referred to the description of the technical scheme of the node determination method described above.
[0197] Corresponding to the above method embodiment, this specification also provides a protocol processing device embodiment, Fig.13 FIG. 2 shows a schematic diagram of the structure of a protocol processing device provided by an embodiment of the present specification. Fig.13 As shown, the device comprises:
[0198] The determination module 1302 is configured to determine the target scheduling information corresponding to the data processing instruction in response to the data processing instruction submitted by the target user, wherein the target scheduling information includes a target scheduling identifier, target length information and target scheduling value information;
[0199] The generating module 1304 is configured to add the target scheduling information to the initial transmission protocol field to generate a transmission protocol field, wherein the transmission protocol field includes source port information, destination port information, field descriptor information, option data information and application layer data information, and the option data information includes preset option information and target scheduling value information;
[0200] The sending module 1306 is configured to generate a data processing request based on the transmission protocol field and send it to the scheduling server.
[0201] The above is a schematic scheme of a node determination device of this embodiment. It should be noted that the technical scheme of the protocol processing device and the technical scheme of the node determination method described above belong to the same concept, and the details not described in detail in the technical scheme of the protocol processing device can be referred to the description of the technical scheme of the node determination method described above.
[0202] Fig.14 The block diagram of a computing device 1400 according to one embodiment of the present specification is shown. The components of the computing device 1400 include but are not limited to a memory 1410 and a processor 1420. The processor 1420 is connected to the memory 1410 via a bus 1430, and the database 1450 is used to store data.
[0203] The computing device 1400 also includes an access device 1440, which enables the computing device 1400 to communicate via one or more networks 1460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0204] In one embodiment of the present specification, the above components of the computing device 1400 and Fig.14 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.14 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0205] The computing device 1400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1400 may also be a mobile or stationary server.
[0206] The processor 1420 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned node determination method and protocol processing method.
[0207] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned node determination method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned node determination method and protocol processing method.
[0208] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned node determination method and protocol processing method.
[0209] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned node determination method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned node determination method and protocol processing method.
[0210] An embodiment of the present specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned node determination method and protocol processing method.
[0211] The above is an illustrative solution of a computer program of this embodiment. It should be noted that the technical solution of the computer program and the technical solution of the node determination method described above belong to the same concept, and the details not described in detail in the technical solution of the computer program can be found in the description of the technical solutions of the node determination method and the protocol processing method described above.
[0212] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0213] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0214] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0215] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0216] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A node determination method, applied to a scheduling server, comprising: Receive a data processing request sent by a target client, and determine a transmission protocol field carried in the data processing request; Parsing the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by node change information associated with the target client; A target hash value corresponding to the target scheduling information is calculated, and a target computing node is selected from a computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request.
2. The method according to claim 1, wherein the scheduling server stores a set of registration scheduling information; Parsing the transmission protocol field to obtain target scheduling information includes: Parsing the transmission protocol field to obtain a target scheduling identifier in the transmission protocol field; Determine the target length information corresponding to the target scheduling identifier in the registered scheduling information set, and determine the scheduling value information in the transmission protocol field according to the target length information; Target scheduling information is generated according to the target scheduling identifier, the target length information and the scheduling value information.
3. The method according to claim 2, wherein calculating the target hash value corresponding to the target scheduling information comprises: Extracting the scheduling value information from the target scheduling information; The scheduling value information is subjected to consistent hashing to obtain a consistent hash value as a target hash value corresponding to the target scheduling information.
4. The method of claim 1, wherein selecting a target computing node in a computing node cluster according to the target hash value comprises: Get the corresponding computing node ID in the computing node cluster; A target computing node is selected in the computing node cluster based on the target hash value and the computing node identifier.
5. The method of claim 2, further comprising: Receive and parse the node change request sent by the target client, and obtain the target node change information corresponding to the node change request; Based on the target node change information, in the registered scheduling information set, the to-be-updated scheduling identifier and to-be-updated length information corresponding to the target node change information are updated.
6. The method according to claim 5, updating the to-be-updated scheduling identifier and to-be-updated length information corresponding to the target node change information in the registered scheduling information set based on the target node change information, comprises: Determine the scheduling identifier to be updated and the length information to be updated based on the target node change information; When there is a historical dispatch identifier identical to the dispatch identifier to be updated in the registered dispatch information set, replacing the historical dispatch identifier based on the dispatch identifier to be updated, and replacing the historical length information corresponding to the historical dispatch identifier based on the length information to be updated; When there is no historical schedule identifier identical to the schedule identifier to be updated in the registered schedule information set, the schedule identifier to be updated and the length information to be updated are added to the registered schedule information set.
7. The method of claim 1, after selecting a target computing node in a computing node cluster according to the target hash value, the method further comprises: The data processing request is forwarded to the target computing node.
8. The method according to any one of claims 1-7, wherein the transmission protocol field includes source port information, destination port information, field descriptor information, option data information and application layer data information, and the option data information includes preset option information and target scheduling value information.
9. A node determination method, applied to a scheduling server, comprising: Receive a data query request sent by a target client, and determine a transmission protocol field carried in the data query request; Parsing the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by node change information associated with the target client; A target hash value corresponding to the target scheduling information is calculated, and a target computing node is selected from a computing node cluster according to the target hash value, wherein the target computing node is used to process the data query request.
10. A protocol processing method, applied to a client, comprising: In response to the node change instruction submitted by the target user, determining the node change information corresponding to the node change instruction, wherein the node change information includes a scheduling identifier to be updated and length information to be updated; A scheduling information registration request is generated based on the node change information, and the scheduling information registration request is sent to a scheduling server, wherein the scheduling information registration request is used to register the scheduling identifier to be updated and the length information to be updated in a registered scheduling information set of the scheduling server.
11. A protocol processing method, applied to a client, comprising: In response to a data processing instruction submitted by a target user, determining target scheduling information corresponding to the data processing instruction, wherein the target scheduling information includes a target scheduling identifier, target length information, and target scheduling value information; Adding the target scheduling information to the initial transmission protocol field to generate a transmission protocol field, wherein the transmission protocol field includes source port information, destination port information, field descriptor information, option data information and application layer data information, and the option data information includes preset option information and target scheduling information; A data processing request is generated based on the transmission protocol field and sent to the scheduling server.
12. A node determination system, the system comprising a scheduling server, a computing node cluster and a client, wherein: The client is used to generate a data processing request in response to a data processing instruction submitted by a target user, and forward the data processing request to the scheduling server; The scheduling server is used to receive the data processing request sent by the target client, determine the transmission protocol field carried in the data processing request, parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client, calculate the target hash value corresponding to the target scheduling information, and select a target computing node in the computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request and forward the data processing request to the target computing node; The target computing node is used to determine target response data in response to the data processing request, and send the target response data to the client.
13. A node determination system, the system comprising a scheduling server, a computing node cluster and a client, wherein: The client is used to generate a data query request in response to a data query instruction submitted by a target user, and forward the data query request to the scheduling server; The scheduling server is used to receive the data query request sent by the target client, determine the transmission protocol field carried in the data query request, parse the transmission protocol field to obtain target scheduling information, wherein the target scheduling information is determined by the node change information associated with the target client, calculate the target hash value corresponding to the target scheduling information, and select a target computing node in the computing node cluster according to the target hash value, wherein the target computing node is used to process the data processing request and forward the data processing request to the target computing node; The target computing node is used to determine target query data in response to the data query request, and send the target query data to the client.
14. A protocol processing system, the system comprising a client and a scheduling server, wherein: The client is used to respond to the node change instruction submitted by the target user, determine the node change information corresponding to the node change instruction, generate a scheduling information registration request based on the node change information, and send the scheduling information registration request to the scheduling server; The scheduling server is used to parse the scheduling information registration request to obtain node change information, and based on the node change information, update the to-be-updated scheduling identifier and to-be-updated length information corresponding to the node change information in the registered scheduling information set.
15. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 are implemented.
16. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.