Business processing method and device, electronic equipment and storage medium

By splitting and allocating batch task processing, the problem of batch task failure caused by the failure of a single task in batch business is solved, the business processing efficiency is improved, and the reasonable splitting and successful processing of batch tasks are ensured.

CN118656151APending Publication Date: 2024-09-17CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410746036.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In batch business processing, when a single business processing fails, the entire batch business processing will fail, and the entire batch business needs to be resubmitted, resulting in low business processing efficiency.

Method used

By receiving the business processing request, obtain the business type and pending information, call the batch business template to determine the splitting strategy, split the batch task into multiple pending tasks, and assign them to the task processing server for processing, and generate batch task processing result.

Benefits of technology

It avoids the failure of a single task from affecting the processing of the entire batch task, improves business processing efficiency, and ensures that batch tasks are reasonably split and processed successfully.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656151A
    Figure CN118656151A
Patent Text Reader

Abstract

The invention discloses a business processing method and device, electronic equipment and a storage medium, and relates to the technical field of data processing. A specific embodiment of the method comprises the following steps: receiving a service processing request; in response to the fact that the service processing type is a preset type, obtaining a service type identifier, calling a corresponding batch service template, obtaining batch tasks in the service information, determining a splitting strategy, splitting the batch tasks based on the splitting strategy, and obtaining a plurality of to-be-processed tasks; obtaining attribute information of the task processing server, determining a task allocation strategy, and allocating each to-be-processed task to the task processing server to obtain a processing result of each to-be-processed task; and based on the processing result of each to-be-processed task, generating a processing result of the batch tasks and sending the processing result. According to the embodiment of the invention, the problem of low service processing efficiency caused by the fact that the whole batch service processing fails due to the failure of single service processing in the batch service and the failure problem needs to be solved by resubmitting the whole batch service can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a business processing method, device, electronic device and storage medium. Background Art

[0002] In the business processing system, in order to reduce user operations and speed up business processing efficiency, users usually apply for multiple identical businesses as a one-time transaction processing application, and the business processing system can process the applied transactions in batches. In the related art, the batch processing method is to process business applications in batches, but this method will cause the entire batch business processing to fail when a single business processing fails in the batch business, and the failure problem needs to be solved by resubmitting the entire batch business, resulting in low business processing efficiency. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a business processing method, device, electronic device and storage medium, which can solve the problem that when a single business processing failure occurs in a batch business, the entire batch business processing will fail, and the failure problem needs to be solved by resubmitting the entire batch business, resulting in low business processing efficiency.

[0004] To achieve the above objective, according to one aspect of an embodiment of the present invention, a service processing method is provided.

[0005] A business processing method of an embodiment of the present invention includes: receiving a business processing request, obtaining a corresponding business processing type and business information to be processed; in response to the business processing type being a preset type, obtaining a business type identifier from the business information, calling a corresponding batch business template, obtaining batch tasks in the business information, determining a splitting strategy in combination with the batch business template, splitting the batch tasks based on the splitting strategy, and obtaining multiple tasks to be processed; obtaining attribute information of a task processing server, determining a task allocation strategy, and allocating each of the tasks to be processed to the task processing server, and obtaining a processing result of each of the tasks to be processed; and generating and sending the processing result of the batch tasks based on the processing result of each of the tasks to be processed.

[0006] In one embodiment, batch tasks in the business information are obtained to determine a splitting strategy in combination with the batch business template, including: obtaining split fields in the batch business template to match them with task fields of the batch tasks, and determining a set of fields that match successfully; obtaining a level label for each target field in the field set to determine a splitting order for the target fields, and obtaining splitting conditions for each of the target fields to determine a splitting strategy in combination with the splitting order.

[0007] In another embodiment, the split fields in the batch business template are obtained to match the task fields of the batch tasks, and a field set that matches successfully is determined, including: obtaining the split fields in the batch business template, extracting the task fields of the batch tasks, identifying the first field in the task fields to obtain annotation information of the first field, and matching the annotation information with the split fields; in response to a successful matching result, determining a second field associated with the first field to obtain a field set; in response to a failed matching result, calling a preset general splitting strategy to determine the splitting strategy for the batch tasks.

[0008] In another embodiment, determining the second field associated with the first field to obtain a field set includes: determining the second field associated with the first field from the task field of the batch task to obtain a field set; or obtaining a split field matching the first field, querying the corresponding field set to determine the field set associated with the first field.

[0009] In another embodiment, the batch tasks are split based on the splitting strategy to obtain multiple tasks to be processed, including: obtaining status information of task processing to determine the corresponding task quantity threshold; obtaining the field sequence of task splitting in the splitting strategy to sequentially determine the target field in the field sequence as the current splitting field, and splitting the batch tasks based on the current splitting field to obtain task sets, and stopping the splitting operation in response to the number of tasks in each of the task sets being not greater than the task quantity threshold.

[0010] In another embodiment, after each of the tasks to be processed is assigned to the task processing server, it also includes: obtaining the identifier of each of the task processing servers, and the task identifier and business identifier of the task processing server corresponding to the task to be processed, so as to generate a processing code for each of the tasks to be processed.

[0011] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for service processing is provided.

[0012] A business processing device according to an embodiment of the present invention includes: a receiving unit, which is used to receive a business processing request, obtain a corresponding business processing type and business information to be processed; a splitting unit, which is used to obtain a business type identifier from the business information in response to the business processing type being a preset type, call a corresponding batch business template, obtain batch tasks in the business information, determine a splitting strategy in combination with the batch business template, split the batch tasks based on the splitting strategy, and obtain multiple tasks to be processed; a processing unit, which is used to obtain attribute information of a task processing server, determine a task allocation strategy, so as to allocate each of the tasks to be processed to the task processing server, and obtain a processing result of each of the tasks to be processed; and a sending unit, which is used to generate and send the processing result of the batch task based on the processing result of each of the tasks to be processed.

[0013] In one embodiment, the splitting unit is specifically used to: obtain the split fields in the batch business template to match the task fields of the batch tasks, and determine a set of fields that match successfully; obtain the level label of each target field in the field set to determine the target field splitting order, obtain the splitting conditions of each target field, and determine the splitting strategy in combination with the splitting order.

[0014] In another embodiment, the splitting unit is specifically used to: obtain the splitting field in the batch business template, extract the task field of the batch task, identify the first field in the task field to obtain annotation information of the first field, and match the annotation information with the splitting field; in response to a successful matching result, determine the second field associated with the first field to obtain a field set; in response to a failed matching result, call a preset general splitting strategy to determine the splitting strategy for the batch task.

[0015] In another embodiment, the splitting unit is specifically used to: determine the second field associated with the first field from the task field of the batch task to obtain a field set; or, obtain the split field matching the first field, query the corresponding field set to determine the field set associated with the first field.

[0016] In another embodiment, the splitting unit is specifically used to: obtain status information of task processing to determine the corresponding task quantity threshold; obtain the field sequence of task splitting in the splitting strategy to determine the target field in the field sequence as the current splitting field in turn, and split the batch tasks based on the current splitting field to obtain each task set, and stop the splitting operation in response to the number of tasks in each of the task sets being not greater than the task quantity threshold.

[0017] In another embodiment, the device further includes: a generating unit, configured to obtain an identifier of each of the task processing servers, and a task identifier and a service identifier of the task processing server corresponding to the task to be processed, so as to generate a processing code for each of the tasks to be processed.

[0018] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.

[0019] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the business processing method provided by the embodiment of the present invention.

[0020] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.

[0021] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, the service processing method provided by the embodiment of the present invention is implemented.

[0022] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer program product is provided.

[0023] A computer program product according to an embodiment of the present invention includes a computer program, and when the program is executed by a processor, the service processing method provided by the embodiment of the present invention is implemented.

[0024] An embodiment of the above invention has the following advantages or beneficial effects: In the embodiment of the present invention, for the received business processing request, after determining that its business processing type is a preset type, that is, a batch processing type, the corresponding batch business template can be called according to the business type identifier, and the splitting strategy can be determined in combination with the information in the batch task to split the batch task to obtain multiple tasks to be processed; then the tasks to be processed are assigned to the task processing server, and the processing results are obtained, thereby generating the processing results of the batch tasks. In the embodiment of the present invention, for the batch tasks, a suitable splitting strategy can be determined by the corresponding batch task template, so that the batch tasks can be split and assigned to the task processing server for processing, thereby avoiding the business processing of batch applications in application batches, and when the processing of the pending tasks fails, they can be processed separately without affecting other tasks in the batch tasks, thereby improving the business processing efficiency; and in the embodiment of the present invention, a batch task template is pre-set to determine the splitting strategy of each batch task, so that the batch tasks can be reasonably split, avoiding the processing failure caused by unreasonable task division, and improving the efficiency of business processing.

[0025] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention. Figure 1 is a schematic diagram of a main process of a method for business processing according to an embodiment of the present invention; Figure 2 is a schematic diagram of another main flow of a method for business processing according to an embodiment of the present invention; Figure 3 is a schematic diagram of main units of a device for service processing according to an embodiment of the present invention; Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied; Figure 5 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0028] It should be pointed out that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict. The acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, which should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0029] An embodiment of the present invention provides a business processing system, which can be used in scenarios where tasks in business processing requests are processed, and specifically can be used in scenarios where batch tasks are processed. Specifically, the business processing system in the embodiment of the present invention may include a task control module, a task disassembly module, and a task status marking module. Among them, the task control module can pre-configure parameters for controlling the tasks applied for processing, such as verification rule parameters, task splitting and processing quantity parameters, etc.; the task disassembly module can be used to disassemble and allocate batch tasks, etc.; the task status marking module can be used to mark the processing status of each task. The business processing system may also include one or more task processing servers, and then the required processing tasks can be allocated to the task processing servers for processing and processing results can be obtained, and then the processing results can be returned to the request end.

[0030] The embodiment of the present invention provides a method for business processing, which can be executed by a business processing system, such as Figure 1 As shown, the method includes the following steps.

[0031] S101: receiving a service processing request, and obtaining a corresponding service processing type and service information to be processed.

[0032] Among them, the business processing request can be sent by an external system to request the business processing system to process the business to be processed. The business processing request can include the business processing type and the business information to be processed. The business processing type indicates the processing type of the task to be processed in this business processing request, which can include single task processing and batch task processing. Single task processing means that the task requested to be processed by the business processing request is a single task, which is processed in a single task processing manner; batch task processing means that the task requested to be processed by the business processing request is a batch task, which is processed in a batch task processing manner. Business information indicates the information of the task to be processed in this business processing request.

[0033] In one embodiment, the control-related information of batch task processing can be pre-configured in the business processing system, such as the maximum number of tasks contained in the batch task, the request field of the batch task and the corresponding pre-verification rules, etc., so as to perform pre-processing and verification on the batch task through these pre-configured parameters. The maximum number can be used to limit the number of tasks in the batch task sent by the business processing request, and the specific value can be set based on the application scenario. The pre-verification rules can be set based on the verification requirements, such as verifying the field content, field length, whether it is required, field type, etc.

[0034] It should be noted that, in the embodiment of the present invention, in order to facilitate the processing of batch tasks, the business processing request may also include whether failed tasks are allowed, that is, whether failed tasks are allowed in the batch tasks. In the batch task processing scenario, part of a batch task may fail to process, so it can be set that all tasks in the batch task are successfully processed, that is, the batch task processing is successful, that is, failed tasks are not allowed, and it can also be set that the number of failed tasks in the batch task is less than the required number, that is, the batch task processing is successful, that is, failed tasks are allowed. The tasks in the batch task can be associated, and in this case, it is usually necessary for all tasks to be successfully processed to determine that the batch task processing is successful. In the scenario where failed tasks are allowed, the failure details of the reported tasks can be played to the requesting end, so that it can determine how to process the failed tasks, such as initiating a business processing request again for the failed tasks.

[0035] S102: In response to the business processing type being a preset type, obtain a business type identifier from the business information, call a corresponding batch business template, obtain batch tasks in the business information, determine a splitting strategy in combination with the batch business template, split the batch tasks based on the splitting strategy, and obtain multiple tasks to be processed.

[0036] Among them, the preset type can be a batch processing type, and the business processing type is a preset type, indicating that the business processing request requests batch tasks, and the batch tasks need to be split first. In the embodiment of the present invention, batch business templates for each business field can be pre-set, which include strategies for task splitting, so in this step, the batch business template corresponding to the business type identifier can be called, and combined with the specific information of the batch task, the batch business template determines the splitting strategy, and then the batch business is split to obtain multiple tasks to be processed.

[0037] Specifically, in an embodiment of the present invention, determining the splitting strategy can be performed as follows: obtaining the splitting fields in the batch business template to match them with the task fields of the batch tasks, and determining a set of fields that match successfully; obtaining the level label of each target field in the field set to determine the splitting order of the target fields, obtaining the splitting conditions of each target field, and determining the splitting strategy in combination with the splitting order.

[0038] The batch business template may include split fields that can be used for task splitting, and the format of the batch task can be set based on the batch business template, so the task field and split field of the batch task are matched to obtain the successfully matched task field, that is, the field set. Each split field can be pre-set with a level for task splitting, so the splitting order can be determined through the level label, and then the splitting strategy can be generated in combination with the splitting conditions of each field.

[0039] In another embodiment, the task field of the batch task may include a first field, and the first field may represent the business detail field corresponding to this batch task, so the business detail content can be recorded through the annotation information of the first field, and the annotation information of the first field is matched with the split field. If the match is successful, it means that the first field belongs to a field that can be used for splitting, and then the second field associated with it can be determined based on the first field, that is, the second field is combined into a field set. If the match fails, it means that the first field does not belong to a field that can be used for splitting. At this time, the preset general splitting strategy can be used as the splitting strategy of the batch task. Therefore, determining the field set in this step can be performed as follows: obtaining the splitting field in the batch business template, extracting the task field of the batch task, identifying the first field in the task field, to obtain the annotation information of the first field, and matching the annotation information with the split field; in response to the matching result being successful, determining the second field associated with the first field to obtain a field set; in response to the matching result being failed, calling the preset general splitting strategy to determine it as the splitting strategy of the batch task.

[0040] For example, taking the business type of internal account accounting as an example, the task fields may include group number, serial number within the set, voucher transaction type code, internal account code, debit and credit code, summary code, summary, etc. The summary is usually used to clarify the specific accounting subjects and related information, so the summary can be set as the first field.

[0041] It should be noted that, in the embodiment of the present invention, a second field associated with a first field can be set in a batch task, so the second field can be determined from the task field of the batch task according to a preset association relationship to obtain a field set. Alternatively, a field set associated with each split field can be established in a batch business template, and then the corresponding field set can be queried based on the split field matching the first field to obtain a field set associated with the first field.

[0042] In another embodiment, after determining the splitting strategy, the embodiment of the present invention can determine the target field and splitting order for batch task splitting according to the field sequence used for task splitting in the splitting strategy, and then for each target field, find the splitting condition to split the task. The splitting condition can be set based on demand, such as splitting according to the field value, for example, different field values ​​can be split into different tasks.

[0043] Normally, batch tasks are split into individual tasks. Since each task processing server can process a large number of tasks when the business processing system is relatively idle, the batch tasks can also be split into multiple tasks including a smaller number of individual tasks and directly assigned to each task processing server. Therefore, in the embodiment of the present invention, the task number threshold of the batch task after splitting can also be determined according to the state of the business processing system. The task splitting can be specifically performed as follows: obtaining the state information of the task processing to determine the corresponding task number threshold; obtaining the field sequence of task splitting in the splitting strategy to determine the target field in the field sequence as the current splitting field in turn, and splitting the batch tasks based on the current splitting field to obtain each task set, and in response to the number of tasks in each task set not being greater than the task number threshold, stopping the splitting operation.

[0044] The status information of task processing can include multiple types, such as idle, busy, etc. Different status information can correspond to different task quantity thresholds. Since it is necessary to use each target field in sequence according to the field sequence to split the task, the target field can be determined as the current split field in sequence, and then the batch task can be split using the current split field to obtain the split task set, and it is determined whether the number of tasks included in each task set is not greater than the task quantity threshold; if so, it means that the split task has met the task quantity threshold, and the split operation can be stopped; if not, it means that the split task has not met the task quantity threshold, and the split operation needs to be continued, that is, the next target field of the current split field in the field sequence is updated to the current split field to perform task splitting, until the number of tasks included in each task set after splitting is not greater than the task quantity threshold, or the target fields in the field sequence have performed the corresponding task splitting operation.

[0045] S103: Acquire attribute information of the task processing server, determine the corresponding task allocation strategy, allocate each task to be processed to the task processing server, and obtain the processing result of each task to be processed.

[0046] The attribute information may include multiple types, such as idle parameters, available resource parameters, number of servers, etc. The task allocation strategy may be pre-configured and may include multiple types, such as average allocation, proportional allocation, allocation according to idle or available resources, etc. The method for determining the task allocation strategy in this step may not be limited. After determining the allocation strategy, each task to be processed may be allocated to the task processing server to obtain the processing result of each task to be processed.

[0047] In the embodiment of the present invention, after the batch tasks are split, a task identifier can be assigned to each task to be processed, and after the assigned business processing server is determined, the identifier of the task processing server, the task identifier of the task to be processed and the business identifier can be combined to generate a processing code for the task to be processed, so as to identify the task to be processed and the processing result. The combination method may not be limited, such as a splicing method.

[0048] S104: Based on the processing results of each task to be processed, generate and send the processing results of the batch tasks.

[0049] The processing results of each task to be processed can be summarized to obtain the processing result of the batch task, and then the processing result can be returned to the request end.

[0050] In the embodiment of the present invention, the method of generating the processing results of the batch tasks can be determined based on the demand, and then the processing results of the batch tasks can be generated. For example, if the business processing request includes allowing failed tasks, the number of failed tasks in the processing results of each task to be processed can be determined to compare with the number of failed tasks allowed to exist, so as to determine the processing results of the batch tasks.

[0051] It should be noted that, in the embodiment of the present invention, when sending the processing results of the batch tasks, the processing results of each task to be processed may also be sent, so that operations such as querying the processing results may be performed.

[0052] In some other implementations, the processing process of the task to be processed can be marked with the task status by a task status marking module. Specifically, the task status can include initialization success, initialization failure, processing success and processing failure.

[0053] Before the batch tasks are split, the batch tasks are verified and processed, that is, the verification is passed. At this time, the task status of the batch tasks can be determined as initialization success. If there are tasks that fail the verification, the task status can be determined as initialization failure.

[0054] After successful initialization, the batch tasks are split and processed to obtain the processing results. If the processing result is successful, the task status can be updated to successful processing; if the processing result is failed, the task status can be updated to failed processing, and the failure reason can be recorded. The request end can query the processing progress or status of each task based on the task status.

[0055] In the embodiment of the present invention, a suitable splitting strategy can be determined for batch tasks through corresponding batch task templates, so that the batch tasks can be split and assigned to the task processing server for processing, thereby avoiding business processing of batch applications in application batches, and when a processing failure occurs in a pending task, it can be processed separately without affecting other tasks in the batch task, thereby improving business processing efficiency; and, in the embodiment of the present invention, a batch task template is pre-set to determine the splitting strategy for each batch task, so that the batch tasks can be reasonably split, avoiding processing failure due to unreasonable task division, and improving business processing efficiency.

[0056] Combine the following Figure 1 The embodiment shown in the figure specifically describes the method for business processing in the embodiment of the present invention. Figure 2 As shown, the method includes the following steps.

[0057] S201: Receive a business processing request, and obtain the corresponding business processing type and business information to be processed.

[0058] S202: In response to the service processing type being a preset type, obtaining a service type identifier from the service information, and calling a corresponding batch service template.

[0059] S203: Acquire split fields in the batch business template to match with the task fields of the batch task, and determine a field set that matches successfully.

[0060] S204: Obtain the level label of each target field in the field set to determine the target field splitting order, obtain the splitting condition of each target field, and determine the splitting strategy in combination with the splitting order.

[0061] S205: Split the batch tasks based on the splitting strategy to obtain a plurality of tasks to be processed.

[0062] S206: Acquire attribute information of the task processing server, determine the task allocation strategy, allocate each task to be processed to the task processing server, and obtain the processing result of each task to be processed.

[0063] S207: Based on the processing results of each task to be processed, generate and send the processing results of the batch tasks.

[0064] It should be noted that the data processing principle in the embodiment of the present invention is the same as Figure 1 The corresponding data processing principles in the illustrated embodiments are the same and will not be described in detail here.

[0065] In order to solve the problems existing in the prior art, the embodiment of the present invention provides a service processing device 300, such as Figure 3As shown, the device 300 includes: a receiving unit 301, which is used to receive a business processing request, obtain the corresponding business processing type and the business information to be processed; a splitting unit 302, which is used to obtain the business type identifier from the business information in response to the business processing type being a preset type, call the corresponding batch business template, obtain the batch tasks in the business information, determine the splitting strategy in combination with the batch business template, split the batch tasks based on the splitting strategy, and obtain a plurality of tasks to be processed; a processing unit 303, which is used to obtain the attribute information of the task processing server, determine the task allocation strategy, so as to allocate each of the tasks to be processed to the task processing server, and obtain the processing results of each of the tasks to be processed; a sending unit 304, which is used to generate and send the processing results of the batch tasks based on the processing results of each of the tasks to be processed.

[0066] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1 The method of the illustrated embodiment is the same and will not be repeated here.

[0067] In one embodiment, the splitting unit 302 is specifically used to: obtain the split fields in the batch business template to match the task fields of the batch task, and determine a set of fields that match successfully; obtain the level label of each target field in the field set to determine the target field splitting order, obtain the splitting conditions of each target field, and determine the splitting strategy in combination with the splitting order.

[0068] In another embodiment, the splitting unit 302 is specifically used to: obtain the splitting field in the batch business template, extract the task field of the batch task, identify the first field in the task field to obtain annotation information of the first field, and match the annotation information with the splitting field; in response to a successful matching result, determine the second field associated with the first field to obtain a field set; in response to a failed matching result, call a preset general splitting strategy to determine the splitting strategy for the batch task.

[0069] In another embodiment, the splitting unit 302 is specifically used to: determine the second field associated with the first field from the task field of the batch task to obtain a field set; or, obtain the split field matching the first field, query the corresponding field set to determine the field set associated with the first field.

[0070] In another embodiment, the splitting unit 302 is specifically used to: obtain status information of task processing to determine a corresponding task quantity threshold; obtain a field sequence for task splitting in the splitting strategy to sequentially determine the target field in the field sequence as the current splitting field, and split the batch tasks based on the current splitting field to obtain each task set, and stop the splitting operation in response to the number of tasks in each of the task sets being not greater than the task quantity threshold.

[0071] In another embodiment, the device 300 further includes: a generating unit, configured to obtain an identifier of each of the task processing servers, and a task identifier and a service identifier of the task processing server corresponding to the task to be processed, so as to generate a processing code for each of the tasks to be processed.

[0072] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1 , 2 The method of the illustrated embodiment is the same and will not be repeated here.

[0073] In the embodiment of the present invention, a suitable splitting strategy can be determined for batch tasks through corresponding batch task templates, so that the batch tasks can be split and assigned to the task processing server for processing, thereby avoiding business processing of batch applications in application batches, and when a processing failure occurs in a pending task, it can be processed separately without affecting other tasks in the batch task, thereby improving business processing efficiency; and, in the embodiment of the present invention, a batch task template is pre-set to determine the splitting strategy for each batch task, so that the batch tasks can be reasonably split, avoiding processing failure due to unreasonable task division, and improving business processing efficiency.

[0074] According to an embodiment of the present invention, the embodiment of the present invention further provides an electronic device and a readable storage medium.

[0075] The electronic device of an embodiment of the present invention comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the business processing method provided by the embodiment of the present invention.

[0076] Figure 4 An exemplary system architecture 400 is shown to which the service processing method or service processing apparatus according to the embodiment of the present invention can be applied.

[0077] like Figure 4As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0078] The user can use the terminal devices 401, 402, 403 to interact with the server 405 through the network 404 to receive or send messages, etc. Various client applications can be installed on the terminal devices 401, 402, 403.

[0079] The terminal devices 401 , 402 , 403 may be, but are not limited to, smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0080] The server 405 may be a server that provides various services. The server may analyze and process the received data such as the product information query request, and feed back the processing result (such as product information - just an example) to the terminal device.

[0081] It should be noted that the service processing method provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the service processing device is generally set in the server 405 .

[0082] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0083] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 suitable for implementing an embodiment of the present invention. Figure 5 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0084] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0085] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0086] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0087] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0088] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a unit, a program segment, or a part of a code, and the above-mentioned unit, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0089] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be arranged in a processor, for example, it may be described as: a processor includes a receiving unit, a splitting unit, a processing unit and a sending unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the receiving unit may also be described as a "unit with a receiving function".

[0090] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes the service processing method provided by the present invention.

[0091] As another aspect, the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the service processing method provided by an embodiment of the present invention.

[0092] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A business processing method, characterized in that: include: Receive business processing requests, and obtain the corresponding business processing type and business information to be processed; In response to the business processing type being a preset type, obtaining a business type identifier from the business information, calling a corresponding batch business template, obtaining batch tasks from the business information, determining a splitting strategy in combination with the batch business template, and splitting the batch tasks based on the splitting strategy to obtain a plurality of tasks to be processed; Acquire attribute information of the task processing server, determine a task allocation strategy, allocate each of the tasks to be processed to the task processing server, and obtain processing results of each of the tasks to be processed; Based on the processing results of each of the tasks to be processed, the processing results of the batch tasks are generated and sent.

2. The method according to claim 1, characterized in that Acquiring batch tasks in the business information to determine a splitting strategy in combination with the batch business template includes: Obtain the split fields in the batch business template to match the task fields of the batch task, and determine a field set that matches successfully; The level label of each target field in the field set is obtained to determine the target field splitting order, and the splitting condition of each target field is obtained to determine the splitting strategy in combination with the splitting order.

3. The method according to claim 2, characterized in that Obtaining the split fields in the batch business template to match the task fields of the batch task, and determining a field set that matches successfully, including: Acquire the split fields in the batch business template, extract the task fields of the batch tasks, identify the first field in the task fields to acquire annotation information of the first field, and match the annotation information with the split fields; In response to a successful matching result, a second field associated with the first field is determined to obtain a field set; in response to a failed matching result, a preset general splitting strategy is called to determine a splitting strategy for the batch task.

4. The method according to claim 3, characterized in that Determining a second field associated with the first field to obtain a field set includes: determining a second field associated with the first field from the task fields of the batch task to obtain a field set; or, A split field matching the first field is obtained, and a corresponding field set is queried to determine a field set associated with the first field.

5. The method according to claim 1, characterized in that The batch tasks are split based on the splitting strategy to obtain a plurality of tasks to be processed, including: Obtain task processing status information to determine the corresponding task quantity threshold; Obtain a field sequence for task splitting in the splitting strategy, determine the target field in the field sequence as the current splitting field in turn, and split the batch tasks based on the current splitting field to obtain each task set, and stop the splitting operation in response to the number of tasks in each task set being no greater than a task number threshold.

6. The method according to claim 1, characterized in that After allocating each of the tasks to be processed to the task processing server, the method further includes: The identifier of each of the task processing servers, as well as the task identifier and business identifier of the task to be processed corresponding to the task processing server, are obtained to generate a processing code for each of the tasks to be processed.

7. A device for business processing, characterized in that: include: A receiving unit, used to receive a business processing request, and obtain a corresponding business processing type and business information to be processed; a splitting unit, configured to, in response to the business processing type being a preset type, obtain a business type identifier from the business information, call a corresponding batch business template, obtain batch tasks from the business information, determine a splitting strategy in combination with the batch business template, and split the batch tasks based on the splitting strategy to obtain a plurality of tasks to be processed; A processing unit, used to obtain attribute information of the task processing server, determine a task allocation strategy, allocate each of the tasks to be processed to the task processing server, and obtain a processing result of each of the tasks to be processed; The sending unit is used to generate and send the processing results of the batch tasks based on the processing results of each of the tasks to be processed.

8. The device according to claim 7, characterized in that The splitting unit is specifically used for: Obtain the split fields in the batch business template to match the task fields of the batch task, and determine a field set that matches successfully; The level label of each target field in the field set is obtained to determine the target field splitting order, and the splitting condition of each target field is obtained to determine the splitting strategy in combination with the splitting order.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

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

Citation Information

Cited By

  • Electric power business system splitting method and device

    CN119201054A

  • Power business system splitting method and device

    CN119201054B

  • Data batch processing scheduling method and device, computer equipment and storage medium

    CN121961021A