Service scheduling methods, devices, equipment and storage media
By acquiring historical customer transaction data for queue allocation and risk identification, the inefficiency of existing business scheduling solutions has been resolved, enabling efficient resource allocation and emergency handling, and improving business processing efficiency and system stability.
Patent Information
- Application Number
- CN202311205820.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-18
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-09-18
AI Technical Summary
Existing business scheduling solutions suffer from duplicate processing and transaction security issues when using multi-threaded processing, while single-threaded processing is inefficient, prone to transaction blocking, and difficult to allocate resources effectively.
By acquiring customers' historical transaction volume data, queues are allocated and risks are identified using queue data models. Business scheduling is carried out according to optimized sorting, including the distinction between large-volume and small-customer queues, the division of independent business stages, and emergency handling modes.
It enables flexible and optimized scheduling when there is a risk of congestion, improves the execution efficiency of business scheduling, avoids long queues for routine business, and ensures the stability and security of the system.
Smart Images

Figure CN117041177B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a service scheduling method, apparatus, device, and storage medium. Background Technology
[0002] With the development of mobile communication technology, the content of services supported by various industries has become richer, and the quality of products offered has also improved. As the number of services in various industries increases, the demand for server resources for each service also grows, thus requiring service scheduling to achieve reasonable resource allocation.
[0003] Traditional resource allocation solutions for business operations typically employ either multi-threaded or single-threaded transaction processing. However, in multi-threaded solutions, under high concurrency, multiple instances processing the same transaction data simultaneously can lead to duplicate processing, resulting in low scheduling efficiency. While single-threaded solutions avoid transaction security issues, they are slower and can cause transaction congestion during peak periods.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this invention is to provide a service scheduling method, apparatus, device, and storage medium, which aims to solve the technical problem of low execution efficiency in existing service scheduling schemes.
[0006] To achieve the above objectives, the present invention provides a service scheduling method, the method comprising the following steps:
[0007] Obtain historical transaction volume data for the customers corresponding to the pending business;
[0008] Based on the historical transaction volume data, the pending business is queued to obtain multiple mode queues corresponding to the pending business.
[0009] Risk identification is performed on the pattern queue using a queue data model. When there is a risk of congestion in the pattern queue, the pending business in the pattern queue is scheduled in an optimized order.
[0010] Optionally, the step of allocating the pending transactions to queues based on the historical transaction volume data to obtain multiple pattern queues corresponding to the pending transactions includes:
[0011] Determine whether the historical transaction volume data has reached a preset threshold, the preset threshold including the maximum transaction volume per minute and / or the maximum transaction volume per day;
[0012] If so, the pending business that reaches the preset threshold will be queued to obtain a large number of customer queues.
[0013] The pending business that has not reached the preset threshold is assigned to a queue to obtain a small customer queue;
[0014] Accordingly, the step of identifying risks in the pattern queue through a queue data model, and optimizing the scheduling of pending services in the pattern queue according to optimized sorting when there is a risk of congestion in the pattern queue, includes:
[0015] The large-volume customer queue and the small-volume customer queue are risk-identified using a queue data model. When there is a risk of congestion, the pending business in the large-volume customer queue and the small-volume customer queue is optimized and scheduled according to the optimized sorting.
[0016] Optionally, before determining whether the historical transaction volume data has reached a preset threshold, the method further includes:
[0017] Statistical analysis is performed on the customer's historical transaction data to obtain the customer's daily total transaction volume and / or per minute total transaction volume;
[0018] Accordingly, determining whether the historical transaction volume data has reached a preset threshold includes:
[0019] Determine whether the total daily transaction volume and / or the total transaction volume per minute have reached the corresponding preset threshold.
[0020] Optionally, after identifying risks in the pattern queue through a queue data model and optimizing the scheduling of pending services in the pattern queue according to optimized sorting when congestion risk exists, the method further includes:
[0021] Obtain the processing time of the pending service;
[0022] The business process of the pending business is divided into stages based on the processing time to obtain multiple independent business stages of the pending business.
[0023] Based on the system's parallel capacity and the independent service stage, the services to be processed are scheduled according to a preset ratio.
[0024] Optionally, after identifying risks in the pattern queue using a queue data model and optimizing the scheduling of pending services in the pattern queue according to optimized sorting when congestion risk exists, the method further includes:
[0025] Data is collected during the processing of the service to be processed using a bypass acquisition method to obtain service processing performance data;
[0026] Perform statistical analysis on the business processing performance data to obtain the business performance indicators corresponding to the business processing performance data;
[0027] The business performance indicators are identified using a historical performance data model, and it is determined whether the identification results reach a preset fluctuation threshold.
[0028] When the identification result reaches a preset fluctuation threshold, emergency scheduling is performed on the pending business corresponding to the preset fluctuation threshold according to the preset emergency handling mode.
[0029] Optionally, when the identification result reaches a preset fluctuation threshold, the step of emergency scheduling of the pending business corresponding to the preset fluctuation threshold according to a preset emergency processing mode includes:
[0030] When the identification result reaches a preset fluctuation threshold, the key node of the pending business corresponding to the preset fluctuation threshold is determined according to the business performance index.
[0031] Emergency handling is performed on the critical nodes according to the preset emergency handling modes, which include degradation mode, flow limiting mode and circuit breaker mode.
[0032] Optionally, the step of performing emergency handling on the critical node according to a preset emergency handling mode includes:
[0033] When the pending service encounters a certain number of call exceptions, the critical nodes of the pending service corresponding to the call exception will be set to an unavailable state according to the circuit breaker mode.
[0034] When the circuit breaker period of the unavailable state ends, the call chain of the pending service corresponding to the call exception is restored by a preset switch.
[0035] Furthermore, to achieve the above objectives, the present invention also proposes a service scheduling device, the device comprising:
[0036] The data acquisition module is used to acquire historical transaction volume data of the customers corresponding to the business to be processed;
[0037] The queue allocation module is used to allocate the pending business to queues based on the historical transaction volume data, and obtain multiple mode queues corresponding to the pending business.
[0038] The service scheduling module is used to identify risks in the pattern queue through the queue data model, and to optimize the scheduling of pending services in the pattern queue according to the optimized sorting when there is a risk of congestion in the pattern queue.
[0039] In addition, to achieve the above objectives, the present invention also proposes a service scheduling device, the device comprising: a memory, a processor, and a service scheduling program stored in the memory and executable on the processor, the service scheduling program being configured to implement the steps of the service scheduling method described above.
[0040] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a service scheduling program, which, when executed by a processor, implements the steps of the service scheduling method described above.
[0041] This invention acquires historical transaction volume data of customers corresponding to pending business transactions; then, based on this historical transaction volume data, it allocates the pending business transactions into queues, obtaining multiple pattern queues corresponding to the pending business transactions; finally, it uses a queue data model to identify risks in the pattern queues, and when a pattern queue has a congestion risk, it optimizes the scheduling of pending business transactions in the pattern queue according to an optimized sorting. Because this invention allocates queues by acquiring historical transaction volume data of customers corresponding to pending business transactions, it can effectively allocate resources to pending business transactions based on the obtained pattern queues, and can flexibly optimize scheduling when there is a congestion risk in the pattern queues. This facilitates overall coordination, maximizes the processing effect of the entire business scheduling process, and improves the efficiency of business scheduling execution. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the structure of the service scheduling device in the hardware operating environment involved in the embodiments of the present invention;
[0043] Figure 2 This is a flowchart illustrating the first embodiment of the service scheduling method of the present invention;
[0044] Figure 3 This is a schematic diagram illustrating a scenario where optimized scheduling is performed when there is a risk of congestion in the mode queue in the first embodiment of the service scheduling method of the present invention.
[0045] Figure 4 This is a schematic diagram of a scenario involving multiple independent business stages in the first embodiment of the business scheduling method of the present invention;
[0046] Figure 5 This is a flowchart illustrating the second embodiment of the service scheduling method of the present invention;
[0047] Figure 6 This is a schematic diagram of a queue allocation scenario in the second embodiment of the service scheduling method of the present invention;
[0048] Figure 7 This is a flowchart illustrating the third embodiment of the service scheduling method of the present invention;
[0049] Figure 8 This is a structural block diagram of the first embodiment of the service scheduling device of the present invention.
[0050] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0051] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0052] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of the service scheduling equipment in the hardware operating environment involved in the embodiments of the present invention.
[0053] like Figure 1 As shown, the service scheduling device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0054] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the service scheduling equipment and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0055] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a service scheduler.
[0056] exist Figure 1In the service scheduling device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the service scheduling device of the present invention can be set in the service scheduling device, and the service scheduling device calls the service scheduling program stored in the memory 1005 through the processor 1001 and executes the service scheduling method provided in the embodiment of the present invention.
[0057] This invention provides a service scheduling method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the service scheduling method of the present invention.
[0058] It should be noted that existing business scheduling solutions generally handle transactions using either multi-threading or single-threading. In existing multi-threaded solutions, with multiple instances operating at high concurrency, different instances processing the same transaction data simultaneously can lead to transaction security issues due to duplicate processing. While single-threaded processing avoids transaction security issues, it is slower and can cause transaction congestion during peak periods. Besides these issues, some businesses require processing transactions in the order they are submitted by customers; random processing can lead to out-of-order processing. For some large-volume, high-concurrency customers, interlocking within the group's cash pool necessitates restricting the transaction order. Some smaller customers are assigned to large-volume account queues, and when there are too many transactions from large customers, smaller customer transactions will experience significant delays. Furthermore, existing threaded processing solutions can only obtain information on successful and failed transactions, making it difficult to identify specific details and obtain more effective information when transactions are congested or customers experience abnormal failed transactions. Therefore, based on the above reasons, this invention proposes a business scheduling method that can effectively allocate resources to complete business scheduling processing, achieving maximum parallel processing throughout the entire process.
[0059] In this embodiment, the service scheduling method includes the following steps:
[0060] Step S10: Obtain historical transaction volume data of the customer corresponding to the business to be processed.
[0061] It should be noted that the executing entity of the method in this embodiment can be a computing service device with data processing, queue allocation, and program service scheduling functions, such as a personal computer or a server. It can also be other electronic devices capable of performing the same or similar functions, such as the aforementioned escalator safety detection device. This embodiment does not limit this. Here, the aforementioned service scheduling device is used to specifically describe this embodiment and the following embodiments.
[0062] Understandably, pending business transactions are those that require resource allocation and are awaiting execution during the business scheduling process. These transactions may include documents awaiting approval, emails awaiting replies, customer requests awaiting processing, and project tasks awaiting completion. Historical transaction volume data is statistical data on the transaction volume of the customers corresponding to pending business transactions over a past period, recording historical transaction volume.
[0063] In practice, the business scheduling equipment can statistically analyze the transaction volume of all customers corresponding to pending business and obtain historical transaction volume data.
[0064] Step S20: Allocate queues for the pending business based on the historical transaction volume data to obtain multiple mode queues corresponding to the pending business.
[0065] It should be noted that the multiple mode queues are obtained by allocating queues according to business nature, customer needs, and customer classification. For example, the allocation queues can be established based on customer needs or past transaction characteristics, and can be divided into business queuing modes such as ordinary customer serial processing mode, large batch high-concurrency customer parallel processing mode, group cash pool customer limited parallel processing mode, and green channel customer priority processing mode. This embodiment does not impose any restrictions on this.
[0066] In a specific implementation, the business scheduling device allocates queues to the pending business based on the nature of the business, customer needs, and customer classification according to the historical transaction data, thereby obtaining multiple mode queues corresponding to the pending business.
[0067] Step S30: Identify risks in the pattern queue using the queue data model. When there is a congestion risk in the pattern queue, optimize the scheduling of pending services in the pattern queue according to the optimized sorting.
[0068] Understandably, a queue data model is a data structure model that manages data according to the First-In-First-Out (FIFO) principle. It can be viewed as a linear structure, similar to a queue waiting for service. In a queue data model, new elements are added to the end of the queue, while elements already in the queue are maintained in the order they entered the queue. When it is necessary to access or process an element in the queue, it is usually retrieved from the head of the queue for operation.
[0069] It should be noted that dividing pending business transactions into multiple pattern queues according to various business needs enables horizontal data distribution and vertical scaling configuration of processes for large-scale business, achieving business balance across all dimensions. However, congestion risks also exist. Therefore, congestion risks can be identified based on the queue data model. The business scheduling equipment automatically optimizes the transaction processing order of the queues according to optimized sorting. For example, when encountering a large number of customers with congested transactions, other customers' transactions are processed first to avoid long queues for routine business and improve business processing efficiency.
[0070] For ease of understanding, the scenario of queue congestion is used as an example, but this does not limit the scope of this solution. (Reference) Figure 3 , Figure 3 This is a schematic diagram illustrating a scenario where optimized scheduling is performed when there is a risk of congestion in the mode queue, as shown in the first embodiment of the service scheduling method of the present invention. Figure 3 As shown, before the adjustment, queue one, from left to right, represents the transaction order and priority (as shown in the queue order: one transaction customer B, priority 5; four transaction customers A, priority 5; one transaction customer C, priority 5; multiple transaction customers A, priority 5; one transaction customer B, priority 5; one transaction customer A, priority 5). If congestion occurs at multiple transaction customers A, meaning a large number of customer A transactions are blocking the queue, the service scheduling device will activate a daemon process to identify the congestion and adjust the service priority. The priority of the large number of customers will be lowered, and other customer transactions will be processed first (as shown in the queue order: the priority of the large number of transaction customers A will be adjusted to 9 and placed at the end of the queue, while transaction customers B and C will be placed at the front of the queue for priority processing), to avoid long queues for regular services and improve service processing efficiency.
[0071] Furthermore, in this embodiment, after step S30, the method further includes: obtaining the processing time of the pending service; dividing the business process of the pending service into stages according to the processing time to obtain multiple independent business stages of the pending service; and scheduling the pending service according to a preset ratio based on the system parallel capacity and the independent business stages.
[0072] It should be noted that the independent business phase is determined by proportionally allocating the number of tasks to be processed in each phase based on the processing time of the business scheduling equipment. The system parallel capacity is the number of parallel tasks that the business scheduling equipment can execute simultaneously, measuring how many tasks the equipment can process concurrently within the same timeframe. The preset ratio is a pre-set proportion allocated to the business tasks to be processed based on the system parallel capacity and the independent business phase.
[0073] In practical implementation, the business process is divided into multiple independent business stages for sequential processing. Based on the system's parallel capacity and processing time for different stages, the number of tasks processed in parallel for each stage is configured proportionally, achieving continuity and timeliness in the entire business process and avoiding bottlenecks. (Reference) Figure 4 , Figure 4 This is a schematic diagram illustrating multiple independent business stages in the first embodiment of the business scheduling method of the present invention. As shown in the figure, the multiple independent business stages are divided into four stages. The stage conditions for stage one can be: the processing flow of a single business to be processed is long, and the performance is twice or other multiples of stage two, so as to achieve a business throughput comparable to stage two; as shown in the figure, stage one can be allocated four queues, twice that of stage two (queues 101-104). The stage conditions for stage two can be: the number of parallel processing is limited by external constraints, but it can determine the bottleneck of the total number of parallel processing in the entire process. Stage three is a non-critical stage with low timeliness and consistency requirements, and the business to be processed can be processed asynchronously. Finally, in the asynchronous stage, thread pools can be used appropriately to improve concurrency. By dividing the business process into the above independent business stages for sequential processing, and configuring the number of parallel processing tasks in each stage proportionally according to the system's parallel capacity and processing time of different stages, the continuity and timeliness of the entire process business processing are achieved, thereby avoiding bottlenecks in the process.
[0074] In this embodiment, the business scheduling device can statistically analyze the transaction volume of all customers corresponding to pending business to obtain historical transaction volume data. Then, based on the business nature, customer needs, and customer classification of the historical transaction volume data, queues are allocated to the pending business to obtain multiple pattern queues corresponding to each pending business. Further dividing the pending business into multiple pattern queues according to various business needs enables horizontal data distribution and vertical scaling configuration of processes for large-scale business, achieving business balance across all dimensions. However, congestion risks also exist; therefore, congestion risks in pattern queues can be identified based on queue data models. The business scheduling device automatically optimizes the transaction processing order of queues using optimized sorting. For example, when encountering a large number of customers blocking transactions, other customer transactions are processed first to avoid long queues for regular business and improve business processing efficiency. Because this embodiment allocates queues by obtaining historical transaction volume data of customers corresponding to pending business, resources can be effectively allocated to pending business based on the obtained pattern queues. Furthermore, when there is a risk of congestion in the pattern queues, flexible optimization of scheduling is possible, facilitating overall coordination and maximizing the processing effect of the entire business scheduling process, thus improving the efficiency of business scheduling execution.
[0075] refer to Figure 5 , Figure 5 This is a flowchart illustrating the second embodiment of the service scheduling method of the present invention.
[0076] Based on the first embodiment described above, in this embodiment, step S20 includes:
[0077] Step S21: Determine whether the historical transaction volume data has reached a preset threshold, the preset threshold including the maximum transaction volume per minute and / or the maximum transaction volume per day.
[0078] Step S22: If so, the pending business corresponding to the preset threshold will be queued to obtain a large number of customer queues.
[0079] Step S23: Allocate the pending business that has not reached the preset threshold to a queue to obtain a small customer queue.
[0080] Accordingly, step S30 includes: step S31: using a queue data model to identify risks in the large-volume customer queue and the small-volume customer queue, and when there is a risk of congestion, optimizing the scheduling of pending business in the large-volume customer queue and the small-volume customer queue according to optimized sorting.
[0081] It should be noted that the maximum transaction volume per minute is the maximum number of transactions that a financial or commercial system can process per minute, and is used to measure the system's processing capacity and throughput.
[0082] Understandably, the maximum daily transaction volume is the maximum number of transactions that a financial or commercial system can process in a single day, used to measure the system's processing capacity and throughput.
[0083] In practical implementation, two thresholds can be set for the historical transaction volume data of a single customer: "maximum transaction volume per minute" and "maximum transaction volume per day". When a user's transaction volume exceeds one of the thresholds, it is identified as a "large-volume customer", and the corresponding pending business is assigned to a large-volume customer queue. Pending business corresponding to those that do not reach the preset threshold is queued to obtain a small-volume customer queue. This realizes the horizontal distribution of large-volume business data and the vertical scaling configuration of the process, achieves automatic mitigation of local congestion, and supports flexible allocation.
[0084] For ease of understanding, please refer to the specific implementation details. Figure 6 , Figure 6This is a schematic diagram of queue allocation in the second embodiment of the business scheduling method of the present invention. In terms of transaction volume, a large-volume transaction threshold can be set. Customers of institutions 01, 02, and others can be categorized into large customers A or D, and other customers B, C, E, F, etc., based on this threshold. When allocating transactions to queues (as shown in the figure, queue one, queue two, queue three, queue four…), two mechanisms are employed: transactions from large-volume customers are randomly allocated to each queue (as shown in the figure, large customers A and D are randomly scattered to each queue), fully utilizing parallel processing performance. Smaller customers are allocated to a unique queue along with their branch institutions (as shown in the figure, customer B is allocated to queue one with institution 01, customer C is allocated to queue one with institution 01, customer E is allocated to queue two with institution 02, customer F is allocated to queue two with institution 02, etc.). Branch institutions are grouped according to historical transaction volume to balance the total transaction volume allocated to each queue. This achieves business balance across all dimensions, avoiding uneven workloads and queue imbalances, thereby improving the efficiency of business scheduling execution.
[0085] Furthermore, in this embodiment, before step S21, the method further includes: statistically analyzing the customer's historical transaction data to obtain the customer's daily transaction volume and / or per-minute transaction volume; correspondingly, step S21 includes: determining whether the daily transaction volume and / or per-minute transaction volume have reached the corresponding preset threshold.
[0086] In a specific implementation, the customer's daily transaction volume and / or per-minute transaction volume are obtained by statistically analyzing the customer's historical transaction data. Queue allocation can be performed based on whether the daily transaction volume and / or per-minute transaction volume have reached the corresponding preset threshold, so as to achieve the accuracy of large-scale business configuration.
[0087] This embodiment allows setting two thresholds for a single customer's historical transaction volume data: "maximum transaction volume per minute" and "maximum transaction volume per day." When a user's transaction volume exceeds one of these thresholds, they are identified as a "large-volume customer," and the corresponding pending transactions are assigned to a large-volume customer queue. Pending transactions that do not reach the preset thresholds are then queued to obtain a small-volume customer queue. This achieves horizontal data distribution and vertical scaling configuration of large-volume transactions, and automatically alleviates local congestion. Furthermore, by statistically analyzing the customer's historical transaction volume data, the customer's daily transaction volume and / or transaction volume per minute can be obtained; queue allocation can be performed based on whether the corresponding preset thresholds are reached, ensuring the accuracy of large-volume transaction configuration.
[0088] refer to Figure 7 , Figure 7 This is a flowchart illustrating the third embodiment of the service scheduling method of the present invention.
[0089] Based on the above embodiments, in this embodiment, considering emergency handling of business operations, after step S30, the method further includes:
[0090] Step S41: Collect data on the processing of the service to be processed through bypass acquisition to obtain service processing performance data.
[0091] It should be noted that bypass acquisition refers to the use of a parallel data acquisition method in the service scheduling equipment to improve the efficiency of data processing and transmission.
[0092] Understandably, business processing performance data is used to measure and evaluate the performance of business scheduling equipment when processing business tasks and workloads.
[0093] In practice, business processing performance data can be collected in real time through embedded components or by bypassing data collection, and then connected to the monitoring and alarm module to send alarms to the alarm module when emergency handling occurs.
[0094] Step S42: Perform statistical analysis on the business processing performance data to obtain the business performance indicators corresponding to the business processing performance data.
[0095] It should be noted that business performance metrics are key indicators used to measure performance when handling business tasks and workloads, such as response time, throughput, number of concurrent users, and completion rate.
[0096] Step S43: Identify the business performance indicators through the historical performance data model, and determine whether the identification result reaches the preset fluctuation threshold.
[0097] It should be noted that the preset fluctuation threshold is a pre-set threshold used to identify fluctuations in the business performance indicators. If a large data fluctuation is detected, an alarm message can be issued through the intra-bank communication tool.
[0098] Step S44: When the identification result reaches the preset fluctuation threshold, the pending business corresponding to the preset fluctuation threshold is dispatched in an emergency according to the preset emergency handling mode.
[0099] It should be noted that the preset emergency handling mode is a pre-set emergency handling mode, such as downgrading, flow limiting, circuit breaking, and other emergency handling.
[0100] In practical implementation, performance data of business scheduling processes can be centrally collected and calculated, and graphical performance indicators can be displayed from the perspectives of process relationships and business distribution scope, facilitating the viewing and monitoring of task execution. Then, a historical performance data model can be established and compared with the collected performance data to identify situations with significant data fluctuations. Alarm messages can be issued via internal communication tools, and anomaly handling can be implemented to promptly detect and report risks, address anomalies in a timely manner, and improve the security of business scheduling.
[0101] Furthermore, in this embodiment, step S44 includes: when the identification result reaches a preset fluctuation threshold, determining the key node of the pending service corresponding to the preset fluctuation threshold based on the service performance index; performing emergency processing on the key node according to a preset emergency processing mode, wherein the preset emergency processing mode includes a degradation mode, a rate limiting mode, and a circuit breaker mode.
[0102] In practical implementation, key nodes in business processing can be preset with routing switches and start / stop switches, supporting default values for business configurations and fully retaining relevant scenario data. It allows for the trimming of business process steps as needed, permitting pauses and deferrals, allowing for subsequent rework, and allowing business processes to operate according to default values. This enables emergency handling such as degradation, rate limiting, and circuit breaking to ensure the stability and correctness of the overall business.
[0103] Furthermore, in this embodiment, the emergency handling of the critical node according to the preset emergency handling mode includes: when the pending service experiences a certain number of call exceptions, setting the critical node of the pending service corresponding to the call exception to an unavailable state according to the circuit breaker mode; when the circuit breaker time of the unavailable state ends, restoring the call chain of the pending service corresponding to the call exception through a preset switch.
[0104] It's important to note that the circuit breaker period is a time interval during which access to the system is automatically cut off or restricted to prevent further escalation of the problem when a service scheduling failure occurs or a certain number of call anomalies take place. The specific length of the circuit breaker period can be set according to system requirements and design, and it is typically used to protect the system from the impact of failures or abnormal situations. During the circuit breaker period, the system will suspend service or reduce service capacity to allow for repair, recovery, or load relief operations.
[0105] Understandably, the preset switch is a start / stop switch set at a critical node in the business process.
[0106] In practical implementation, taking microservice calls as an example, if a call to a microservice instance fails three times within a 15-second time window, that instance is set to an unavailable state and will not be called again. After a 30-second circuit breaker recovery interval, a small number of requests are allowed to that instance. If the request succeeds, the instance is added back to the set of available instances; otherwise, the circuit breaker continues until the next 30-second recovery interval. When all instances of a microservice in the call chain are unavailable or the response time is too long, the call to that node's microservice is circuit-broken, and calls to that node's microservice are no longer made. For non-essential or retroactive microservice nodes, a preset switch allows for a quick return of the default response information when a call exception occurs, ensuring the smoothness of the main process. Once the failed node's microservice call response is detected to be normal, the call chain is restored. This allows for control over the business processing at each stage, employing mechanisms such as circuit breakers to ensure the stability and correctness of the overall business.
[0107] Furthermore, the business scheduling equipment can be configured with a scheduled task scheduling mechanism to enable the cyclical initiation of business processing programs at different configured time intervals. This includes support for task uniqueness control, balanced distribution of multiple tasks across multiple servers, application blue-green deployment, and emergency temporary start / stop. The polling mechanism offers three polling methods: fixed time interval, minimum interval between starts, and fixed interval between starts, scheduling pre-defined tasks for periodic execution and continuous business processing. Uniqueness control ensures globally unique execution of each task by competing for database table record locks. Balanced execution across multiple services utilizes a master control allocation mechanism to distribute multiple tasks to different application instances, fully leveraging the resources of multiple instances. Blue-green deployment supports blue version operation, balanced blue-green operation, and green version operation modes through the master control allocation mechanism. Combined with a blue-green version canary deployment mechanism, it enables blue-green canary deployment of scheduled tasks, facilitating operation and maintenance management. Business start / stop can be controlled by modifying task configuration parameters, allowing for smooth operation of application deployment, hardware maintenance, and emergency switching, ensuring business integrity and continuity.
[0108] Through the above-mentioned business scheduling mechanisms, resources can be effectively allocated to complete relevant business scheduling processes. The degree of parallelism at different stages of the process can be flexibly configured, which facilitates overall coordination and achieves the maximum parallel processing effect throughout the entire process, thereby improving the execution efficiency of business scheduling.
[0109] This embodiment's business scheduling equipment can centrally collect and calculate performance data for business scheduling processes, displaying graphical performance indicators based on the relationships between processes and the scope of business distribution, facilitating the viewing and monitoring of task execution. It can then establish a historical performance data model, compare it with collected performance data, identify situations with significant data fluctuations, issue alarms via intra-bank communication tools, and handle anomalies, promptly identifying and reporting risks and responding to abnormal situations to improve the security of business scheduling. Furthermore, it can preset routing switches and start / stop switches at key nodes in business processing, supporting default values for business configurations and fully retaining relevant scenario data. It allows for the trimming of business process steps as needed, permitting pauses and delays, allowing for subsequent rework, and allowing business to be processed according to default values. This enables emergency handling such as degradation, rate limiting, and circuit breaking to ensure the stability and correctness of the overall business.
[0110] Furthermore, this embodiment of the invention also proposes a storage medium storing a service scheduling program, which, when executed by a processor, implements the steps of the service scheduling method described above.
[0111] Reference Figure 8 , Figure 8 This is a structural block diagram of the first embodiment of the service scheduling device of the present invention.
[0112] like Figure 8 As shown, the service scheduling device proposed in this embodiment of the invention includes:
[0113] Data acquisition module 801 is used to acquire historical transaction volume data of customers corresponding to the business to be processed;
[0114] The queue allocation module 802 is used to allocate the pending business to queues according to the historical transaction data, and obtain multiple mode queues corresponding to the pending business.
[0115] The service scheduling module 803 is used to identify risks in the pattern queue through the queue data model, and to optimize the scheduling of pending services in the pattern queue according to the optimized sorting when there is a congestion risk in the pattern queue.
[0116] In this embodiment, the business scheduling device can statistically analyze the transaction volume of all customers corresponding to pending business to obtain historical transaction volume data. Then, based on the business nature, customer needs, and customer classification of the historical transaction volume data, queues are allocated to the pending business to obtain multiple pattern queues corresponding to each pending business. Further dividing the pending business into multiple pattern queues according to various business needs enables horizontal data distribution and vertical scaling configuration of processes for large-scale business, achieving business balance across all dimensions. However, congestion risks also exist; therefore, congestion risks in pattern queues can be identified based on queue data models. The business scheduling device automatically optimizes the transaction processing order of queues using optimized sorting. For example, when encountering a large number of customers blocking transactions, other customer transactions are processed first to avoid long queues for regular business and improve business processing efficiency. Because this embodiment allocates queues by obtaining historical transaction volume data of customers corresponding to pending business, resources can be effectively allocated to pending business based on the obtained pattern queues. Furthermore, when there is a risk of congestion in the pattern queues, flexible optimization of scheduling is possible, facilitating overall coordination and maximizing the processing effect of the entire business scheduling process, thus improving the efficiency of business scheduling execution.
[0117] Based on the first embodiment of the service scheduling device of the present invention, a second embodiment of the service scheduling device of the present invention is proposed.
[0118] In this embodiment, the queue allocation module 802 is further configured to determine whether the historical transaction volume data has reached a preset threshold, the preset threshold including the maximum transaction volume per minute and / or the maximum transaction volume per day; if so, the pending business corresponding to the preset threshold is queued to obtain a large-volume customer queue; the pending business corresponding to the non-preset threshold is queued to obtain a small-volume customer queue; correspondingly, the business scheduling module 803 is further configured to perform risk identification on the large-volume customer queue and the small-volume customer queue through a queue data model, and when there is a risk of congestion, optimize the scheduling of pending business in the large-volume customer queue and the small-volume customer queue according to the optimized sorting.
[0119] Furthermore, the data acquisition module 801 is also used to statistically analyze the customer's historical transaction data to obtain the customer's daily transaction volume and / or transaction volume per minute; correspondingly, the queue allocation module 802 is also used to determine whether the daily transaction volume and / or transaction volume per minute have reached the corresponding preset threshold.
[0120] Furthermore, the service scheduling device also includes a stage division module 804, used to obtain the processing time of the service to be processed; divide the business process of the service to be processed into stages according to the processing time to obtain multiple independent business stages of the service to be processed; and schedule the service to be processed according to a preset ratio based on the system parallel capacity and the independent business stages.
[0121] Furthermore, the service scheduling device also includes an emergency scheduling module 805, which is used to collect data on the processing of the pending service through a bypass acquisition method to obtain service processing performance data; perform statistical analysis on the service processing performance data to obtain the service performance indicators corresponding to the service processing performance data; identify the service performance indicators through a performance history data model and determine whether the identification result reaches a preset fluctuation threshold; when the identification result reaches the preset fluctuation threshold, perform emergency scheduling on the pending service corresponding to the preset fluctuation threshold according to a preset emergency processing mode.
[0122] Furthermore, the emergency dispatch module 805 is also used to determine the key node of the pending business corresponding to the preset fluctuation threshold when the identification result reaches the preset fluctuation threshold according to the business performance index; and to perform emergency processing on the key node according to the preset emergency processing mode, the preset emergency processing mode including degradation mode, rate limiting mode and circuit breaker mode.
[0123] Furthermore, the emergency scheduling module 805 is also used to set the key nodes of the pending business corresponding to the call exception to an unavailable state according to the circuit breaker mode when the pending business experiences a certain number of call exceptions; and to restore the call chain of the pending business corresponding to the call exception through a preset switch when the circuit breaker time of the unavailable state ends.
[0124] Other embodiments or specific implementations of the service scheduling device of the present invention can be referred to the above-described method embodiments, and will not be repeated here.
[0125] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0126] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0127] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0128] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A service scheduling method, characterized in that, The service scheduling method includes: Obtain historical transaction volume data for the customers corresponding to the pending business; Based on the historical transaction volume data, the pending business is queued to obtain multiple mode queues corresponding to the pending business. Risk identification is performed on the pattern queue using a queue data model. When there is a congestion risk in the pattern queue, the pending business in the pattern queue is optimized and scheduled according to the optimized sorting. The step of allocating pending transactions to queues based on the historical transaction volume data to obtain multiple pattern queues corresponding to the pending transactions includes: Determine whether the historical transaction volume data has reached a preset threshold, the preset threshold including the maximum transaction volume per minute and / or the maximum transaction volume per day; If so, the pending business that reaches the preset threshold will be queued to obtain a large number of customer queues. The pending business that has not reached the preset threshold is assigned to a queue to obtain a small customer queue; Transactions from large numbers of customers are randomly assigned to various queues, while transactions from small customers are assigned to a unique queue based on the branch office. Accordingly, the step of identifying risks in the pattern queue through a queue data model, and optimizing the scheduling of pending services in the pattern queue according to optimized sorting when there is a risk of congestion in the pattern queue, includes: The large-volume customer queue and the small-volume customer queue are risk-identified using a queue data model. When there is a risk of congestion, the pending business in the large-volume customer queue and the small-volume customer queue is optimized and scheduled according to the optimized sorting, with the priority of the large-volume customer being reduced and other customer transactions being processed first.
2. The service scheduling method as described in claim 1, characterized in that, Before determining whether the historical transaction volume data has reached a preset threshold, the method further includes: Statistical analysis is performed on the customer's historical transaction data to obtain the customer's daily total transaction volume and / or per minute total transaction volume; Accordingly, determining whether the historical transaction volume data has reached a preset threshold includes: Determine whether the total daily transaction volume and / or the total transaction volume per minute have reached the corresponding preset threshold.
3. The service scheduling method as described in claim 1, characterized in that, The step of identifying risks in the pattern queue using a queue data model, and optimizing the scheduling of pending services in the pattern queue according to optimized sorting when congestion risk exists, further includes: Obtain the processing time of the pending service; The business process of the pending business is divided into stages based on the processing time to obtain multiple independent business stages of the pending business. Based on the system's parallel capacity and the independent service stage, the services to be processed are scheduled according to a preset ratio.
4. The service scheduling method as described in claim 1, characterized in that, The method further includes: identifying risks in the pattern queue using a queue data model; optimizing the scheduling of pending services in the pattern queue according to optimized sorting when congestion risks exist in the pattern queue; and then: Data is collected during the processing of the service to be processed using a bypass acquisition method to obtain service processing performance data; Perform statistical analysis on the business processing performance data to obtain the business performance indicators corresponding to the business processing performance data; The business performance indicators are identified using a historical performance data model, and it is determined whether the identification results reach a preset fluctuation threshold. When the identification result reaches a preset fluctuation threshold, emergency scheduling is performed on the pending business corresponding to the preset fluctuation threshold according to the preset emergency handling mode.
5. The service scheduling method as described in claim 4, characterized in that, When the identification result reaches a preset fluctuation threshold, the pending business corresponding to the preset fluctuation threshold is scheduled in an emergency according to a preset emergency handling mode, including: When the identification result reaches a preset fluctuation threshold, the key node of the pending business corresponding to the preset fluctuation threshold is determined according to the business performance index. Emergency handling is performed on the critical nodes according to the preset emergency handling modes, which include degradation mode, flow limiting mode and circuit breaker mode.
6. The service scheduling method as described in claim 5, characterized in that, The emergency handling of the key nodes according to the preset emergency handling mode includes: When the pending service encounters a certain number of call exceptions, the critical nodes of the pending service corresponding to the call exception will be set to an unavailable state according to the circuit breaker mode. When the circuit breaker period of the unavailable state ends, the call chain of the pending service corresponding to the call exception is restored by a preset switch.
7. A service scheduling device, characterized in that, The device includes: The data acquisition module is used to acquire historical transaction volume data of the customers corresponding to the business to be processed; The queue allocation module is used to allocate the pending business to queues based on the historical transaction volume data, and obtain multiple mode queues corresponding to the pending business. The service scheduling module is used to identify risks in the pattern queue through the queue data model, and to optimize the scheduling of pending services in the pattern queue according to the optimized sorting when there is a congestion risk in the pattern queue. The queue allocation module is further used to determine whether the historical transaction volume data has reached a preset threshold, the preset threshold including the maximum transaction volume per minute and / or the maximum transaction volume per day; if so, the pending business corresponding to the preset threshold is queued to obtain a large-volume customer queue; the pending business corresponding to the non-preset threshold is queued to obtain a small-volume customer queue; the transactions of large-volume customers are randomly allocated to each queue, and the transactions of small customers are allocated to a unique queue according to the branch office; Correspondingly, the business scheduling module is also used to identify risks in the large-volume customer queue and the small-volume customer queue through the queue data model. When there is a risk of congestion, the module optimizes the scheduling of pending business in the large-volume customer queue and the small-volume customer queue by optimizing the sorting, lowering the priority of the large-volume customers and prioritizing the processing of other customer transactions.
8. A service scheduling device, characterized in that, The device includes: a memory, a processor, and a service scheduler stored in the memory and executable on the processor, the service scheduler being configured to implement the steps of the service scheduling method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium stores a service scheduling program, which, when executed by a processor, implements the steps of the service scheduling method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Queuing method and device for bank outlets
CN114692913A
Automatic task scheduling management method and device, equipment and storage medium
CN116010056A
