Service scheduling method, device, storage medium and server

By configuring the linked list structure in the cache server to store frequently accessed data, the problem of insufficient reusability of parameters and program instances in multi-type business processing is solved, and the effect of improving operational efficiency and processing efficiency is achieved.

CN114706888BActive Publication Date: 2025-02-25AGRICULTURAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210355576.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-06
Publication Date
2025-02-25
Estimated Expiration
2042-04-06

AI Technical Summary

Technical Problem

The existing technology lacks the reusability of parameters and program instances in multi-type business processing, which leads to the need to manually write a large amount of repetitive code, which increases the workload, and when there is a program bug, it takes a lot of time to find defects and recompile, resulting in processing efficiency. reduce.

Method used

By configuring a linked list structure in the cache server to store frequently accessed data and system shared data, the data required for task scheduling is provided according to business requests with execution server number and task type number, thereby improving operational efficiency.

Benefits of technology

The fast access speed of the cache server is compared with the database server, which further improves the operation efficiency and ensures that the processing efficiency of multiple types of services is effectively improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114706888B_ABST
    Figure CN114706888B_ABST
Patent Text Reader

Abstract

This application discloses a service scheduling method, apparatus, storage medium, and server. The method involves: responding to a service request sent by a user; querying a cache server for a task set and task chain corresponding to the execution server number and service type number indicated in the service request; for each task, obtaining a program instance corresponding to the task name from the service server; obtaining parameters and parameter values ​​corresponding to the instance number and service type number of the program instance from a database server; loading the parameter values ​​into the program instance according to the parameters; sequentially running the program instances corresponding to the task names of each task and loaded with parameters and parameter values ​​according to the execution order to obtain the processing result, and sending the processing result to the user. This method provides the linked list data required for task scheduling based on the service request with the execution server number and task type number, resulting in fast data access and improved processing efficiency for multiple types of services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of databases, and in particular to a service scheduling method, device, storage medium and server. Background Art

[0002] Today's banking institutions need to handle a large amount of multi-type business every day. Each type of business usually includes multiple business functions, and each business function requires one or more program instances that implement a single function to complete.

[0003] In the process of implementing multiple types of business, it is usually necessary to manually compile corresponding business programs for different business types. However, for different business programs, the various parameters required also need to be manually configured. However, in the existing program implementation process, there is a lack of reusability of parameters and program instances, and a large amount of repetitive code needs to be written manually, which increases the workload. When program bugs occur, it takes a lot of time for manual maintenance such as defect detection and recompilation, which reduces the processing efficiency of multiple types of business.

[0004] In addition, the current business implementation usually adopts the client server or browser server architecture. In the implementation process, a server with a database is usually used to implement it, and various data are obtained from the database by wired or wireless means. However, each time data is obtained, it is necessary to connect to the server and query the database, resulting in low data acquisition efficiency, and the reusability, convenience, security and efficiency of important data are not considered.

[0005] Therefore, how to improve the processing efficiency of multiple types of services has become an urgent problem to be solved in this field. Summary of the invention

[0006] The present application provides a service scheduling method, device, storage medium and server, the purpose of which is to improve the processing efficiency of multiple types of services from multiple angles.

[0007] In order to achieve the above objectives, this application provides the following technical solutions:

[0008] A service scheduling method, comprising:

[0009] In response to a service request sent by a user, query a task set and a task chain corresponding to the execution server number and the service type number indicated in the service request from a cache server; the task set includes a plurality of tasks; and the task chain is used to indicate the execution order of each of the tasks;

[0010] For each of the tasks, obtaining a program instance corresponding to the task name of the task from the business server;

[0011] Acquire from the database server a parameter and a parameter value corresponding to the instance number of the program instance and the service type number indicated in the service request;

[0012] According to the parameter, the parameter value is loaded into the program instance;

[0013] According to the execution order of each of the tasks, the program instances corresponding to the task name of each task and loaded with the parameters and the parameter values ​​are run in sequence to obtain the processing result of the business request, and the processing result is sent to the user.

[0014] Optionally, before responding to the service request sent by the user and querying the cache server for a task set and a task chain corresponding to the execution server number and the service type number indicated in the service request, the method further includes:

[0015] Pre-acquire execution server numbers of multiple execution servers, multiple business type numbers included in the business, and business processes corresponding to each of the business type numbers;

[0016] Concatenate each of the execution server numbers with each of the business type numbers to obtain multiple number character strings;

[0017] Performing hash operations on each of the numbered character strings respectively to obtain a hash value of each of the numbered character strings, and recording a corresponding relationship between the hash value and the service type number;

[0018] Respectively analyzing the business processes corresponding to each of the business type numbers to obtain a task set and a task chain corresponding to each of the business type numbers;

[0019] Based on the task set and task chain corresponding to each of the business type numbers, a two-dimensional array corresponding to each of the business type numbers is generated; wherein the two-dimensional array includes a matrix of n rows and 2 columns; n represents the number of tasks included in the task set; the first column element of the matrix includes a name string corresponding to the task name of each task in the task set; the name string is obtained by concatenating the business type number with the task name; the second column element of the matrix includes a list corresponding to each of the name strings; the list is used to store the task chain and the business type number;

[0020] Based on the hash value corresponding to each of the business type numbers and the two-dimensional array as element nodes, a linked list is constructed, and the linked list is stored in the cache server; the linked list includes m element nodes, and each element node includes a hash value and a two-dimensional array; m represents the product of the number of execution servers and the number of business processes.

[0021] Optionally, responding to a service request sent by a user and querying from a cache server a task set and a task chain corresponding to an execution server number and a service type number indicated in the service request, includes:

[0022] After receiving the service request sent by the user, the execution server number and the service type number shown in the service request are concatenated to obtain a character string of the number to be processed;

[0023] Performing a hash operation on the number string to be processed to obtain a target hash value;

[0024] After establishing a connection with the cache server, querying from the linked list to obtain an element node containing the target hash value as the target element node;

[0025] The two-dimensional array in the target element node is parsed to obtain a task set and a task chain corresponding to the execution server number and the business type number indicated in the business request.

[0026] Optionally, after acquiring from the database server the parameter and parameter value corresponding to the instance number of the program instance and the service type number indicated in the service request, the method further includes:

[0027] Concatenate the business type number indicated in the business request and the task name of the task obtained from the cache server to obtain a target name character string;

[0028] The parameters and the parameter values ​​are stored in a list corresponding to the target name character string in the element node.

[0029] Optionally, after respectively parsing the business processes corresponding to each of the business type numbers to obtain the task set and task chain corresponding to each of the business type numbers, the method further includes:

[0030] For each of the task sets, configuring a program instance corresponding to a task name of each task in the task set, and storing the program instance corresponding to the task name of each task in the task set in the business server;

[0031] For each of the program instances, configure a parameter corresponding to the instance number of the program instance and corresponding to each of the service type numbers;

[0032] Parameters corresponding to the task name of the task and to the business type number are stored in the database server.

[0033] Optionally, after the program instance corresponding to the task name of each task and loaded with the parameter and the parameter value is sequentially run in the execution order of each task and the processing result of the business request is obtained, the method further includes:

[0034] Based on the processing result, the service type number, and the execution server number, an execution log of the service request is generated, and the execution log is stored in the service server.

[0035] A service scheduling device, comprising:

[0036] A task acquisition unit, used to respond to a service request sent by a user, and query a task set and a task chain corresponding to the execution server number and the service type number indicated in the service request from a cache server; the task set includes a plurality of tasks; and the task chain is used to indicate the execution order of each of the tasks;

[0037] An instance acquisition unit, configured to acquire, for each of the tasks, a program instance corresponding to the task name of the task from a business server;

[0038] A parameter acquisition unit, used to acquire, from a database server, parameters and parameter values ​​corresponding to the instance number of the program instance and the business type number;

[0039] A parameter loading unit, used for loading the parameter value into the program instance according to the parameter;

[0040] The instance running unit is used to run the program instances corresponding to the task name of each task and loaded with the parameters and the parameter values ​​in sequence according to the execution order of each task, obtain the processing result of the business request, and send the processing result to the user.

[0041] Optionally, also include:

[0042] A log storage unit is used to generate an execution log of the service request based on the processing result, the service type number, and the execution server number, and store the execution log in the service server.

[0043] A computer-readable storage medium includes a stored program, wherein the program executes the service scheduling method.

[0044] A server comprises: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0045] The memory is used to store programs, and the processor is used to run programs, wherein the service scheduling method is executed when the program is running.

[0046] In summary, in response to the business request sent by the user, the task set and task chain corresponding to the execution server number and business type number shown in the business request are queried from the cache server. For each task, the program instance corresponding to the task name of the task is obtained from the business server. The parameters and parameter values ​​corresponding to the instance number of the program instance and the business type number shown in the business request are obtained from the database server. According to the parameters, the parameter values ​​are loaded into the program instance. According to the execution order of each task, the program instance corresponding to the task name of each task and loaded with parameters and parameter values ​​is run in sequence to obtain the processing result of the business request, and the processing result is sent to the user. Based on the scheme shown in the present application, the cache server is configured to store data and system common data (i.e., tasks) that need to be frequently accessed in a linked list structure, and the data stored in the linked list required for this task scheduling is provided according to the business request with the execution server number and the task type number. Since the cache server uses memory storage, its access speed is faster, which further effectively improves the operating efficiency relative to the database server, thereby ensuring that the processing efficiency of multiple types of business is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0048] Figure 1a A flowchart of a service scheduling method provided in an embodiment of the present application;

[0049] Figure 1b A flowchart of a service scheduling method provided in an embodiment of the present application;

[0050] Figure 1c A flowchart of a service scheduling method provided in an embodiment of the present application;

[0051] Figure 2A flowchart of another service scheduling method provided in an embodiment of the present application;

[0052] Figure 3 A schematic diagram of the architecture of a service scheduling device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] like Figure 1a , Figure 1b and Figure 1c As shown, it is a flow chart of a service scheduling method provided in an embodiment of the present application, comprising the following steps:

[0055] S101: pre-acquire execution server numbers of a plurality of execution servers, a plurality of service type numbers included in a service, and a service process corresponding to each service type number.

[0056] The so-called business process is common knowledge familiar to those skilled in the art and will not be elaborated here.

[0057] S102: Concatenate each execution server number with each business type number to obtain multiple number character strings.

[0058] Each execution server number is concatenated with each business type number, and the number of obtained number strings is m, where m represents the product of the number of execution servers and the number of business processes.

[0059] Specifically, assuming that the execution server number is RS001, and the business type number of the business type DAYRPT is 001, RS001 and 001 are concatenated, and the resulting number string is RS001.001.

[0060] It should be noted that the above specific implementation process is only used for illustration.

[0061] S103: Perform hash operations on each number string respectively to obtain a hash value of each number string, and record the corresponding relationship between the hash value and the business type number.

[0062] The specific implementation process of performing hash operations on each number character string is common knowledge familiar to those skilled in the art and will not be described in detail here.

[0063] S104: respectively analyzing the business processes corresponding to each business type number to obtain a task set and a task chain corresponding to each business type number.

[0064] The task set includes multiple tasks, and the task chain is used to indicate the execution order of each task in the task set.

[0065] S105: Based on the task set and task chain corresponding to each business type number, generate a two-dimensional array corresponding to each business type number.

[0066] Among them, the two-dimensional array includes a matrix of n rows and 2 columns; n represents the number of tasks contained in the task set; the elements of the first column of the matrix include name strings corresponding to the task name of each task in the task set; the name strings are obtained by concatenating the business type number and the task name; the elements of the second column of the matrix include lists corresponding to each name string; the lists are used to store task chains and business type numbers.

[0067] It should be noted that in the list shown in the two-dimensional array, the "task chain" is used as the key, and the execution order of multiple tasks is used as the value. At the same time, the "business type number" is used as the key, and the actual number of the task type is used as the value. In other words, the task chain and the business type number are stored in the list in the form of key-value pairs.

[0068] Specifically, assuming that the execution order of the tasks shown in the task chain is ABC (i.e., task A, task B, and task C), "task chain" is used as the key, and ABC is used as the value corresponding to the "task chain". In addition, assuming that the business type number is 001, the "business type number" is used as the key, and 001 is used as the value corresponding to the "business type number".

[0069] S106: construct a linked list based on the hash value corresponding to each business type number and the two-dimensional array as element nodes, and store the linked list in the cache server.

[0070] The linked list includes m element nodes, and each element node includes a hash value and a two-dimensional array; m represents the product of the number of execution servers and the number of business processes.

[0071] It should be noted that the element nodes in the linked list can be dynamically added, deleted and adjusted, so that technical personnel can make adjustments according to actual conditions.

[0072] S107: For each task set, a program instance corresponding to the task name of each task in the task set is configured, and the program instance corresponding to the task name of each task in the task set is stored in the business server.

[0073] S108: For each program instance, configure parameters corresponding to the instance number of the program instance and to each service type number.

[0074] S109: Storing parameters corresponding to the task name of the task and the business type number in the database server.

[0075] S110: After receiving the service request sent by the user, the execution server number and the service type number shown in the service request are concatenated to obtain a character string of numbers to be processed.

[0076] S111: Perform a hash operation on the number character string to be processed to obtain a target hash value.

[0077] S112: After establishing a connection with the cache server, an element node containing a target hash value is obtained from the linked list as the target element node.

[0078] S113: Parse the two-dimensional array in the target element node to obtain a task set and a task chain corresponding to the execution server number and the business type number indicated in the business request.

[0079] S114: For each task obtained from the cache server, obtain a program instance corresponding to the task name of the task from the business server.

[0080] S115: Acquire, from the database server, parameters and parameter values ​​corresponding to the instance number of the program instance and the service type number indicated in the service request.

[0081] The process shown in S110 - S115 can be simply understood as obtaining a task set and a task chain from a cache server, obtaining a program instance set from a business server, and obtaining a parameter set from a database server.

[0082] Specifically, take the bank generating DAYRPT as an example. DAYRPT represents daily business and is a business type. The business type number is 001. The business process needs to execute program instance A, program instance B, and program instance C to complete. Therefore, tasks A (task name), task B (task name), and task C (task name) need to be completed. Therefore, tasks A, task B, and task C are grouped together, and ABC constitutes a task chain. For example, the bank generates MONRPT business. MONRPT represents monthly report business and is also a business type. The business type number is 002. It needs to be completed by program instance A, program instance B, program instance D, and program instance C. Therefore, tasks A, task B, task D, and task C are grouped together, and ABDC constitutes a task chain. It should be noted that there is a sequence between the tasks in the task chain. The task chain composed of tasks A, task B, and task C is different from the task chain composed of tasks A, task C, and task B.

[0083] The parameters involved in the program instance include but are not limited to: @SYSDATE (current system date, YYYYMMDD), @LASTDATE (previous system date, YYYYMMDD), @BEFODATE (previous system date, YYYYMMDD), @SYSMONTH (current system month, YYYYMM), @LASTMONTH (previous system month, YYYYMM), @SYSYEAR (current system year, YYYY), @LASTYEAR (previous system year, YYYY), IND_NOTE (operation status reminder mark, indicating the form of operation status reminder), COD_THRD (third-party node code, indicating that the business process is used for the party to interact with the third party and provide functions), NAME_JOB (task name), GROUP_JOB (task group), etc. The above parameters can be called according to different business processes.

[0084] Specifically, assuming that the execution server number is RS001, the business type is DAYRPT, and the business type number of DAYRPT is 001, a hash value is generated according to "RS001.001", and the hash value can be used to index the target element node from the linked list, and then obtain the two-digit array in the target element node. The content of the two-digit array can be shown in Table 1 below.

[0085] Table 1

[0086]

[0087]

[0088] It should be noted that the contents shown in Table 1 above are only for illustration.

[0089] In the embodiment of the present application, the content in the list includes task chains, business type numbers, parameters and corresponding values, and is represented by<key,value> It is represented in the form of a key-value pair. This ensures that the execution server can successfully obtain the task set to be executed and the execution order between the tasks in the task set, and further obtain the program instance from the business server and the parameters from the database server.

[0090] S116: Concatenate the service type number indicated in the service request and the task name of the task obtained from the cache server to obtain a target name character string.

[0091] S117: Store the parameters and parameter values ​​in a list corresponding to the target name character string in the element node.

[0092] S118: Load the parameter value into the program instance according to the parameter.

[0093] S119: According to the execution order of each task, the program instance corresponding to the task name of each task and loaded with parameters and parameter values ​​is run in sequence to obtain the processing result of the business request, and send the processing result to the user.

[0094] S120: Generate an execution log of the service request based on the processing result, the service type number, and the execution server number, and store the execution log in the service server.

[0095] Among them, the execution log is stored in the business server, which can be convenient for users to check later.

[0096] In summary, based on the solution shown in this embodiment, the cache server is configured to store data that needs to be frequently accessed and system common data (i.e., tasks) in a linked list structure, and provides the data stored in the linked list required for this task scheduling according to the business request with the execution server number and the task type number. Since the cache server uses memory storage, its access speed is faster, which further effectively improves the operating efficiency compared to the database server, thereby ensuring that the processing efficiency of multiple types of business is effectively improved.

[0097] It should be noted that S101 mentioned in the above embodiment is an optional implementation of the service scheduling method described in this application. In addition, S120 mentioned in the above embodiment is also an optional implementation of the service scheduling method described in this application. To this end, the process shown in the above embodiment can be summarized as follows: Figure 2 The method shown.

[0098] like Figure 2 FIG. 1 is a flow chart of another service scheduling method provided in an embodiment of the present application, comprising the following steps:

[0099] S201: In response to a service request sent by a user, query a cache server for a task set and a task chain corresponding to an execution server number and a service type number indicated in the service request.

[0100] The task set includes multiple tasks; the task chain is used to indicate the execution order of each task.

[0101] S202: For each task, obtain a program instance corresponding to the task name of the task from the business server.

[0102] S203: Acquire, from the database server, parameters and parameter values ​​corresponding to the instance number of the program instance and the service type number indicated in the service request.

[0103] S204: Load the parameter value into the program instance according to the parameter.

[0104] S205: According to the execution order of each task, the program instance corresponding to the task name of each task and loaded with parameters and parameter values ​​is run in sequence to obtain the processing result of the business request, and send the processing result to the user.

[0105] In summary, based on the solution shown in this embodiment, the cache server is configured to store data that needs to be frequently accessed and system common data (i.e., tasks) in a linked list structure, and provides the data stored in the linked list required for this task scheduling according to the business request with the execution server number and the task type number. Since the cache server uses memory storage, its access speed is faster, which further effectively improves the operating efficiency compared to the database server, thereby ensuring that the processing efficiency of multiple types of business is effectively improved.

[0106] Corresponding to the service scheduling method provided in the above-mentioned embodiment of the present application, the embodiment of the present application also provides a service scheduling device.

[0107] like Figure 3 FIG. 1 is a schematic diagram of the architecture of a service scheduling device provided in an embodiment of the present application, including:

[0108] The linked list storage unit 100 is used to: pre-acquire the execution server numbers of multiple execution servers, as well as multiple business type numbers contained in the business, and the business process corresponding to each business type number; concatenate each execution server number with each business type number to obtain multiple number strings; perform hash operations on each number string to obtain the hash value of each number string, and record the corresponding relationship between the hash value and the business type number; parse the business process corresponding to each business type number to obtain the task set and task chain corresponding to each business type number; generate a two-dimensional data set corresponding to each business type number based on the task set and task chain corresponding to each business type number. group; wherein the two-dimensional array includes a matrix of n rows and 2 columns; n represents the number of tasks contained in the task set; the elements of the first column of the matrix include a name string corresponding to the task name of each task in the task set; the name string is obtained by concatenating the business type number with the task name; the elements of the second column of the matrix include a list corresponding to each name string; the list is used to store task chains and business type numbers; based on the hash value corresponding to each business type number and the two-dimensional array as element nodes, a linked list is constructed, and the linked list is stored in the cache server; the linked list includes m element nodes, and each element node includes a hash value and a two-dimensional array; m represents the product of the number of execution servers and the number of business processes.

[0109] The instance storage unit 200 is used to: configure a program instance corresponding to the task name of each task in the task set for each task set, and store the program instance corresponding to the task name of each task in the task set in the business server.

[0110] The parameter storage unit 300 is used to: configure parameters corresponding to the instance number of the program instance and each business type number for each program instance; and store parameters corresponding to the task name of the task and the business type number in the database server.

[0111] The task acquisition unit 400 is used to respond to the business request sent by the user, and query the task set and task chain corresponding to the execution server number and business type number shown in the business request from the cache server; the task set includes multiple tasks; the task chain is used to indicate the execution order of each task.

[0112] Optionally, the task acquisition unit 400 is specifically used to: after receiving a business request sent by a user, concatenate the execution server number and the business type number shown in the business request to obtain a string of numbers to be processed; perform a hash operation on the string of numbers to be processed to obtain a target hash value; after establishing a connection with the cache server, query from the linked list to obtain an element node containing the target hash value as a target element node; parse the two-dimensional array in the target element node to obtain a task set and task chain corresponding to the execution server number and the business type number shown in the business request.

[0113] The instance acquisition unit 500 is used to acquire, for each task, a program instance corresponding to the task name of the task from the business server.

[0114] The parameter acquisition unit 600 is used to acquire parameters and parameter values ​​corresponding to the instance number of the program instance and the business type number from the database server.

[0115] The numerical storage unit 700 is used to: concatenate the business type number shown in the business request and the task name of the task obtained from the cache server to obtain a target name string; store the parameters and the parameter values ​​in a list corresponding to the target name string in the element node.

[0116] The parameter loading unit 800 is used to load parameter values ​​into the program instance according to the parameters.

[0117] The instance running unit 900 is used to run the program instance corresponding to the task name of each task and loaded with parameters and parameter values ​​in sequence according to the execution order of each task, obtain the processing result of the business request, and send the processing result to the user.

[0118] The log storage unit 1000 is used to generate an execution log of the service request based on the processing result, the service type number, and the execution server number, and store the execution log in the service server.

[0119] In summary, based on the solution shown in this embodiment, the cache server is configured to store data that needs to be frequently accessed and system common data (i.e., tasks) in a linked list structure, and provides the data stored in the linked list required for this task scheduling according to the business request with the execution server number and the task type number. Since the cache server uses memory storage, its access speed is faster, which further effectively improves the operating efficiency compared to the database server, thereby ensuring that the processing efficiency of multiple types of business is effectively improved.

[0120] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the service scheduling method provided by the present application.

[0121] The present application also provides a server, including: a processor, a memory, and a bus. The processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run programs, wherein when the program is running, the service scheduling method provided by the present application is executed, including the following steps:

[0122] In response to a service request sent by a user, query a task set and a task chain corresponding to the execution server number and the service type number indicated in the service request from a cache server; the task set includes a plurality of tasks; and the task chain is used to indicate the execution order of each of the tasks;

[0123] For each of the tasks, obtaining a program instance corresponding to the task name of the task from the business server;

[0124] Acquire from the database server a parameter and a parameter value corresponding to the instance number of the program instance and the service type number indicated in the service request;

[0125] According to the parameter, the parameter value is loaded into the program instance;

[0126] According to the execution order of each of the tasks, the program instances corresponding to the task name of each task and loaded with the parameters and the parameter values ​​are run in sequence to obtain the processing result of the business request, and the processing result is sent to the user.

[0127] Specifically, based on the above embodiment, before responding to the service request sent by the user and querying the cache server for the task set and task chain corresponding to the execution server number and the service type number indicated in the service request, the method further includes:

[0128] Pre-acquire execution server numbers of multiple execution servers, multiple business type numbers included in the business, and business processes corresponding to each of the business type numbers;

[0129] Concatenate each of the execution server numbers with each of the business type numbers to obtain multiple number character strings;

[0130] Performing hash operations on each of the numbered character strings respectively to obtain a hash value of each of the numbered character strings, and recording a corresponding relationship between the hash value and the service type number;

[0131] Respectively analyzing the business processes corresponding to each of the business type numbers to obtain a task set and a task chain corresponding to each of the business type numbers;

[0132] Based on the task set and task chain corresponding to each of the business type numbers, a two-dimensional array corresponding to each of the business type numbers is generated; wherein the two-dimensional array includes a matrix of n rows and 2 columns; n represents the number of tasks included in the task set; the first column element of the matrix includes a name string corresponding to the task name of each task in the task set; the name string is obtained by concatenating the business type number with the task name; the second column element of the matrix includes a list corresponding to each of the name strings; the list is used to store the task chain and the business type number;

[0133] Based on the hash value corresponding to each of the business type numbers and the two-dimensional array as element nodes, a linked list is constructed, and the linked list is stored in the cache server; the linked list includes m element nodes, and each element node includes a hash value and a two-dimensional array; m represents the product of the number of execution servers and the number of business processes.

[0134] Specifically, based on the above embodiment, the responding to the service request sent by the user, querying the task set and task chain corresponding to the execution server number and the service type number indicated in the service request from the cache server, includes:

[0135] After receiving the service request sent by the user, the execution server number and the service type number shown in the service request are concatenated to obtain a character string of the number to be processed;

[0136] Performing a hash operation on the number string to be processed to obtain a target hash value;

[0137] After establishing a connection with the cache server, querying from the linked list to obtain an element node containing the target hash value as the target element node;

[0138] The two-dimensional array in the target element node is parsed to obtain a task set and a task chain corresponding to the execution server number and the business type number indicated in the business request.

[0139] Specifically, based on the above embodiment, after obtaining the parameter and parameter value corresponding to the instance number of the program instance and the service type number indicated in the service request from the database server, the method further includes:

[0140] Concatenate the business type number indicated in the business request and the task name of the task obtained from the cache server to obtain a target name character string;

[0141] The parameters and the parameter values ​​are stored in a list corresponding to the target name character string in the element node.

[0142] Specifically, based on the above embodiment, after respectively parsing the business processes corresponding to each of the business type numbers to obtain the task set and task chain corresponding to each of the business type numbers, the method further includes:

[0143] For each of the task sets, configuring a program instance corresponding to a task name of each task in the task set, and storing the program instance corresponding to the task name of each task in the task set in the business server;

[0144] For each of the program instances, configure a parameter corresponding to the instance number of the program instance and corresponding to each of the service type numbers;

[0145] Parameters corresponding to the task name of the task and to the business type number are stored in the database server.

[0146] Specifically, based on the above embodiment, the program instance corresponding to the task name of each task and loaded with the parameter and the parameter value is sequentially run in the execution order of each task, and after obtaining the processing result of the business request, it also includes:

[0147] Based on the processing result, the service type number, and the execution server number, an execution log of the service request is generated, and the execution log is stored in the service server.

[0148] If the functions described in the method of the embodiment of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the part of the embodiment of the present application that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computing device (which can be a personal computer, server, mobile computing device or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks.

[0149] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0150] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A service scheduling method, characterized in that: include: Pre-acquire execution server numbers of multiple execution servers, multiple business type numbers included in the business, and business processes corresponding to each of the business type numbers; Concatenate each of the execution server numbers with each of the business type numbers to obtain multiple number character strings; Performing hash operations on each of the numbered character strings respectively to obtain a hash value of each of the numbered character strings, and recording a corresponding relationship between the hash value and the service type number; Respectively analyzing the business processes corresponding to each of the business type numbers to obtain a task set and a task chain corresponding to each of the business type numbers; Based on the task set and task chain corresponding to each of the business type numbers, a two-dimensional array corresponding to each of the business type numbers is generated; wherein the two-dimensional array includes a matrix of n rows and 2 columns; n represents the number of tasks included in the task set; the first column element of the matrix includes a name string corresponding to the task name of each task in the task set; the name string is obtained by concatenating the business type number with the task name; the second column element of the matrix includes a list corresponding to each of the name strings; the list is used to store the task chain and the business type number; Based on the hash value corresponding to each of the business type numbers and the two-dimensional array as element nodes, a linked list is constructed, and the linked list is stored in the cache server; the linked list includes m element nodes, and each element node includes a hash value and a two-dimensional array; m represents the product of the number of execution servers and the number of business processes; In response to a service request sent by a user, query a task set and a task chain corresponding to the execution server number and the service type number indicated in the service request from a cache server; the task set includes a plurality of tasks; and the task chain is used to indicate the execution order of each of the tasks; For each of the tasks, obtaining a program instance corresponding to the task name of the task from the business server; Acquire from the database server a parameter and a parameter value corresponding to the instance number of the program instance and the service type number indicated in the service request; According to the parameter, the parameter value is loaded into the program instance; According to the execution order of each of the tasks, the program instances corresponding to the task name of each task and loaded with the parameters and the parameter values ​​are run in sequence to obtain the processing result of the business request, and the processing result is sent to the user.

2. The method according to claim 1, characterized in that The responding to the service request sent by the user, querying the cache server for a task set and a task chain corresponding to the execution server number and the service type number indicated in the service request, includes: After receiving the service request sent by the user, the execution server number and the service type number shown in the service request are concatenated to obtain a character string of the number to be processed; Performing a hash operation on the number string to be processed to obtain a target hash value; After establishing a connection with the cache server, querying from the linked list to obtain an element node containing the target hash value as the target element node; The two-dimensional array in the target element node is parsed to obtain a task set and a task chain corresponding to the execution server number and the business type number indicated in the business request.

3. The method according to claim 1, characterized in that After obtaining from the database server the parameters and parameter values ​​corresponding to the instance number of the program instance and the service type number indicated in the service request, the method further includes: Concatenate the business type number indicated in the business request and the task name of the task obtained from the cache server to obtain a target name character string; The parameters and the parameter values ​​are stored in a list corresponding to the target name character string in the element node.

4. The method according to claim 1, characterized in that: After respectively parsing the business processes corresponding to each of the business type numbers to obtain the task set and task chain corresponding to each of the business type numbers, the method further includes: For each of the task sets, configuring a program instance corresponding to a task name of each task in the task set, and storing the program instance corresponding to the task name of each task in the task set in the business server; For each of the program instances, configure a parameter corresponding to the instance number of the program instance and corresponding to each of the service type numbers; Parameters corresponding to the task name of the task and to the business type number are stored in the database server.

5. The method according to claim 1, characterized in that: After the program instances corresponding to the task names of the tasks and loaded with the parameters and the parameter values ​​are sequentially run in the execution order of the tasks, and the processing result of the business request is obtained, the method further includes: Based on the processing result, the service type number, and the execution server number, an execution log of the service request is generated, and the execution log is stored in the service server.

6. A service scheduling device, characterized in that: include: A linked list storage unit is used to pre-acquire the execution server numbers of multiple execution servers, as well as multiple business type numbers contained in the business, and the business process corresponding to each of the business type numbers; concatenate each of the execution server numbers with each of the business type numbers to obtain multiple number character strings; perform hash operations on each of the number character strings to obtain a hash value of each of the number character strings, and record the corresponding relationship between the hash value and the business type number; parse the business process corresponding to each of the business type numbers to obtain a task set and task chain corresponding to each of the business type numbers; Based on the task set and task chain corresponding to each of the business type numbers, a two-dimensional array corresponding to each of the business type numbers is generated; wherein the two-dimensional array includes a matrix of n rows and 2 columns; n represents the number of tasks contained in the task set; the first column elements of the matrix include a name string corresponding to the task name of each task in the task set; the name string is obtained by concatenating the business type number with the task name; the second column elements of the matrix include a list corresponding to each of the name strings; the list is used to store the task chain and the business type number; based on the hash value corresponding to each of the business type numbers and the two-dimensional array as element nodes, a linked list is constructed, and the linked list is stored in a cache server; the linked list includes m element nodes, and each of the element nodes includes a hash value and a two-dimensional array; m represents the product of the number of execution servers and the number of business processes; A task acquisition unit, used to respond to a service request sent by a user, and query a task set and a task chain corresponding to the execution server number and the service type number indicated in the service request from a cache server; the task set includes a plurality of tasks; and the task chain is used to indicate the execution order of each of the tasks; An instance acquisition unit, configured to acquire, for each of the tasks, a program instance corresponding to the task name of the task from a business server; A parameter acquisition unit, used to acquire, from a database server, parameters and parameter values ​​corresponding to the instance number of the program instance and the business type number; A parameter loading unit, used for loading the parameter value into the program instance according to the parameter; The instance running unit is used to run the program instances corresponding to the task name of each task and loaded with the parameters and the parameter values ​​in sequence according to the execution order of each task, obtain the processing result of the business request, and send the processing result to the user.

7. The device according to claim 6, characterized in that Also includes: A log storage unit is used to generate an execution log of the service request based on the processing result, the service type number, and the execution server number, and store the execution log in the service server.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the service scheduling method according to any one of claims 1-5.

9. A server, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program executes the service scheduling method described in any one of claims 1 to 5 when running.

Citation Information

Patent Citations

  • Application parameter managing and configuring method

    CN105573774A

  • Task engine execution method and device, equipment and medium

    CN113672371A