Data scheduling method and device, electronic equipment and storage medium

By using the primary and secondary resource pools of the decision engine for load balancing, and by scheduling strategies based on the number of backslips and latency time data, the problem of excessive resource consumption caused by complex strategy calculations is solved, thus achieving stability and fast decision-making speed of the decision engine.

CN121542007APending Publication Date: 2026-02-17AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511724321.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-23
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In the decision engine, the computational complexity of complex strategies is high, resulting in excessive consumption of resource pool resources. Other strategy data cannot be processed in a timely manner, affecting decision speed and stability.

Method used

The decision engine uses primary and secondary resource pools to load balance policy data, and uses the number of backslips and latency to determine the scheduling of data between the primary and secondary resource pools, ensuring timely processing and stability of policy data.

Benefits of technology

It improves the decision-making speed and stability of the decision engine, ensures the timely processing of high-priority data, and avoids resource pool overload and data queue backlog.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542007A_ABST
    Figure CN121542007A_ABST
Patent Text Reader

Abstract

The invention provides a data scheduling method and device, electronic equipment and a storage medium, and the method comprises the steps: loading to-be-executed strategy data in message middleware corresponding to a target resource pool, the target resource pool being a main resource pool or an auxiliary resource pool of a decision engine; if the resource pool initialization of the to-be-executed strategy data is completed, obtaining the back-switching times of the to-be-executed strategy data; according to the switching times and the delay time of the to-be-executed strategy data in the message middleware corresponding to the target resource pool, sending the to-be-executed strategy data to the main resource pool for decision execution, or pushing the to-be-executed strategy data to the message middleware corresponding to another resource pool, or pushing the to-be-executed strategy data to the message middleware corresponding to another resource pool. And sending the to-be-executed strategy data to the target resource pool for decision execution. According to the scheme, load balancing of the strategy data is carried out through the main and auxiliary resource pools of the decision engine, stable and timely processing of the decision data is ensured, and the decision speed and the decision stability of the decision engine are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of load balancing technology, specifically to a data scheduling method, apparatus, electronic device, and storage medium. Background Technology

[0002] Decision engines are widely used in marketing and customer acquisition scenarios in the financial sector. When bank users browse the pages of a bank's app, the information they browse is collected and sent to the decision engine, which then makes decisions based on pre-programmed rules.

[0003] However, different decision-making strategies have different computational complexities. Complex strategies may involve dozens of strategy nodes and a large amount of online analysis and processing, which consumes a lot of time. As a result, the entire resource pool of the decision engine is engaged in the computation and processing of complex strategies, while data for other strategies is always in the queue, resulting in a slow decision-making speed. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a data scheduling method, apparatus, electronic device, and storage medium to improve the decision-making speed of a decision engine.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] The first aspect of this invention discloses a data scheduling method, the method comprising:

[0007] Load the strategy data to be executed from the message middleware corresponding to the target resource pool, where the target resource pool is the main resource pool or the secondary resource pool of the decision engine.

[0008] If the data to be executed completes the resource pool initialization, the number of back-switching times of the data to be executed is obtained. The number of back-switching times is the number of times the data is transmitted between the message middleware corresponding to the main resource pool and the message middleware corresponding to the secondary resource pool.

[0009] Based on the number of back-switching operations and the delay time of the policy data to be executed in the message middleware corresponding to the target resource pool, the policy data to be executed is sent to the main resource pool for decision execution, or the policy data to be executed is pushed to the message middleware corresponding to another resource pool, or the policy data to be executed is sent to the target resource pool for decision execution.

[0010] Preferably, according to the number of times of the return and the delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool, the to-be-executed policy data is sent to the master resource pool for decision execution, or the to-be-executed policy data is pushed to the message middleware corresponding to another resource pool, or the to-be-executed policy data is sent to the target resource pool for decision execution, comprising:

[0011] determining whether the number of times of the return is greater than or equal to an upper limit of the number of times;

[0012] If the number of times of the return is greater than or equal to the upper limit of the number of times, the to-be-executed policy data is sent to the master resource pool for decision execution;

[0013] If the number of times of the return is less than the upper limit of the number of times, it is determined whether the delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool is greater than or equal to a delay threshold;

[0014] When the delay time is greater than or equal to the delay threshold, the to-be-executed policy data is pushed to the message middleware corresponding to another resource pool;

[0015] When the delay time is less than the delay threshold, the to-be-executed policy data is sent to the target resource pool for decision execution.

[0016] Preferably, after loading the to-be-executed policy data in the message middleware corresponding to the target resource pool, further comprising:

[0017] If the to-be-executed policy data has not completed the resource pool initialization, the to-be-executed policy data is sent to the target resource pool for the resource pool initialization, and the step of obtaining the number of times of the return of the to-be-executed policy data is executed.

[0018] Preferably, sending the to-be-executed policy data to the target resource pool for the resource pool initialization comprises:

[0019] Using the average processing time length of the policy data, the total number of policy nodes involved in the decision execution of the to-be-executed policy data, and the total number of processed policy data, the resource scale required by the to-be-executed policy data is calculated;

[0020] The to-be-executed policy data and the resource scale required by the to-be-executed policy data are sent to the target resource pool, so that the target resource pool performs the resource pool initialization on the to-be-executed policy data.

[0021] Preferably, after sending the to-be-executed policy data to the master resource pool for decision execution, or after sending the to-be-executed policy data to the target resource pool for decision execution, further comprising:

[0022] store the processing duration of the to-be-executed policy data, and update the total number of processed policy data.

[0023] The second aspect of the embodiment of the application discloses a data scheduling device, which comprises:

[0024] a loading unit configured to load to-be-executed policy data in a message middleware corresponding to a target resource pool, the target resource pool being a main resource pool or a secondary resource pool of a decision engine;

[0025] a obtaining unit configured to, if the to-be-executed policy data completes resource pool initialization, obtain a switching-back number of the to-be-executed policy data, the switching-back number being a number of times of transmission between a message middleware corresponding to the main resource pool and a message middleware corresponding to the secondary resource pool;

[0026] a scheduling unit configured to, according to the switching-back number and a delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool, send the to-be-executed policy data to the main resource pool for decision execution, or push the to-be-executed policy data to a message middleware corresponding to another resource pool, or send the to-be-executed policy data to the target resource pool for decision execution.

[0027] Preferably, the scheduling unit is specifically configured to:

[0028] determine whether the switching-back number is greater than or equal to an upper limit of the number of times;

[0029] if the switching-back number is greater than or equal to the upper limit of the number of times, send the to-be-executed policy data to the main resource pool for decision execution;

[0030] if the switching-back number is less than the upper limit of the number of times, determine whether a delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool is greater than or equal to a delay threshold;

[0031] if the delay time is greater than or equal to the delay threshold, push the to-be-executed policy data to a message middleware corresponding to another resource pool;

[0032] if the delay time is less than the delay threshold, send the to-be-executed policy data to the target resource pool for decision execution.

[0033] Preferably, the device further comprises:

[0034] an initialization unit configured to, if the to-be-executed policy data does not complete the resource pool initialization, send the to-be-executed policy data to the target resource pool for the resource pool initialization, and execute the obtaining unit.

[0035] A third aspect of the embodiment of the present application discloses a computer device, comprising: a processor and a memory connected through a bus; wherein the processor is configured to invoke and execute a program stored in the memory; and the memory is configured to store the program, which is used to implement the data scheduling method disclosed in the first aspect of the embodiment of the present application.

[0036] A fourth aspect of the embodiment of the present application discloses a storage medium, in which computer executable instructions are stored, and the computer executable instructions are used to execute the data scheduling method disclosed in the first aspect of the embodiment of the present application.

[0037] Based on the data scheduling method, device, electronic device and storage medium provided by the embodiment of the present application, the method is as follows: loading to-be-executed policy data in a message middleware corresponding to a target resource pool, the target resource pool being a main resource pool or a secondary resource pool of a decision engine; if the to-be-executed policy data completes resource pool initialization, obtaining a number of times of fallback of the to-be-executed policy data; and according to the number of times of fallback and a delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool, sending the to-be-executed policy data to the main resource pool for decision execution, or pushing the to-be-executed policy data to a message middleware corresponding to another resource pool, or sending the to-be-executed policy data to the target resource pool for decision execution. The scheme balances the load of policy data through the main and secondary resource pools of the decision engine, ensures stable and timely processing of decision data, and improves the decision speed and stability of the decision engine. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on the provided drawings.

[0039] Figure 1 A flowchart of a data scheduling method provided by the embodiment of the present application;

[0040] Figure 2 An implementation principle architecture diagram of a data scheduling method provided by the embodiment of the present application;

[0041] Figure 3 An implementation principle flowchart of a load balancer of a decision engine provided by the embodiment of the present application;

[0042] Figure 4 A structure block diagram of a data scheduling device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work belong to the scope of protection of the present application.

[0044] In this application, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitations, the element defined by the sentence "including a" does not exclude the presence of other identical elements in the process, method, article or equipment including the element.

[0045] For better understanding of the following content, some terms are explained first.

[0046] Decision engine: a software system or tool designed to automate and optimize the decision-making process. Decision engine analyzes input data and conditions in depth by applying predefined rules, logic and algorithms, and quickly generates accurate decision results or recommendations.

[0047] Resource pool: usually refers to a centrally managed group of resources that can be allocated and reallocated to different tasks, projects or users.

[0048] Thread pool: a thread usage mode.

[0049] Online analytical processing: a technology for performing high-speed complex queries or multi-dimensional analysis on a large amount of data stored in data warehouse, data lake or other data storage.

[0050] Decision engine is widely used in marketing and customer acquisition scenarios in the financial field. When a bank user browses the page of a bank APP (such as the page of applying for a credit card), the user's browsing information will be collected and sent to the decision engine, and the decision engine will make decisions according to the pre-programmed rules. However, different decision strategies have different computational complexity, and some strategy nodes can be completed quickly (such as directly making logical judgment of collected information). Some strategy nodes need to be processed by online analytical processing, and it takes a long time to query the database table to obtain related information, for example: bank asset size data needs to query the database table to complete.

[0051] Therefore, relevant users (such as credit card service personnel) need to create different strategies (such as marketing strategies) to meet daily business needs, and different strategies will also bring different differences in execution time, and complex strategies may have dozens of strategy nodes and a large number of online analytical processing, which will consume a lot of time, causing the entire decision engine resource pool to be in the calculation and processing of such complex strategies, and other strategy data is always in queue arrangement, and many high-priority and high-time-efficiency-required data cannot complete decision-making in time.

[0052] Therefore, the embodiment of the present application provides a data scheduling method, device, electronic equipment and storage medium, which balances the load of strategy data through the main and auxiliary resource pools of the decision engine, ensures stable and timely processing of decision data, and improves the decision speed and stability of the decision engine.

[0053] It should be noted that the data scheduling method, device, electronic equipment and storage medium provided by the embodiment of the present application can be applied to the field of credit card data.

[0054] Referring to Figure 1 , a flowchart of a data scheduling method provided by the embodiment of the present application is shown, and the data scheduling method comprises the following steps:

[0055] Step S101: loading the to-be-executed strategy data in the message middleware corresponding to the target resource pool, the target resource pool being the main resource pool or the auxiliary resource pool of the decision engine.

[0056] It should be noted that the strategy data is collected in advance through various business pages (such as credit card browsing pages) or other data collection channels, and the collected strategy data is sent to the message middleware (message service queue) corresponding to the main resource pool.

[0057] In the process of specifically implementing step S101, the to-be-executed strategy data in the message middleware corresponding to the target resource pool is loaded, and the target resource pool is the main resource pool or the auxiliary resource pool of the decision engine.

[0058] That is, the to-be-executed strategy data is any strategy data in the message middleware corresponding to the main resource pool or the message middleware corresponding to the auxiliary resource pool.

[0059] When the to-be-executed strategy data is loaded, the specified information is obtained from the memory database, and the specified information at least includes: the delay time of the to-be-executed strategy data in the message middleware corresponding to the target resource pool, the total number of strategy nodes involved when the to-be-executed strategy data is executed, the average processing time length of the strategy data (for example, the average processing time length of the strategy data yesterday), and the total number of processed strategy data (for example, the total number of processed strategy data yesterday).

[0060] The average processing time length of the policy data is calculated according to the processing time length of each policy data. The processing time length of the policy data is equivalent to the time length consumed by the running or processing of the policy data.

[0061] Step S102: judging whether the to-be-executed policy data completes resource pool initialization. If not, executing step S103; if yes, executing step S104 and step S105.

[0062] In the process of implementing step S102, if the to-be-executed policy data has completed resource pool initialization, executing step S104 and step S105. If the to-be-executed policy data has not completed resource pool initialization, executing step S103.

[0063] Step S103: if the to-be-executed policy data has not completed resource pool initialization, sending the to-be-executed policy data to the target resource pool for resource pool initialization, and executing step S104 and step S105.

[0064] In the process of implementing step S103, if the to-be-executed policy data has not completed resource pool initialization, using the average processing time length of the policy data, the total number of policy nodes involved in the decision execution of the to-be-executed policy data, and the total number of processed policy data to calculate the resource scale L required by the to-be-executed policy data, which is equivalent to the resource allocation amount required by the to-be-executed policy data.

[0065] Specifically, the resource scale L required by the to-be-executed policy data is calculated by formula (1).

[0066] L=(ah / h’+bn / n’+ct / t’)*K (1);

[0067] In formula (1), h is the average processing time length of the policy data, h’ is the upper limit value of the processing time length, and h takes the value of h’ when h exceeds h’. n is the total number of processed policy data, n’ is the upper limit value of the processed data, and n takes the value of n’ when n exceeds n’. t is the total number of policy nodes involved in the decision execution of the to-be-executed policy data, t’ is the upper limit value of the node number, and t takes the value of t’ when t exceeds t’. K is the maximum resource that can be allocated for a single policy data. a, b and c are preset coefficients, and a+b+c=1.

[0068] The to-be-executed policy data and the resource scale required by the to-be-executed policy data are sent to the target resource pool, so that the target resource pool initializes the resource pool for the to-be-executed policy data, and executes step S104 and step S105.

[0069] Step S104: If the resource pool initialization of the to-be-executed policy data is completed, the number of back-and-forth times of the to-be-executed policy data is obtained.

[0070] In the implementation of step S104, if the resource pool initialization of the to-be-executed policy data is completed, the number of back-and-forth times of the to-be-executed policy data is obtained. The number of back-and-forth times is the number of times that the to-be-executed policy data is transmitted (or said to be circulated) between the message middleware corresponding to the main resource pool and the message middleware corresponding to the secondary resource pool.

[0071] Step S105: According to the number of back-and-forth times and the delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool, the to-be-executed policy data is sent to the main resource pool for decision execution, or pushed to the message middleware corresponding to another resource pool, or sent to the target resource pool for decision execution.

[0072] In the implementation of step S105, it is judged whether the number of back-and-forth times of the to-be-executed policy data is greater than or equal to the upper limit of the number of times.

[0073] If the number of back-and-forth times is greater than or equal to the upper limit of the number of times, the to-be-executed policy data is directly sent to the main resource pool for decision execution, regardless of whether the target resource pool is the main resource pool or the secondary resource pool. Specifically, the to-be-executed policy data is sent to the resource thread pool of the main resource pool for decision execution to obtain a decision result, and then the decision result is pushed to the downstream system.

[0074] If the number of back-and-forth times is less than the upper limit of the number of times, it is judged whether the delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool is greater than or equal to the delay threshold value.

[0075] When the delay time is greater than or equal to the delay threshold value, the to-be-executed policy data is pushed to the message middleware corresponding to another resource pool, which is another resource pool other than the target resource pool. Here, there are two cases:

[0076] The first case is that if the target resource pool is the main resource pool, when the delay time is greater than or equal to the delay threshold value, the to-be-executed policy data is pushed to the message middleware corresponding to the secondary resource pool.

[0077] The second case is that if the target resource pool is the secondary resource pool, when the delay time is greater than or equal to the delay threshold value, the to-be-executed policy data is pushed to the message middleware corresponding to the main resource pool.

[0078] It can be understood that after the to-be-executed policy data is pushed to the message middleware corresponding to another resource pool, the to-be-executed policy data is transmitted between the message middleware corresponding to the main resource pool and the message middleware corresponding to the secondary resource pool, so the number of back-and-forth times of the to-be-executed policy data increases by 1.

[0079] When the delay time is less than the delay threshold, the to-be-executed policy data is sent to the target resource pool (the main resource pool or the secondary resource pool) for decision execution to obtain a decision result, and the decision result is pushed to a downstream system.

[0080] In some embodiments, after the to-be-executed policy data is sent to the main resource pool for decision execution, or after the to-be-executed policy data is sent to the target resource pool for decision execution, a processing duration of the to-be-executed policy data is stored in the in-memory database, and a total number of processed policy data stored in the in-memory database is updated.

[0081] In the embodiments of the present application, the load balancing of the policy data is performed by the main and secondary resource pools of the decision engine, so that the decision data can be stably and timely processed, and the decision speed and stability of the decision engine are improved.

[0082] To better understand the data scheduling method proposed in the embodiments of the present application, by Figure 2 The implementation principle architecture of the data scheduling method is shown, and the calling process of the two-way load balancer of the credit card data scenario and the decision engine is taken as an example for illustration, Figure 2 The data scheduling method comprises the following parts:

[0083] The policy data collection part 201 collects policy data through a credit card browsing page and other credit card data update channels, and then sends the collected policy data to the message middleware corresponding to the main resource pool.

[0084] The message middleware corresponding to the main resource pool part 202 is used to store the policy data pushed by the policy data collection part 201 for consumption by the decision engine.

[0085] The decision engine main consumption entry part 203 is used to consume the message middleware corresponding to the main resource pool, and send the policy data into the decision engine.

[0086] The load balancer part 204 of the decision engine: the implementation principle of the load balancer of the decision engine, which will be described in detail in the following Figure 3 The related description of the corresponding embodiments.

[0087] The main resource pool decision execution part 205 puts the to-be-executed policy data into the resource thread pool of the main resource pool for decision execution, and pushes the obtained decision result to the main resource pool decision result output part 206.

[0088] The main resource pool decision result output part 206: pushes the decision result to the downstream system, and sends the processing time length of the statistical strategy data to be executed this time to the memory database part 209 through the data statistics part 207, and sends the updated total number of processed strategy data to the memory database part 209.

[0089] The data statistics part 207: statistics the processing time length of the decision data, the total number of processed strategy data and the like, and then sends the statistical information to the memory database part 209.

[0090] The delay time collection part 208: collects the delay time of the strategy data in the main resource pool corresponding message middleware and the secondary resource pool corresponding message middleware, and stores the collected delay time to the memory database part 209.

[0091] The memory database part 209: is used to store at least the following data: the delay time of the strategy data in the main resource pool corresponding message middleware and the secondary resource pool corresponding message middleware, the total number of strategy nodes involved in the decision execution of the strategy data, the processing time length of the strategy data, and the total number of processed strategy data.

[0092] The secondary resource pool corresponding message middleware part 210: receives the strategy data provided by the decision engine load balancer part 204 for the decision engine secondary consumption entry part 211 to consume, for example: the decision engine load balancer part 204 provides the strategy data in the main resource pool corresponding message middleware to the secondary resource pool corresponding message middleware.

[0093] The decision engine secondary consumption entry part 211: consumes the strategy data in the secondary resource pool corresponding message middleware, and sends the strategy data into the decision engine.

[0094] The secondary resource pool decision execution part 212: puts the strategy data to be executed into the resource thread pool of the secondary resource pool for decision execution, and pushes the obtained decision result to the secondary resource pool decision result output part 213.

[0095] The secondary resource pool decision result output part 213: pushes the decision result to the downstream system, and sends the processing time length of the statistical strategy data to be executed this time to the memory database part 209 through the data statistics part 207, and sends the updated total number of processed strategy data to the memory database part 209.

[0096] For the implementation principle of the decision engine load balancer part 204, refer to Figure 3 The implementation principle flow chart of the decision engine load balancer provided by the embodiment of the application is shown, which includes the following steps:

[0097] Step S2041: load the to-be-executed policy data in the message middleware corresponding to the target resource pool.

[0098] Step S2042: determine whether the to-be-executed policy data is completed for resource pool initialization. If not, execute steps S2043 to S2045; if yes, execute step S2046.

[0099] Step S2043: obtain the specified information.

[0100] It should be noted that the specified information at least includes: the delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool, the total number of policy nodes involved in the decision execution of the to-be-executed policy data, the average processing time length of the policy data (for example, the average processing time length of the policy data yesterday), and the total number of processed policy data (for example, the total number of processed policy data yesterday).

[0101] Step S2044: calculate the resource size required by the to-be-executed policy data.

[0102] It should be noted that the resource size required by the to-be-executed policy data is calculated by the above formula (1).

[0103] Step S2045: send the to-be-executed policy data and the resource size required by the to-be-executed policy data to the target resource pool for resource pool initialization, and execute step S2046.

[0104] Step S2046: determine whether the number of switching back is greater than or equal to the upper limit of the number. If yes, directly send the to-be-executed policy data to the main resource pool for decision execution. If no, execute step S2047.

[0105] Step S2047: determine whether the delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool is greater than or equal to the delay threshold. If yes, execute step S2048; if no, execute step S2049.

[0106] Step S2048: push the to-be-executed policy data to the message middleware corresponding to another resource pool.

[0107] Step S2049: send the to-be-executed policy data to the target resource pool for decision execution.

[0108] The above Figure 2 and Figure 3 are exemplary descriptions of the present scheme.

[0109] In practical applications, for scenarios such as credit card services that have high requirements for timeliness, the decision engine needs to support data decision and result output in quasi-real-time. In the face of a large amount of policy data and complex policy decision processes, resource shortages, data congestion, long data queue queues, and high-timeliness data that cannot be processed in time are often encountered. The data scheduling method proposed in this solution can effectively solve these problems.

[0110] Specifically, the main and auxiliary resource pool bidirectional load balancer initializes the policy data according to the complexity of the decision rule and the average processing time of the policy data on the same day, and simultaneously monitors the push delay of the policy data in the message middleware corresponding to the main resource pool to scale the resource occupation of the decision engine main resource. When the resource expansion of the main resource pool for the policy data reaches the upper limit, the policy data is written to the message middleware corresponding to the auxiliary resource pool.

[0111] According to the execution of the policy data in the auxiliary resource pool, the message middleware corresponding to the auxiliary resource pool is monitored, and when the policy data in the message middleware corresponding to the auxiliary resource pool reaches the delay threshold, the policy data is quickly rewritten into the message middleware corresponding to the main resource pool. At the same time, the policy data flowing between the message middleware corresponding to the main resource pool and the message middleware corresponding to the auxiliary resource pool is marked with the number of times of switching back, and when the number of times of switching back reaches the upper limit, the policy data will not be switched back and forth between the message middleware corresponding to the main resource pool and the message middleware corresponding to the auxiliary resource pool, but will be directly sent to the main resource pool for decision execution. The delay time of different policy data in the auxiliary resource pool can be quickly executed in the auxiliary resource pool, and the policy data that has not been delayed in the main resource pool can be normally executed. The policy data that has been delayed is always in full load operation. Because some types of policy data have different peak and valley values on the time curve, the congestion of the policy data is monitored in real time to adjust the resource allocation of the policy data in the main and auxiliary resource pools. At the same time, when the peak value of some types of policy data is indeed unable to complete decision execution, the message middleware corresponding to the main resource pool and the message middleware corresponding to the auxiliary resource pool switch back and forth for the policy data that cannot be digested in time, ensuring the bidirectional load balancing of the main and auxiliary resource pools. Through the design of the bidirectional load balancing of the main and auxiliary resource pools of the decision engine, reasonable decision resource allocation for the policy data is completed, and the overall performance pressure of the decision engine caused by extreme policies is avoided.

[0112] Corresponding to the data scheduling method provided by the above-mentioned embodiment of the application, referring to Figure 4 The embodiment of the application also provides a structural diagram of a data scheduling device, which comprises a loading unit 401, an acquisition unit 402, and a scheduling unit 403.

[0113] The loading unit 401 is configured to load to-be-executed policy data in a message middleware corresponding to a target resource pool, the target resource pool being a main resource pool or a secondary resource pool of the decision engine.

[0114] The obtaining unit 402 is configured to obtain a number of times of switching back of the to-be-executed policy data if the to-be-executed policy data completes resource pool initialization, the number of times of switching back being a number of times of switching between a message middleware corresponding to the main resource pool and a message middleware corresponding to the secondary resource pool.

[0115] The scheduling unit 403 is configured to send the to-be-executed policy data to the main resource pool for decision execution according to the number of times of switching back and a delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool, or push the to-be-executed policy data to a message middleware corresponding to another resource pool, or send the to-be-executed policy data to the target resource pool for decision execution.

[0116] In some embodiments, the scheduling unit 403 is specifically configured to: determine whether the number of times of switching back is greater than or equal to an upper limit of the number of times; if the number of times of switching back is greater than or equal to the upper limit of the number of times, send the to-be-executed policy data to the main resource pool for decision execution; if the number of times of switching back is less than the upper limit of the number of times, determine whether a delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool is greater than or equal to a delay threshold; when the delay time is greater than or equal to the delay threshold, push the to-be-executed policy data to the message middleware corresponding to another resource pool; and when the delay time is less than the delay threshold, send the to-be-executed policy data to the target resource pool for decision execution.

[0117] Preferably, in combination with Figure 4 As shown, the data scheduling apparatus further includes:

[0118] The initialization unit is configured to, if the to-be-executed policy data does not complete resource pool initialization, send the to-be-executed policy data to the target resource pool for resource pool initialization, and execute the obtaining unit 402.

[0119] In some embodiments, the initialization unit is specifically configured to: calculate a resource scale required by the to-be-executed policy data by using an average processing time length of policy data, a total number of policy nodes involved in decision execution of the to-be-executed policy data, and a total number of processed policy data; and send the to-be-executed policy data and the resource scale required by the to-be-executed policy data to the target resource pool, so that the target resource pool performs resource pool initialization on the to-be-executed policy data.

[0120] Preferably, in combination with Figure 4 As shown, the data scheduling apparatus further includes:

[0121] The updating unit is configured to store a processing time length of the to-be-executed policy data, and update the total number of processed policy data.

[0122] Preferably, the embodiment of the present application further provides a computer device, comprising: a processor and a memory, the processor and the memory being connected through a bus; wherein the processor is used for calling and executing a program stored in the memory; and the memory is used for storing the program, the program being used for implementing the data scheduling method provided by the method embodiment.

[0123] Preferably, the embodiment of the present application further provides a storage medium, the storage medium storing computer executable instructions, the computer executable instructions being used for executing the data scheduling method provided by the method embodiment.

[0124] To sum up, the embodiment of the present application provides a data scheduling method, device, electronic device and storage medium, load balancing of policy data is performed through the main and auxiliary resource pools of the decision engine, stable and timely processing of decision data is ensured, and the decision speed and stability of the decision engine are improved.

[0125] Each embodiment in the specification is described in a progressive manner, and the same parts between each embodiment can be referred to each other, and each embodiment mainly describes the difference from other embodiments. Especially, for the system or system embodiment, since it is basically similar to the method embodiment, it is described more simply, and the related parts can be referred to the part of the method embodiment. The system and system embodiment described above are only illustrative, and the units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to the actual needs, part or all of the modules can be selected to achieve the purpose of the embodiment scheme. Those skilled in the art can understand and implement without creative labor.

[0126] The professional person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present text can be realized in electronic hardware, computer software or combination of both, in order to clearly show the interchangeability of hardware and software, the composition and steps of each example have been described in the above description. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical scheme. The professional person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0127] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and, while certain modifications are discussed, it is desired to be protected in accordance with the scope of this application, which is defined in the following claims.

Claims

1. A data scheduling method, characterized by, The method comprises: loading to-be-executed policy data in a message middleware corresponding to a target resource pool, the target resource pool being a main resource pool or a secondary resource pool of a decision engine; if the to-be-executed policy data completes resource pool initialization, acquiring a number of times of switching back of the to-be-executed policy data, the number of times of switching back being a number of times of transmission between a message middleware corresponding to the main resource pool and a message middleware corresponding to the secondary resource pool; sending the to-be-executed policy data to the main resource pool for decision execution, or pushing the to-be-executed policy data to a message middleware corresponding to another resource pool, or sending the to-be-executed policy data to the target resource pool for decision execution, according to the number of times of switching back and a delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool.

2. The method of claim 1, wherein, The method comprises: judging whether the number of times of switching back is greater than or equal to an upper limit of the number of times; if the number of times of switching back is greater than or equal to the upper limit of the number of times, sending the to-be-executed policy data to the main resource pool for decision execution; if the number of times of switching back is less than the upper limit of the number of times, judging whether a delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool is greater than or equal to a delay threshold; when the delay time is greater than or equal to the delay threshold, pushing the to-be-executed policy data to a message middleware corresponding to another resource pool; when the delay time is less than the delay threshold, sending the to-be-executed policy data to the target resource pool for decision execution.

3. The method of claim 1, wherein, After loading the to-be-executed policy data in the message middleware corresponding to the target resource pool, the method further comprises: if the to-be-executed policy data does not complete the resource pool initialization, sending the to-be-executed policy data to the target resource pool for the resource pool initialization, and then executing the step of acquiring the number of times of switching back of the to-be-executed policy data.

4. The method of claim 3, wherein, The method comprises: calculating a resource scale required by the to-be-executed policy data by using an average processing time length of policy data, a total number of policy nodes involved in decision execution of the to-be-executed policy data, and a total number of processed policy data; sending the to-be-executed policy data and the resource scale required by the to-be-executed policy data to the target resource pool, so that the target resource pool performs the resource pool initialization on the to-be-executed policy data.

5. The method of claim 3, wherein, After sending the to-be-executed policy data to the main resource pool for decision execution, or after sending the to-be-executed policy data to the target resource pool for decision execution, the method further comprises: storing a processing time length of the to-be-executed policy data, and updating the total number of processed policy data.

6. A data scheduling apparatus, characterized by comprising: The device comprises: A loading unit is configured to load to-be-executed policy data in a message middleware corresponding to a target resource pool, the target resource pool being a main resource pool or a secondary resource pool of a decision engine. A obtaining unit is configured to obtain a number of times of switching back of the to-be-executed policy data if the to-be-executed policy data completes resource pool initialization, the number of times of switching back being a number of times of switching between the main resource pool and the secondary resource pool. A scheduling unit is configured to send the to-be-executed policy data to the main resource pool for decision execution, or push the to-be-executed policy data to a message middleware corresponding to another resource pool, or send the to-be-executed policy data to the target resource pool for decision execution, according to the number of times of switching back and a delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool.

7. The apparatus of claim 6, wherein, The scheduling unit is specifically configured to: determine whether the number of times of switching back is greater than or equal to an upper limit of the number of times; if the number of times of switching back is greater than or equal to the upper limit of the number of times, send the to-be-executed policy data to the main resource pool for decision execution; if the number of times of switching back is less than the upper limit of the number of times, determine whether a delay time of the to-be-executed policy data in the message middleware corresponding to the target resource pool is greater than or equal to a delay threshold; if the delay time is greater than or equal to the delay threshold, push the to-be-executed policy data to a message middleware corresponding to another resource pool; if the delay time is less than the delay threshold, send the to-be-executed policy data to the target resource pool for decision execution.

8. The apparatus of claim 6, wherein, Further comprising: an initialization unit is configured to, if the to-be-executed policy data does not complete the resource pool initialization, send the to-be-executed policy data to the target resource pool for the resource pool initialization, and execute the obtaining unit.

9. A computer device, comprising: comprise: a processor and a memory, the processor and the memory being connected through a bus; wherein the processor is configured to invoke and execute a program stored in the memory; the memory is configured to store a program, the program being configured to implement the data scheduling method in any one of claims 1-5.

10. A storage medium, characterized by The storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the data scheduling method in any one of claims 1-5.