Business processing method and device
By parsing the business identifier from the business request, obtaining the component node set of the configuration center, and adopting the responsibility chain model and AOV network orchestration, dynamic decision-making for business processing is realized, and the high cost caused by static writing of business method calling logic in the existing technology is solved. The problems of R&D costs and slow delivery speed have improved the speed of demand delivery and system flexibility.
Patent Information
- Application Number
- CN201911122257.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-15
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-11-15
AI Technical Summary
In the existing technology, the calling logic of business methods is written directly in the system code, resulting in the inability to make dynamic decisions, resulting in high system development costs and slow demand delivery.
By parsing the business identifier from the business request, the component node set of the configuration center is obtained, and the business methods are extracted into component nodes based on the responsibility chain model. The AOV network is used to orchestrate the execution sequence of the component nodes to achieve dynamic decision-making for business processing.
It improves the speed of demand delivery, responds quickly to changes, reduces system development costs, and resolves dependencies and parallel execution conflicts between component nodes.
Smart Images

Figure CN112817562B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for business processing. Background Art
[0002] With the development of mobile Internet and the Internet, various systems are becoming more and more complex. After the business fields are segmented, different business fields require different service supports. In the prior art, the calling logic of each business method used to support different services is generally written directly in the system code.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] It is not possible to make dynamic decisions based on business request parameters. Therefore, when there are new requirements or changes in requirements, a large number of changes can only be made to the existing code, resulting in high system development costs and the requirements are often not delivered on time. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and device for business processing, which can improve the delivery speed of requirements, quickly respond to changes, and reduce system development costs.
[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a service processing method is provided, including:
[0007] Parse the business identifier of the business line from the business request;
[0008] Acquire a component node set corresponding to the business identifier from a configuration center; the component node set includes: each component node corresponding to the business line and its execution order;
[0009] Each component node in the component node set is reflectively called, and each component node in the component node set is executed based on the execution order of each component node in the component node set to implement business processing.
[0010] Optionally, before obtaining the component node set corresponding to the service identifier from the configuration center, the method further includes:
[0011] Extract all business methods into component nodes based on the responsibility chain pattern;
[0012] Divide all component nodes according to business fields to obtain a business component set for each business field, and save the business component set to a configuration center;
[0013] Based on the business component set of the business domain, a component node set is configured for each business line in the business domain, and the component node set of each business line in the business domain is saved to a configuration center.
[0014] Optionally, after extracting all business methods into component nodes based on the chain of responsibility model, it also includes: defining a component interface in each of the component nodes, the component interface including: a node identifier of the component node, and a business method corresponding to the component node.
[0015] Optionally, the execution order of each component node in the business component set and the execution order of each component node in the component node set adopt AOV network orchestration.
[0016] According to a second aspect of an embodiment of the present invention, a service processing device is provided, including:
[0017] A parsing unit, which parses the service identifier of the service line from the service request;
[0018] An acquisition unit is configured to acquire a component node set corresponding to the service identifier from a configuration center; the component node set includes: each component node corresponding to the service line and its execution order;
[0019] The execution unit reflectively calls each component node in the component node set, executes each component node in the component node set based on the execution order of each component node in the component node set, and realizes business processing.
[0020] Optionally, the apparatus of the embodiment of the present invention further includes a configuration unit, which is used to: before the acquisition unit acquires the component node set corresponding to the service identifier from the configuration center,
[0021] Extract all business methods into component nodes based on the responsibility chain pattern;
[0022] Divide all component nodes according to business fields to obtain a business component set for each business field, and save the business component set to a configuration center;
[0023] Based on the business component set of the business domain, a component node set is configured for each business line in the business domain, and the component node set of each business line in the business domain is saved to a configuration center.
[0024] Optionally, the configuration unit is further used to: after extracting all business methods into component nodes based on the chain of responsibility model, define a component interface in each component node, the component interface including: a node identifier of the component node, and a business method corresponding to the component node.
[0025] Optionally, the execution order of each component node in the business component set and the execution order of each component node in the component node set adopt AOV network orchestration.
[0026] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for service processing, including:
[0027] one or more processors;
[0028] a storage device for storing one or more programs,
[0029] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.
[0030] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.
[0031] One embodiment of the above invention has the following advantages or beneficial effects: the call relationship that changes frequently with demand in the system is extracted from the system and managed in the form of configuration files (handed over to the configuration center for management). The business system implements dynamic decision-making of the call link by parsing the configuration, which can improve the delivery speed of demand, respond to changes quickly, and reduce system development costs. The use of AOV network to arrange the execution order of each component node can resolve the dependency relationship between component nodes and the conflict of parallel execution.
[0032] 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
[0033] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0034] Figure 1 It is a schematic diagram of the main flow of the method for business processing in an embodiment of the present invention;
[0035] Figure 2 is a schematic diagram of a component node instance in an embodiment of the present invention;
[0036] Figure 3 is a schematic diagram of an AOV network of a service component set in an embodiment of the present invention;
[0037] Figure 4 is a schematic diagram of an AOV network of a component node set in an embodiment of the present invention;
[0038] Figure 5 is a schematic diagram of a business processing flow in an optional embodiment of the present invention;
[0039] Figure 6 is a schematic diagram of the main components of a device for service processing according to an embodiment of the present invention;
[0040] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0041] Figure 8 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0042] 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.
[0043] According to one aspect of an embodiment of the present invention, a service processing method is provided.
[0044] Figure 1 FIG. 1 is a schematic diagram of the main flow of the method for business processing in an embodiment of the present invention. Figure 1 As shown, the business processing method includes: step S101, step S102 and step S103.
[0045] Step S101: parse the service identifier of the service line from the service request.
[0046] Business domain refers to the scope of the business, such as goods belong to the goods domain, orders belong to the order domain, and users belong to the user domain. A business line can correspond to different business domains. For example, the business line for major customer orders includes: order domain, user domain, product domain, price domain, and promotion domain. The business identifier is a kind of marking information that indicates the characteristics of the business line, which is used to uniquely mark a business line. The business identifier can be the name of the business line, or a unique code generated for the business line.
[0047] Step S102: Acquire a component node set corresponding to the business identifier from a configuration center; the component node set includes: each component node corresponding to the business line and its execution order.
[0048] The present invention extracts all business methods into component nodes based on the responsibility chain model and saves them in the configuration center. Each component node can be configured with one or more business methods. The configuration center in this example refers to a system with the ability to push configuration changes. By saving the component node sets of each business line in the configuration center, node changes can be promptly notified when component nodes are changed.
[0049] Optionally, before obtaining the component node set corresponding to the business identifier from the configuration center, all business methods are extracted into component nodes based on the responsibility chain model; all component nodes are divided according to business fields to obtain a business component set for each business field, and the business component set is saved to the configuration center; based on the business component set of the business field, component node sets are configured for each business line in the business field, and the component node sets for each business line in the business field are saved to the configuration center.
[0050] Exemplarily, after extracting all business methods contained in the business system in the e-commerce field into component nodes, component nodes 1, component nodes 2, ..., and component nodes 100 are obtained. The 100 component nodes are divided according to the business field to obtain business component sets of five business fields, namely: business component set 1 of the commodity domain, including component nodes 1, component nodes 2, ..., and component nodes 60; business component set 2 of the order domain, including component nodes 61, component nodes 62, ..., and component nodes 70; business component set 3 of the price domain, including component nodes 71, component nodes 72, ..., and component nodes 80; business component set 4 of the user domain, including component nodes 81, component nodes 82, ..., and component nodes 90; business component set 5 of the promotion domain. It includes component nodes 91, component nodes 92, ..., and component nodes 100. Then, component node sets are configured for each business line in each business field. Taking the key customer ordering business line as an example, since the key customer ordering business line includes: order domain, user domain, product domain, price domain, and promotion domain, it is necessary to configure the component node set of this business line in the business component set of each business field.
[0051] In actual application, different component node sets can be configured for different business lines based on the system's component capability template, and the configuration can be verified, such as whether the component nodes in the component node set exist in the system, whether there are conflicts between the component nodes in the component node set, etc. Verification can avoid business processing failures caused by node non-existence or node conflicts.
[0052] After the business component set of each business domain and the component node set of each business line in each business domain are saved to the configuration center, a reminder message can also be sent through the configuration center to inform the business system configuration result, such as configuration success or configuration failure.
[0053] Optionally, after extracting all business methods into component nodes based on the responsibility chain pattern, it further includes: defining a component interface in each of the component nodes, the component interface including: a node identifier of the component node and a business method corresponding to the component node. By making all component nodes implement the component interface, it is convenient to find all component nodes using reflection.
[0054] Figure 2 is a schematic diagram of a component node instance in an embodiment of the present invention. Figure 2 In the illustrated embodiment, it is assumed that there are business methods f1, f2, f3, and f4 in the system. In order to realize componentization, a component interface ProcessUnit is defined, and all component nodes need to implement the component interface. The purpose of defining the component interface is to shield the appearance differences between component nodes and facilitate unified processing. Figure 2 In the example, the component interface is ProcessUnit, which has two main methods: process(Tt) and getOrder(). t ) is used for business processing, T t Represents the context of business processing. getOrder() is used to uniquely identify a component node. Business methods f1, f2, f3, and f4 are extracted to the corresponding classes ClassA, ClassB, ClassC, and ClassD, respectively, and the ProcesUnit interface is implemented. Component nodes usually belong to the same business domain. t It is the same, component nodes in different business areas, T in process t are different.
[0055] Optionally, the execution order of each component node in the business component set and the execution order of each component node in the component node set are arranged using an AOV network. The AOV (Activity On Vertex) network is also called an activity on vertex network. The vertices in the graph represent activities, and the directed edges represent the order in which the activities occur. The use of the AOV network to arrange the execution order of nodes effectively solves the dependency relationship between nodes and the conflict of parallel execution.
[0056] Figure 3 It is a schematic diagram of the AOV network of the business component set in the embodiment of the present invention. Components are divided according to business fields to form different business component sets. There can be multiple business component sets in a system, and a business component set is usually defined by a tuple <problem domain name, AOV network of component node dependencies>). The business line name is the business line identifier, and the system name is the system identifier. By dividing the business component set, all component nodes in the system and the boundaries of the system component capabilities (component capabilities refer to the set of problems that can be solved by all components in a system) can be clearly known. Figure 3In the figure, circles represent component nodes, and letters A, B, C, D, E, F, G, and H represent the numbers of component nodes. Component node A is the beginning of a link, and component node B can only run after component node A is completed. Component node C and component node F have no dependency relationship. After component node B is completed, component node C and component node F can run in parallel (parallel execution is adopted because current servers are multi-core, and multi-threading can give full play to the advantages of multi-core, but parallel execution will increase the difficulty of programming, and it is necessary to balance the solution with the actual situation of the company. When parallel execution is not possible, serial execution can also be adopted).
[0057] The business component set is defined by the business system and saved in the configuration center. When saving, it can be automatically saved to the configuration center after the business system is defined, or it can be saved manually in the configuration center. When registering each business component set to the configuration center, the triple <system name, business component set name, component node dependency AOV network> is usually used to save it. The AOV (Activity On Vertex) network is also known as the activity on the vertex network. The vertices in the graph represent activities, and the directed edges represent the order in which the activities occur. The following JSON (JavaScriptObject Notation, i.e. object notation, is a lightweight data exchange format) is the configuration information of a business component set:
[0058] [{"app-name":"sytemA-Name","business-line":"business1","unitList":
[0059] [{"nodeId":1,"nodeName":"Node A"},{"nodeId":2,"nodeName":"Node B"},{"nodeId":3,"nodeName":"Node C"},{"nodeId":4,"nodeName":"Node D"},{"nodeId":5,"nodeName":"Node E"},{"nodeId":6,"nodeName":"Node F"},{"nodeId":7,"nodeName":"Node G"},{"nodeId":8,"nodeName":"Node H"}],"aov_grap":"
[0060] [[0,1,0,0,0,0,0,0],[0,0,1,0,0,1,0,0],[0,0,0,1,1,0,0,0],[0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,1],[0,0,0,0,0,0,0,0]]"}]
[0061] Figure 4 is a schematic diagram of the AOV network of the component node set in the embodiment of the present invention. The component node set usually uses <system name, business line name, node dependency AOV network> to represent each component node that a business line needs to go through). For example, business line B1 only uses Figure 3 There are four component nodes A, B, C, and D in the diagram. Therefore, when configuring the component node set for business line B1, you can only check Figure 3 The four nodes A, B, C, and D in Figure 4 ) and fill in the name of the corresponding business line and the system name. The business line name is the business line identifier, and the system name is the system identifier. In actual application, the process of configuring the business component set and component node set can be visualized, which is more intuitive and can avoid a large number of configuration errors. The following JSON is the configuration information of the business line AOV network diagram saved by the business line:
[0062] [{"app-name":"sytemA-Name","business-line":"business1","unitList":
[0063] [{"nodeId":1,"nodeName":"Node A"},{"nodeId":2,"nodeName":"Node B"},{"nodeId":3,"nodeName":"Node C"},{"nodeId":4,"nodeName":"Node D"},{"nodeId":5,"nodeName":"Node E"},{"nodeId":6,"nodeName":"Node F"},{"nodeId":7,"nodeName":" e":"Node G"},{"nodeId":8,"nodeName":"Node H"}],"aov_grap":"[[0,1,0,0,0,0,0,0],[0,0,1,0,0,1,0,0],[0,0,0,1,1,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]]"}]
[0064] Step S103: reflectively call each component node in the component node set, and execute each component node in the component node set based on the execution order of each component node in the component node set to implement business processing.
[0065] Figure 5 Schematic diagram of the business processing flow in an optional embodiment of the present invention. In this example, the external business system refers to the system that needs to call the business system for business processing. Figure 5 As shown in the figure, the business processing flow mainly includes:
[0066] The external business system sends a request to the business system to call the business system; the business system performs parameter verification on the request. If the verification fails, a prompt message is returned to the external business system; if the call is successful, the external business system is run to call the business system. At this time, the AOV network of the component node of a specific business line under a specific system is obtained from the configuration center. If the AOV network exists in the configuration center, the AOV network is returned; otherwise, a prompt message is returned. Then the business system verifies whether there is a node in the AOV network. If the AOV network does not exist in the configuration center or a node in the AOV network does not exist in the business system, it is determined whether there is a reduction plan. If so, the reduction plan is used for processing and the processing result is returned. If there is no reduction plan, a prompt message is returned to the external business system. If the AOV network exists in the configuration center and each node in the AOV network exists in the business system, the process method of each component node in the network is called in the order of the AOV network, and the call result is subsequently processed and returned to the caller (external business system). The external business system determines the call result based on the return information of the business system, and the process ends after the result is processed.
[0067] exist Figure 5 In the illustrated embodiments, it should be noted that the service processing method of the embodiments of the present invention is generally executed in a service system.
[0068] The present invention extracts the parts of the system that change frequently with demand and gives them to a separate configuration center for maintenance, thereby realizing dynamic assembly and decision-making of business lines. When there are new demands, it is only necessary to expand the business component set stored in the configuration center. When changing an existing business line, it is only necessary to change the business component set of the business line in the configuration center. The present invention can improve the delivery speed of demand, respond to changes quickly, and reduce system R&D costs.
[0069] According to a second aspect of an embodiment of the present invention, a device for business processing is provided.
[0070] Figure 6 FIG. 1 is a schematic diagram of the main components of the device for service processing according to an embodiment of the present invention. Figure 6 As shown, the service processing device 600 includes:
[0071] A parsing unit 601 parses the service line's service identifier from the service request;
[0072] The acquisition unit 602 acquires a component node set corresponding to the service identifier from a configuration center; the component node set includes: each component node corresponding to the service line and its execution order;
[0073] The execution unit 603 reflectively calls each component node in the component node set, and executes each component node in the component node set based on the execution order of each component node in the component node set to implement business processing.
[0074] Optionally, the apparatus of the embodiment of the present invention further includes a configuration unit, which is used to: before the acquisition unit acquires the component node set corresponding to the service identifier from the configuration center,
[0075] Extract all business methods into component nodes based on the responsibility chain pattern;
[0076] Divide all component nodes according to business fields to obtain a business component set for each business field, and save the business component set to a configuration center;
[0077] Based on the business component set of the business domain, a component node set is configured for each business line in the business domain, and the component node set of each business line in the business domain is saved to a configuration center.
[0078] Optionally, the configuration unit is further used to: after extracting all business methods into component nodes based on the chain of responsibility model, define a component interface in each component node, the component interface including: a node identifier of the component node, and a business method corresponding to the component node.
[0079] Optionally, the execution order of each component node in the business component set and the execution order of each component node in the component node set adopt AOV network orchestration.
[0080] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for service processing, including:
[0081] one or more processors;
[0082] a storage device for storing one or more programs,
[0083] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.
[0084] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.
[0085] Figure 7 An exemplary system architecture 700 is shown to which the service processing method or service processing apparatus according to the embodiment of the present invention can be applied.
[0086] like Figure 7As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0087] Users can use terminal devices 701, 702, and 703 to interact with server 705 through network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0088] The terminal devices 701 , 702 , and 703 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.
[0089] The server 705 may be a server that provides various services, such as a backend management server (only for example) that supports shopping websites browsed by users using the terminal devices 701, 702, and 703. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only for example) to the terminal device.
[0090] It should be noted that the service processing method provided in the embodiment of the present invention is generally executed by the server 705 , and accordingly, the service processing device is generally set in the server 705 .
[0091] It should be understood that Figure 7 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.
[0092] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 The terminal 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 invention.
[0093] like Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0094] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 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 section 808 as needed.
[0095] 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 includes 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 central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.
[0096] 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.
[0097] 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 module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a 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 a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0098] The units involved in the embodiments of the present invention may be implemented in software or hardware. The units described may also be set in a processor, for example, may be described as: a processor comprising: a parsing unit, parsing the business identifier of the business line from the business request; an acquisition unit, acquiring a component node set corresponding to the business identifier from a configuration center; the component node set comprising: each component node corresponding to the business line and its execution order; an execution unit, reflectively calling each component node in the component node set, and executing each component node in the component node set based on the execution order of each component node in the component node set to implement business processing. Among them, the names of these units do not constitute a limitation on the unit itself in some cases. For example, the parsing unit may also be described as "a unit that acquires a component node set corresponding to the business identifier from a configuration center".
[0099] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it 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 includes: parsing the business identifier of the business line from the business request; obtaining the component node set corresponding to the business identifier from the configuration center; the component node set includes: each component node corresponding to the business line and its execution order; reflectively calling each component node in the component node set, and executing each component node in the component node set based on the execution order of each component node in the component node set to implement business processing.
[0100] According to the technical solution of the embodiment of the present invention, the call relationship in the system that changes frequently with demand is extracted from the system and managed in the form of configuration files (handed over to the configuration center for management). The business system implements dynamic decision-making of the call link by parsing the configuration, which can improve the delivery speed of demand, respond to changes quickly, and reduce system development costs. The use of AOV network to arrange the execution order of each component node can resolve the dependencies between component nodes and the conflict of parallel execution.
[0101] 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: Parse the business identifier of the business line from the business request; Acquire a component node set corresponding to the service identifier from a configuration center; The component node set includes: each component node corresponding to the business line and its execution order; Reflectively calling each component node in the component node set, and executing each component node in the component node set based on the execution order of each component node in the component node set to implement business processing; Before obtaining the component node set corresponding to the business identifier from the configuration center, it also includes: extracting all business methods into component nodes based on the responsibility chain model; dividing all component nodes according to business fields to obtain a business component set for each business field, and saving the business component set to the configuration center; based on the business component set of the business field, configuring component node sets for each business line in the business field, and saving the component node sets of each business line in the business field to the configuration center; wherein the component node set of the business line is configured in the business component set of each business field corresponding to the business line.
2. The method according to claim 1, characterized in that After all business methods are extracted into component nodes based on the responsibility chain model, it also includes: defining a component interface in each of the component nodes, the component interface including: a node identifier of the component node and a business method corresponding to the component node.
3. The method according to claim 1, characterized in that The execution order of each component node in the business component set and the execution order of each component node in the component node set adopt AOV network arrangement.
4. A device for business processing, characterized in that: include: A parsing unit, which parses the service identifier of the service line from the service request; An acquisition unit, which acquires a component node set corresponding to the service identifier from a configuration center; The component node set includes: each component node corresponding to the business line and its execution order; An execution unit, which reflectively calls each component node in the component node set, and executes each component node in the component node set based on the execution order of each component node in the component node set to implement business processing; The device also includes a configuration unit, which is used to: before the acquisition unit acquires the component node set corresponding to the business identifier from the configuration center, extract all business methods into component nodes based on the responsibility chain model; divide all component nodes according to business fields to obtain a business component set for each business field, and save the business component set to the configuration center; based on the business component set of the business field, configure component node sets for each business line in the business field, and save the component node sets of each business line in the business field to the configuration center; wherein the component node set of the business line is configured in the business component set of each business field corresponding to the business line.
5. The device according to claim 4, characterized in that The configuration unit is also used to: after extracting all business methods into component nodes based on the responsibility chain model, define a component interface in each component node, the component interface including: a node identifier of the component node and a business method corresponding to the component node.
6. The device according to claim 4, characterized in that The execution order of each component node in the business component set and the execution order of each component node in the component node set adopt AOV network arrangement.
7. An electronic device for business processing, 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 3.
8. 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 3 is implemented.
Citation Information
Patent Citations
Communication protocol adapting method and system
CN102594833A
Software definable network business configuration method
CN107294773A
Network interaction methods, equipment and system
CN108712456A
Service software development method and device and terminal device
CN109324787A
A Method of Processing Multiple Components of a Processing Job in Parallel Across a Plurality of Clusters
EP2538329A1
