Load balancing method and device, electronic equipment, storage medium and computer program product

By building directed acyclic graphs and optimizing task scheduling using reinforcement learning and ant colony system algorithm, the problem of unreasonable task scheduling of load balancing methods in the anti-fraud control system is solved, and the accuracy of load balancing and resource utilization efficiency is improved. Real-time requirements for anti-fraud scenarios.

CN119201473APending Publication Date: 2024-12-27CHINA MOBILE GROUP ZHEJIANG +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411504055.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The load balancing method of the existing anti-fraud control system fails to effectively consider task dependencies, communication overhead and server specifications, resulting in unreasonable task scheduling, low load balancing accuracy, insufficient resource utilization, and lagging behind in execution of high-priority tasks.

Method used

By constructing a directed acyclic graph, task priority is sorted based on initial weights, calculation amount, call dependency and communication overhead, and the scheduling strategy is determined using improved reinforcement learning algorithms and ant colony system algorithms to optimize task scheduling.

Benefits of technology

It improves the accuracy of load balancing and resource utilization efficiency, avoids hunger at high priority tasks, shortens processing time, and meets the real-time monitoring requirements of anti-fraud scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201473A_ABST
    Figure CN119201473A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a load balancing method and device, electronic equipment, a storage medium and a computer program product, and the method comprises the steps: carrying out the task construction according to to-be-processed multivariate heterogeneous data, and obtaining at least one anti-fraud management and control task; the sources of the multivariate heterogeneous data to be processed include but are not limited to a security management mechanism, a service providing unit and a social service unit; constructing a directed acyclic graph according to the initial weight of each anti-fraud management and control task, the calculated amount of each anti-fraud management and control task, the calling dependence between the anti-fraud management and control tasks and the communication overhead between the anti-fraud management and control tasks; performing priority ranking of each anti-fraud management and control task based on the directed acyclic graph; and scheduling the anti-fraud management and control tasks after the priority ranking. According to the method, the scheduling of the anti-fraud management and control task constructed based on the to-be-processed multivariate heterogeneous data is more reasonable, so that the accuracy of load balancing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a load balancing method, device, electronic device, storage medium and computer program product. Background Art

[0002] The current anti-fraud control system is deployed in multiple cross-departmental domains such as public security, operators, banks, community offices, enterprises, and schools, forming relatively independent heterogeneous subsystems. At the data level, each heterogeneous subsystem controls and identifies multi-dimensional data within its own environment and jurisdiction; at the task level, each heterogeneous subsystem sets monitoring tasks of different contents and forms based on data distribution and prior experience, and there is a dependency relationship between tasks; at the data interaction level, each heterogeneous subsystem realizes communication transmission through channels such as Application Programming Interface (API), Kafka, ETL, Secure File Transfer Protocol (SFTP), table authorization and table subscription, and the communication bandwidth and occupancy pressure between heterogeneous subsystems are different; at the hardware level, each heterogeneous subsystem has servers with different specifications and processing capabilities. Among them, Kafka is a distributed stream processing platform for building real-time data pipelines and streaming applications. ETL is a data processing process used to extract data from multiple data sources, transform it, and load it into the target database or data warehouse.

[0003] In this context, the current load balancing solution for anti-fraud control systems is that each heterogeneous subsystem develops different load balancing methods and task scheduling mechanisms based on its own data, tasks, servers, and communication transmission conditions.

[0004] However, there are task dependencies between the above-mentioned heterogeneous subsystems. If load balancing is performed according to the above-mentioned load balancing method based on the anti-fraud control system, unreasonable task scheduling problems may easily occur, resulting in low accuracy of load balancing. Summary of the invention

[0005] The present application aims to solve at least one of the technical problems existing in the related art. To this end, the present application proposes a load balancing method, device, electronic device, storage medium and computer program product to solve the problem that the current load balancing method based on the anti-fraud control system is prone to unreasonable task scheduling, so as to improve the accuracy of load balancing.

[0006] The load balancing method according to the first aspect of the present application includes: According to the multivariate heterogeneous data to be processed, tasks are constructed to obtain at least one anti-fraud control task; the sources of the multivariate heterogeneous data to be processed include but are not limited to security management agencies, service providers and social service units; Construct a directed acyclic graph based on the initial weight of each anti-fraud control task, the computational complexity of each anti-fraud control task, the call dependencies between each anti-fraud control task, and the communication overhead between each anti-fraud control task; Prioritize each anti-fraud control task based on the directed acyclic graph; Schedule the anti-fraud control tasks after priority sorting.

[0007] According to an embodiment of the present application, scheduling the priority-sorted anti-fraud control tasks includes: Based on the improved reinforcement learning algorithm, the initial scheduling strategy of each anti-fraud control task after priority sorting is determined; the improved reinforcement learning algorithm is based on the original reinforcement learning algorithm, defines actions based on call dependencies and designs rewards as immediate positive rewards, long-term positive rewards and negative rewards; Based on the initial scheduling strategy, each anti-fraud control task is scheduled.

[0008] According to an embodiment of the present application, scheduling each anti-fraud control task based on the initial scheduling strategy includes: The initial scheduling strategy is used as the initial pheromone, and the path is optimized through the ant colony system algorithm to obtain the target scheduling strategy; According to the target scheduling strategy, each anti-fraud control task is scheduled.

[0009] According to an embodiment of the present application, the priority sorting of each anti-fraud control task based on the directed acyclic graph includes: Determine the priority calculation method for each anti-fraud control task; According to the priority calculation method corresponding to the directed acyclic graph and each anti-fraud control task, each anti-fraud control task is prioritized.

[0010] According to an embodiment of the present application, the priority calculation method for respectively determining each anti-fraud control task includes: Determine the task type of each anti-fraud control task respectively; the task types include communication task concentration type, computing task concentration type and task averaging type; For each type of anti-fraud control task, determine the corresponding priority calculation method.

[0011] According to an embodiment of the present application, for each type of anti-fraud control task, the corresponding priority calculation method is determined respectively, including: According to the correlation between the task type and the priority calculation method, the priority calculation method corresponding to the anti-fraud control task of each task type is determined respectively.

[0012] According to the load balancing device of the second aspect of the present application, the load balancing device includes: The first construction module is used to construct tasks according to the multivariate heterogeneous data to be processed to obtain at least one anti-fraud control task; the sources of the multivariate heterogeneous data to be processed include but are not limited to security management agencies, service providers and social service units; The second construction module is used to construct a directed acyclic graph according to the initial weight of each anti-fraud control task, the computational amount of each anti-fraud control task, the call dependency between each anti-fraud control task, and the communication overhead between each anti-fraud control task; A sorting module, used to sort the priorities of various anti-fraud control tasks based on the directed acyclic graph; The scheduling module is used to schedule the anti-fraud control tasks after priority sorting.

[0013] According to an electronic device of an embodiment of the third aspect of the present application, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the load balancing method described above is implemented.

[0014] According to the storage medium of the fourth aspect embodiment of the present application, the storage medium is a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the load balancing methods described above.

[0015] A computer program product according to an embodiment of the fifth aspect of the present application includes a computer program, which, when executed by a processor, implements any of the load balancing methods described above.

[0016] The above one or more technical solutions in the embodiments of the present application have at least the following technical effects: After obtaining at least one anti-fraud control task by constructing tasks based on the to-be-processed multivariate heterogeneous data from sources including but not limited to security management agencies, service providers and social service units, a directed acyclic graph is constructed according to the initial weights of each anti-fraud control task, the computational amount of each anti-fraud control task, the calling dependencies between the anti-fraud control tasks, and the communication overhead between the anti-fraud control tasks. This improves the ability to control and extract dimensional information such as the computational amount, initial weight, dependency between tasks, and communication overhead of each task in the anti-fraud scenario, so that the anti-fraud control tasks can be accurately prioritized based on the directed acyclic graph, and then the scheduling of the anti-fraud control tasks after priority sorting is more reasonable, thereby improving the accuracy of load balancing.

[0017] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a flow chart of the load balancing method provided in the embodiment of the present application.

[0020] Figure 2 It is a schematic diagram of a directed acyclic graph of the load balancing method provided in an embodiment of the present application.

[0021] Figure 3 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION

[0022] The following is a further detailed description of the implementation of the present application in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but cannot be used to limit the scope of the present application.

[0023] In the description of the embodiments of the present application, it should be noted that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the embodiments of the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.

[0024] In the description of the embodiments of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.

[0025] In the embodiments of the present application, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0026] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0027] It should be noted that the current load balancing method does not take into account the computing and communication overhead of all tasks in the end-to-end anti-fraud control system as a whole, nor does it prioritize tasks by category. There are situations where task scheduling is not timely, resource utilization is insufficient, and high-priority tasks are executed late.

[0028] The current load balancing method also fails to consider the overall dependencies between tasks in heterogeneous systems, which may result in the predecessor-dependent task nodes not being completed for a long time, while the downstream collateral nodes are completed first. As a result, the current core task nodes are in a hungry state for a long time and no resources are allocated.

[0029] The current load balancing method also does not take into account the communication transmission overhead between heterogeneous systems as a whole. In anti-fraud scenarios, the amount of data such as Deep Packet Inspection (DPI) log data, telephone media stream data, and SMS signaling data is extremely large, and the data transmission methods between heterogeneous systems are different. There are defects such as unreasonable task scheduling and bandwidth utilization, which prolongs the overall processing time.

[0030] The current load balancing method does not take into account the server specifications and processing capabilities of each subsystem as a whole, resulting in unbalanced processor loads, serious task queuing for processors with heavy loads, and failure of processors with light loads to perform to their full potential.

[0031] The current load balancing method fails to take into account the task nature, task structure, communication transmission, processor load and other information of the end-to-end system as a whole. The delays in identification, blocking, crackdown and publicity achieved remain at the multi-day level, which is far from meeting the real-time monitoring requirements of anti-fraud scenarios.

[0032] Based on the above problems, the present application proposes a load balancing method, device, electronic device, storage medium and computer program product.

[0033] Figure 1 is a flow chart of the load balancing method provided in the embodiment of the present application, such as Figure 1 As shown, the load balancing method includes: Step 110, constructing tasks based on the multivariate heterogeneous data to be processed to obtain at least one anti-fraud control task; sources of the multivariate heterogeneous data to be processed include but are not limited to security management agencies, service providers and social service units.

[0034] Step 120, construct a directed acyclic graph according to the initial weight of each anti-fraud control task, the computational load of each anti-fraud control task, the calling dependency between each anti-fraud control task, and the communication overhead between each anti-fraud control task.

[0035] Step 130: Prioritize each anti-fraud control task based on the directed acyclic graph.

[0036] Step 140, scheduling the priority-sorted anti-fraud control tasks.

[0037] It should be noted that the executor of the load balancing method provided in the embodiment of the present application can be a server, a computer device, etc., such as a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc.

[0038] A load balancing device may be provided or connected to the server or computer equipment of the present application, thereby controlling the load balancing device to execute the load balancing method of the present application.

[0039] This application can obtain data related to anti-fraud control from heterogeneous systems including but not limited to security management agencies, service providers and social service units as multivariate heterogeneous data to be processed. Among them, the security management agency can be a designated security agency, the service provider can be an operator, and the social service unit can be including but not limited to banks, community offices, enterprises and schools.

[0040] Furthermore, tasks for processing multivariate heterogeneous data can be constructed according to types such as security agencies, operators, banks, community offices, enterprises and schools, thereby constructing at least one anti-fraud control task.

[0041] It should be noted that each heterogeneous system is deployed in the intranet environment of each company or department. Through a non-core domain machine and public IP (Internet Protocol) port mapping, and opening the firewall of the other end's public IP->one's own public IP->non-core machine, task requests from other subsystems are accepted on this machine and forwarded to the core domain server for task processing and execution.

[0042] The server parameters include , each parameter represents the number of CPU (Central Processing Unit) cores, memory, bandwidth between servers, and hard disk storage.

[0043] Thus, a server topology map can be constructed to assist in task scheduling.

[0044] In some embodiments, the 30 anti-fraud control tasks constructed are shown in Table 1, Table 2 and Table 3 below, and the contents in Table 1, Table 2 and Table 3 are connected in sequence: Table 1

[0045] .

[0046] Table 2

[0047] .

[0048] Table 3

[0049] .

[0050] It should be noted that each anti-fraud control task constructed in the present application may include an initial weight representing the importance of the task and the amount of computation required for the execution of each task.

[0051] In addition, based on the constructed anti-fraud control tasks, the call dependencies between the anti-fraud control tasks and the communication overhead between the anti-fraud control tasks can also be obtained.

[0052] Furthermore, the present application may construct a directed acyclic graph (DAG) according to the initial weight of each anti-fraud control task, the computational complexity of each anti-fraud control task, the calling dependencies between each anti-fraud control task, and the communication overhead between each anti-fraud control task.

[0053] Specifically, the constructed directed acyclic graph can be represented as: ; in, Represents a collection of anti-fraud control tasks; each anti-fraud control task can have attributes , respectively represent the domain type to which the task belongs and the initial weight of the task; Represents the collection of call dependency links between anti-fraud control tasks; Represents the computational effort of each anti-fraud control task itself; Represents the communication overhead of each called communication link.

[0054] Figure 2 is a schematic diagram of a directed acyclic graph of a load balancing method provided in an embodiment of the present application, such as Figure 2 As shown, multiple anti-fraud control tasks such as 1-30 can be constructed based on the multivariate heterogeneous data to be processed, wherein the anti-fraud control tasks in different fields can also be distinguished in the form of different colors and / or pattern combinations. Figure 2 It can be seen that the anti-fraud control tasks of security agencies often serve as the initiators of anti-fraud tasks or the connecting nodes; the anti-fraud control tasks of operators serve as the data source, data processing and early warning provider; and the anti-fraud control tasks of communities, schools, enterprises and other units serve as the consumers and actual executors of the anti-fraud system.

[0055] Furthermore, after obtaining the directed acyclic graph, for each anti-fraud control task, priority calculation can be performed based on the information in the directed acyclic graph combined with the priority calculation method corresponding to the anti-fraud control task, thereby completing the priority sorting of each anti-fraud control task.

[0056] Furthermore, each anti-fraud control task after priority sorting can be scheduled. Specifically, in this application, the reinforcement learning algorithm Q-Learning is used to schedule each anti-fraud control task after priority sorting; the ant colony system algorithm can also be used to schedule each anti-fraud control task after priority sorting; and the reinforcement learning algorithm and the ant colony system algorithm can also be combined to schedule each anti-fraud control task after priority sorting. The Ant Colony System (AS) algorithm is a heuristic optimization algorithm based on the foraging behavior of ants in nature.

[0057] In this way, the scheduling of various anti-fraud control tasks can be completed.

[0058] This application classifies the tasks of various heterogeneous systems according to security agencies, operators, banks, community offices, enterprises and schools, and statistics the initial weights, computing power and communication overhead to form a directed acyclic graph. After prioritizing each anti-fraud control task according to the directed acyclic graph, the characteristic parameters are uniformly integrated into the subsequent reinforcement learning algorithm Q-learning and ant colony system algorithm, which solves the problems of untimely task scheduling, insufficient resource utilization and lagging execution of high-priority tasks in previous heterogeneous system load balancing methods.

[0059] According to the load balancing method of the embodiment of the present application, after obtaining at least one anti-fraud control task by constructing tasks based on the to-be-processed multi-variant heterogeneous data from sources including but not limited to security management agencies, service providers and social service units, a directed acyclic graph is constructed according to the initial weights of each anti-fraud control task, the computational amount of each anti-fraud control task, the calling dependencies between the anti-fraud control tasks, and the communication overhead between the anti-fraud control tasks. This improves the ability to control and extract dimensional information such as the computational amount, initial weight, inter-task dependency, and communication overhead of each task in the anti-fraud scenario, so that the anti-fraud control tasks can be accurately prioritized based on the directed acyclic graph, and then the scheduling of the anti-fraud control tasks after priority sorting is more reasonable, thereby improving the accuracy of load balancing.

[0060] Based on the above embodiment, the priority of each anti-fraud control task is sorted based on a directed acyclic graph, including: Determine the priority calculation method for each anti-fraud control task; According to the priority calculation method corresponding to the directed acyclic graph and each anti-fraud control task, the priority of each anti-fraud control task is sorted.

[0061] In this application, a corresponding priority calculation method can be set in advance for different task types, so as to accurately prioritize each anti-fraud control task. Specifically, the task types in this application can include communication task concentration, computing task concentration, and task averaging.

[0062] Therefore, the present application can determine the task type of each anti-fraud control task respectively, and further determine the priority calculation method of the corresponding anti-fraud control task according to the task type.

[0063] After obtaining the priority calculation method corresponding to each anti-fraud control task, for each anti-fraud control task, this application can calculate according to the priority calculation method of the anti-fraud control task and combine the information related to the anti-fraud control task in the directed acyclic graph to obtain the priority information of the anti-fraud control task.

[0064] After obtaining the priority information of each anti-fraud control task, the priority of each anti-fraud control task can be sorted according to the priority information.

[0065] This application develops a priority calculation method related to the nature of the task for anti-fraud control tasks in different fields, focusing on the specific attributes of the task, thereby improving the rationality and necessity of task scheduling and resource allocation, avoiding the problem of high-priority tasks starving, and thus improving the accuracy of load balancing.

[0066] Furthermore, the priority calculation method corresponding to each anti-fraud control task is determined separately, including: Determine the task type of each anti-fraud control task respectively; the task types include communication task concentration type, computing task concentration type and task averaging type; For each type of anti-fraud control task, determine the corresponding priority calculation method.

[0067] This application is based on the nature of the anti-fraud control task, and for each anti-fraud control task, the task type corresponds to the nature of the task.

[0068] After obtaining the task type of each anti-fraud control task, the priority calculation method corresponding to the anti-fraud control task of each task type can be determined according to the correlation between the task type and the priority calculation method.

[0069] For example: for anti-fraud control tasks of the nature of security agencies, the task type is determined to be communication task concentrated; for anti-fraud control tasks of the nature of operators, the task type is determined to be computing task concentrated; for anti-fraud control tasks of banks, community offices, schools and enterprises, the task type is determined to be task average.

[0070] This application develops a priority calculation method related to the nature of the task for anti-fraud control tasks in different fields, focusing on the specific attributes of the task, thereby improving the rationality and necessity of task scheduling and resource allocation, avoiding the problem of high-priority tasks starving, and thus improving the accuracy of load balancing.

[0071] Furthermore, for each type of anti-fraud control task, the corresponding priority calculation method is determined, including: According to the correlation between the task type and the priority calculation method, the priority calculation method corresponding to the anti-fraud control task of each task type is determined respectively.

[0072] Since there is a correlation between the task type and the priority calculation method, for each anti-fraud control task, the corresponding priority calculation method can be determined according to its task type.

[0073] Specifically, for an anti-fraud control task whose task type is a communication task-focused task, its priority calculation method can be determined as follows: * + ( + ; in, Represents the priority information of the i-th anti-fraud control task; ( Represents the priority information of the jth anti-fraud control task; represents the computational effort of the i-th anti-fraud control task; Represents all the subsequent nodes of the current task node; dynamic programming is used to recursively solve the priorities of all task nodes, and the priorities of leaf nodes are based on the initial Make an allocation; Communication overhead between task nodes i and j; represents the standard deviation of the communication overhead between task nodes i and j; represents a hyperparameter.

[0074] For anti-fraud control tasks whose task type is computing task-intensive, the priority calculation method can be determined as follows: ; in, Represents the priority information of the i-th anti-fraud control task; ( Represents the priority information of the jth anti-fraud control task; represents the computational effort of the i-th anti-fraud control task; Represents all the subsequent nodes of the current task node; dynamic programming is used to recursively solve the priorities of all task nodes, and the priorities of leaf nodes are based on the initial Make an allocation; Communication overhead between task nodes i and j; Represents the standard deviation of the computation amount of task node i; Represents a hyperparameter.

[0075] For anti-fraud control tasks of the task type of task average, the priority calculation method can be determined as follows: ; in, Represents the priority information of the i-th anti-fraud control task; ( Represents the priority information of the jth anti-fraud control task; represents the computational effort of the i-th anti-fraud control task; Represents all the subsequent nodes of the current task node; dynamic programming is used to recursively solve the priorities of all task nodes, and the priorities of leaf nodes are based on the initial Make an allocation; Communication overhead between task nodes i and j; Represents a hyperparameter.

[0076] This application develops a priority calculation method related to the nature of the task for anti-fraud control tasks in different fields, focusing on the specific attributes of the task, thereby improving the rationality and necessity of task scheduling and resource allocation, avoiding the problem of high-priority tasks starving, and thus improving the accuracy of load balancing.

[0077] Based on the above embodiment, the priority-sorted anti-fraud control tasks are scheduled, including: Based on the improved reinforcement learning algorithm, the initial scheduling strategy of each anti-fraud control task after priority sorting is determined; the improved reinforcement learning algorithm is based on the original reinforcement learning algorithm, defines actions based on call dependencies and designs rewards as immediate positive rewards, long-term positive rewards and negative rewards; Based on the initial scheduling strategy, various anti-fraud control tasks are scheduled.

[0078] It should be noted that the reinforcement learning algorithm Q-Learning is a value-based algorithm for reinforcement learning, which is mainly used to solve the optimal strategy in the Markov Decision Process (MDP). The value-based method is a type of algorithm that guides the behavior of the agent by estimating the value of the state or state-action pair (i.e., the expectation of future rewards). It has five basic characteristics: State: a specific state enumeration in the environment; Action: An operation that an agent can perform; Reward: Immediate feedback given by the environment after performing an action; Q-function: evaluates the expected return of taking a specific action in a specific state, usually expressed as Q(s,a); Policy: A function used by an agent to make decisions, defining the actions that should be taken in a given state.

[0079] In order to solve the problems of priority, dependency, calling overhead, computing overhead among different tasks in the anti-fraud heterogeneous system, and unbalanced server allocation, this application can perform multiple rounds of iterations based on the Q-learning algorithm to fit the optimal intelligent agent state, that is, the current optimal anti-fraud control task allocation server strategy, which is given as the initial pheromone to the downstream ant colony system algorithm.

[0080] For State expression, there are: ; Use the above formula to express the state information in the environment, where SD( ) indicates a task Assign to On, start execution.

[0081] For Action expressions, there are: [MOV ... ]; Use the above formula to express the set of actions that can be performed in the environment. Indicates that from the previous state Transfer to state, and there is a call link between the two states , and the firewalls between the upstream and downstream servers are open.

[0082] For the Reward expression, there are: The purpose of the reward function is to guide the agent to obtain the optimal scheduling strategy in the given environment information by obtaining positive / negative feedback data after taking actions, and finally give the shortest task completion length while ensuring that the server is not overloaded. The expression is as follows: ; in, Indicates the current state. Indicates the action to be performed. Indicates the transition state after executing the action. Indicates the positive or negative benefit of performing an action. Indicates the completion time of the task node in the current state; and Respectively The initial weight and priority of the task node in the state; , , , is a hyperparameter; For branch 1-immediate positive feedback: by calculating the difference in task completion time corresponding to the previous and next states, the smaller the difference, the greater the positive reward; and considering the initial weight and priority of the subsequent task, the weight and priority are positively correlated with the reward; For branch 2-long-term positive feedback: when When a leaf node is reached, it indicates that a call chain has been completed. Therefore, in this mode, hyperparameters are incorporated to encourage the agent to fit the goal of minimizing the overall completion time. For branch 3-negative feedback: when the next node meets the following conditions, negative feedback is performed to prevent the function from fitting in this direction: The total amount of computation allocated to the next server exceeds 90% of the CPU performance of the server; The memory and storage allocated to the next server have exceeded 95%; 90% of the bandwidth allocated to the next server is already occupied.

[0083] For the Q-function expression, we have: By building a Q-Table, each node Represents a distribution method, fitting a value matrix, the rows and columns represent the list of anti-fraud control tasks and the server list after priority arrangement; the agent obtains the corresponding benefit value and the value after taking action by continuously iterating the selection path. value, and thus use dynamic programming to finally fit the calling path with the maximum benefit, that is, the allocation strategy with the shortest completion, the expression is as follows: ; in, Represents the discount factor, which is used to determine the relative proportion of delayed rewards to immediate rewards. The larger it is, the more important the delayed rewards are. is the learning rate, which indicates the degree of retention of historical iteration information.

[0084] Therefore, based on the improved reinforcement learning algorithm, dynamic programming can be used to finally fit the call path with maximum benefit for each anti-fraud control task after priority sorting, thereby determining the initial scheduling strategy for each anti-fraud control task after priority sorting.

[0085] This application adapts and transforms several feature expressions such as Sate, Action, Reward, and Q function for anti-fraud scenarios. For example, Reward is divided into immediate positive rewards, long-term positive rewards, negative rewards, etc., and the task scheduling strategy is iteratively fitted. The defects of the ant colony system algorithm, such as the lack of initial pheromones and slow convergence speed, are solved. The problems will be more obvious and magnified under the requirements of accuracy and timeliness in the handling of anti-fraud scenarios, which will help improve the accuracy of load balancing.

[0086] Furthermore, based on the initial scheduling strategy, each anti-fraud control task is scheduled, including: The initial scheduling strategy is used as the initial pheromone, and the path is optimized through the ant colony system algorithm to obtain the target scheduling strategy; According to the target scheduling strategy, various anti-fraud control tasks are scheduled.

[0087] It should be noted that ants release a substance called "pheromone" on the path they pass through. Ants in the ant colony have the ability to perceive "pheromone", where the pheromone concentration is inversely proportional to the path length. They will walk along the path with a higher concentration of "pheromone", and each passing ant will leave "pheromone" on the road. The pheromone concentration on the path will gradually decay over time, forming a mechanism similar to positive feedback. After a period of time, the entire ant colony will reach the food source along the shortest path. The algorithm evolved from the above-mentioned ant food-finding mode is the ant colony system algorithm. This algorithm has the characteristics of distributed computing, information positive feedback and heuristic search, and is essentially a heuristic global path optimization algorithm in evolutionary algorithms.

[0088] In order to prevent the problem of slow convergence caused by too large a search space, the Q-table fitted above is introduced as the initial pheromone.

[0089] The ant colony system algorithm is integrated into the task scheduling and allocation of the anti-fraud control system, and tasks are selected and executed in order of priority.

[0090] For the state transition and scheduling strategy in the ant colony system algorithm, the state transition probability is: ; in, It represents pheromone, which is Q-Table; is the activation operator; Represents the load balancing operator, expressed as the inverse of the sum of the computational loads of all tasks on the server.

[0091] In order to obtain the global optimal scheduling method for the entire anti-fraud control system, the path is updated based on the Ant-Cycle-System algorithm to continuously obtain the latest pheromone data and optimize the completion length.

[0092] ; in, is the pheromone emission coefficient, which determines the amount of pheromone left by the ant on the path in each iteration; Represents the evaporation rate of pheromone. After each iteration, the pheromone on all paths will be reduced by a certain proportion to avoid the path being strengthened indefinitely. is the amount of pheromone increase on the path (i, j), which is usually proportional to the performance of the ant on the path; ; L is the length of the scheduling path obtained in the current iteration; Increases the coefficient for pheromones.

[0093] Based on this, the initial scheduling strategy is used as the initial pheromone of the ant colony system algorithm, and the path is further optimized through the ant colony system algorithm to obtain the target scheduling strategy; then, according to the target scheduling strategy, various anti-fraud control tasks can be scheduled quickly and accurately.

[0094] This application uses the initial scheduling strategy as the initial pheromone of the ant colony system algorithm, which provides the ant colony system algorithm with an initial scheduling strategy pheromone while reducing the task scheduling length and balancing the server load, thereby improving the speed and accuracy of convergence; and, by integrating the task attributes, inter-task dependencies, server specifications, initial scheduling strategy and other information extracted from the previous work, the Ant-Cycle-System algorithm is used for path update, which optimizes the completion length of tasks in the anti-fraud control system and the effective utilization rate of server resources, thereby improving the timeliness of the anti-fraud control system.

[0095] This application drives the execution of anti-fraud control tasks based on servers by receiving multi-dimensional heterogeneous data from operators, security agencies and other fields. Establish various forms of task dependency DAGs to obtain the predecessor and successor dependency relationships of tasks, as well as the computing amount of tasks, communication overhead between tasks and other attributes; establish server topology information to sort out the server firewall connectivity relationships of various heterogeneous systems, as well as server specification data; based on the task dependency DAG, use dynamic programming equations to derive the priority of each task; based on Q-learning iterative training, obtain the initial pheromone of the ant colony system algorithm, that is, the initial task scheduling allocation strategy; finally, based on the ant colony system algorithm, continuously update the task scheduling path and processor load mode, fit the optimal scheduling length and task execution time, solve the problem of uneven processor load, achieve a reduction in task scheduling length and a leap in processing time, and reach a quasi-real-time level.

[0096] The load balancing device provided in the present application is described below. The load balancing device described below and the load balancing method described above can refer to each other.

[0097] Furthermore, the present application also provides a load balancing device.

[0098] The load balancing device comprises: The first construction module is used to construct tasks according to the multivariate heterogeneous data to be processed to obtain at least one anti-fraud control task; the sources of the multivariate heterogeneous data to be processed include but are not limited to security management agencies, service providers and social service units; The second construction module is used to construct a directed acyclic graph according to the initial weight of each anti-fraud control task, the computational amount of each anti-fraud control task, the call dependency between each anti-fraud control task, and the communication overhead between each anti-fraud control task; A sorting module, used to sort the priorities of various anti-fraud control tasks based on the directed acyclic graph; The scheduling module is used to schedule the anti-fraud control tasks after priority sorting.

[0099] The load balancing device of the present application, after obtaining at least one anti-fraud control task by constructing tasks based on the to-be-processed multi-variant heterogeneous data from sources including but not limited to security management agencies, service providers and social service units, constructs a directed acyclic graph according to the initial weights of each anti-fraud control task, the computational amount of each anti-fraud control task, the calling dependencies between the anti-fraud control tasks, and the communication overhead between the anti-fraud control tasks, thereby improving the ability to control and extract dimensional information such as the computational amount, initial weight, dependency between tasks, and communication overhead of each task in the anti-fraud scenario, so that the anti-fraud control tasks can be accurately prioritized based on the directed acyclic graph, and then the scheduling of the anti-fraud control tasks after priority sorting is more reasonable, thereby improving the accuracy of load balancing.

[0100] In one embodiment, the sorting module is specifically used to: Determine the priority calculation method for each anti-fraud control task; According to the priority calculation method corresponding to the directed acyclic graph and each anti-fraud control task, each anti-fraud control task is prioritized.

[0101] In one embodiment, the sorting module includes a first determining unit, and the first determining unit is used to: Determine the task type of each anti-fraud control task respectively; the task types include communication task concentration type, computing task concentration type and task averaging type; For each type of anti-fraud control task, determine the corresponding priority calculation method.

[0102] In one embodiment, the sorting module comprises a second determining unit, wherein the second determining unit is configured to: According to the correlation between the task type and the priority calculation method, the priority calculation method corresponding to the anti-fraud control task of each task type is determined respectively.

[0103] In one embodiment, the scheduling module is specifically used to: Based on the improved reinforcement learning algorithm, the initial scheduling strategy of each anti-fraud control task after priority sorting is determined; the improved reinforcement learning algorithm is based on the original reinforcement learning algorithm, defines actions based on call dependencies and designs rewards as immediate positive rewards, long-term positive rewards and negative rewards; Based on the initial scheduling strategy, each anti-fraud control task is scheduled.

[0104] In one embodiment, the scheduling module includes a scheduling unit, and the scheduling unit is used to: The initial scheduling strategy is used as the initial pheromone, and the path is optimized through the ant colony system algorithm to obtain the target scheduling strategy; According to the target scheduling strategy, each anti-fraud control task is scheduled.

[0105] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the following method: constructing tasks according to the multivariate heterogeneous data to be processed to obtain at least one anti-fraud control task; the sources of the multivariate heterogeneous data to be processed include but are not limited to security management agencies, service providers and social service units; Construct a directed acyclic graph based on the initial weight of each anti-fraud control task, the computational complexity of each anti-fraud control task, the call dependencies between each anti-fraud control task, and the communication overhead between each anti-fraud control task; Prioritize each anti-fraud control task based on the directed acyclic graph; Schedule the anti-fraud control tasks after priority sorting.

[0106] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0107] On the other hand, the embodiments of the present application further provide a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the methods provided in the above embodiments, for example, including: constructing tasks according to the multivariate heterogeneous data to be processed to obtain at least one anti-fraud control task; the sources of the multivariate heterogeneous data to be processed include but are not limited to security management agencies, service providers and social service units; Construct a directed acyclic graph based on the initial weight of each anti-fraud control task, the computational complexity of each anti-fraud control task, the call dependencies between each anti-fraud control task, and the communication overhead between each anti-fraud control task; Prioritize each anti-fraud control task based on the directed acyclic graph; Schedule the anti-fraud control tasks after priority sorting.

[0108] On the other hand, the embodiments of the present application further provide a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the method provided by the above embodiments is implemented, for example, including: constructing tasks according to the multivariate heterogeneous data to be processed to obtain at least one anti-fraud control task; the source of the multivariate heterogeneous data to be processed includes but is not limited to a security management agency, a service provider, and a social service unit; Construct a directed acyclic graph based on the initial weight of each anti-fraud control task, the computational complexity of each anti-fraud control task, the call dependencies between each anti-fraud control task, and the communication overhead between each anti-fraud control task; Prioritize each anti-fraud control task based on the directed acyclic graph; Schedule the anti-fraud control tasks after priority sorting.

[0109] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0110] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.

[0111] Finally, it should be noted that the above implementation modes are only used to illustrate the present application, rather than to limit the present application. Although the present application is described in detail with reference to the embodiments, a person skilled in the art should understand that various combinations, modifications or equivalent substitutions of the technical solutions of the present application do not depart from the spirit and scope of the technical solutions of the present application.

Claims

1. A load balancing method, characterized in that: include: Construct tasks based on the multivariate heterogeneous data to be processed to obtain at least one anti-fraud control task; The sources of the multivariate heterogeneous data to be processed include but are not limited to security management agencies, service providers and social service units; Construct a directed acyclic graph based on the initial weight of each anti-fraud control task, the computational complexity of each anti-fraud control task, the call dependencies between each anti-fraud control task, and the communication overhead between each anti-fraud control task; Prioritize each anti-fraud control task based on the directed acyclic graph; Schedule the anti-fraud control tasks after priority sorting.

2. The load balancing method according to claim 1, characterized in that: The scheduling of the priority-sorted anti-fraud control tasks includes: Based on the improved reinforcement learning algorithm, the initial scheduling strategy of each anti-fraud control task after priority sorting is determined; the improved reinforcement learning algorithm is based on the original reinforcement learning algorithm, defines actions based on call dependencies and designs rewards as immediate positive rewards, long-term positive rewards and negative rewards; Based on the initial scheduling strategy, each anti-fraud control task is scheduled.

3. The load balancing method according to claim 2, characterized in that: The scheduling of each anti-fraud control task based on the initial scheduling strategy includes: The initial scheduling strategy is used as the initial pheromone, and the path is optimized through the ant colony system algorithm to obtain the target scheduling strategy; According to the target scheduling strategy, each anti-fraud control task is scheduled.

4. The load balancing method according to claim 1, characterized in that: The priority sorting of each anti-fraud control task based on the directed acyclic graph includes: Determine the priority calculation method for each anti-fraud control task; According to the priority calculation method corresponding to the directed acyclic graph and each anti-fraud control task, each anti-fraud control task is prioritized.

5. The load balancing method according to claim 4, characterized in that: The method for calculating the priority of each anti-fraud control task includes: Determine the task type of each anti-fraud control task respectively; the task types include communication task concentration type, computing task concentration type and task averaging type; For each type of anti-fraud control task, determine the corresponding priority calculation method.

6. The load balancing method according to claim 5, characterized in that: The anti-fraud control task for each task type determines the corresponding priority calculation method, including: According to the correlation between the task type and the priority calculation method, the priority calculation method corresponding to the anti-fraud control task of each task type is determined respectively.

7. A load balancing device, characterized in that: include: The first construction module is used to construct tasks according to the multivariate heterogeneous data to be processed to obtain at least one anti-fraud control task; The sources of the multivariate heterogeneous data to be processed include but are not limited to security management agencies, service providers and social service units; The second construction module is used to construct a directed acyclic graph according to the initial weight of each anti-fraud control task, the computational amount of each anti-fraud control task, the call dependency between each anti-fraud control task, and the communication overhead between each anti-fraud control task; A sorting module, used to sort the priorities of various anti-fraud control tasks based on the directed acyclic graph; The scheduling module is used to schedule the anti-fraud control tasks after priority sorting.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the load balancing method according to any one of claims 1 to 6 is implemented.

9. A storage medium, the storage medium being a non-transitory computer-readable storage medium, on which a computer program is stored, characterized in that: When the computer program is executed by a processor, the load balancing method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the load balancing method according to any one of claims 1 to 6 is implemented.