Data processing method and device, electronic equipment and storage medium

By evaluating the resource usage and task volume of data processing nodes and selecting appropriate nodes to allocate data operation requests, the problem of load imbalance in the data processing system is solved and processing efficiency is improved.

CN118656198APending Publication Date: 2024-09-17MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410217734.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-27
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In existing data processing systems, there may be load imbalance problems among multiple data processing nodes, which affects the processing efficiency of data requests.

Method used

By obtaining the resource usage and current task volume information of the data processing node, the resource dependence index and task volume score are calculated, and the most appropriate target data processing node is selected to allocate data operation requests.

Benefits of technology

It achieves a more accurate assessment of the processing capabilities of data processing nodes from the two dimensions of resource usage and task volume, ensuring that the distribution of data operation requests is more reasonable and efficient, and avoiding the reduction in processing efficiency caused by load imbalance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656198A
    Figure CN118656198A
Patent Text Reader

Abstract

The invention provides a data processing method and device, and the method comprises the steps: obtaining the resource utilization rate of a data processing node in response to a data operation request; according to the request type of the data operation request, determining a resource dependence index of the data operation request on node resources, and according to the resource utilization rate and the resource dependence index, determining a first score of a data processing node; obtaining current task load information of the data processing node, and determining a second score of the data processing node according to the current task load information; and selecting a target data processing node for processing the data operation request according to the first score and the second score, and sending the data operation request to the target data processing node. The processing efficiency of the data operation request can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data, and in particular to a data processing method, device, electronic device and storage medium. Background Art

[0002] With the continuous development of network services, the amount of business data is also increasing. In order to increase the amount of data processing, multiple data processing nodes are set in many data processing systems. Through the cooperation between multiple data processing nodes, the throughput of the entire data processing system can be greatly improved. For multiple data requests sent by the data processing system, they are usually assigned to one or more data processing nodes in the data processing system in a random or polling manner. Summary of the invention

[0003] The present application provides a data processing method, device, electronic device and storage medium to improve the processing efficiency of data operation requests.

[0004] In a first aspect, the present application provides a method for processing a data operation request, the method comprising:

[0005] In response to the received data operation request, obtaining a resource usage rate of the data processing node;

[0006] Determining a resource dependency index of the data operation request on node resources according to a request type of the data operation request, and determining a first score of the data processing node according to a resource usage rate and the resource dependency index;

[0007] Acquire current task volume information of the data processing node, and determine a second score of the data processing node according to the current task volume information;

[0008] determining a target data processing node from the data processing nodes according to the first score and the second score of the data processing nodes;

[0009] The data operation request is sent to the target data processing node.

[0010] In a second aspect, the present application provides a data processing device, the device comprising:

[0011] An acquisition module, configured to acquire a resource usage rate of a data processing node in response to a received data operation request;

[0012] a first score determination module, configured to determine a resource dependency index of the data operation request on node resources according to a request type of the data operation request, and determine a first score of the data processing node according to a resource usage rate and the resource dependency index;

[0013] A second score determination module, used to obtain current task volume information of the data processing node, and determine a second score of the data processing node according to the current task volume information;

[0014] A processing module is used to determine a target data processing node from the data processing nodes according to the first score and the second score of the data processing node; and send the data operation request to the target data processing node.

[0015] In a third aspect, the present application provides an electronic device comprising: at least one processor; at least one memory; and one or more I / O interfaces connected between the processor and the memory; wherein the memory stores one or more computer programs that can be executed by at least one processor, and the one or more computer programs are executed by at least one processor so that the at least one processor can execute the above-mentioned data processing method.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned data processing method when executed by a processor / processing core.

[0017] In a fifth aspect, the present application provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying a computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the data processing method as described above.

[0018] In the method provided by the present application, when a data operation request is received, on the one hand, the current load information of the data processing node is obtained, so as to determine the resource dependence index of the data operation request on the node resources according to the request type of the data operation request, and determine the first score of the data processing node according to the resource utilization rate and resource dependence index determined by the current load information. On the other hand, the current task volume information of the data processing node is obtained, so as to determine the second score of the data processing node according to the current task volume information. Correspondingly, according to the first score and the second score of the data processing node, the target data processing node for processing the data operation request is selected. It can be seen that in this method, on the one hand, the resource dependence index of the data operation request on the node resources can be determined according to the request type of the data operation request, and the first score of the data processing node can be determined according to the resource utilization rate and resource dependence index determined by the current load information, so that the score of the data processing node can be reasonably determined from the perspective of resource usage status. On the other hand, the second score of the data processing node can be determined according to the current task volume information of the data processing node, so that the score of the data processing node can be reasonably determined from the perspective of task volume. Therefore, this method can more accurately evaluate the current processing capacity of the data processing node from the two dimensions of resource usage and task volume, thereby ensuring that the selected target data processing node is the best node in the current state, and further ensuring that the allocation of data operation requests is more reasonable and efficient.

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

[0020] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings. In the accompanying drawings:

[0021] Figure 1 A flowchart of a method for processing a data operation request provided in an embodiment of the present application;

[0022] Figure 2 A flowchart of a method for processing a data operation request provided for a specific example of the present application;

[0023] Figure 3 A block diagram of a data operation request processing device provided in an embodiment of the present application;

[0024] Figure 4A block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solution of the present application, the exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0026] In the absence of conflict, the embodiments of the present application and the features therein may be combined with each other.

[0027] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0028] The terms used herein are only used to describe specific embodiments and are not intended to limit the present application. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0029] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this application, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined herein.

[0030] The processing method of the data operation request according to the embodiment of the present application can be executed by an electronic device such as a terminal device or a server. The terminal device can be a vehicle-mounted device, a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The method can be specifically implemented by a processor calling a computer program stored in a memory.

[0031] In the related art, multiple data requests sent by a data processing system are usually distributed to one or more data processing nodes in the data processing system in a random manner or a polling manner. For example, in a random manner, each time a data request is received, a node is randomly selected from multiple data processing nodes to process the data request received this time. For another example, in a polling manner, each time a data request is received, each of the multiple data processing nodes is sequentially determined as a node for processing the received data request by polling in sequence. However, in the above method, there may be a problem of load imbalance between multiple data processing nodes, thereby affecting the processing efficiency of data requests. In order to solve the above problem, in the present application, a method for processing data operation requests is proposed. The method can more accurately evaluate the current processing capacity of each data processing node through the dual information of current load information and current task volume information, thereby making the allocation of data operation requests more reasonable.

[0032] Figure 1 A flowchart of a method for processing a data operation request provided in an embodiment of the present application. Figure 1 , the method comprising:

[0033] Step S110: In response to the received data operation request, obtain the resource usage rate of the data processing node.

[0034] The data operation request may be triggered for the data cluster system, and is used to perform a specified operation on the data in the data cluster system.

[0035] In a data cluster system, there are multiple data processing nodes, and each data processing node works in parallel with each other, which can greatly improve the processing capacity of the data cluster system. In order to ensure load balancing between multiple data processing nodes, after receiving a data operation request, it is necessary to select a suitable data processing node from multiple data processing nodes for processing based on the node-related information of each data processing node.

[0036] In this step, the load information in the node-related information can be obtained so as to determine the current state of each node according to the load information. Among them, the current load information of each data processing node can be stored through the first node list. The current load information is used to reflect the current load state and resource occupancy state of the data processing node. Specifically, the current load information can be expressed according to the resource utilization rate (also called resource occupancy rate). That is, the current load information can be used to characterize the resource utilization rate of the node resources of the data processing node. Correspondingly, in the subsequent steps, by comparing the resource utilization rates of each data processing node, it is convenient to determine the idle state of each data processing node from the perspective of load balancing: if the resource utilization rate is larger, the current load is larger (that is, the node is busier); if the resource utilization rate is smaller, the current load is smaller (that is, the node is more idle). Among them, in addition to being stored through the first node list, the current load information and / or resource utilization rate information can also be stored in various forms such as documents, storage blocks, data units, etc., and the present application does not limit the specific storage form and storage location. In other words, the first node list can also be replaced by a first node storage unit in various forms (including but not limited to data tables, documents, etc.).

[0037] Step S120: determining a resource dependency index of the data operation request on node resources according to the request type of the data operation request, and determining a first score of the data processing node according to the resource usage rate and the resource dependency index.

[0038] Among them, the request type of the data operation request is used to characterize the specific operation type of the data operation request. For example, the request types of the data operation request include: read, write, update, delete and other types. The resource dependency index of the node resource is used to characterize the degree of dependence on the node resource during the processing of the data operation request. If the degree of dependence on the node resource during the processing of the data operation request is smaller, the resource dependency index is smaller; if the degree of dependence on the node resource during the processing of the data operation request is greater, the resource dependency index is greater.

[0039] Specifically, the inventors found in the process of implementing the present invention that each request type has a different degree of resource dependence on node resources. For example, since the reading process consumes fewer resources, the resource dependence index of the data operation request of the read request type on the node resources is less than the resource dependence index of the data operation request of the write request type on the node resources.

[0040] In addition, when node resources include multiple types, the resource dependency index of a data operation request for each type of node resource may be different. For example, when the request type is a new type request such as write, update, etc., the dependency index for the CPU node resource is greater than the dependency index for the memory node resource; when the request type is a non-new type such as query, delete, etc., the dependency index for the CPU node resource is less than the dependency index for the memory node resource.

[0041] Accordingly, the first score of the data processing node can be determined according to the resource utilization rate and resource dependency index of the data processing node. For example, for any data processing node, if the resource utilization rate of the data processing node is low and the resource dependency index is high, it means that the data processing node has more idle resources and the current data operation request is more dependent on the corresponding node resources, so the first score of the data processing node is high.

[0042] In an optional implementation, the data processing node includes multiple node resources; when determining the resource dependency index of the data operation request for each node resource according to the request type of the data operation request, it can be implemented in the following manner:

[0043] The preset type dependency mapping table is queried, and the resource dependency index of the node resource corresponding to the request type of the data operation request is determined according to the type dependency mapping table. The preset type dependency mapping table can be updated in the following manner:

[0044] For the processed data operation request, the node resource change amount corresponding to the processing process of the processed data operation request is obtained, and the resource dependency index of the processed data operation request on the node resource is determined according to the node resource change amount. According to the mapping relationship between the resource dependency index of the processed data operation request on the node resource and the request type of the processed data operation request, the preset type dependency mapping table is updated. The preset type dependency mapping table is used to store the mapping relationship between each request type and the corresponding resource dependency index of the node resource.

[0045] For example, during the processing of any data operation request, the resource change amount of each node resource (i.e., the node resource change amount) can be dynamically monitored, and the resource dependence index of the data operation request on the node resource can be determined based on the resource change amount of the node resource. For example, if the resource change amount of the node resource is large (such as a significant increase in resource utilization), it means that the resource dependence index of the node resource is high (i.e., the data operation request is highly dependent on the node resource during the processing); for another example, if the resource change amount of the node resource is small (such as no significant change in resource utilization), it means that the resource dependence index of the node resource is small (i.e., the data operation request is less dependent on the node resource during the processing). Through the above-mentioned dynamic monitoring method, the resource dependence index of each type of data operation request on each node resource can be determined.

[0046] For example, when the request type of the data operation request is a newly added type such as write or update, the resource dependency index of the corresponding node resource includes: the CPU dependency index for the CPU node resource and the memory dependency index for the memory node resource, and the CPU dependency index is greater than the memory dependency index. For example, the CPU dependency index is 0.8 and the memory dependency index is 0.2.

[0047] For another example, when the request type of the data operation request is a non-new type such as query or delete, the resource dependency index of the corresponding node resource includes: the CPU dependency index for the node resource CPU and the memory dependency index for the node resource memory, and the CPU dependency index is smaller than the memory dependency index. For example, the CPU dependency index is 0.3 and the memory dependency index is 0.7.

[0048] It can be seen that the type dependency mapping table is used to store the corresponding relationship between each type of data operation request and the resource dependency index of various node resources, and the type dependency mapping table can be dynamically updated as the data operation request is processed. Specifically, during the processing of any data operation request, the resource change amount of each node resource can be dynamically monitored, so as to determine the resource dependency index of the node resource according to the resource change amount of the node resource.

[0049] In addition, the above-mentioned "update" includes two situations: additional update and modified update. Among them, additional update means: when the resource dependency index corresponding to a request type has not been stored in the type dependency mapping table (that is, the resource dependency index corresponding to a request type is empty), the resource dependency index corresponding to a request type is updated in an additional way. This situation corresponds to the initial stage. For example, in the initial stage, the system has not processed a certain type of request. At this time, in order to facilitate processing, an initial value can be set in advance for each request type in the type dependency mapping table. The specific value of the initial value can be set by a technician in this field based on historical processing conditions or industry experience. Modified update means: when the resource dependency index corresponding to a request type has been stored in the type dependency mapping table, the resource dependency index corresponding to the stored request type is updated in a modified way. It can be seen that, in addition to the use of additional update when a certain request type is processed for the first time after the system is started, the system uses modified update when processing a certain request type subsequently.

[0050] For example, the initial values ​​of the CPU dependency index and the memory dependency index can both be 0.5. Accordingly, when the system processes a non-newly added operation request of a request type such as query or deletion for the first time, the CPU dependency index can be updated to 0.3 and the memory dependency index can be updated to 0.7. However, when the system processes a non-newly added operation request of a request type such as query or deletion for the second time, if it detects that the CPU resource consumption increases and the memory resource consumption decreases, the CPU dependency index and the memory dependency index can be dynamically adjusted, for example, the CPU dependency index is adjusted to 0.35 and the memory dependency index is adjusted to 0.65. In short, by dynamically monitoring the resource occupancy of each processed data operation request during the processing, the resource dependency index of the request type corresponding to each node resource can be dynamically adjusted. Therefore, by dynamically maintaining the type dependency mapping table, the resource dependency index of each request type for each node resource can be accurately characterized, thereby improving the rationality of request allocation.

[0051] In another optional implementation, when determining the first score of each data processing node according to the resource utilization rate of multiple node resources and the resource dependence index of each node resource, it can be implemented in the following way: according to the resource utilization rate of each node resource, determine the resource score of each node resource. Among them, the lower the resource utilization rate of the node resource, the higher the idle degree of the node resource, and thus the corresponding resource score is larger. According to the resource dependence index of the data operation request on each node resource, the resource type weight of each node resource is determined. Among them, the higher the resource dependence index of the data operation request on a certain node resource, the greater the resource type weight of the node resource, so as to increase the proportion of the resource score of the node resource in the final score. The resource score of each node resource is processed by the resource type weight to obtain the first score of the data processing node. Among them, when the resource score of each node resource is processed by the resource type weight, it can be specifically implemented by weighted processing. In addition, in addition to weighted processing, technical personnel in this field can also flexibly choose other processing methods. For example, the resource score of each node resource can be adjusted by the resource type weight to obtain the first score of the data processing node. The specific adjustment method can be an adjustment method of setting an adjustment coefficient according to the weight, or it can be other adjustment methods. This application does not limit this.

[0052] Among them, the multiple node resources may include: node storage resources, and node processor resources; wherein the node storage resources further include: node memory resources, and / or node disk resources. Accordingly, if the resource dependency index of the data operation request on the node storage resource is greater than the resource dependency index of the node processor resource, the resource type weight of the node storage resource is higher, so that the first score of the data processing node with a higher resource score of the node storage resource (i.e., the node storage resource is relatively idle) can be higher. Among them, the first score is used to reflect the node priority of the data processing node from the perspective of resource utilization.

[0053] Step S130: Acquire current task volume information of the data processing node, and determine the second score of the data processing node according to the current task volume information.

[0054] Among them, the current task volume information of each data processing node can be stored through the second node list, and the current task volume information mainly refers to the total amount of tasks that are not currently processed. By comparing the total amount of tasks that have not yet been processed by each data processing node, the idle state of each data processing node can be determined from the perspective of task volume: if the total amount of tasks that have not yet been processed is larger, it means that the current node is busier; if the total amount of tasks that have not yet been processed is smaller, it means that the current node is more idle. Correspondingly, the second score of the data processing node can be determined according to the current task volume information. For example, the more current task volume information there is, the lower the second score; the less current task volume information there is, the higher the second score. In addition, in addition to being stored through the second node list, the current task volume information can also be stored in various forms such as documents, storage blocks, data units, etc., and the present application does not limit the specific storage form and storage location. In other words, the second node list can also be replaced by a second node storage unit in various forms (including but not limited to data tables, documents, etc.).

[0055] Step S140: determining a target data processing node from the data processing nodes according to the first score and the second score of the data processing node, and sending the data operation request to the target data processing node.

[0056] Specifically, the node score of each data processing node can be determined according to the first score and the second score of the data processing node, and the target data processing node can be selected from the multiple data processing nodes according to the dynamic sorting results between the node scores of the multiple data processing nodes. It can be seen that in this method, on the one hand, the resource dependence index of the data operation request on the node resource can be determined according to the request type of the data operation request, and the first score of the data processing node can be determined according to the resource utilization rate and the resource dependence index determined by the current load information, so that the score of the data processing node can be reasonably determined from the perspective of resource usage status. On the other hand, the second score of the data processing node can be determined according to the current task volume information of the data processing node, so that the score of the data processing node can be reasonably determined from the perspective of task volume. Therefore, this method can more accurately evaluate the current processing capacity of the data processing node from the two dimensions of resource utilization and task volume, so as to ensure that the selected target data processing node is the better node in the current state, and then ensure that the allocation of data operation requests is more reasonable and efficient.

[0057] In addition, those skilled in the art may also make various modifications and variations to the above embodiments:

[0058] In one implementation, the current task volume information of each data processing node is used to characterize the total data volume of the unprocessed tasks of the data processing node, and the total data volume of the unprocessed tasks is determined according to the number of unprocessed tasks and the task data volume of each unprocessed task. For example, for a data processing node, if the number of unprocessed tasks of the data processing node is 3, wherein the task data volume of the first unprocessed task is 1000M, the task data volume of the second unprocessed task is 800M, and the task data volume of the third unprocessed task is 1500M, then the total data volume of the unprocessed tasks of the data processing node is 3300M (1000M+800M+1500M).

[0059] Accordingly, after the data operation request is sent to the target processing node, the number of tasks corresponding to the data operation request and the amount of task data of each task are further determined; and according to the number of tasks corresponding to the data operation request and the amount of task data of each task, the current task amount information of the target processing node is updated, so that the current task amount information of the target processing node (i.e., the amount of task of unprocessed tasks) is increased. Among them, the number of tasks corresponding to the data operation request and the amount of task data of each task can be determined according to the request type and / or request parameters of the data operation request, and accordingly, the sum of the amount of task data of each task is calculated to update the current task amount information of the target processing node. In this way, the current task amount information of the target processing node can be dynamically updated after each data operation request is sent, so that the amount of task of unprocessed tasks recorded in the current task amount information is increased, thereby ensuring the accuracy of the current task amount information of each data processing node stored in the second node list.

[0060] In an optional implementation, the above data operation request is a batch type data operation request. Accordingly, the number of tasks corresponding to the data operation request and the amount of task data for each task can be determined in the following manner: obtain the request parameters contained in the batch type data operation request, extract the batch parameters associated with the operation batch from the request parameters, and determine the number of tasks corresponding to the batch type data operation request and the amount of task data for each task according to the batch parameters. Among them, an operation request may contain multiple operation items. Therefore, in the case of a large number of operation items, it is necessary to divide it into multiple operation batches, and each operation batch can contain several operation items, so as to ensure the orderly execution of multiple operation items. Accordingly, the batch parameters associated with the operation batch generally refer to various parameters related to batch division, for example, they can include: a type sub-parameter for characterizing the operation type and a quantity sub-parameter for characterizing the number of records corresponding to the operation type. Among them, the type sub-parameter used to characterize the operation type represents the type of operation of an operation item, such as adding, deleting, modifying, etc. The quantity sub-parameter represents the number of records (such as the number of records) of data records to be processed in an operation item. Therefore, according to the sum of the number of records of data records that need to be processed in each type of operation items, the number of tasks corresponding to the operation request and the amount of task data of each task can be roughly determined. Among them, the number of tasks can correspond to the operation items (or operation types), for example, one operation item corresponds to one task. The amount of task data of each task can correspond to the number of records of data records that need to be processed in the corresponding operation items. For example, the more the number of records of data records that need to be processed in the corresponding operation items, the larger the amount of task data of the task; the fewer the number of records of data records that need to be processed in the corresponding operation items, the smaller the amount of task data of the task.

[0061] Specifically, the batch type data operation request can be a bulk request, which allows multiple operation items (such as create, index, update, delete, etc.) to be included in one request, and each operation item can also correspond to multiple data records. Accordingly, by parsing the bulk request, the number of tasks corresponding to the data operation request and the amount of task data for each task can be estimated according to the request parameters in the bulk request.

[0062] By estimating the number of tasks corresponding to the data operation request and the amount of task data for each task through request parameters, the second node list can be updated in time according to the data amount of the newly assigned tasks to increase the current task amount information in the second node list, thereby improving the accuracy of the updated data in the second node list.

[0063] In an optional implementation, after the data operation request is sent to the target processing node, the following operations are further performed: in the case of receiving a processing success response message returned by any data processing node, the task quantity of the processed tasks corresponding to the processing success response message and the task data volume of each processed task are determined; according to the task quantity of the processed tasks and the task data volume of each processed task, the current task volume information of any data processing node is updated to reduce the task volume of the unprocessed tasks recorded in the current task volume information of any data processing node (i.e., delete the tasks that have been processed). In order to ensure the timely update of the second node list, in this embodiment, the task processing status can also be dynamically monitored. Accordingly, each data processing node returns a processing success response message whenever a data operation request is processed. Among them, the processing success response message contains identification information such as the request ID of the corresponding data operation request, and accordingly, according to the request ID contained in the processing success response message, the corresponding data operation request can be determined, and then the task quantity corresponding to the data operation request and the task data volume of each task are determined. Furthermore, the number of tasks corresponding to the data operation request and the amount of task data of each task are used as the number of tasks that have been processed and the amount of task data of each processed task, and the current task amount information of the data processing node corresponding to the successful processing response message stored in the second node list is updated. It can be seen that this method can update the second node list in time according to the amount of data of the completed tasks by dynamically monitoring the successful processing response messages returned by each data processing node, so as to reduce the current task amount information in the second node list, thereby improving the accuracy of the updated data in the second node list.

[0064] In an optional implementation, before responding to the received data operation request, the following operations are further performed: at every preset time interval, the node load information of each data processing node is obtained, and the first node list is updated according to the node load information of each processing node obtained this time. It can be seen that the current load information of each data processing node in the first node list is dynamically updated at every preset time interval, so as to ensure the real-time and accuracy of the load information. Among them, the current load information in the first node list is used to characterize the resource utilization rate of multiple node resources corresponding to the data processing node, wherein the multiple node resources include at least one of the following: node memory resources, node disk resources, and node processor resources. It can be seen that each data processing node contains multiple types of node resources, and the load information of the data processing node needs to be determined in combination with the resource utilization rate of each type of node resources. In an optional implementation, when determining the node score of each data processing node according to the first score and the second score of each data processing node, it can be achieved in the following way:

[0065] According to the request type of the data operation request, determine the first weight and the second weight corresponding to the request type; wherein the first weight corresponds to the first score, and the second weight corresponds to the second score; according to the first weight and the second weight, process the first score and the second score of each data processing node (such as weighted processing, adjusting the score according to the weight, etc.) to obtain the node score of each data processing node. Since the request types of data operation requests include: a first type that is more closely related to the load situation, and a second type that is more closely related to the current task volume. For example, considering that the new data type needs to be written to the database during the request processing process, and the writing process will cause the system's memory, disk and other resource usage to increase, the new data type can be used as the first type that is more closely related to the load situation. In addition, considering that there is no need to write data to the database during the processing of the request for deleting the data type, it is only necessary to perform the deletion operation on the data already written in the database. Therefore, this process will not only not cause the system's memory, disk and other resource occupancy rate to increase, but will reduce the system's memory, disk and other resource occupancy rate. However, the data operation of the deletion type still needs to be assigned to the corresponding task thread for execution. Therefore, if the number of currently unprocessed tasks is large, the data operation of the deletion type will still cause the data operation of the deletion type to wait for a long time. Therefore, the deletion data type can be used as the second type with a greater correlation with the current task volume. Correspondingly, for the first type of data operation request, its first weight is greater than the second weight, so that the first score related to the load situation occupies a larger proportion in the final node score. For the second type of data operation request, its first weight is less than the second weight, so that the second score related to the current task volume occupies a larger proportion in the final node score. By setting different first weights and second weights for different request types, it is convenient to reasonably determine the node score according to the business needs of the request type during the processing process, thereby improving the rationality of allocation.

[0066] Specifically, the first weight and the second weight can be obtained by querying the preset weight configuration data. Accordingly, the weight configuration data is used to store weight-related data such as the first weight and the second weight corresponding to each request type. Among them, the request type of the data operation request can be divided in a variety of ways. For example, the request type of the data operation request can be divided into: new data type, deletion data type, update data type, etc. For another example, the request type of the data operation request can also be divided into a first type that is more closely related to the load situation, and a second type that is more closely related to the current task volume. For example, considering that the new data type needs to be written to the database during the request processing of the new data type, and the writing process will cause the system's memory, disk and other resource usage rates to increase, therefore, the new data type can be used as the first type that is more closely related to the load situation. In addition, considering that there is no need to write data to the database during the request processing of the delete data type, it is only necessary to perform the delete operation on the data written in the database. Therefore, this process will not increase the memory, disk and other resource occupancy rates of the system, but will reduce the memory, disk and other resource occupancy rates of the system. However, the data operation of the delete type still needs to be assigned to the corresponding task thread for execution. Therefore, if the number of currently unprocessed tasks is large, the data operation of the delete type will still require a long wait time. Therefore, the delete data type can be used as the second type with a greater correlation with the current task volume. Correspondingly, the weight configuration data is used to store the weight information corresponding to each request type; and the weight information includes: a first weight corresponding to the current load information and a second weight corresponding to the current task volume information. For example, for the first type of data operation request with a greater correlation with the load situation mentioned above, the corresponding first weight is greater than the second weight; for the second type of data operation request with a greater correlation with the current task volume mentioned above, the corresponding first weight is less than the second weight.

[0067] In specific implementation, the first weight and the second weight corresponding to each request type can be obtained by monitoring the correlation between the historical data operation requests of this type and the load and task volume during the processing. For example, if the historical data operation requests of the newly added data type have higher requirements for the current load during the processing, the first weight of the data operation requests of the newly added data type will be greater; if the historical data operation requests of the deleted data type have higher requirements for the current task volume during the processing, the second weight of the data operation requests of the deleted data type will be greater.

[0068] In addition, considering that different types of data operation requests may have different degrees of dependence on each node resource, the first weight may further include: a first sub-weight corresponding to each node resource. For example, some requests rely more on storage resources such as memory during processing, then the first sub-weight of the storage resources for this type of request is greater than the first sub-weight of other resources. For another example, some requests rely more on processor resources during processing, then the first sub-weight of the processor resources for this type of request is greater than the first sub-weight of other resources. In short, by flexibly configuring the first sub-weight of each node resource through the request type of the data operation request, the accuracy of the final calculated score can be improved.

[0069] Then, for each data processing node, the first score of the data processing node is determined according to the resource utilization rate of multiple node resources in the data processing node and the first sub-weight of each node resource; and the second score of the data processing node is determined according to the current task volume information of the data processing node. For example, for a certain data operation request, the first sub-weight of the corresponding memory resource is a, the first sub-weight of the disk resource is b, and the first sub-weight of the processor resource is c. Then the first score of a certain data processing node is calculated in the following way: the memory occupancy score corresponding to the memory resource occupancy rate of the data processing node *a + the memory occupancy score corresponding to the disk resource occupancy rate *b + the memory occupancy score corresponding to the processor resource occupancy rate *c. Among them, the occupancy score of a certain resource can be inversely proportional to the occupancy rate of the resource, for example, the higher the resource occupancy rate, the lower the corresponding occupancy score; the lower the resource occupancy rate, the higher the corresponding occupancy score. In addition, the second score can be directly determined according to the current task volume information. For example, the larger the current task volume, the lower the second score; the smaller the current task volume, the higher the second score.

[0070] Finally, according to the first weight and the second weight, a preset operation (such as a weighted operation, or a score adjustment operation based on the weight) is performed on the first score and the second score, and the node score of each data processing node is determined according to the operation result, so as to determine the current priority of multiple data processing nodes according to the node score. For example, node score = first score * first weight + second score * second weight. The node scores of multiple data processing nodes are sorted, for example, they can be sorted in order from high to low according to the node scores, so that the current priority of each data processing node can be determined according to the sorting result (specifically, the data processing node with the highest node score can be used as the target data processing node). In short, the node with a smaller load and a smaller current task volume determined according to the node score has a higher priority.

[0071] In an optional implementation, the target processing node includes multiple data shards. When sending a data operation request to the target processing node, the shard data volume of each data shard in the target processing node is first obtained; then the data shard with the smallest shard data volume is determined as the target data shard, and the data operation request is sent to the target data shard in the target processing node. Since a data processing node usually includes multiple data shards, in order to ensure that the loads between the multiple data shards are relatively balanced, it is necessary to compare the shard data volumes of the multiple data shards, so as to select the shard with the smallest data volume to process the data operation request.

[0072] For ease of understanding, the specific implementation details of the above embodiment are described in detail below using a specific example:

[0073] In this example, the data operation request is a bulk request. In addition, the data cluster in this example is an Elastic cluster. The Elastic cluster consists of multiple nodes, each of which can store data, process query requests, and communicate with other nodes in the cluster. Elasticsearch is a search server based on Lucene, which provides a distributed multi-user full-text search engine based on the RESTful web interface. The Elastic cluster can be implemented based on Elasticsearch. Each node in the Elastic cluster can contain one or more data shards. Among them, the data shard is the data carrier of Elasticsearch. In Elasticsearch, data is divided into primary shards and replica shards. Each primary shard carries a part of the data of a single index and is distributed on each node. The replica shard is a copy of a primary shard, that is, a backup. Among them, an index is a collection of documents with similar features. A document is a basic information unit that can be indexed, similar to a record in a table, such as an employee document or a product document. The principle of shard allocation is to distribute them evenly across the nodes in the cluster to minimize the impact of some shards on the entire cluster and even the service when an accident occurs. bulk is an operation API provided by Elasticsearch for batch writing, deletion, and modification.

[0074] The system architecture of the data cluster system in this example includes: a data processing plug-in and multiple data processing nodes. The data processing plug-in is respectively connected to the multiple data processing nodes for communication. In addition, the data processing plug-in is used to receive various data operation requests sent from different applications. Figure 2 FIG. 4 is a flowchart showing a method for processing a data operation request in this example. Figure 2As shown, the specific steps include:

[0075] Step S201: The data processing plug-in receives a data operation request from an application.

[0076] Step S202: Acquire a first node list corresponding to a plurality of data processing nodes.

[0077] Specifically, the application initiates a data operation request (i.e., a bulk request). After receiving the bulk request, the data processing plug-in queries the load of each data processing node recorded in the first node list. The load refers to the resource usage of the node, such as the CPU, memory, and disk usage. The higher the CPU, memory, and disk usage, the greater the load, the slower the program response, and in extreme cases, the service may be stopped. At this time, it is necessary to expand the CPU, memory, or migrate the traffic in the current data processing node.

[0078] In the first node list, each data processing node can be sorted in order from low to high node load. Therefore, the first node list can also be called a node load priority list. For the convenience of description, the first node list is defined as list1. In list1, three nodes can be recorded in order from high to low node load, such as node1, node2, and node3.

[0079] Step S203: Acquire a second node list corresponding to the plurality of data processing nodes.

[0080] The second node list may also be referred to as a data node sharding plan list, which is used to characterize the task processing volume planned for each data shard in the corresponding node. In the initial state, the second node list may be empty, that is, each data processing node has not yet received the assigned task. At this time, the second node list can be directly initialized to a list that is exactly the same as the first node list. For the convenience of description, the second node list is defined as list2.

[0081] Step S204: Dynamically determine the current priorities of the multiple data processing nodes according to the current load information in the first node list and the current task volume information in the second node list.

[0082] Among them, when determining the priority, it can be determined according to the weight calculation method mentioned above. For example, assuming that the first weight of list1 is 70%, the second weight of list2 is 30%, and assuming that the score of node1 in list1 is 80 points and the score in list2 is 30 points, then the total score of node1 is 80*0.7+30*0.3=64. In this example, the load information and task volume information of each node are converted into a score form. Accordingly, the priority of the node is determined according to the total score of the node.

[0083] For example, when dynamically determining the current priorities of multiple data processing nodes, it can be implemented in accordance with the above method: first, according to the request type of the data operation request, determine the resource dependence index of the data operation request on the node resources, and determine the first score of the data processing node according to the resource utilization rate and the resource dependence index. Then, determine the second score of the data processing node according to the current task volume information in the second node list. Finally, according to the request type of the data operation request, determine the first weight and the second weight corresponding to the request type; wherein the first weight corresponds to the first score, and the second weight corresponds to the second score; according to the first weight and the second weight, perform weighted processing on the first score and the second score of each data processing node to obtain the node score of each data processing node, so as to determine the current priority of multiple data processing nodes according to the node score.

[0084] Step S205: Select a target processing node from multiple data processing nodes according to the current priority.

[0085] Specifically, a data processing node with the highest selection score may be used as the target processing node.

[0086] Step S206: Send the data operation request to the target processing node.

[0087] Among them, if the target processing node includes multiple data shards, the data shard with the smallest shard data volume is determined as the target data shard according to the shard data volume of each data shard in the target processing node, so as to send the data operation request to the target data shard in the target processing node. Among them, the data shard is Shard, which specifically refers to the data carrier of ES. In ES, data is divided into primary shard and replica shard. Each primary shard carries part of the data of a single index and is distributed in each node. Replica shard is a copy of a primary, that is, a backup. The principle of shard allocation is to distribute it as evenly as possible to each node in the cluster, so as to minimize the impact of some shards on the entire cluster and even the service in the event of an accident. It can be seen from this that data shards can be understood as a storage unit in a processing node.

[0088] Step S207: according to the number of tasks corresponding to the data operation request and the task data volume of each task, update the current task volume information of the target processing node stored in the second node list.

[0089] For example, since a new task has just been assigned to the target processing node, the current task volume information of the target processing node increases. Accordingly, when the nodes in the second node list are sorted by task volume, the target processing node can be processed in descending order to reduce the priority of the target processing node in the next request processing process.

[0090] Step S208: When a successful processing response message is received from any processing node, the current task volume information stored in the second node list of any processing node is updated according to the number of processed tasks corresponding to the successful processing response message and the task data volume of each processed task.

[0091] For example, since the target processing node has just completed several tasks, the current task volume information of the target processing node is reduced. Accordingly, when the nodes in the second node list are sorted according to the task volume, the target processing node can be processed in ascending order to improve the priority of the target processing node in the next request processing process.

[0092] In summary, in the above example, priority can be sorted according to information such as node load and task volume, so as to make better use of node performance, make the load of each node in the cluster relatively uniform, and reduce the risk of bulk requests being rejected. This method can dynamically analyze the node load and implement traffic-oriented requests. In addition, a two-item comprehensive scoring standard (i.e., a two-way standard of load and task volume) can be used to screen the optimal node. In short, according to the strength of the ES node processing power, the rate at which the node pushes data can be changed to solve the data backlog and data rejection caused by nodes with weak processing power still receiving data.

[0093] Among them, in a related technology, a bulk write request uses the document's _id field as routing information (routing) by default in the Elastic cluster, and distributes this batch of data to different shards and different nodes through an algorithm (shard = hash (routing) % number_of_primary_shards). The write of each shard is a sub-request. When all sub-requests are executed, the entire write request is completed. When a sub-request cannot be responded immediately due to node failure, insufficient resources, etc., the entire request will wait for the sub-request to be completed, resulting in slow response and accumulation. In severe cases, write rejection may occur, resulting in data loss. In the multi-shard bulk write scenario, a bulk is written to only one shard by routing, which reduces network overhead, improves data node CPU usage, and avoids long-tail shards affecting the entire bulk request. Among them, the ES kernel can provide index attributes, which can automatically add a random routing for the write sub-requests of a bulk request, ensuring that the sub-request is routed to only one shard and that the index data of each shard is balanced. However, in the above method, the problem of node load tilt may occur: the data processing capacity of each node is different, some nodes process fast, and some nodes process slowly. After receiving the bulk request, the fast processing node immediately completes the processing without accumulation. The slow processing node may not have completed the previous batch of bulk, and the next batch of bulk requests will arrive, resulting in the accumulation of node tasks. When the amount of data written is large, some nodes may be idle, and some nodes may be highly loaded, and write rejection may occur. In the example of the present application, after the application initiates a bulk request, the data processing plug-in (such as BulkDataPlugin) in the data cluster can receive the data operation request, and then analyze the load of each node of the Elastic cluster and the unfinished tasks of the node, and at the same time, consider the node data distribution as evenly as possible, and select the optimal node and shard. The data processing plug-in can be a custom plug-in installed in the central processing device of the data cluster, and the custom plug-in is used to implement each step in the above embodiment to select a better data processing node. After filtering out the nodes and shards, a directed request is made to the elastic cluster and a bulk request is initiated. All data in the bulk request falls on a shard of a node. Therefore, only one thread is needed to process the bulk request.

[0094] Figure 3 A block diagram of a data operation request processing device provided in an embodiment of the present application. Figure 3 , the data operation request processing device 30 includes:

[0095] An acquisition module 31, configured to acquire a resource usage rate of a data processing node in response to a received data operation request;

[0096] A first score determination module 32, adapted to determine a resource dependency index of the data operation request on node resources according to a request type of the data operation request, and determine a first score of the data processing node according to a resource usage rate and the resource dependency index;

[0097] A second score determination module 33, configured to obtain current task volume information of the data processing node, and determine a second score of the data processing node according to the current task volume information;

[0098] The processing module 34 is used to determine a target data processing node from the data processing nodes according to the first score and the second score of the data processing node; and send the data operation request to the target data processing node.

[0099] In an optional implementation, the data processing node includes multiple node resources; and determining, according to the request type of the data operation request, a resource dependence index of the data operation request on the node resources includes:

[0100] Querying a preset type dependency mapping table, and determining a resource dependency index of a node resource corresponding to a request type of the data operation request according to the type dependency mapping table;

[0101] The preset type dependency mapping table is updated in the following manner:

[0102] For a processed data operation request, obtaining a node resource change amount corresponding to a processing process of the processed data operation request, and determining a resource dependence index of the processed data operation request on the node resource according to the node resource change amount;

[0103] The type dependency mapping table is updated according to a mapping relationship between a resource dependency index of the processed data operation request on a node resource and a request type of the processed data operation request.

[0104] In an optional implementation, determining the first score of the data processing node according to the resource usage rate and the resource dependency index includes:

[0105] Determining a resource score for each node resource according to the resource utilization rate of each node resource;

[0106] Determining a resource type weight of each node resource according to a resource dependency index of the data operation request on each node resource;

[0107] The resource score of each node resource is processed by the resource type weight to obtain the first score of the data processing node. In an optional implementation, the current task volume information of each data processing node is used to characterize the total data volume of the unprocessed tasks of the data processing node, and the total data volume of the unprocessed tasks is determined according to the number of unprocessed tasks and the task data volume of each unprocessed task;

[0108] Furthermore, after sending the data operation request to the target processing node, the method further includes:

[0109] Determine the number of tasks corresponding to the data operation request and the amount of task data for each task;

[0110] According to the number of tasks corresponding to the data operation request and the task data volume of each task, the current task volume information of the target processing node stored in the second node list is updated.

[0111] In an optional implementation, the data operation request is a batch type data operation request, and determining the number of tasks corresponding to the data operation request and the task data volume of each task includes:

[0112] Obtaining request parameters contained in the batch processing type data operation request;

[0113] Batch parameters associated with the operation batch are extracted from the request parameters, and the number of tasks corresponding to the batch processing type data operation request and the task data volume of each task are determined according to the batch parameters.

[0114] In an optional implementation manner, after sending the data operation request to the target processing node, the method further includes:

[0115] In case of receiving a processing success response message returned by any processing node, determining the number of processed tasks corresponding to the processing success response message and the amount of task data of each processed task;

[0116] According to the task quantity of the processed tasks and the task data volume of each processed task, the current task volume information stored in the second node list of any processing node is updated.

[0117] In an optional implementation, before responding to the received data operation request, the method further includes:

[0118] At every preset time interval, node load information of each data processing node is obtained, and the first node list is updated according to the node load information of each processing node obtained this time;

[0119] The current load information in the first node list is used to characterize resource utilization rates of various node resources corresponding to the data processing node, wherein the various node resources include at least one of the following: node memory resources, node disk resources, and node processor resources.

[0120] In an optional implementation, dynamically determining the current priorities of the multiple data processing nodes according to the current load information and the current task volume information includes:

[0121] Determine the request type of the data operation request, and query the weight information corresponding to the request type from the preset weight configuration data; wherein the weight configuration data is used to store the weight information corresponding to each request type; and the weight information includes: a first weight corresponding to the current load information, and a second weight corresponding to the current task volume information; the first weight further includes: a first sub-weight corresponding to each node resource;

[0122] For each data processing node, determining a first score of the data processing node according to resource utilization rates of multiple node resources in the data processing node and a first sub-weight of each node resource; and determining a second score of the data processing node according to current task volume information of the data processing node;

[0123] According to the first weight and the second weight, the first score and the second score are calculated, and the node score of each data processing node is determined according to the calculation result;

[0124] The current priorities of the plurality of data processing nodes are determined according to the node scores.

[0125] In an optional implementation, the target processing node includes multiple data shards, and sending the data operation request to the target processing node includes:

[0126] Obtaining the shard data volume of each data shard in the target processing node;

[0127] The data shard with the smallest shard data amount is determined as the target data shard, and the data operation request is sent to the target data shard in the target processing node.

[0128] The specific structure and working principle of each of the above modules can be referred to the description of the corresponding part of the method embodiment, which will not be repeated here.

[0129] Figure 4 A block diagram of an electronic device provided in an embodiment of the present application. Figure 4The electronic device 50 includes: at least one processor 501; at least one memory 502; and one or more I / O interfaces 503, connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more computer programs that can be executed by at least one processor 501, and the one or more computer programs are executed by at least one processor 501 so that at least one processor 501 can execute the above-mentioned data operation request processing method.

[0130] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned method for processing data operation requests when executed by a processor / processing core. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0131] An embodiment of the present application also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned data operation request processing method.

[0132] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0133] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0134] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0135] The computer program instructions for performing the operation of the present application can be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of a computer-readable program instruction to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit can execute a computer-readable program instruction, thereby realizing various aspects of the present application.

[0136] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0137] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0138] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0139] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0140] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the function involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a dedicated hardware-based system that performs the function or action of the specification, or can be realized by a combination of special-purpose hardware and computer instructions.

[0141] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present application as set forth in the appended claims.

Claims

1. A data processing method, characterized in that: include: In response to the received data operation request, obtaining a resource usage rate of the data processing node; Determining a resource dependency index of the data operation request on node resources according to a request type of the data operation request, and determining a first score of the data processing node according to a resource usage rate and the resource dependency index; Acquire current task volume information of the data processing node, and determine a second score of the data processing node according to the current task volume information; determining a target data processing node from the data processing nodes according to the first score and the second score of the data processing nodes; The data operation request is sent to the target data processing node.

2. The method according to claim 1, characterized in that The data processing node includes multiple node resources; determining the resource dependency index of the data operation request on the node resources according to the request type of the data operation request includes: Querying a preset type dependency mapping table, and determining a resource dependency index of a node resource corresponding to a request type of the data operation request according to the type dependency mapping table; The preset type dependency mapping table is updated in the following manner: For a processed data operation request, obtaining a node resource change amount corresponding to a processing process of the processed data operation request, and determining a resource dependence index of the processed data operation request on the node resource according to the node resource change amount; The type dependency mapping table is updated according to a mapping relationship between a resource dependency index of the processed data operation request on a node resource and a request type of the processed data operation request.

3. The method according to claim 2, characterized in that Determining the first score of the data processing node according to the resource usage rate and the resource dependency index includes: Determining a resource score for each node resource according to the resource utilization rate of each node resource; Determine the resource type weight of each node resource according to the resource dependency index of the data operation request on each node resource; The resource score of each node resource is processed by using the resource type weight to obtain a first score of the data processing node.

4. The method according to claim 1, characterized in that: The current task volume information of each data processing node is used to characterize the total data volume of the unprocessed tasks of the data processing node, and the total data volume of the unprocessed tasks is determined according to the number of unprocessed tasks and the task data volume of each unprocessed task; After sending the data operation request to the target data processing node, the method further includes: Determine the number of tasks corresponding to the data operation request and the amount of task data for each task; According to the number of tasks corresponding to the data operation request and the task data volume of each task, the current task volume information of the target processing node is updated.

5. The method according to claim 4, characterized in that The data operation request is a batch type data operation request, and determining the number of tasks corresponding to the data operation request and the task data volume of each task includes: Obtaining request parameters contained in the batch processing type data operation request; Batch parameters associated with the operation batch are extracted from the request parameters, and the number of tasks corresponding to the data operation request and the amount of task data of each task are determined according to the batch parameters.

6. The method according to claim 4 or 5, characterized in that: After sending the data operation request to the target data processing node, the method further includes: In case of receiving a processing success response message returned by any data processing node, determining the number of tasks processed corresponding to the processing success response message and the task data volume of each processed task; According to the task quantity of the processed tasks and the task data volume of each processed task, the current task volume information of any data processing node is updated.

7. The method according to any one of claims 1-2, characterized in that: The target data processing node includes a plurality of data shards, and sending the data operation request to the target data processing node includes: Obtaining the shard data volume of each data shard in the target data processing node; The data shard with the smallest shard data amount is determined as the target data shard, and the data operation request is sent to the target data shard in the target data processing node.

8. A data processing device, characterized in that: include: An acquisition module, configured to acquire a resource usage rate of a data processing node in response to a received data operation request; a first score determination module, configured to determine a resource dependency index of the data operation request on node resources according to a request type of the data operation request, and determine a first score of the data processing node according to a resource usage rate and the resource dependency index; A second score determination module, used to obtain current task volume information of the data processing node, and determine a second score of the data processing node according to the current task volume information; A processing module, configured to determine a target data processing node from the data processing nodes according to the first score and the second score of the data processing node; The data operation request is sent to the target data processing node.

9. An electronic device, characterized in that: include: at least one processor; at least one memory; as well as One or more I / O interfaces are connected between the processor and the memory; wherein, The memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the data processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the data processing method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The invention comprises a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the data processing method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Distribution network operation and maintenance test method and device based on micro modular processing

    CN119209931A

  • Self-adaptive computing power scheduling system for large model training

    CN119322682A