CN115174582A - Data scheduling method and related device - Google Patents
Data scheduling method and related device Download PDFInfo
- Publication number
- CN115174582A CN115174582A CN202211081425.0A CN202211081425A CN115174582A CN 115174582 A CN115174582 A CN 115174582A CN 202211081425 A CN202211081425 A CN 202211081425A CN 115174582 A CN115174582 A CN 115174582A
- Authority
- CN
- China
- Prior art keywords
- node
- target
- nodes
- determining
- conflict
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 121
- 238000012545 processing Methods 0.000 claims abstract description 110
- 230000008569 process Effects 0.000 claims description 65
- 230000015654 memory Effects 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 14
- 238000004891 communication Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000004148 unit process Methods 0.000 claims description 5
- 238000013507 mapping Methods 0.000 claims description 3
- 238000004088 simulation Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 9
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000012512 characterization method Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000007794 visualization technique Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Technology Law (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Development Economics (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a data scheduling method and a related device, wherein the method comprises the following steps: acquiring a preset bifurcation tree, wherein each node of the preset bifurcation tree corresponds to one service processing unit; determining a target node corresponding to the minimum conflict quantity through searching preset bifurcation tree nodes and calculating the conflict quantity; further judging whether the target node is a leaf node, if so, passing through a target child node corresponding to a neighbor node of the node, and calculating the conflict quantity of the target child node; with the target child node as a reference node, updating the associated node information step by step upwards, and distributing a plurality of transaction request data to the neighborhood node and the associated node to obtain a first fork tree so as to complete the distribution of the transaction request data; and finally, determining a target path according to the collision quantity of each node of the first bifurcation tree. Therefore, the search range can be gradually converged from a complex tree structure space, and the high efficiency of client transaction request data scheduling is finally ensured.
Description
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data scheduling method and a related apparatus.
Background
With the rapid development of economy, people have higher and higher requirements on the processing speed of transaction requests. In a general hardware system and a matched operating system thereof, any scheduling is usually performed according to a time-sharing principle, and a scheduling algorithm emphasizes the fairness of tasks and enables different tasks to fairly occupy the BPU resources of a transaction channel in turn as much as possible. In reality, the securities trading has strong real-time requirements, namely, the system needs to complete tasks within a specified time and respond and process random external events.
Therefore, a data scheduling method is needed to solve the above problems.
Disclosure of Invention
The embodiment of the application provides a data scheduling method and a related device, which can realize gradual convergence of a search range from a more complex tree structure space by performing iterative selection judgment on nodes in a search process of a preset bifurcation tree, and finally ensure the high efficiency of client transaction request data scheduling.
In a first aspect, an embodiment of the present application provides a data scheduling method, which is applied to a server, where the server includes at least one service processing unit, and includes:
acquiring a preset bifurcation tree, wherein the preset bifurcation tree consists of a plurality of nodes, the plurality of nodes comprise a root node, a plurality of child nodes and a plurality of leaf nodes, and each node corresponds to one service processing unit;
searching the plurality of nodes and determining a plurality of target nodes;
determining a conflict amount corresponding to each target node in the searching process, wherein the conflict amount is used for indicating the number of conflicts generated when the business processing unit processes the transaction request data;
judging whether a target node corresponding to the minimum conflict quantity is the leaf node or not;
if the target node corresponding to the minimum conflict quantity is the leaf node, determining a neighborhood node of the target node corresponding to the minimum conflict quantity, wherein the neighborhood node is a child node of the target node corresponding to the minimum conflict quantity;
determining a target child node corresponding to the neighborhood node, and calculating the conflict amount of the target child node, wherein the target child node is any one of the plurality of child nodes or at least one leaf node;
searching the preset bifurcation tree step by step upwards by taking the target child node as a reference node to obtain a correlation node of the target child node;
distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updating the conflict amount of the associated nodes according to the conflict amount of the target child node to obtain a first fork tree so as to complete the distribution of the transaction request data;
determining a target path according to the collision amount of each node of the first fork tree, wherein the target path is used for indicating an optimal path for processing a plurality of transaction request data.
In a second aspect, an embodiment of the present application provides a data scheduling apparatus, which is applied to a server, where the server includes at least one service processing unit, and the apparatus includes an obtaining unit, a processing unit, a determining unit, an updating unit, and a determining unit: wherein,
the acquiring unit is configured to acquire a preset bifurcation tree, where the preset bifurcation tree is composed of multiple nodes, the multiple nodes include a root node, multiple child nodes, and multiple leaf nodes, and each node corresponds to one service processing unit;
the processing unit is used for searching the plurality of nodes and determining a plurality of target nodes; and determining a conflict amount corresponding to each target node in the searching process, wherein the conflict amount is used for indicating the number of conflicts generated when the business processing unit processes the transaction request data;
the judging unit is configured to judge whether a target node corresponding to the minimum collision amount is the leaf node;
the processing unit is further configured to determine a neighborhood node of the target node corresponding to the minimum collision volume if the target node corresponding to the minimum collision volume is the leaf node, where the neighborhood node is a new node determined by the target node corresponding to the minimum collision volume; and the conflict calculation module is used for determining a target child node corresponding to the neighborhood node and calculating the conflict amount of the target child node, wherein the target child node is any one of the plurality of child nodes or at least one leaf node;
the updating unit is used for searching the preset bifurcation tree upwards step by taking the target child node as a reference node to obtain a relevant node of the target child node;
the distribution unit is used for distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, updating the conflict quantity of the associated nodes according to the conflict quantity of the target child node, and obtaining a first fork tree so as to finish the distribution of the transaction request data;
the determining unit is configured to determine a target path according to the collision amount of each node of the preset bifurcation tree, where the target path is used to indicate an optimal path for processing multiple transaction request data.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing steps in any method in the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods of the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, a preset bifurcation tree is obtained, where each node of the preset bifurcation tree corresponds to one service processing unit; searching a plurality of nodes and determining a plurality of target nodes; in the searching process, determining the conflict amount corresponding to each target node; judging whether the target node corresponding to the minimum conflict quantity is a leaf node or not; if the node is a leaf node, determining a neighborhood node of the target node corresponding to the minimum conflict quantity; determining a target child node corresponding to the neighborhood node, and calculating the conflict quantity of the target child node; searching a preset bifurcation tree upwards step by taking the target child node as a reference node to obtain a correlation node of the target child node; distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updating the conflict quantity of the associated nodes according to the conflict quantity of the target child nodes to obtain a first fork tree so as to complete the distribution of the transaction request data; and determining a target path according to the collision quantity of each node of the first fork tree. Therefore, the nodes are subjected to iterative selection judgment in the searching process of the preset bifurcation tree, the searching range is gradually converged from a complex tree structure space, the efficiency of client transaction data scheduling is finally guaranteed, and lower delay, higher efficiency and better user experience are provided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a data scheduling method according to an embodiment of the present application;
fig. 2A is a schematic structural diagram of a preset bifurcation tree according to an embodiment of the present application;
fig. 2B is a schematic view of a scenario of node expansion of a preset bifurcation tree according to an embodiment of the present application;
fig. 3 is a schematic overall flowchart of data scheduling provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of functional units of a data scheduling apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
For better understanding of the aspects of the embodiments of the present application, the following description is provided to describe electronic devices, related terms, concepts and related backgrounds to which the embodiments of the present application may be applied.
The server may be a portable electronic device, such as a cell phone, a tablet, a wearable electronic device with wireless communication capabilities (e.g., a smart watch), etc., that also contains other functionality, such as personal digital assistant and/or music player functionality. Exemplary embodiments of the portable electronic device include, but are not limited to, portable electronic devices that carry an IOS system, an Android system, a Microsoft system, or other operating system. The portable electronic device may also be other portable electronic devices such as a Laptop computer (Laptop) or the like. It should also be understood that in other embodiments, the electronic device may not be a portable electronic device, but may be a desktop computer. In some examples, the server may also be a virtual server, a physical server, a cloud server, a server for data scheduling, or the like.
The tree graph is also called tree graph or system graph, which is developed from one project by expanding two or more branches and then expanding from each branch and so on. It has a trunk and multiple branches, so it resembles a tree, hence the name tree map. The bifurcation tree diagram can decompose things or phenomena into branches, display the organization relation of hierarchical data through a tree structure, organize objects by a parent-child hierarchical structure, and is an expression mode of an enumeration method. The bifurcation tree diagram is to systematically expand the purpose to be realized and the measures or measures to be taken and draw a diagram so as to clarify the key points of the problems and find the best measures or measures. The bifurcation tree diagram utilizes a visualization method of containing relational expression hierarchical data, and is widely applied due to high-efficiency space utilization rate and good interactivity when the bifurcation tree diagram presents data.
Due to the limitation of objective conditions, when a Business Processing Unit (BPU) of a fast-subscription system receives more than 2 requests simultaneously (within 1 ms) in the same transaction channel of the BPU, request accumulation can be caused to affect transaction experience, which is called a transaction conflict. Some customers in the quick-order system have similar transaction time and large order placing quantity, and are easy to cause transaction conflict.
In order to solve the problems, the data scheduling method provided by the application performs iterative selection and judgment on nodes in the searching process of the preset bifurcation tree, gradually converges the searching range from a more complex tree structure space, and places clients with frequent transaction conflicts in different channel transactions according to the converged result so as to reduce the occurrence of transaction conflicts. And finally, the high efficiency of the customer transaction data scheduling is ensured, and lower delay, higher efficiency and better user experience are provided.
The present application will be described in detail with reference to specific examples.
Referring to fig. 1, fig. 1 is a schematic flowchart of a data scheduling method provided in an embodiment of the present application, and is applied to a server, where the server includes at least one service processing unit, and as shown in fig. 1, the data scheduling method specifically includes the following steps:
s101, acquiring a preset bifurcation tree.
The preset branching tree is composed of a plurality of nodes, the plurality of nodes comprise a root node, a plurality of child nodes and a plurality of leaf nodes, and each node corresponds to one service processing unit.
Specifically, in the scheme of the present application, a predefined preset bifurcation tree already exists in the server, and the preset bifurcation tree includes a root node, a plurality of child nodes, and at least one leaf node in a conventional bifurcation tree structure.
Specifically, taking fig. 2A as an example, fig. 2A is a schematic structural diagram of a preset bifurcation tree according to an embodiment of the present application. As shown in fig. 2A, the node a at the first level identifies a root node of a preset bifurcation tree, and it should be noted that each bifurcation tree has only one root node, that is, a node corresponding to the uppermost level of each bifurcation tree. And branching the node A downwards to obtain child nodes of the node A. In practical applications, the structure of the predetermined bifurcation tree may include multiple types, that is, there may be multiple sub-node number allocations of the node a, so that the final bifurcation tree obtained by expanding the node downward may also be different, and what is shown in fig. 2A is only one possible example.
Further, as shown in fig. 2A, from the sub-nodes B, C and D of the node a, any one of the sub-nodes continues downward (taking the node B as an example), and the sub-nodes E, F and G of the node B are obtained. At this time, the node A is a father node of the nodes B, C and D, the node B is a father node of the nodes E, F and G, and according to the inheritance principle of the bifurcation tree, the node B inherits the father node, namely the node distribution rule of the node A, so that at most three child nodes can be obtained.
Further, as shown in fig. 2A, there is no child node downward for E, F, and G, and at this time, E, F, and G may be determined as the root node of the preset bifurcation tree.
Further, in the scheme of the application, the server completes the distribution of the transaction request data of the client to each node in the searching process of the preset bifurcation tree so as to realize the scheduling work of the transaction request data. Each node corresponds to one service processing unit, and finally, each service processing unit completes processing of transaction request data.
S102, searching the plurality of nodes and determining a plurality of target nodes.
S103, in the searching process, determining the conflict amount corresponding to each target node.
Wherein the conflict amount is used to indicate the number of conflicts occurring when the transaction request data is processed by the service processing unit.
Specifically, the server searches for a plurality of nodes of a preset bifurcation tree, selects one of the nodes as a starting node, and performs node search from the starting node downwards. As described in step S101 above, there may be multiple children nodes, i.e., multiple target nodes, in one node.
In a possible example, when determining the starting node for searching for the preset bifurcation tree, the server needs to determine whether there is an unvisited child node in the child nodes of the starting node, i.e., the multiple target nodes. Specifically, the unvisited child node is used to indicate that the node has not been searched in the current search of the preset bifurcation tree.
Further, if the inaccessible child node does not exist in the plurality of current target nodes, calculating the conflict amount corresponding to each target node in the plurality of target nodes. The conflict amount is used for indicating the number of conflicts occurring when the business processing unit corresponding to the node processes the transaction request data. Specifically, when the service processing unit receives two or more transaction request data at the same time, the number of conflicts occurs.
And S104, judging whether the target node corresponding to the minimum conflict quantity is the leaf node.
Further, the server determines the target node corresponding to the minimum conflict amount according to the calculated conflict amount of each target node, and determines whether the node is a leaf node, that is, whether the target node has a child node.
And S105, if the target node corresponding to the minimum conflict quantity is the leaf node, determining a neighborhood node of the target node corresponding to the minimum conflict quantity.
And the neighborhood node is a new node determined by the target node corresponding to the minimum conflict quantity.
Further, if the server determines that the target node corresponding to the minimum collision quantity does not have a child node, it indicates that the node type of the target node corresponding to the current minimum collision quantity is a leaf node.
Furthermore, a new node is expanded downwards for the target node to serve as a child node of the target node, namely, the new node corresponds to the neighborhood node. Specifically, please refer to fig. 2B, wherein fig. 2B is a schematic view of a scenario of preset bifurcation tree node expansion according to an embodiment of the present application.
Illustratively, as shown in fig. 2B, if the server determines that the node corresponding to the minimum collision amount is E, the E node is a leaf node.
Further, the server allocates a child node H to the node E, at this time, the node H is a neighbor node of the target node E corresponding to the minimum collision amount, and the server allocates a transaction request data to the node. At this time, the H node is a leaf node and inherits the node allocation rule of its parent node E at the same time.
S106, determining a target child node corresponding to the neighborhood node, and calculating the conflict amount of the target child node.
Wherein the target child node is any one of the plurality of child nodes or at least one leaf node.
Illustratively, as shown in fig. 2B, after determining the neighborhood node E, the server starts with the neighborhood node E, continues to downward allocate the child node H to the neighborhood node E, and repeatedly performs N times of simulated allocation operations downward, thereby obtaining N target child nodes. The simulation distribution operation means that the server continuously extends the child nodes downwards by taking the neighborhood nodes as a starting point, and a target child node is correspondingly generated when one child node is extended downwards. Further, the server randomly selects the transaction request from the unallocated transaction request data to allocate to the target child node, and the process is executed for N times to obtain N target child nodes. In addition, the server calculates the conflict amount of each target child node while expanding the child nodes downward.
In a possible example, the N simulated allocation operations may be set by the server according to the data processing capability of the server, or may be determined by service personnel according to the data amount of the actual application scenario, which is not specifically limited herein.
Further, the N simulation distribution operations may be performed within a preset time before the server starts searching the preset bifurcation tree, and if the current preset time is not exhausted, the N simulation processes may be normally performed. And if the preset time is exhausted before the execution of the N times of simulated distribution processes is finished, the simulation operation is finished, and the server performs the next operation. Specifically, the adaptive restriction may be implemented in an actual application scenario, which is not described herein.
And S107, searching the preset bifurcation tree upwards step by taking the target child node as a reference node to obtain the associated node of the target child node.
Specifically, the description will be made taking fig. 2B as an example. As shown in fig. 2B, if the server determines that the reference node is H, the step-by-step upward search for obtaining the associated node of the H node includes: its parent node E and the parent node B of node E. It can be known that the related node of the reference node is a node passed by in the process of searching upwards step by step until the root node.
S108, distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updating the conflict amount of the associated nodes according to the conflict amount of the target child node to obtain a first fork tree so as to complete the distribution of the transaction request data.
Further, according to the conflict amount of the target child node calculated by the server in the process of executing the simulated distribution operation, the conflict amount of the associated node is updated step by step.
Exemplarily, the description is made by taking fig. 2B as an example. The reference node is I, and according to the associated node determination process in step S108, it can be known that the associated nodes of the I node include H, E, B, and a.
Further, the collision amount of the I node is accumulated into the node H, and the collision amount of the H node is updated.
Further, the updated collision amount of the H node is added to the parent node E, and iteration is performed until the root node a is finished, and the collision amount of the a node is updated to obtain a new bifurcation tree, that is, a first bifurcation tree.
S109, determining a target path according to the conflict amount of each node of the first fork tree, wherein the target path is used for indicating an optimal path for processing a plurality of transaction request data.
Illustratively, the server determines the target path based on the collision volumes of the nodes in the first bifurcation tree. The target path is a path with the minimum sum of collision amounts formed by nodes connected in series step by step from top to bottom, and the server controls the service processing units corresponding to the nodes on the target path to perform data processing operation on the transaction request data distributed by the service processing units so as to finish data scheduling work.
It can be seen that, in the data scheduling method described in the embodiment of the present application, a preset bifurcation tree is obtained, where each node of the preset bifurcation tree corresponds to one service processing unit; searching a plurality of nodes, and determining a plurality of target nodes; in the searching process, determining the conflict amount corresponding to each target node; judging whether the target node corresponding to the minimum conflict quantity is a leaf node or not; if the node is a leaf node, determining a neighborhood node of the target node corresponding to the minimum conflict quantity; determining a target child node corresponding to the neighborhood node, and calculating the conflict amount of the target child node; searching a preset bifurcation tree upwards step by taking the target child node as a reference node to obtain a correlation node of the target child node; distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updating the conflict quantity of the associated nodes according to the conflict quantity of the target child nodes to obtain a first fork tree so as to complete the distribution of the transaction request data; and determining a target path according to the collision quantity of each node of the first fork tree. Therefore, the nodes are subjected to iterative selection judgment in the searching process of the preset bifurcation tree, the searching range is gradually converged from a complex tree structure space, the high efficiency of client transaction data scheduling is finally ensured, and the user experience with lower delay, higher efficiency and better quality is provided.
In one possible example, each node of the at least one node includes corresponding node information including access number information of the each node; the searching the plurality of nodes and determining a plurality of target nodes may include the steps of: searching the plurality of nodes, and determining a starting node from the plurality of nodes; judging whether the starting node is the leaf node; if the starting node is not the leaf node, acquiring the access times information of the target nodes, wherein the target nodes are child nodes of the starting node; determining whether an unvisited child node exists in the target nodes according to the access frequency information; if one or more of the unvisited child nodes exist, determining the target node from the unvisited child nodes; and updating the access times information of the target node, and distributing one transaction request datum for the target node.
Specifically, each node in the preset bifurcation tree has corresponding node information, wherein the node information includes, but is not limited to, access time information, conflict amount, simulation distribution time information and the like of the node. The access frequency information is used for indicating the access frequency of the node in the process that the server searches the preset bifurcation tree, and the access frequency of the node is added with 1 every time the node passes through; the simulation distribution frequency information refers to the frequency of the simulation distribution operation of the server to a certain node, namely the frequency of downward distribution of child nodes, and 1 is added to the simulation distribution frequency of the node every time the simulation distribution operation is performed.
Illustratively, the server randomly selects one node from a plurality of nodes of the preset bifurcation tree as a starting node when a search operation is performed on the preset bifurcation tree for the first time. The starting node may be a root node of the preset bifurcation tree directly determined as the starting node, or a child node in the preset bifurcation tree may be determined as the starting node, where the child node includes a leaf node.
Further, the server determines whether the start node is a leaf node. And if the starting node is determined not to be the leaf node, acquiring the access frequency information of the child node of the starting node. Wherein the child node comprises one or more. And the server judges whether the initial node has an unvisited child node, namely the child node with the access frequency of 0, according to the access frequency information of one or more child nodes.
Illustratively, the server searches for the preset bifurcation tree for the first time. Then one or more of the child nodes of the originating node are all unvisited nodes at this time.
Further, the server randomly selects one sub-node from the one or more sub-nodes as a target node, and executes the operations in steps S104 to S108, which are not described herein again.
In another possible example, if the server determines that the start node is a leaf node, the server starts with a neighboring node of the start node, and performs the operations in steps S106 to S108, which is not described herein again.
As can be seen, in this example, when the preset bifurcation tree is searched for the first time, the server randomly selects the start node and determines the iterative update operation mode according to the type of the start node, so that the distribution of the transaction request data can be ensured to be more complete, and the full search of the preset bifurcation tree is realized.
In one possible example, before determining the amount of conflict corresponding to each target node, the method may include the steps of: determining the transaction heat of at least one customer in a target time period, wherein the transaction heat is used for indicating the occupation condition of each customer in the at least one customer on the business processing unit corresponding to each target node in the target time period; determining the average transaction heat of each customer in the target time period according to the transaction heat; determining the average load of each service processing unit in the target time period according to the sum of the average transaction heat degrees; and determining the conflict amount of the service processing unit corresponding to each target node according to the average load.
In the present application, a service processing unit is exemplarily characterized by a node. In an actual scene, in order to better describe the transaction habits of customers, the transaction habits are often visually presented by a way of making a transaction heat map by a server, and data for making the transaction heat map depends on calculation determination of the transaction heat of the customers. Since the service processing unit can process 6 requests every millisecond, in the actual calculation process, the number of single strokes of a client in a certain millisecond is divided by 6 to represent the occupation situation of the client on a certain service processing unit at the moment, so as to calculate the occupation situation of the client on the certain service processing unit at the momentcFor example, the customer is calculated by the following formulacIn thattOccupation situation of a certain service processing unit at any momentOC(c,t):
wherein,V(c,t) Is a customercIn thattThe amount of transaction request data at the time. We refer to the vector formed by the occupancy of the business processing unit by the client in a certain time as the transaction heat of the client in the time. In particular, the customercIn (a)t1,…tn) time (t1,…tn) the transaction popularity at time is:
in an actual scene, in order to reduce the calculation amount, the server calculates the occupancy rate of the client to a certain service processing unit according to the unit of second when calculating the occupancy condition of the client to the certain service processing unit. Meanwhile, the server averages the heat of each trading day of the client within a period of time to obtain the average trading heat.
Further, based on the above indicators, the server may calculate an average load condition for each traffic processing unit: the average load of a traffic handling unit is the sum of the average heat of each customer traded on it, specifically a traffic handling unit in (a)t1,…tn) average load at timeLDComprises the following steps:
wherein,c 1 ,c 2 …c k transaction request data corresponding to all customers on the business processing unit,is a customerc i Average transaction heat.
Further, the server determines the conflict amount of the service processing unit corresponding to each target node according to the calculated average load of the service processing units.
It can be seen that, in the present example, the server determines the average load of the traffic processing unit by determining the transaction heat of the client, and further determines the conflict amount of the traffic processing unit according to the average load. Therefore, the server can further select and iteratively update the path for the nodes in the preset bifurcation tree searching process according to the conflict quantity, the searching space is further reduced, and the transaction request data scheduling efficiency and the user experience are improved.
In one possible example, the determining the collision amount of the traffic processing unit corresponding to each target node according to the average load may include: if the average load is greater than or equal to a preset threshold, determining a first parameter and a second parameter, and determining the collision quantity according to the first parameter, the second parameter and the average load, wherein the first parameter and/or the second parameter are/is used for representing a mapping relation between the collision quantity and the average load; if the average load is smaller than the preset threshold, determining that the conflict amount of the service processing unit corresponding to each target node is 0.
In an actual application scenario, one service processing unit may correspond to one or more transaction channels, and a client submits transaction request data to the service processing unit through different transaction channels, so that the collision amount of the service processing unit may be measured by the number of collisions of the corresponding one or more transaction channels within a period of time. Wherein, the average load of the transaction processing unit at a certain time is determined through fitting calculationLDNumber of conflicts with its corresponding transaction channelCFHas the following relationship:
wherein,α,δare common parameters, namely a first parameter and a second parameter in the scheme of the application. In particular, the above formula (4) means that the traffic processing units do not collide when the load is small, i.e. smaller than the preset threshold, i.e. thatCFIs 0, when the load exceeds a preset threshold valueδThe number of collisions is then proportional to the square of the average load.
wherein,
further, according to the above relationship, the server may calculate that the service processing unit is in a certain preset time period, for example: the amount of conflict within a trading day. The calculation method is as follows:
wherein,x ji the load of the jth transaction channel of a certain service processing unit at the ith transaction time is referred to, and the load of each transaction channel in one service processing unit at each time is referred toDetermining to obtain the average load of the service processing unitxAccording toxAnd a predetermined threshold valueδThe size relationship between the service processing units determines the conflict amount of the service processing unitsH(x)。
Illustratively, if the average load of the current traffic processing unitxIf the current conflict quantity is less than the preset threshold value, determining the conflict quantity of the current service processing unitH(x) Is 0. In the actual application scenario, the conflict amount of the current service processing unit can also be determinedH(x) The predetermined value is close to 0, and will not be described herein.
Illustratively, if the average load of the current traffic processing unitxIf the current time is larger than or equal to the preset threshold value, determining the conflict amount of the current time service processing unitH(x) Proportional to the square of the difference between the current transaction channel in the service processing unit and a preset threshold.
In a possible example, the server may also characterize the traffic handling unit conflict amount by an index SH(x) Wherein S is the inverse number of the collision quantity. That is, when the conflict amount of the service processing unit is larger, the index S of the node is lower; the smaller the collision amount, the higher the index S.
Further, in step S103, the server determines the target node operation corresponding to the minimum collision amount, and may further select, according to the node score, the node with the highest node score as the target node.
As can be seen, in this example, the server may perform iterative update and simulated distribution of the preset bifurcated tree within a preset time by calculating the conflict amount and the node score of the service processing unit corresponding to the node, and after obtaining the first bifurcated tree, may evaluate the quality of the scheduling scheme according to the node score or the conflict amount of the node, so as to determine the target path.
In one possible example, the determining the target child node corresponding to the neighborhood node may include: determining the target child node according to an allocation rule, wherein the allocation rule refers to a node allocation rule inherited by the neighborhood node from a target node corresponding to the minimum conflict amount, and the node allocation rule is used for indicating an upper limit of the number of the target child nodes; determining a node distribution rule of a target node corresponding to the minimum conflict quantity; and determining the target child node according to the node distribution rule.
Specifically, when the server performs the simulated distribution operation on the neighbor node downward, the neighbor node inherits the parent node, that is, the node distribution rule inherited by the target node corresponding to the minimum collision volume, that is, the neighbor node can obtain the number of child nodes equal to the number of target nodes corresponding to the minimum collision volume. For example, if the target node corresponding to the minimum collision amount includes m child nodes, the server may assign less than or equal to m child nodes to the neighborhood node.
Further, the server allocates at least one child node to the neighborhood node as a target child node according to the allocation rule of the neighborhood node, and at this time, the server calculates the collision amount of the target child node.
In another possible example, the server updates the number of accesses of the target child node to 1 while performing the simulation operation once. In addition, the simulation frequency information of the neighborhood node is updated, and the characterization server completes one simulation operation on the neighborhood node.
In another possible example, after the server completes the simulation operation on the neighborhood node to obtain at least one target child node and calculates the conflict amount of the target child node, the server may further calculate the node score according to the conflict amount and the simulation frequency information of the target child node. The specific calculation process is as follows:
Wherein N is the number of access times of the parent node, N is the number of access times of the current node, and the node score is calculated according to the above formula (5) and formula (6).
As can be seen, in this example, while the server performs the process of the simulated distribution operation on the neighborhood nodes, the server calculates the generated conflict amount of the target child node and updates the node information of the nodes passed through in the process. Therefore, the server can also calculate the node score of each node according to the updated node information, and the node score is used as a reference index of the server in the iterative updating process of the preset bifurcation tree, so that the search range of the preset bifurcation tree is reduced, and the efficiency of transaction request data scheduling is improved.
In one possible example, the method may comprise the steps of: in the process of searching the preset bifurcation tree upwards step by step, the target child node is taken as the reference node, and the associated node is obtained through upwards searching; accumulating the conflict amount of the target child node to the associated node, and updating the conflict amount and the access time information of the associated node; judging whether the associated node is the root node or not; if the associated node is not the root node, the associated node is taken as the reference node, the step of searching the preset bifurcation tree step by step upwards is continuously executed, the next associated node is obtained, and the step of searching the preset bifurcation tree step by step upwards is stopped until the associated node is determined to be the root node.
Specifically, the server obtains at least one target child node after the preset duration or the preset simulation times are finished. And searching the associated node of the target child node upwards by taking the current target child node as a reference node, so that the process can determine at least one associated node of the target child node.
Further, each time an associated node is determined, the server determines whether the associated node is a root node: and if the current associated node is not the root node, taking the current associated node as a new reference node, continuously searching upwards and finishing iterative updating of node information until the final associated node is the root node. The method specifically comprises the step of updating information such as access times, node scores and conflict quantities of the associated nodes. If the current node is the root node, the iterative update operation is ended, and the server starts from the current node and executes the relevant operations of steps S101 to S108 again, which is not described herein again.
As can be seen, in this example, the server adjusts the node information of the preset bifurcation tree through a continuous iterative update process, and finally obtains the first bifurcation tree. Therefore, the conflict amount of the current service processing unit can be determined through the adjustment of the node information, and a better scheduling scheme is selected to process the transaction request data.
In one possible example, before determining a target path according to the collision amount of each node of the first bifurcation tree, the method may include the steps of: judging whether a preset time length is used up, wherein the preset time length is used for limiting the time length of the execution of the searching process; and if the preset time length is determined to be exhausted, stopping executing the searching process.
For example, in practical applications, the server may always perform the processes of steps S101-S108. However, the main purpose of the scheme of the present application is to implement scheduling of transaction request data in a certain period of time, and to complete a service request of a client. Therefore, to complete the scheduling task more quickly, the server often sets a preset duration of a search before performing the search process on the preset bifurcation tree. The server searches a preset bifurcation tree, executes simulation distribution operation on the nodes and completes the iterative updating process of the node information within the preset time length.
Specifically, if the server determines that the operation is still before the preset duration is exhausted, the server continues to execute the current iterative update operation. And if the server determines that the preset time length is exhausted, stopping executing the iterative updating operation. At this time, a first bifurcation tree is obtained.
Furthermore, the server selects an optimal path as a target path through the node information of the first bifurcation tree, distributes the transaction request data of the client to the service processing unit corresponding to the node included in the target path, and executes data processing operation. The basis for determining the target path may be, but is not limited to: a node score for each node of the first bifurcation tree, an amount of conflict for each node, and so on. And is not particularly limited herein.
In this example, the server obtains the first bifurcation tree through continuous iterative update operation, wherein the range and the number of the nodes in the first bifurcation tree are formed by selecting and determining the nodes with higher scores or small conflict amount in each iterative update process, so that the screening and range narrowing of the multiple and complicated nodes are realized, and then after the iterative update is finished, the selection and confirmation of the target path are performed according to the narrowed first bifurcation tree, the scheduling of the transaction request data and the data processing task are completed, and the efficiency of data scheduling and the experience of the client can be improved.
For better understanding of the above processes, the following will be explained with reference to fig. 3, which is a schematic overall flow chart of data scheduling proposed in the embodiment of the present application.
Specifically, please refer to fig. 3, which illustrates an overall process of data scheduling provided in the present application, which specifically includes the following steps:
s301, the server starts from a target node of a preset bifurcation tree.
S302, the server judges whether the target node is a leaf node.
S303, if the server determines that the target node is not the leaf node, judging whether the child node of the target node has an inaccessible node.
S304, the server determines that the child node of the target node has the inaccessible child node, randomly selects the inaccessible child node as a new node, and returns to the step S302 to continuously search the preset bifurcation tree.
S305, the server determines that no inaccessible child node exists in the child node of the target node, and calculates the conflict amount of the child node of the target node.
S306, the server determines the node corresponding to the minimum conflict quantity, and returns to the step S302 to judge whether the node is a leaf node.
And S307, if the server determines that the target node is a leaf node, distributing neighborhood nodes for the target node downwards.
S308, the server executes N times of simulation distribution operation from the neighborhood node.
S309 and N, the simulation operation is finished, at least one target child node is obtained, and the server searches the associated nodes of the target child node upwards step by step from the target child node to update the node information of the associated nodes.
S310, the server executes the processes of the steps S301 to S309 until the preset time length is exhausted, finishes iterative updating, determines a target path and finishes transaction request data scheduling.
Specifically, the specific processes of steps S301 to S310 can be described with reference to the processes of steps S101 to S109, which are not described herein again.
It can be seen that, in the data scheduling method described in the embodiment of the present application, a preset bifurcation tree is obtained, where each node of the preset bifurcation tree corresponds to one service processing unit; searching a plurality of nodes and determining a plurality of target nodes; in the searching process, determining the conflict amount corresponding to each target node; judging whether the target node corresponding to the minimum conflict quantity is a leaf node or not; if the node is a leaf node, determining a neighborhood node of the target node corresponding to the minimum conflict quantity; determining a target child node corresponding to the neighborhood node, and calculating the conflict amount of the target child node; searching a preset bifurcation tree upwards step by taking the target child node as a reference node to obtain a correlation node of the target child node; distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updating the conflict quantity of the associated nodes according to the conflict quantity of the target child nodes to obtain a first fork tree so as to complete the distribution of the transaction request data; and determining a target path according to the collision quantity of each node of the first fork tree. Therefore, the nodes are subjected to iterative selection judgment in the searching process of the preset bifurcation tree, the searching range is gradually converged from a complex tree structure space, the high efficiency of client transaction data scheduling is finally ensured, and the user experience with lower delay, higher efficiency and better quality is provided.
Referring to fig. 4, fig. 4 is a schematic diagram of a server, as shown in fig. 4, the server includes a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured to be executed by the processor, the server is applied to a data scheduling system, the programs include instructions for:
acquiring a preset bifurcation tree, wherein the preset bifurcation tree consists of a plurality of nodes, the plurality of nodes comprise a root node, a plurality of child nodes and a plurality of leaf nodes, and each node corresponds to one service processing unit;
searching the plurality of nodes and determining a plurality of target nodes;
determining a conflict amount corresponding to each target node in the searching process, wherein the conflict amount is used for indicating the number of conflicts generated when the business processing unit processes the transaction request data;
judging whether a target node corresponding to the minimum conflict quantity is the leaf node or not;
if the target node corresponding to the minimum collision quantity is the leaf node, determining a neighborhood node of the target node corresponding to the minimum collision quantity, wherein the neighborhood node is a new node determined by the target node corresponding to the minimum collision quantity;
determining a target child node corresponding to the neighborhood node, and calculating the conflict amount of the target child node, wherein the target child node is any one of the plurality of child nodes or at least one leaf node;
searching the preset bifurcation tree step by step upwards by taking the target child node as a reference node to obtain a correlation node of the target child node;
distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updating the conflict amount of the associated nodes according to the conflict amount of the target child node to obtain a first fork tree so as to complete the distribution of the transaction request data;
determining a target path according to the collision amount of each node of the first fork tree, wherein the target path is used for indicating an optimal path for processing a plurality of transaction request data.
It can be seen that, in the data scheduling method described in the embodiment of the present application, a preset bifurcation tree is obtained, where each node of the preset bifurcation tree corresponds to one service processing unit; searching a plurality of nodes and determining a plurality of target nodes; in the searching process, determining the conflict amount corresponding to each target node; judging whether the target node corresponding to the minimum conflict quantity is a leaf node or not; if the node is a leaf node, determining a neighborhood node of the target node corresponding to the minimum conflict quantity; determining a target child node corresponding to the neighborhood node, and calculating the conflict amount of the target child node; searching a preset bifurcation tree upwards step by taking the target child node as a reference node to obtain a correlation node of the target child node; distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updating the conflict quantity of the associated nodes according to the conflict quantity of the target child nodes to obtain a first fork tree so as to complete the distribution of the transaction request data; and determining a target path according to the collision quantity of each node of the first fork tree. Therefore, the nodes are subjected to iterative selection judgment in the searching process of the preset bifurcation tree, the searching range is gradually converged from a complex tree structure space, the efficiency of client transaction data scheduling is finally guaranteed, and lower delay, higher efficiency and better user experience are provided.
In one possible example, each node of the at least one node includes corresponding node information including access number information of the each node;
said searching said plurality of nodes to determine a plurality of target nodes, said program comprising instructions for:
searching the plurality of nodes, and determining a starting node from the plurality of nodes;
judging whether the starting node is the leaf node;
if the starting node is not the leaf node, acquiring the access times information of the target nodes, wherein the target nodes are child nodes of the starting node;
determining whether an unvisited child node exists in the target nodes according to the access frequency information;
if one or more of the unvisited child nodes exist, determining the target node from the unvisited child nodes;
and updating the access time information of the target node, and distributing one transaction request datum for the target node.
In one possible example, before determining the amount of conflict for each target node, the program includes instructions for:
determining the transaction heat of at least one customer in a target time period, wherein the transaction heat is used for indicating the occupation condition of each customer in the at least one customer on the service processing unit corresponding to each target node in the target time period;
determining the average transaction heat of each customer in the target time period according to the transaction heat;
determining the average load of each service processing unit in the target time period according to the sum of the average transaction heat degrees;
and determining the conflict amount of the service processing unit corresponding to each target node according to the average load.
In one possible example, the determining the conflict amount of the traffic processing unit corresponding to each target node according to the average load includes instructions for:
if the average load is greater than or equal to a preset threshold value, determining a first parameter and a second parameter, and determining the collision quantity according to the first parameter, the second parameter and the average load, wherein the first parameter and/or the second parameter are/is used for representing a mapping relation between the collision quantity and the average load;
if the average load is smaller than the preset threshold, determining that the collision amount of the service processing unit corresponding to each target node is 0.
In one possible example, the determining the target child node corresponding to the neighborhood node comprises instructions for:
determining the target child node according to an allocation rule, wherein the allocation rule refers to a node allocation rule inherited by the neighborhood node from the target node corresponding to the minimum conflict amount, and the node allocation rule is used for indicating the upper limit of the number of the target child nodes;
determining a node distribution rule of a target node corresponding to the minimum conflict amount;
and determining the target child node according to the node distribution rule.
In one possible example, the program includes instructions for performing the steps of:
in the process of searching the preset bifurcation tree upwards step by step, the target child node is taken as the reference node, and the associated node is obtained through upwards searching;
accumulating the conflict amount of the target child node to the associated node, and updating the conflict amount and the access time information of the associated node;
judging whether the associated node is the root node or not;
if the associated node is not the root node, the associated node is taken as the reference node, the step of searching the preset bifurcation tree step by step upwards is continuously executed, the next associated node is obtained, and the step of searching the preset bifurcation tree step by step upwards is stopped until the associated node is determined to be the root node.
In one possible example, before said determining a target path based on said collision volume for each node of said first bifurcation tree, the above program comprises instructions for:
judging whether a preset time length is used up, wherein the preset time length is used for limiting the time length of the execution of the searching process;
and if the preset time length is determined to be exhausted, stopping executing the searching process.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the server includes hardware structures and/or software modules for performing the respective functions in order to implement the above-described functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the server may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that, in the embodiment of the present application, the division of the unit is schematic, and is only one logic function division, and when the actual implementation is realized, another division manner may be provided.
In the case of dividing each functional module by corresponding functions, fig. 5 shows a functional unit structure diagram of a data scheduling apparatus, as shown in fig. 5, the data scheduling apparatus 500 is applied to a server, the data scheduling apparatus 500 may include an obtaining unit 501, a processing unit 502, a judging unit 503, an updating unit 504, an allocating unit 505, and a determining unit 506, wherein,
the acquisition unit 501 may be used to support the server performing step S101 described above, and/or other processes for the techniques described herein.
The determination unit 503 may be used to support the server performing the above step S104, and/or other processes for the techniques described herein.
The determination unit 506 may be used to support the server performing step S109 described above, and/or other processes for the techniques described herein.
It can be seen that, in the data scheduling apparatus provided in the embodiment of the present application, a preset bifurcation tree may be obtained through an obtaining unit, where each node of the preset bifurcation tree corresponds to one service processing unit; searching a plurality of nodes through a processing unit, determining a plurality of target nodes, and determining the conflict amount corresponding to each target node in the searching process; the judging unit judges whether the target node corresponding to the minimum conflict quantity is a leaf node; if the node is a leaf node, the processing unit determines a neighborhood node of the target node corresponding to the minimum conflict quantity; determining a target child node corresponding to the neighborhood node, and calculating the conflict amount of the target child node; searching a preset bifurcation tree upwards step by taking the target child node as a reference node to obtain a correlation node of the target child node; the distribution unit distributes a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updates the conflict quantity of the associated nodes according to the conflict quantity of the target child nodes to obtain a first fork tree so as to complete the distribution of the transaction request data; the determining unit determines a target path according to the collision amount of each node of the first bifurcation tree. Therefore, the nodes are subjected to iterative selection judgment in the searching process of the preset bifurcation tree, the searching range is gradually converged from a complex tree structure space, the high efficiency of client transaction data scheduling is finally ensured, and the user experience with lower delay, higher efficiency and better quality is provided.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The server provided by the embodiment is used for executing the data scheduling method, so that the same effect as the implementation method can be achieved.
In case of an integrated unit, the server may comprise a processing module, a storage module and a communication module. The processing module may be configured to control and manage actions of the server, for example, may be configured to support the server to execute the steps executed by the processing unit 502. The storage module may be used to support server execution, storage of program code and data, and the like. And the communication module can be used for supporting the communication between the server and other equipment.
The processing module may be a processor or a controller. Which may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein. A processor may also be a combination of computing functions, e.g., a combination comprising one or more microprocessors, a combination of Digital Signal Processing (DSP) and microprocessors, etc. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip, a Wi-Fi chip, or other devices that interact with other servers.
Embodiments of the present application further provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments, and the computer includes a server.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the methods as set out in the above method embodiments. The computer program product may be a software installation package, the computer comprising a server.
It should be noted that for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art will recognize that the embodiments described in this specification are preferred embodiments and that acts or modules referred to are not necessarily required for this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash memory disks, read-only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. A data scheduling method is applied to a server, the server comprises at least one service processing unit, and the method comprises the following steps:
acquiring a preset bifurcation tree, wherein the preset bifurcation tree consists of a plurality of nodes, the plurality of nodes comprise a root node, a plurality of child nodes and a plurality of leaf nodes, and each node corresponds to one service processing unit;
searching the plurality of nodes and determining a plurality of target nodes;
determining a conflict amount corresponding to each target node in the searching process, wherein the conflict amount is used for indicating the number of conflicts generated when the business processing unit processes transaction request data;
judging whether a target node corresponding to the minimum conflict quantity is the leaf node or not;
if the target node corresponding to the minimum conflict quantity is the leaf node, determining a neighborhood node of the target node corresponding to the minimum conflict quantity, wherein the neighborhood node is a new node determined by the target node corresponding to the minimum conflict quantity;
determining a target child node corresponding to the neighborhood node, and calculating the conflict amount of the target child node, wherein the target child node is any one of the child nodes or the leaf nodes;
searching the preset bifurcation tree step by step upwards by taking the target child node as a reference node to obtain a correlation node of the target child node;
distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updating the conflict amount of the associated nodes according to the conflict amount of the target child node to obtain a first fork tree so as to complete the distribution of the transaction request data;
determining a target path according to the collision amount of each node of the first fork tree, wherein the target path is used for indicating an optimal path for processing a plurality of transaction request data.
2. The method of claim 1, wherein each node of the at least one node comprises corresponding node information, and the node information comprises access time information of the each node;
the searching the plurality of nodes and determining a plurality of target nodes comprises:
searching the plurality of nodes, and determining a starting node from the plurality of nodes;
judging whether the starting node is the leaf node;
if the starting node is not the leaf node, acquiring the access times information of the target nodes, wherein the target nodes are child nodes of the starting node;
determining whether an unvisited child node exists in the target nodes according to the access frequency information;
if one or more of the unvisited child nodes exist, determining the target node from the unvisited child nodes;
and updating the access times information of the target node, and distributing one transaction request datum for the target node.
3. The method of claim 2, wherein prior to determining the amount of conflict for each target node, the method further comprises:
determining the transaction heat of at least one customer in a target time period, wherein the transaction heat is used for indicating the occupation condition of each customer in the at least one customer on the service processing unit corresponding to each target node in the target time period;
determining the average transaction heat of each customer in the target time period according to the transaction heat;
determining the average load of each service processing unit in the target time period according to the sum of the average transaction heat degrees;
and determining the conflict amount of the service processing unit corresponding to each target node according to the average load.
4. The method according to claim 3, wherein said determining the collision amount of the traffic processing unit corresponding to each target node according to the average load comprises:
if the average load is greater than or equal to a preset threshold value, determining a first parameter and a second parameter, and determining the collision quantity according to the first parameter, the second parameter and the average load, wherein the first parameter and/or the second parameter are/is used for representing a mapping relation between the collision quantity and the average load;
if the average load is smaller than the preset threshold, determining that the collision amount of the service processing unit corresponding to each target node is 0.
5. The method of claim 4, wherein the determining the target child node corresponding to the neighborhood node comprises:
determining the target child node according to an allocation rule, wherein the allocation rule refers to an allocation rule corresponding to the neighborhood node inheriting a node allocation rule of a target node corresponding to the minimum conflict amount, and the node allocation rule is used for indicating an upper limit of the number of the target child nodes;
determining a node distribution rule of a target node corresponding to the minimum conflict amount;
and determining the target child node according to the node distribution rule.
6. The method according to claim 1 or 2, characterized in that the method further comprises:
in the process of searching the preset bifurcation tree upwards step by step, the target child node is taken as the reference node, and the associated node is obtained through upwards searching;
accumulating the conflict amount of the target child node to the associated node, and updating the conflict amount and the access time information of the associated node;
judging whether the associated node is the root node or not;
if the associated node is not the root node, the associated node is taken as the reference node, the step of searching the preset bifurcation tree step by step upwards is continuously executed, the next associated node is obtained, and the step of searching the preset bifurcation tree step by step upwards is stopped until the associated node is determined to be the root node.
7. The method of claim 1, wherein before determining a target path based on the collision volume for each node of the first bifurcation tree, the method further comprises:
judging whether a preset time length is used up, wherein the preset time length is used for limiting the time length of the execution of the searching process;
and if the preset time length is determined to be exhausted, stopping executing the searching process.
8. A data scheduling device is applied to a server, the server comprises at least one service processing unit, the device comprises an acquisition unit, a processing unit, a judgment unit, an updating unit, an allocation unit and a determination unit: wherein,
the acquiring unit is configured to acquire a preset bifurcation tree, where the preset bifurcation tree is composed of a plurality of nodes, the plurality of nodes include a root node, a plurality of child nodes, and a plurality of leaf nodes, and each node corresponds to one service processing unit;
the processing unit is used for searching the plurality of nodes and determining a plurality of target nodes; and determining a conflict amount corresponding to each target node in the searching process, wherein the conflict amount is used for indicating the number of conflicts generated when the business processing unit processes the transaction request data;
the judging unit is configured to judge whether a target node corresponding to the minimum collision amount is the leaf node;
the processing unit is further configured to determine a neighborhood node of the target node corresponding to the minimum collision volume if the target node corresponding to the minimum collision volume is the leaf node, where the neighborhood node is a new node determined by the target node corresponding to the minimum collision volume; and the conflict calculation module is used for determining a target child node corresponding to the neighborhood node and calculating the conflict amount of the target child node, wherein the target child node is any one of the plurality of child nodes or at least one leaf node;
the updating unit is used for searching the preset bifurcation tree upwards step by taking the target child node as a reference node to obtain a relevant node of the target child node;
the distribution unit is used for distributing a plurality of transaction request data to the neighborhood nodes and the associated nodes, and updating the conflict quantity of the associated nodes according to the conflict quantity of the target child node to obtain a first fork tree so as to complete the distribution of the transaction request data;
the determining unit is configured to determine a target path according to the collision amount of each node of the preset bifurcation tree, where the target path is used to indicate an optimal path for processing a plurality of transaction request data.
9. A server, comprising a processor, memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211081425.0A CN115174582B (en) | 2022-09-06 | 2022-09-06 | Data scheduling method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211081425.0A CN115174582B (en) | 2022-09-06 | 2022-09-06 | Data scheduling method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115174582A true CN115174582A (en) | 2022-10-11 |
CN115174582B CN115174582B (en) | 2022-11-18 |
Family
ID=83482296
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211081425.0A Active CN115174582B (en) | 2022-09-06 | 2022-09-06 | Data scheduling method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115174582B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117076542A (en) * | 2023-08-29 | 2023-11-17 | 中国中金财富证券有限公司 | Data processing method and related device |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6480849B1 (en) * | 1998-10-27 | 2002-11-12 | Electronics And Telecommunications Research Institute | Efficient concurrency control method for high dimensional index structures |
US20040135674A1 (en) * | 2002-10-18 | 2004-07-15 | Wayne Shanks | Method for the efficient reading of a population of radio frequency identification tags with unique identification numbers over a noisy air channel |
CN101009636A (en) * | 2006-01-26 | 2007-08-01 | 华为技术有限公司 | Dynamic management method for the multicast service members of the automatic switching optical network |
CN103793391A (en) * | 2012-10-30 | 2014-05-14 | 宏碁股份有限公司 | Remote dynamic data processing and verifying method and system |
CN107153707A (en) * | 2017-05-12 | 2017-09-12 | 华中科技大学 | A kind of Hash table construction method and system for nonvolatile memory |
KR20180014602A (en) * | 2016-08-01 | 2018-02-09 | 삼성에스디에스 주식회사 | Method and apparatus for profiling a pattern of resident by analyzing event log |
CN107679049A (en) * | 2016-08-02 | 2018-02-09 | 北京京东尚科信息技术有限公司 | Obtain the method, apparatus and system of the hop of tree structure data two |
CN107679983A (en) * | 2017-10-20 | 2018-02-09 | 京北方信息技术股份有限公司 | Amount tree constructing method and device, amount take route inspection method and apparatus |
CN111131015A (en) * | 2019-12-27 | 2020-05-08 | 芯启源(南京)半导体科技有限公司 | Method for dynamically updating route based on PC-Trie |
CN113220685A (en) * | 2021-05-11 | 2021-08-06 | 支付宝(杭州)信息技术有限公司 | Traversal method and device for intelligent contract storage content and electronic equipment |
CN113835823A (en) * | 2020-06-23 | 2021-12-24 | 中兴通讯股份有限公司 | Resource scheduling method and device, electronic equipment and computer readable storage medium |
CN113885567A (en) * | 2021-10-22 | 2022-01-04 | 北京理工大学 | Multi-unmanned aerial vehicle collaborative path planning method based on conflict search |
-
2022
- 2022-09-06 CN CN202211081425.0A patent/CN115174582B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6480849B1 (en) * | 1998-10-27 | 2002-11-12 | Electronics And Telecommunications Research Institute | Efficient concurrency control method for high dimensional index structures |
US20040135674A1 (en) * | 2002-10-18 | 2004-07-15 | Wayne Shanks | Method for the efficient reading of a population of radio frequency identification tags with unique identification numbers over a noisy air channel |
CN101009636A (en) * | 2006-01-26 | 2007-08-01 | 华为技术有限公司 | Dynamic management method for the multicast service members of the automatic switching optical network |
CN103793391A (en) * | 2012-10-30 | 2014-05-14 | 宏碁股份有限公司 | Remote dynamic data processing and verifying method and system |
KR20180014602A (en) * | 2016-08-01 | 2018-02-09 | 삼성에스디에스 주식회사 | Method and apparatus for profiling a pattern of resident by analyzing event log |
CN107679049A (en) * | 2016-08-02 | 2018-02-09 | 北京京东尚科信息技术有限公司 | Obtain the method, apparatus and system of the hop of tree structure data two |
CN107153707A (en) * | 2017-05-12 | 2017-09-12 | 华中科技大学 | A kind of Hash table construction method and system for nonvolatile memory |
CN107679983A (en) * | 2017-10-20 | 2018-02-09 | 京北方信息技术股份有限公司 | Amount tree constructing method and device, amount take route inspection method and apparatus |
CN111131015A (en) * | 2019-12-27 | 2020-05-08 | 芯启源(南京)半导体科技有限公司 | Method for dynamically updating route based on PC-Trie |
CN113835823A (en) * | 2020-06-23 | 2021-12-24 | 中兴通讯股份有限公司 | Resource scheduling method and device, electronic equipment and computer readable storage medium |
CN113220685A (en) * | 2021-05-11 | 2021-08-06 | 支付宝(杭州)信息技术有限公司 | Traversal method and device for intelligent contract storage content and electronic equipment |
CN113885567A (en) * | 2021-10-22 | 2022-01-04 | 北京理工大学 | Multi-unmanned aerial vehicle collaborative path planning method based on conflict search |
Non-Patent Citations (1)
Title |
---|
廖凯; 张润涛; 杨子安; 向悦萍; 何正友: "交通能源融合大数据平台架构与应用", 《电力系统自动化》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117076542A (en) * | 2023-08-29 | 2023-11-17 | 中国中金财富证券有限公司 | Data processing method and related device |
CN117076542B (en) * | 2023-08-29 | 2024-06-07 | 中国中金财富证券有限公司 | Data processing method and related device |
Also Published As
Publication number | Publication date |
---|---|
CN115174582B (en) | 2022-11-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6998964B2 (en) | Methods and equipment for determining the geofence index grid | |
CN113377540A (en) | Cluster resource scheduling method and device, electronic equipment and storage medium | |
CN109788489B (en) | Base station planning method and device | |
CN105843666B (en) | Based on the virtual machine placement method of multiple-objection optimization in cloud computing | |
CN115174582B (en) | Data scheduling method and related device | |
CN114416352A (en) | Computing resource allocation method and device, electronic equipment and storage medium | |
CN113094183B (en) | Training task creating method, device, system and medium of AI (Artificial Intelligence) training platform | |
US20220229701A1 (en) | Dynamic allocation of computing resources | |
CN111538867A (en) | Method and system for dividing bounded incremental graph | |
CN112333260A (en) | Cloud computing task scheduling method and cloud computing system | |
CN109361750A (en) | Resource allocation methods, device, electronic equipment, storage medium | |
CN111694756A (en) | Application program testing method and device | |
CN113835823A (en) | Resource scheduling method and device, electronic equipment and computer readable storage medium | |
CN114205317B (en) | SDN and NFV-based service function chain SFC resource allocation method and electronic equipment | |
CN115827253A (en) | Chip resource calculation allocation method, device, equipment and storage medium | |
CN115640117A (en) | Micro-service instance deployment method and device based on resource allocation | |
CN109041236B (en) | Wireless resource allocation method and device for services with different weights | |
CN112650449A (en) | Release method and release system of cache space, electronic device and storage medium | |
CN116880968A (en) | Job scheduling method and scheduling system | |
CN116737370A (en) | Multi-resource scheduling method, system, storage medium and terminal | |
CN112882805A (en) | Profit optimization scheduling method based on task resource constraint | |
JP2013030107A (en) | Reservation management device, reservation management method, reservation management program, and computer-readable recording medium storing program | |
CN109450684B (en) | Method and device for expanding physical node capacity of network slicing system | |
CN110096352A (en) | Process management method, device and computer readable storage medium | |
CN115454574A (en) | Container deployment method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |