Business processing method, device, equipment and medium
By using preset load balancing strategies to allocate multiple process modules of business process instances to multiple hosts in distributed application scenarios, the problem of large granularity of process model cutting and difficulty in achieving load balancing is solved, and the availability and processing efficiency of business process systems are improved.
Patent Information
- Application Number
- CN202210355433.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-06
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-04-06
Smart Images

Figure CN114816736B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of computer technology and finance, and more specifically, to a business processing method, a business processing device, an electronic device, a storage medium, and a program product. Background Art
[0002] Activiti is a new open source BPM (Activiti Business Process Management) platform based on the Apache license, which supports the BPMN 2.0 standard and can be applied to business systems with strong process characteristics. Activiti can not only make the data in the process persistent, but also provide seven major Service interfaces, including process warehouse service, identity service, runtime service, task service, form service, history service and engine management service. In addition, Activiti can also easily integrate with Spring to facilitate the management of transactions and Expression. Although Activiti is a business system with strong process characteristics, in the process of realizing the concept of the present disclosure, the inventor found that there are at least the following problems in the related technology: in a distributed application scenario, the process model obtained by configuring the business process with a two-layer model structure of process-data has a large cutting granularity and is difficult to reasonably split, which makes it difficult to achieve load balancing of the host, and the availability and flexibility of the business process system are poor. Summary of the invention
[0003] In view of this, the present disclosure provides a service processing method, a service processing device, an electronic device, a readable storage medium and a computer program product.
[0004] One aspect of the present disclosure provides a business processing method, including: receiving a business processing request for a business to be processed, wherein the business processing request carries a target business scenario identifier and target business parameters; in response to the business processing request, determining a target process model from multiple process models according to the target business scenario identifier, wherein the process model includes multiple process modules located at N levels, and N is a positive integer greater than 2; based on the target process model and the target business parameters, generating a business process instance for the business to be processed; and using a preset load balancing strategy to distribute the multiple process modules of the business process instance to multiple hosts in a distributed system, wherein the multiple hosts process the business to be processed.
[0005] According to an embodiment of the present disclosure, the above method also includes: in response to receiving a configuration operation from a user, constructing the above process model; in response to triggering a storage instruction for the above process model, obtaining a business scenario identifier carried in the above storage instruction; and using the above business scenario identifier as a primary key, storing the above process model in a database.
[0006] According to an embodiment of the present disclosure, in response to receiving a configuration operation from a user, constructing the process model, including: for a process module at the Nth level, in response to receiving a first configuration operation from a user, configuring the module attributes of the process module, wherein the module attributes include the module name, the calling address of the executable program, and the resource usage attributes; for a process module at any level from the 1st level to the N-1th level, in response to receiving a second configuration operation from the user, configuring the module attributes and process attributes of the process module; and constructing the process model based on the module attributes of the process module at the Nth level, and the module attributes and process attributes of all process modules from the 1st level to the N-1th level.
[0007] According to an embodiment of the present disclosure, the above-mentioned first configuration operation includes an input operation; wherein, for the process module of the Nth level, in response to receiving the first configuration operation of the user, the module properties of the above-mentioned process module are configured, including: for the process module of the Nth level, in response to the input operation of the above-mentioned user, the module properties of the process module of the Nth level are configured based on the input information carried in the above-mentioned input operation.
[0008] According to an embodiment of the present disclosure, the second configuration operation includes a selection operation and a connection operation; wherein, for any process module at the 1st level to the N-1th level, in response to receiving the second configuration operation of the user, the module attributes and process attributes of the process module are configured, including: for the process module at the Mth level, in response to the user's selection operation, determining at least one process module at the M+1th level associated with the process module at the Mth level, wherein the M is a positive integer less than the N; determining the module attributes of the process module at the Mth level based on the module attributes of at least one process module at the M+1th level; drawing at least one graphic associated with at least one process module at the M+1th level on the display interface; determining the relationship type corresponding to the connection operation in response to the user's connection operation on at least one of the above graphics; and configuring the process attributes of the process module at the Mth level based on the relationship type.
[0009] According to an embodiment of the present disclosure, for the above-mentioned M-th level process module, the resource usage attribute of the above-mentioned M-th level process module is characterized by the weighted sum of the resource usage attributes of at least one of the above-mentioned M+1-th level process modules associated with the above-mentioned M-th level process module; wherein the above-mentioned use of a preset load balancing strategy to distribute multiple process modules of the above-mentioned business process instance to multiple hosts of the distributed system includes: based on the resource usage attributes of the multiple above-mentioned process modules, distributing the multiple above-mentioned process modules to the multiple hosts of the above-mentioned distributed system.
[0010] Another aspect of the present disclosure provides a business processing device, including: a receiving module, used to receive a business processing request for a business to be processed, wherein the business processing request carries a target business scenario identifier and target business parameters; a determining module, used to respond to the business processing request and determine a target process model from multiple process models according to the target business scenario identifier, wherein the process model includes multiple process modules located at N levels, and N is a positive integer greater than 2; a generating module, used to generate a business process instance of the business to be processed based on the target process model and the target business parameters; and an allocating module, used to use a preset load balancing strategy to allocate multiple process modules of the business process instance to multiple hosts in a distributed system, wherein the multiple hosts process the business to be processed.
[0011] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors implement the method described above.
[0012] Another aspect of the present disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method described above.
[0013] Another aspect of the present disclosure provides a computer program product, the computer program product comprising computer executable instructions, and the computer executable instructions are used to implement the above method when being executed.
[0014] According to the embodiments of the present disclosure, by adopting a method of converting the business to be processed into a business process instance containing multiple cascaded process modules, the business to be processed can be split into multiple process modules, which is conducive to the decoupling of business processes and simplifies the logic of process configuration; then using a preset load balancing strategy, multiple process modules in the business process instance are distributed to multiple hosts in the distributed system, and the business to be processed is processed by multiple hosts. By processing the business to be processed by multiple hosts, it is possible to achieve load balancing of the hosts while achieving reasonable allocation of the business to be processed, thereby improving the availability and flexibility of the business process, and improving the processing efficiency of the business process, thereby at least partially overcoming the problems of large cutting granularity of business processes in related technologies, difficulty in reasonable segmentation, difficulty in load balancing, low availability, and low flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0016] Figure 1 An exemplary system architecture to which the service processing method and device according to an embodiment of the present disclosure can be applied is schematically shown;
[0017] Figure 2 A flowchart of a business processing method according to an embodiment of the present disclosure is schematically shown;
[0018] Figure 3 A flowchart schematically shows a method for generating a process model according to an embodiment of the present disclosure;
[0019] Figure 4 A flowchart schematically shows a method for generating a process model according to another embodiment of the present disclosure;
[0020] Figure 5 The schematic diagram shows an architecture diagram of a process model according to an embodiment of the present disclosure;
[0021] Figure 6 A flowchart schematically shows a business processing method according to another embodiment of the present disclosure;
[0022] Figure 7 A block diagram schematically shows a service processing device according to an embodiment of the present disclosure; and
[0023] Figure 8 A block diagram of an electronic device suitable for implementing a service processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0026] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0027] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0028] Activiti is a new open source BPM (Activiti Business Process Management) platform based on the Apache license. It supports the BPMN 2.0 standard and is suitable for business systems with strong process characteristics. Activiti can use the optimal SQL statement to execute the Command through myBatis, solving the bottleneck in the process of exchanging data with the database, so that the engine can maintain the best performance in terms of speed, thereby achieving efficient data persistence. There are special process designers for different software development tools, such as Eclipse Designer for Eclipse, actiBPM plug-in for IDEA, and ActivtiModeler process designer based on the Web. In addition, Activiti can also separate runtime data and historical data in the design of the table structure, and can quickly read runtime data. Only when historical data needs to be queried, it is read from the historical record storage table. This design can greatly improve the access efficiency of the table.
[0029] Although Activiti is a business system that can be applied to processes with strong process characteristics, in related technologies, in distributed application scenarios, the process model obtained by configuring the business process with a two-layer process-data model structure has a large granularity and is difficult to divide reasonably, making it difficult to achieve load balancing on the host. The availability and flexibility of the business process system are poor, and the processing efficiency of the business process system is low.
[0030] In view of this, the present invention changes the business process of the traditional process-data two-layer model structure into a business process with a multi-layer nested structure, thereby realizing the splitting of the business to be processed, which is conducive to the business system to perform more detailed process segmentation and realize the decoupling of business processes; then, according to the selected load balancing method and the amount of resources occupied by each module configured in the process model, each module is allocated to different hosts for execution, and while realizing reasonable allocation of the business to be processed, load balancing of the host is achieved, thereby improving the availability and flexibility of the business process and improving the processing efficiency of the processing process.
[0031] Specifically, the embodiments of the present disclosure provide a business processing method, a business processing device, an electronic device, a readable storage medium and a computer program product. It can be used to improve the availability and flexibility of the business process system and improve the processing efficiency of the process system. The method includes receiving a business processing request for a business to be processed, wherein the business processing request carries a target business scenario identifier and a target business parameter; in response to the business processing request, determining a target process model from multiple process models according to the target business scenario identifier, wherein the process model includes multiple process modules located at N levels, and N is a positive integer greater than 2; based on the target process model and the target business parameter, generating a business process instance for the business to be processed; and using a preset load balancing strategy to distribute multiple process modules of the business process instance to multiple hosts of a distributed system, wherein multiple hosts process the business to be processed.
[0032] It should be noted that the business processing method and device determined in the embodiments of the present disclosure can be used in the field of computer technology or the field of finance, and can also be used in any field other than the field of computer technology and the field of finance, and the specific application field is not limited.
[0033] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0034] In the technical solution of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0035] Figure 1 The exemplary system architecture to which the service processing method and device according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0036] like Figure 1As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, a load balancing device 105, and multiple servers 106. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the load balancing device 105, and between the load balancing device 105 and the multiple servers 106. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0037] The user can use the terminal devices 101, 102, 103 to interact with the load balancing device 105 through the network 104 to send a business processing request including the business to be processed, and the business processing request carries a business scenario identifier and business parameters. Various financial applications and communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc., can be installed on the terminal devices 101, 102, 103 (only as examples).
[0038] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0039] The load balancing device 105 may be a load balancing server for implementing load balancing, such as an Ngnix server. The load balancing device 105 is a background management device that processes and distributes service processing requests sent by users using terminal devices 101, 102, and 103 to multiple servers 106 (for example only).
[0040] The server 106 may be a server that provides various services, such as a background management server that can receive processing tasks assigned by the load balancing device 105 and process the pending business (only as an example). The background management device may analyze and process the received data such as the user's business processing request, and feed back the processing result (such as a web page, information, or data obtained or generated according to the user's business processing request) to the terminal device.
[0041] It should be noted that the service processing method provided in the embodiment of the present disclosure can generally be executed by the server 106. Accordingly, the service processing device provided in the embodiment of the present disclosure can generally be set in the server 106. The service processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 106 and can communicate with the terminal devices 101, 102, 103, the load balancing device 105 and / or the server 106. Correspondingly, the service processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 106 and can communicate with the terminal devices 101, 102, 103, the load balancing device 105 and / or the server 106. Alternatively, the service processing method provided in the embodiment of the present disclosure can also be executed by the terminal devices 101, 102, or 103, or can also be executed by other terminal devices different from the terminal devices 101, 102, or 103. Correspondingly, the service processing device provided in the embodiment of the present disclosure may also be arranged in the terminal device 101 , 102 , or 103 , or in other terminal devices different from the terminal device 101 , 102 , or 103 .
[0042] For example, the pending service request may be originally stored in any one of the terminal devices 101, 102, or 103 (for example, the terminal device 101, but not limited thereto), or stored in an external storage device and may be imported into the terminal device 101. Then, the terminal device 101 may locally execute the service processing method provided by the embodiment of the present disclosure, or send the pending service request to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the pending service request may execute the service processing method provided by the embodiment of the present disclosure.
[0043] It should be understood that Figure 1 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 the implementation requirements.
[0044] Figure 2 The flowchart of the service processing method according to the embodiment of the present disclosure is schematically shown.
[0045] like Figure 2 As shown, the method includes operations S201 to S204.
[0046] In operation S201, a service processing request of a service to be processed is received, wherein the service processing request carries a target service scenario identifier and target service parameters.
[0047] In operation S202 , in response to a business processing request, a target process model is determined from a plurality of process models according to a target business scenario identifier, wherein the process model includes a plurality of process modules at N levels, where N is a positive integer greater than 2.
[0048] In operation S203, a business process instance of the to-be-processed business is generated based on the target process model and the target business parameters.
[0049] In operation S204, a preset load balancing strategy is used to distribute multiple process modules of the business process instance to multiple hosts in the distributed system, wherein the multiple hosts process the pending business.
[0050] According to an embodiment of the present disclosure, the business scenario identifier may be a unique identifier for a business process in a business system. The target business parameter may be a parameter related to the business process, for example, a parameter including credential information, an initiation channel, and the like.
[0051] According to an embodiment of the present disclosure, the process model can output an execution process associated with the business according to an input business processing request. The process model can include N levels, each level includes multiple process modules, and each process module can also have an association relationship; the value of N can be adaptively adjusted according to actual conditions, for example, it can be adjusted according to user needs. The target process model can be a model associated with the target business scenario identifier.
[0052] According to an embodiment of the present disclosure, a business process instance may be a process that can be used to process the business processing request. A business process instance may be a specific processing flow that corresponds to a target business scenario and target business parameters and is related to the business.
[0053] According to an embodiment of the present disclosure, a preset load balancing strategy is used to evenly distribute multiple process modules in a business process instance to multiple machines for processing, thereby collaboratively completing work tasks. Load balancing strategies may include, but are not limited to: adaptive load balancing, weighted round-robin, etc. Specifically, the adaptive load balancing strategy may be that the load balancing device periodically detects the load conditions of all servers, and automatically adjusts the weight of the server according to the load conditions of the server. Or it may also be combined with a weighted round-robin strategy. Specifically, the load distribution may be first calculated based on a static weight ratio. When the load of all servers is lower than the set lower limit, the load balancing device will automatically switch to a weighted round-robin strategy for distribution; when the load of all servers is higher than the set lower limit, the load balancing device will automatically switch to an adaptive load balancing strategy for distribution. Load balancing provides a working method that can effectively enhance the processing capabilities of business processes and improve the availability and flexibility of business process systems.
[0054] According to the embodiments of the present disclosure, by adopting a method of converting the business to be processed into a business process instance containing multiple cascaded process modules, the business to be processed can be split into multiple process modules, which is conducive to the decoupling of business processes and simplifies the logic of process configuration; then using a preset load balancing strategy, multiple process modules in the business process instance are distributed to multiple hosts in the distributed system, and the business to be processed is processed by multiple hosts. By processing the business to be processed by multiple hosts, it is possible to achieve load balancing of the hosts while achieving reasonable allocation of the business to be processed, thereby improving the availability and flexibility of the business process, and improving the processing efficiency of the business process, thereby at least partially overcoming the problems of complex logic, low availability, low flexibility, low processing efficiency, and difficulty in achieving load balancing of the business process in related technologies.
[0055] Reference below Figure 3 to Figure 6 , combined with specific embodiments Figure 2 The method shown is further explained.
[0056] According to an embodiment of the present disclosure, in order to meet the needs of more business scenarios, multiple process models in step S202 can also be constructed in advance, so before determining the target process model from multiple process models, it can also include: in response to receiving a user's configuration operation, building a process model; in response to triggering a storage instruction for the process model, obtaining a business scenario identifier carried in the storage instruction; and storing the process model in a database using the business scenario identifier as the primary key.
[0057] According to an embodiment of the present disclosure, the configuration operation can be used to build a process model, and the configuration operation can include module names related to the process modules, executable program call addresses, module priorities, execution order between modules, and other contents.
[0058] According to an embodiment of the present disclosure, the storage instruction may be an instruction for storing the process model in a corresponding business scenario, and the storage instruction may also include a business scenario identifier and business parameters associated with the process model, wherein the business scenario identifier may be used as a unique identifier for reference when storing the process model.
[0059] Figure 3 The flowchart of the method for generating a process model according to an embodiment of the present disclosure is schematically shown.
[0060] like Figure 3 As shown, in response to receiving a configuration operation from a user, building a process model may further include operations S301 to S303.
[0061] In operation S301 , for a process module at the Nth level, in response to receiving a first configuration operation from a user, module attributes of the process module are configured, wherein the module attributes include a module name, a calling address of an executable program, and a resource usage attribute.
[0062] In operation S302 , for a process module at any level from level 1 to level N−1, in response to receiving a second configuration operation by a user, module attributes and process attributes of the process module are configured.
[0063] In operation S303, a process model is constructed based on the module attributes of the process module at the Nth level, and the module attributes and process attributes of all process modules at the 1st level to the N-1th level.
[0064] According to an embodiment of the present disclosure, the configuration operation can also be divided into a first configuration operation and a second configuration operation. Specifically, the first configuration operation can be an operation for configuring the module name of the process module, the call address of the process module executable program, the resource usage, the preset load balancing strategy, the priority of the process module, the execution host of the process module, etc. The second configuration operation can include the first configuration operation, and can also be an operation for configuring the execution order, execution conditions, etc. between various process modules.
[0065] According to an embodiment of the present disclosure, module attributes may include module name, calling address and resource usage attributes of the executable program, preset load balancing strategy, priority of the process module, execution host of the process module, etc.; process attributes may include execution order and execution conditions between various process modules, etc.
[0066] Figure 4 The flowchart schematically shows a method for generating a process model according to another embodiment of the present disclosure.
[0067] like Figure 4 As shown, the method for generating the process model includes operations S401 to S410.
[0068] In operation S401 , for the process module at the Nth level, the module attribute of the process module at the Nth level may also be configured in response to the input operation of the user based on the input information carried in the input operation.
[0069] In operation S402 , for the process module at the Mth level, in response to a user's selection operation, at least one process module at the M+1th level associated with the process module at the Mth level is determined, where M is a positive integer less than N.
[0070] In operation S403 , based on the module attributes of at least one process module at the M+1th level, the module attributes of the process module at the Mth level are determined.
[0071] In operation S404 , at least one graphic associated with at least one process module at the M+1th level is drawn on a display interface.
[0072] In operation S405 , in response to a user's connection operation on at least one graphic, a relationship type corresponding to the connection operation is determined.
[0073] In operation S406 , the process attributes of the process modules at the Mth level are configured based on the relationship type.
[0074] In operation S407 , it is determined whether the configuration of the process module at the Mth level is complete.
[0075] In operation S408, it is determined whether the value of M is greater than 1.
[0076] In operation S409, the difference between the value of M and 1 is calculated to obtain a new value of M.
[0077] In operation S410 , the generation of the process model is completed.
[0078] According to the embodiments of the present disclosure, the input operation can be used as a way to implement the first configuration operation. For example, the module name, the call address of the process module executable program, the resource usage, the preset load balancing strategy, the priority of the process module, the execution host of the module, and other related contents can be directly input to directly implement the configuration of the module attributes of the N-th level process module. The module attribute configuration of the N-th level process module can be implemented more simply and efficiently through the input method.
[0079] According to an embodiment of the present disclosure, the second configuration operation can be implemented by a selection operation or a connection operation. For example, in the process of configuring the process attributes and module attributes of the process module, in the pop-up display interface for building the process module, the process attributes and module attributes of the process module are established by clicking, dragging, pulling, and dragging.
[0080] According to an embodiment of the present disclosure, the process module of the Mth level may be a process module of any intermediate level from the 1st level to the Nth level. When configuring the process module of the Mth level, the process module of the M+1th level and the associated relationship components may be loaded first, and then based on the module attributes and / or process attributes of the process module of the M+1th level, the module attributes and / or process attributes of the process module of the Mth level may be determined.
[0081] According to an embodiment of the present disclosure, when there is a graphic associated with at least one process module of the M+1th level on the display interface, the process module of the M+1th level can be dragged, pulled, and dragged to perform editing operations on the process attributes, so as to connect the various process modules, and then determine the execution order or execution conditions between the various process modules of the M+1th level. For example, multiple process modules of the M+1th level can be connected in series or in parallel, or they can be executed according to the designed branch conditions, so that the configuration of the process attributes of the process module of the Mth level can be realized. The relationship type can be used to represent the execution order between various processes, such as a series connection, a parallel connection, etc.
[0082] According to an embodiment of the present disclosure, in operation S407, if it is determined that the process module of the Mth level has not completed configuration, the operation S402 may be continued to be executed until all process modules in the Mth level have completed configuration of module attributes and / or process attributes. If it is determined that all process modules in the Mth level have completed configuration of module attributes and / or process attributes, subsequent operations may be continued.
[0083] According to an embodiment of the present disclosure, in the process of generating a process model, the process model may be generated in the order from the Nth level to the 1st level. When the process modules of the Mth level have completed the configuration of module attributes and / or process attribute configuration, it may be determined whether the value of M is greater than 1. If it is still greater than 1, it may indicate that the configuration of process modules of other levels in the process model has not been completed. It is necessary to calculate the difference between M and 1, obtain a new value of M, and then continue to execute from operation S402 according to the new value of M until the value of M is less than or equal to 1.
[0084] According to an embodiment of the present disclosure, if the value of M is less than or equal to 1, it may indicate that the module attributes and / or process attributes of the process module in the first level have been configured, indicating that the process model has been generated.
[0085] According to an embodiment of the present disclosure, by designing a process model as a business process with a multi-layer nested structure, the business process is split into smaller modules, the logic of the process model is simplified, which is conducive to the decoupling of the business process and improves the availability and flexibility of the business process system.
[0086] According to an embodiment of the present disclosure, operation S204 may further include the following operation: allocating the multiple process modules to multiple hosts of the distributed system based on the resource usage attributes of the multiple process modules.
[0087] Figure 5 The schematic diagram shows an architecture diagram of a process model according to an embodiment of the present disclosure.
[0088] like Figure 5 As shown, the process model may include N levels of process modules, and each level in the N levels may be provided with multiple process modules. When N is greater than 2, the process modules in the Nth level may be process modules with only module attributes, the process modules in the 1st level may be process modules with only process attributes, and the process modules in the 2nd to the N-1th levels may be process modules with both module attributes and process attributes. Figure 5 The process module at the Mth level can not only run the entity program, but also serve as the execution association module of the process module at the M+1th level.
[0089] like Figure 5 As shown, for an M-th level process module, the resource usage attribute of the M-th level process module can be represented as a weighted sum of the resource usage attributes of at least one M+1-th level process module associated with the M-th level process module.
[0090] According to the embodiments of the present disclosure, by using a load balancing strategy based on resource occupancy, it is possible to achieve reasonable allocation of resources among various process modules, achieve load balancing among process modules, further improve the availability and flexibility of business processes, and improve the processing efficiency of business processes.
[0091] According to an embodiment of the present disclosure, by designing a process model as a business process with a multi-layer nested structure, the business process is split into smaller modules, the logic of the process model is simplified, which is conducive to the decoupling of the business process and improves the availability and flexibility of the business process system.
[0092] Figure 6 The flowchart of a service processing method according to another embodiment of the present disclosure is schematically shown.
[0093] like Figure 6 As shown, the business processing method includes operations S601 to S609.
[0094] In operation S601 , in response to receiving a configuration requirement of a user, a process model is started to be constructed.
[0095] According to an embodiment of the present disclosure, the configuration requirements may be requirements for building a process model, and the configuration requirements may include module names related to the process modules, executable program call addresses, module priorities, execution order between models, module execution hosts, and the like.
[0096] In operation S602 , for the process module at the Nth level, in response to receiving a first configuration operation of the user, the module attribute of the process module is configured, where N is a positive integer greater than 2. In one embodiment, operation S602 may refer to operation S301 .
[0097] In operation S603, for the process modules at level 2 to level N-1, in response to the user's selection operation and connection operation, the module attributes and process attributes of the process modules are configured. In one embodiment, operation S603 may refer to operation S302, or to operations S501 to S505.
[0098] In operation S604 , it is determined whether the number of levels of the process module needs to be increased.
[0099] According to an embodiment of the present disclosure, whether the number of levels of the process module needs to be increased can be determined according to user needs. If it needs to be increased, continue to execute from operation S603 until the user's needs are met; if it does not need to be increased, continue to execute subsequent operations.
[0100] In operation S605 , the process attributes of the process module at the first level are configured based on the connection operation to the process module at the second level.
[0101] According to an embodiment of the present disclosure, the process module at the first level may only include process attributes. Specifically, the process attributes may include information such as the name and remarks of the process model.
[0102] In operation S606, the process model is constructed and issued.
[0103] In operation S607 , a startup program associated with the process model is configured, and the process model is started.
[0104] According to an embodiment of the present disclosure, after the process model is constructed, a startup program related to the startup process can be written to start the process model. The startup program can be associated with the name of the process model to facilitate faster and more efficient startup of the process model.
[0105] In operation S608, a preset load balancing strategy is used to distribute multiple process modules in the process model to multiple hosts in the distributed system, and the multiple hosts execute the multiple process modules.
[0106] In operation S609 , the execution results of the plurality of process modules executed by the plurality of hosts are output.
[0107] According to an embodiment of the present disclosure, in one embodiment, operation S608 may refer to operation S204, and the process model may be executed according to the configured process attributes and module attributes, for example, according to the configured module priority, module sorting or branching conditions.
[0108] It should be noted that, unless it is explicitly stated that there is a sequence of execution between different operations shown in the flowchart in the embodiments of the present disclosure, or there is a sequence of execution between different operations in technical implementation, otherwise, the execution order of multiple operations may not be prioritized, and multiple operations may also be executed simultaneously.
[0109] Figure 7 The block diagram of a service processing device according to an embodiment of the present disclosure is schematically shown.
[0110] like Figure 7 As shown, the service processing device 700 includes a receiving module 710 , a determining module 720 , a generating module 730 and an allocating module 740 .
[0111] The receiving module 710 is used to receive a service processing request of a service to be processed, wherein the service processing request carries a target service scenario identifier and target service parameters.
[0112] The determination module 720 is used to respond to the business processing request and determine the target process model from multiple process models according to the target business scenario identifier, wherein the process model includes multiple process modules located at N levels, and N is a positive integer greater than 2.
[0113] The generating module 730 is used to generate a business process instance of the to-be-processed business based on the target process model and the target business parameters.
[0114] The allocation module 740 is used to use a preset load balancing strategy to allocate multiple process modules of the business process instance to multiple hosts in the distributed system, wherein the multiple hosts process the to-be-processed business.
[0115] According to an embodiment of the present disclosure, the business processing device further includes a construction module, an acquisition module and a storage module.
[0116] The construction module is used to construct the process model in response to receiving a configuration operation from a user.
[0117] The acquisition module is used for acquiring the business scenario identifier carried in the storage instruction in response to triggering the storage instruction for the process model.
[0118] The storage module is used to store the process model into a database using the business scenario identifier as a primary key.
[0119] According to an embodiment of the present disclosure, a construction module may include a first configuration unit, a second configuration unit, and a construction unit.
[0120] The first configuration unit is used for configuring the module attributes of the process module at the Nth level in response to receiving the first configuration operation of the user, wherein the module attributes include the module name, the calling address of the executable program and the resource usage attribute;
[0121] The second configuration unit is used for configuring the module attributes and process attributes of the process module at any level from the 1st level to the N-1th level in response to receiving the second configuration operation of the user;
[0122] The construction unit is used to construct the process model based on the module attributes of the process module at the Nth level, and the module attributes and process attributes of all process modules at the 1st level to the N-1th level.
[0123] According to an embodiment of the present disclosure, the first configuration unit may further include a first configuration subunit.
[0124] The first configuration subunit is used to configure the module properties of the process module at the Nth level in response to the input operation of the user and based on the input information carried in the input operation.
[0125] According to an embodiment of the present disclosure, the second configuration unit includes a first determining subunit, a second determining subunit, a drawing subunit, a third determining subunit, and a second configuration subunit.
[0126] The first determination subunit is used to determine, for an M-th level process module, at least one M+1-th level process module associated with the M-th level process module in response to a user's selection operation, wherein M is a positive integer less than N.
[0127] The second determining subunit is used to determine the module attributes of the process modules at the Mth level based on the module attributes of at least one process module at the M+1th level.
[0128] The drawing subunit is used to draw at least one graphic associated with at least one of the process modules at the M+1th level on the display interface.
[0129] The third determining subunit is configured to determine, in response to a connection operation performed by the user on at least one of the graphics, a relationship type corresponding to the connection operation.
[0130] The second configuration subunit is used to configure the process attributes of the process module at the Mth level based on the relationship type.
[0131] According to an embodiment of the present disclosure, the allocation module may further include an allocation unit.
[0132] The allocation unit is used to allocate the multiple process modules to the multiple hosts of the distributed system based on the resource usage attributes of the multiple process modules.
[0133] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0134] For example, any multiple of the receiving module 710, the determining module 720, the generating module 730 and the allocating module 740 can be combined in one module / unit / subunit for implementation, or any one of the modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functions of one or more of these modules / units / subunits can be combined with at least part of the functions of other modules / units / subunits and implemented in one module / unit / subunit. According to an embodiment of the present disclosure, at least one of the receiving module 710, the determining module 720, the generating module 730 and the allocating module 740 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the receiving module 710 , the determining module 720 , the generating module 730 , and the allocating module 740 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0135] It should be noted that the business processing device part in the embodiment of the present disclosure corresponds to the business processing method part in the embodiment of the present disclosure. The description of the business processing device part specifically refers to the business processing method part and will not be repeated here.
[0136] Figure 8 A block diagram of an electronic device suitable for implementing a service processing method according to an embodiment of the present disclosure is schematically shown. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0137] like Figure 8 As shown, the computer electronic device 800 according to the embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 to the random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0138] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0139] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage portion 808 as needed.
[0140] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a 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 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0141] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0142] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0143] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 802 and / or the RAM 803 described above and / or one or more memories other than the ROM 802 and the RAM 803 .
[0144] The embodiments of the present disclosure also include a computer program product, which includes a computer program, which contains program code for executing the method provided by the embodiments of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the business processing method provided by the embodiments of the present disclosure.
[0145] When the computer program is executed by the processor 801, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0146] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0147] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that 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 flowchart, and the combination of boxes in the block diagram or flowchart, 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. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0149] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A business processing method, comprising: Receiving a business processing request for a business to be processed, wherein the business processing request carries a target business scenario identifier and target business parameters; In response to the business processing request, determining a target process model from a plurality of process models according to the target business scenario identifier, wherein the process model includes a plurality of process modules at N levels, where N is a positive integer greater than 2; Based on the target process model and the target business parameters, generating a business process instance of the business to be processed; and Using a preset load balancing strategy, multiple process modules of the business process instance are distributed to multiple hosts in a distributed system, wherein the multiple hosts process the pending business; The method further comprises: In response to receiving a configuration operation of the user, constructing the process model includes: For the process module at the Nth level, in response to receiving a first configuration operation from the user, configuring module attributes of the process module, wherein the module attributes include a module name, a calling address of an executable program, and a resource usage attribute; For a process module at any level from level 1 to level N-1, in response to receiving a second configuration operation by the user, configuring a module attribute and a process attribute of the process module; and The process model is constructed based on the module attributes of the process module at the Nth level and the module attributes and process attributes of all process modules at the 1st level to the N-1th level; Wherein, the second configuration operation includes a selection operation and a connection operation; Wherein, for the process module at any level from level 1 to level N-1, in response to receiving the second configuration operation of the user, configuring the module attribute and the process attribute of the process module includes: For a process module at the Mth level, in response to a selection operation by a user, determining at least one process module at the M+1th level associated with the process module at the Mth level, wherein M is a positive integer less than N; Determine the module attributes of the process modules at the Mth level based on the module attributes of at least one process module at the M+1th level; Drawing at least one graphic associated with at least one of the process modules at the M+1th level on a display interface; In response to a connection operation performed by the user on at least one of the graphics, determining a relationship type corresponding to the connection operation; and The process attributes of the process modules at the Mth level are configured based on the relationship type.
2. The method according to claim 1, further comprising: In response to triggering a storage instruction for the process model, obtaining a business scenario identifier carried in the storage instruction; as well as The process model is stored in a database using the business scenario identifier as a primary key.
3. The method according to claim 1, wherein: The first configuration operation includes an input operation; The configuring of the module attributes of the process module at the Nth level in response to receiving the first configuration operation of the user includes: For the process module at the Nth level, in response to the input operation of the user, the module attribute of the process module at the Nth level is configured based on the input information carried in the input operation.
4. The method according to claim 1, wherein: For the process module at the Mth level, the resource usage attribute of the process module at the Mth level is represented by a weighted sum of the resource usage attributes of at least one process module at the M+1th level associated with the process module at the Mth level; The method of using a preset load balancing strategy to distribute multiple process modules of the business process instance to multiple hosts of the distributed system includes: Based on the resource usage attributes of the multiple process modules, the multiple process modules are allocated to the multiple hosts of the distributed system.
5. A service processing device, comprising: A receiving module, configured to receive a service processing request of a service to be processed, wherein the service processing request carries a target service scenario identifier and target service parameters; A determination module, configured to determine, in response to the business processing request, a target process model from a plurality of process models according to the target business scenario identifier, wherein the process model includes a plurality of process modules at N levels, where N is a positive integer greater than 2; A generating module, used for generating a business process instance of the business to be processed based on the target process model and the target business parameters; An allocation module, configured to allocate multiple process modules of the business process instance to multiple hosts of a distributed system using a preset load balancing strategy, wherein the multiple hosts process the to-be-processed business; Wherein, the service processing device further includes: A construction module, configured to construct the process model in response to receiving a configuration operation from a user; The building blocks include: A first configuration unit is configured to configure module attributes of a process module at the Nth level in response to receiving a first configuration operation from a user, wherein the module attributes include a module name, a calling address of an executable program, and a resource usage attribute; A second configuration unit, configured to configure module attributes and process attributes of a process module at any level from level 1 to level N-1 in response to receiving a second configuration operation from the user; and A construction unit, configured to construct the process model based on the module attributes of the process module at the Nth level, and the module attributes and process attributes of all process modules at the 1st level to the N-1th level; Wherein, the second configuration operation includes a selection operation and a connection operation; Wherein, the second configuration unit includes: a first determining subunit, configured to determine, for an M-th level process module, in response to a user's selection operation, at least one M+1-th level process module associated with the M-th level process module, wherein M is a positive integer less than N; A second determining subunit, configured to determine a module attribute of the process module at the Mth level based on a module attribute of at least one process module at the M+1th level; A drawing subunit, used for drawing at least one graphic associated with at least one process module at the M+1th level on a display interface; A third determining subunit is configured to, in response to a connection operation performed by the user on at least one of the graphics, determine a relationship type corresponding to the connection operation; and The second configuration subunit is used to configure the process attributes of the process module at the Mth level based on the relationship type.
6. An electronic device comprising: one or more processors; a memory for storing one or more instructions, Wherein, when the one or more instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having executable instructions stored thereon, wherein when the executable instructions are executed by a processor, the processor is enabled to implement the method according to any one of claims 1 to 4.
8. A computer program product, comprising computer executable instructions, wherein the computer executable instructions are used to implement the method according to any one of claims 1 to 4 when executed.
Citation Information
Patent Citations
Service activation-based data processing method, device, server and system
CN103873433A