CN112817562A - Service processing method and device - Google Patents

Service processing method and device Download PDF

Info

Publication number
CN112817562A
CN112817562A CN201911122257.3A CN201911122257A CN112817562A CN 112817562 A CN112817562 A CN 112817562A CN 201911122257 A CN201911122257 A CN 201911122257A CN 112817562 A CN112817562 A CN 112817562A
Authority
CN
China
Prior art keywords
component
service
node
component node
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911122257.3A
Other languages
Chinese (zh)
Inventor
李旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201911122257.3A priority Critical patent/CN112817562A/en
Publication of CN112817562A publication Critical patent/CN112817562A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation

Abstract

The invention discloses a method and a device for processing services, and relates to the technical field of computers. One embodiment of the method comprises: analyzing the service identification of the service line from the service request; acquiring a component node set corresponding to the service identifier from a configuration center; the set of component nodes comprises: each component node corresponding to the service line and the execution sequence thereof; and reflecting and calling each component node in the component node set, and executing each component node in the component node set based on the execution sequence of each component node in the component node set to realize service processing. The implementation method extracts the calling relation which changes frequently along with the requirement and manages the calling relation by using the configuration file, can improve the delivery speed of the requirement, quickly responds to changes, and reduces the research and development cost of the system. The AOV network is adopted to arrange the execution sequence of each component node, so that the conflict of dependency relationship and parallel execution among the component nodes can be solved.

Description

Service processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for service processing.
Background
With the development of mobile internet and internet, various systems are more and more complex, and after business fields are subdivided, different business fields need different service supports. In the prior art, the call logic for each business method supporting different services is generally directly written in the system code.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the dynamic decision can not be made according to the service request parameters, so that when a new requirement or a requirement is changed, the existing code can only be changed greatly, the research and development cost of the system is high, and the requirement can not be delivered as required.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for service processing, which can improve a delivery speed of a request, quickly respond to a change, and reduce a system development cost.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for service processing, including:
analyzing the service identification of the service line from the service request;
acquiring a component node set corresponding to the service identifier from a configuration center; the set of component nodes comprises: each component node corresponding to the service line and the execution sequence thereof;
and reflecting and calling each component node in the component node set, and executing each component node in the component node set based on the execution sequence of each component node in the component node set to realize service processing.
Optionally, before obtaining the component node set corresponding to the service identifier from the configuration center, the method further includes:
extracting all business methods into component nodes based on a responsibility chain mode;
dividing all component nodes according to service fields to obtain a service component set of each service field, and storing the service component set to a configuration center;
and configuring a component node set for each service line in the service field based on the service component set in the service field, and storing the component node set of each service line in the service field to a configuration center.
Optionally, after extracting all the service methods into a group of component nodes based on the chain of responsibility pattern, the method further includes: defining a component interface in each of the component nodes, the component interface comprising: node identification of the component node, and a service method corresponding to the component node.
Optionally, the execution sequence of each component node in the service component set and the execution sequence of each component node in the component node set are arranged by using an AOV network.
According to a second aspect of the embodiments of the present invention, there is provided a service processing apparatus, including:
the analysis unit is used for analyzing the service identifier of the service line from the service request;
the acquisition unit is used for acquiring a component node set corresponding to the service identifier from a configuration center; the set of component nodes comprises: each component node corresponding to the service line and the execution sequence thereof;
and the execution unit is used for reflecting and calling each component node in the component node set, executing each component node in the component node set based on the execution sequence of each component node in the component node set, and realizing service processing.
Optionally, the apparatus in this embodiment of the present invention further includes a configuration unit, configured to: before the obtaining unit obtains the component node set corresponding to the service identification from the configuration center,
extracting all business methods into component nodes based on a responsibility chain mode;
dividing all component nodes according to service fields to obtain a service component set of each service field, and storing the service component set to a configuration center;
and configuring a component node set for each service line in the service field based on the service component set in the service field, and storing the component node set of each service line in the service field to a configuration center.
Optionally, the configuration unit is further configured to: after all business methods are extracted into component nodes based on a chain of responsibility pattern, defining a component interface in each of the component nodes, the component interface comprising: node identification of the component node, and a service method corresponding to the component node.
Optionally, the execution sequence of each component node in the service component set and the execution sequence of each component node in the component node set are arranged by using an AOV network.
According to a third aspect of the embodiments of the present invention, there is provided an electronic device for service processing, including:
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 are caused to implement the method provided by the first aspect of the embodiments of the present invention.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method provided by the first aspect of embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: the calling relation which changes frequently along with the requirement in the system is taken out from the system and managed in a configuration file mode (handed to a configuration center for management), and the service system realizes dynamic decision of calling links in an analysis configuration mode, so that the delivery speed of the requirement can be improved, the change is responded quickly, and the research and development cost of the system is reduced. The AOV network is adopted to arrange the execution sequence of each component node, so that the conflict of dependency relationship and parallel execution among the component nodes can be solved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a method of business processing in an embodiment of the present invention;
FIG. 2 is a diagram of an example of a component node in an embodiment of the invention;
FIG. 3 is a schematic diagram of an AOV network of service component sets in an embodiment of the invention;
FIG. 4 is a schematic diagram of an AOV network of a set of component nodes in an embodiment of the invention;
FIG. 5 is a schematic illustration of a business process flow in an alternative embodiment of the invention;
fig. 6 is a schematic diagram of the main components of a device for traffic processing according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
According to an aspect of an embodiment of the present invention, a method for service processing is provided.
Fig. 1 is a schematic diagram of a main flow of a service processing method in an embodiment of the present invention, and as shown in fig. 1, the service processing method includes: step S101, step S102, and step S103.
Step S101, analyzing the service identification of the service line from the service request.
The business field refers to the field range related to the business, such as that the commodity belongs to the commodity domain, the order belongs to the order domain, and the user belongs to the user domain. One service line may correspond to different service domains, for example, a large customer ordering service line includes: order field, user field, goods field, price field, and sales promotion field. The service identifier is a kind of marking information indicating the characteristics of the service line, and is used for uniquely marking one service line. The service identification may be a service line name or a unique code generated for the service line.
Step S102, obtaining a component node set corresponding to the service identifier from a configuration center; the set of component nodes comprises: and each component node corresponding to the service line and the execution sequence thereof.
The invention extracts all service methods into component nodes based on the responsibility chain mode and stores the component nodes in the configuration center. Each component node may be configured with one or more business methods. The configuration center in this example refers to a system having a configuration change push capability. By storing the component node sets of each service line in the configuration center, node changes can be known in time when the component nodes change.
Optionally, before acquiring the component node set corresponding to the service identifier from the configuration center, extracting all service methods into component nodes based on a responsibility chain mode; dividing all component nodes according to service fields to obtain a service component set of each service field, and storing the service component set to a configuration center; and configuring a component node set for each service line in the service field based on the service component set in the service field, and storing the component node set of each service line in the service field to a configuration center.
Illustratively, after all business methods contained in the business system in the e-commerce field are extracted into component nodes, component node 1, component node 2, … … and component node 100 are obtained. Dividing 100 component nodes according to the service fields to obtain service component sets of five service fields, wherein the service component sets are respectively as follows: a business component set 1 of the commodity domain, which comprises a component node 1, component nodes 2, … … and a component node 60; a service component set 2 of the order domain, comprising a component node 61, component nodes 62, … …, and a component node 70; a business component set 3 of the price domain, comprising a component node 71, component nodes 72, … …, and a component node 80; service component set 4 of the user domain, which comprises component node 81, component nodes 82, … … and component node 90; a set of business components for the promotion domain 5. Including component node 91, component nodes 92, … …, and component node 100. A set of component nodes is then configured for each business line within each business segment. Taking the large customer ordering service line as an example, the large customer ordering service line includes: order domain, user domain, goods domain, price domain, promotion domain, therefore, it is necessary to configure the component node set of the service line in the service component set of each service domain.
In the actual application process, different component node sets can be configured for different service lines based on the component capability template of the system, and the configuration is verified, for example, whether component nodes in the component node sets exist in the system or not, whether conflicts exist among the component nodes in the component node sets or not, and the like are verified. Service processing failure caused by node absence or node conflict can be avoided through verification.
After the service component sets of each service domain and the component node sets of each service line in each service domain are stored in the configuration center, a reminding message can be generated through the configuration center to inform the configuration result of the service system, such as successful configuration or failed configuration.
Optionally, after extracting all the service methods into a group of component nodes based on the chain of responsibility pattern, the method further includes: defining a component interface in each of the component nodes, the component interface comprising: node identification of the component node, and a service method corresponding to the component node. By enabling all component nodes to implement component interfaces, all component nodes can be conveniently found using reflection.
FIG. 2 is a diagram of an example of a component node in an embodiment of the invention. In the embodiment shown in fig. 2, it is assumed that there are service methods f1, f2, f3, and f4 in the system, and in order to implement componentization, a component interface ProcessUnit is defined, and all component nodes need to implement the component interface. Define the component toThe purpose of the port is to shield appearance differences between the component nodes and facilitate uniform processing. In FIG. 2, the component interface is a ProcessUnit, which has 2 methods, Process (Tt) and getOrder (). Wherein, process (T)t) For performing business processes, TtgetOrder () is used to uniquely identify a component node on behalf of the context of the business process. And respectively extracting the service methods f1, f2, f3 and f4 into corresponding classes ClassA, ClassB, ClassC and ClassD, and simultaneously realizing a ProcessUnit interface. Component nodes, T in a process, usually belonging to the same business domaintIs the same, a component node of different service fields, T in processtAre not the same.
Optionally, the execution sequence of each component node in the service component set and the execution sequence of each component node in the component node set are arranged by using an AOV network. An AOV (Activity On vertex) network is also called a net of activities On vertices, wherein the vertices in the graph represent the activities and the directed edges represent the occurrence sequence of the activities. The execution sequence of the nodes is arranged by utilizing the AOV network, and the conflict of dependency relationship and parallel execution among the nodes is well solved.
FIG. 3 is a schematic diagram of an AOV network of service component sets in an embodiment of the invention. And dividing the components according to the service field to obtain different service component sets. There may be multiple sets of business components in a system, usually a business component set is defined by a duplet < problem domain name, AOV network of component node dependencies >. The service line name is a service line identifier, and the system name is a system identifier. By partitioning the set of business components, it is possible to clearly know all the component nodes in the system, and the boundaries of the system component capabilities (component capabilities refer to the set of problems that all components in a system can solve). In fig. 3, the circles represent component nodes and the letter A, B, C, D, E, F, G, H indicates the number of the component nodes. Where component node a is the beginning of a link and component node B must be operational after component node a is operational. The component node C and the component node F have no dependency relationship, and after the component node B finishes running, the component node C and the component node F can be in parallel (the parallel mode is adopted because the existing servers are all multi-core, the advantage of multi-core can be fully exerted by utilizing multithreading, but the parallel mode can increase programming difficulty, needs to be solved and balanced with the actual condition of a company, and can also be executed in series when the parallel mode cannot be adopted).
The business component set is defined by the business system and is stored in the configuration center. When saving, the business system can be automatically saved to the configuration center after being defined, and the business system can also be manually operated in the configuration center for saving. When registering each service component set to the configuration center, the triple < system name, service component set name, component node dependency relationship AOV network > is usually used for storage. An AOV (Activity On vertex) network is also called a net of activities On vertices, wherein the vertices in the graph represent the activities and the directed edges represent the occurrence sequence of the activities. JSON (object Notation, which is a lightweight data exchange format) is configuration information of a business component set as follows:
[{"app-name":"sytemA-Name","business-line":"business1","unitList":
[ { "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 _ graph ": and"
[[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,1,0],[0,0,0,0,0,0,0,1],[0,0,0,0,0,0,0,0]]"}]。
FIG. 4 is a schematic diagram of an AOV network of a set of component nodes in an embodiment of the invention. The component node set usually adopts < system name, service line name, node dependency relationship AOV network > to represent each component node that a service line needs to go). Illustratively, the service line B1 only uses A, B, C, D four component nodes in fig. 3, so when configuring the component node set for the service line B1, only A, B, C, D four nodes in fig. 3 (e.g., the hooked component nodes in fig. 4) may be checked and the name and system name of the corresponding service line may be filled in. The service line name is a service line identifier, and the system name is a system identifier. In the actual application process, the process of configuring the business component set and the component node set can be visually operated, so that the method is more intuitive and can avoid a large number of configuration errors. The following JSON is configuration information of the service line AOV network map stored by the service line:
[{"app-name":"sytemA-Name","business-line":"business1","unitList":
[ { "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 "[ [0,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]]"}].
Step S103, each component node in the component node set is called in a reflection mode, each component node in the component node set is executed based on the execution sequence of each component node in the component node set, and service processing is achieved.
Fig. 5 is a schematic diagram of a business process flow in an alternative embodiment of the invention. In this example, the external service system refers to a system that needs to call the service system to perform service processing. As shown in fig. 5, the service processing flow mainly includes:
the external service system sends a request for calling the service system to the service system; the service system checks the parameters of the request, and if the check fails, prompt information is returned to an external service system; and if the calling is successful, operating the external service system to call the service system. At this time, the AOV network of a specific service line component node under a specific system is acquired from the configuration center. If the AOV network exists in the configuration center, returning to the AOV network; otherwise, returning the prompt information. The service system then checks whether there are nodes in the AOV network. If the AOV network does not exist in the configuration center or a certain node in the AOV network does not exist in the service system, judging whether a reduction scheme exists or not, if so, processing by adopting the reduction scheme and returning a processing result, and if not, returning prompt information to an external service system. If the AOV network exists in the configuration center and each node in the AOV network exists in the service system, the process method of each component node in the network is called according to the sequence of the AOV network, and the calling result is subsequently processed and returned to the calling party (external service system). And the external service system determines a calling result according to the returned information of the service system, and the flow is ended after the result processing is carried out.
In the embodiment shown in fig. 5, it should be noted that the method for processing the service according to the embodiment of the present invention is generally executed in a service system.
The invention extracts the part which changes frequently along with the requirement in the system and delivers the part to a separate configuration center for maintenance, thereby realizing the dynamic assembly and decision of the service line. When new requirements exist, only the business component set stored in the configuration center needs to be expanded. When the existing service line is changed, only the service component set of the service line needs to be changed in the configuration center. The invention can improve the delivery speed of the demand, quickly respond to the change and reduce the research and development cost of the system.
According to a second aspect of the embodiments of the present invention, an apparatus for processing a service is provided.
Fig. 6 is a schematic diagram of main components of a device for traffic processing according to an embodiment of the present invention. As shown in fig. 6, the apparatus 600 for service processing includes:
the analyzing unit 601 is configured to analyze the service identifier of the service line from the service request;
an obtaining unit 602, configured to obtain, from a configuration center, a component node set corresponding to the service identifier; the set of component nodes comprises: each component node corresponding to the service line and the execution sequence thereof;
the execution unit 603 performs reflection call on each component node in the component node set, and executes each component node in the component node set based on the execution sequence of each component node in the component node set, thereby implementing service processing.
Optionally, the apparatus in this embodiment of the present invention further includes a configuration unit, configured to: before the obtaining unit obtains the component node set corresponding to the service identification from the configuration center,
extracting all business methods into component nodes based on a responsibility chain mode;
dividing all component nodes according to service fields to obtain a service component set of each service field, and storing the service component set to a configuration center;
and configuring a component node set for each service line in the service field based on the service component set in the service field, and storing the component node set of each service line in the service field to a configuration center.
Optionally, the configuration unit is further configured to: after all business methods are extracted into component nodes based on a chain of responsibility pattern, defining a component interface in each of the component nodes, the component interface comprising: node identification of the component node, and a service method corresponding to the component node.
Optionally, the execution sequence of each component node in the service component set and the execution sequence of each component node in the component node set are arranged by using an AOV network.
According to a third aspect of the embodiments of the present invention, there is provided an electronic device for service processing, including:
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 are caused to implement the method provided by the first aspect of the embodiments of the present invention.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method provided by the first aspect of embodiments of the present invention.
Fig. 7 shows an exemplary system architecture 700 of a method of business processing or an apparatus of business processing to which embodiments of the invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 701, 702, 703. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for service processing provided by the embodiment of the present invention is generally executed by the server 705, and accordingly, the device for service processing is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. 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 necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor comprising: the analysis unit is used for analyzing the service identifier of the service line from the service request; the acquisition unit is used for acquiring a component node set corresponding to the service identifier from a configuration center; the set of component nodes comprises: each component node corresponding to the service line and the execution sequence thereof; and the execution unit is used for reflecting and calling each component node in the component node set, executing each component node in the component node set based on the execution sequence of each component node in the component node set, and realizing service processing. The names of these units do not in some cases form a limitation to the unit itself, for example, a parsing unit may also be described as a "unit that obtains a component node set corresponding to the service identifier from a configuration center".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: analyzing the service identification of the service line from the service request; acquiring a component node set corresponding to the service identifier from a configuration center; the set of component nodes comprises: each component node corresponding to the service line and the execution sequence thereof; and reflecting and calling each component node in the component node set, and executing each component node in the component node set based on the execution sequence of each component node in the component node set to realize service processing.
According to the technical scheme of the embodiment of the invention, the calling relation which frequently changes along with the requirement in the system is taken out from the system and managed in a configuration file mode (delivered to a configuration center for management), and the service system realizes the dynamic decision of the calling link in a configuration analysis mode, so that the delivery speed of the requirement can be improved, the change can be quickly responded, and the research and development cost of the system can be reduced. The AOV network is adopted to arrange the execution sequence of each component node, so that the conflict of dependency relationship and parallel execution among the component nodes can be solved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for processing services, comprising:
analyzing the service identification of the service line from the service request;
acquiring a component node set corresponding to the service identifier from a configuration center; the set of component nodes comprises: each component node corresponding to the service line and the execution sequence thereof;
and reflecting and calling each component node in the component node set, and executing each component node in the component node set based on the execution sequence of each component node in the component node set to realize service processing.
2. The method of claim 1, wherein prior to obtaining the set of component nodes corresponding to the service identification from a configuration center, further comprising:
extracting all business methods into component nodes based on a responsibility chain mode;
dividing all component nodes according to service fields to obtain a service component set of each service field, and storing the service component set to a configuration center;
and configuring a component node set for each service line in the service field based on the service component set in the service field, and storing the component node set of each service line in the service field to a configuration center.
3. The method of claim 2, wherein after extracting all traffic methods into a component node based on a chain of responsibility pattern, further comprising: defining a component interface in each of the component nodes, the component interface comprising: node identification of the component node, and a service method corresponding to the component node.
4. The method of claim 2, wherein the order of execution of the individual component nodes in the business component set and the order of execution of the individual component nodes in the component node set are orchestrated using an AOV network.
5. An apparatus for traffic processing, comprising:
the analysis unit is used for analyzing the service identifier of the service line from the service request;
the acquisition unit is used for acquiring a component node set corresponding to the service identifier from a configuration center; the set of component nodes comprises: each component node corresponding to the service line and the execution sequence thereof;
and the execution unit is used for reflecting and calling each component node in the component node set, executing each component node in the component node set based on the execution sequence of each component node in the component node set, and realizing service processing.
6. The apparatus of claim 5, further comprising a configuration unit to: before the obtaining unit obtains the component node set corresponding to the service identification from the configuration center,
extracting all business methods into component nodes based on a responsibility chain mode;
dividing all component nodes according to service fields to obtain a service component set of each service field, and storing the service component set to a configuration center;
and configuring a component node set for each service line in the service field based on the service component set in the service field, and storing the component node set of each service line in the service field to a configuration center.
7. The apparatus of claim 6, wherein the configuration unit is further to: after all business methods are extracted into component nodes based on a chain of responsibility pattern, defining a component interface in each of the component nodes, the component interface comprising: node identification of the component node, and a service method corresponding to the component node.
8. The apparatus of claim 6, wherein an execution order of each component node in the set of business components and an execution order of each component node in the set of component nodes are orchestrated using an AOV network.
9. An electronic device for business processing, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201911122257.3A 2019-11-15 2019-11-15 Service processing method and device Pending CN112817562A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911122257.3A CN112817562A (en) 2019-11-15 2019-11-15 Service processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911122257.3A CN112817562A (en) 2019-11-15 2019-11-15 Service processing method and device

Publications (1)

Publication Number Publication Date
CN112817562A true CN112817562A (en) 2021-05-18

Family

ID=75851992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911122257.3A Pending CN112817562A (en) 2019-11-15 2019-11-15 Service processing method and device

Country Status (1)

Country Link
CN (1) CN112817562A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326030A (en) * 2021-05-26 2021-08-31 北京京东拓先科技有限公司 Service request processing method and device
CN113435846A (en) * 2021-06-30 2021-09-24 深圳平安智汇企业信息管理有限公司 Business process arranging method and device, computer equipment and storage medium
CN114296789A (en) * 2022-03-09 2022-04-08 太平金融科技服务(上海)有限公司深圳分公司 Business processing method, device, equipment and storage medium based on full-flow configuration

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8015541B1 (en) * 2002-10-24 2011-09-06 Rage Frameworks, Inc. Business process technology for the enterprise
CN102594833A (en) * 2012-03-09 2012-07-18 北京神州数码思特奇信息技术股份有限公司 Communication protocol adapting method and system
US20140237442A1 (en) * 2013-02-20 2014-08-21 Bank Of America Corporation Decentralized workflow management system
US9244655B1 (en) * 2013-03-13 2016-01-26 Ca, Inc. Solution modeling and analysis toolset for enterprise software architecture and skeleton architecture
WO2017193715A1 (en) * 2016-05-10 2017-11-16 中国银联股份有限公司 Method, device and apparatus for flow scheduling
CN108712456A (en) * 2018-03-27 2018-10-26 上海淘票儿信息科技有限公司 A kind of network interaction method, equipment and system
CN109324787A (en) * 2017-08-18 2019-02-12 深圳怡化电脑股份有限公司 A kind of business software development approach, device and terminal device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8015541B1 (en) * 2002-10-24 2011-09-06 Rage Frameworks, Inc. Business process technology for the enterprise
CN102594833A (en) * 2012-03-09 2012-07-18 北京神州数码思特奇信息技术股份有限公司 Communication protocol adapting method and system
US20140237442A1 (en) * 2013-02-20 2014-08-21 Bank Of America Corporation Decentralized workflow management system
US9244655B1 (en) * 2013-03-13 2016-01-26 Ca, Inc. Solution modeling and analysis toolset for enterprise software architecture and skeleton architecture
WO2017193715A1 (en) * 2016-05-10 2017-11-16 中国银联股份有限公司 Method, device and apparatus for flow scheduling
CN109324787A (en) * 2017-08-18 2019-02-12 深圳怡化电脑股份有限公司 A kind of business software development approach, device and terminal device
CN108712456A (en) * 2018-03-27 2018-10-26 上海淘票儿信息科技有限公司 A kind of network interaction method, equipment and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李蕴;王宪杰;武秀川;: "面向业务组织的工作流技术及其协同机制电子系统设计与实现", 现代电子技术, no. 01 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326030A (en) * 2021-05-26 2021-08-31 北京京东拓先科技有限公司 Service request processing method and device
CN113435846A (en) * 2021-06-30 2021-09-24 深圳平安智汇企业信息管理有限公司 Business process arranging method and device, computer equipment and storage medium
CN114296789A (en) * 2022-03-09 2022-04-08 太平金融科技服务(上海)有限公司深圳分公司 Business processing method, device, equipment and storage medium based on full-flow configuration

Similar Documents

Publication Publication Date Title
CN107302597B (en) Message file pushing method and device
CN111190888A (en) Method and device for managing graph database cluster
CN112817562A (en) Service processing method and device
CN110895472A (en) Method and device for identifying service change
CN110795315A (en) Method and device for monitoring service
CN107347093B (en) Configuration method and device for distributed server system
CN111444077A (en) Method and device for generating flow node test data
CN111770128B (en) Message management method and device
CN111984234A (en) Method and device for processing work order
CN113760488A (en) Method, device, equipment and computer readable medium for scheduling task
CN110795331A (en) Software testing method and device
CN112947919A (en) Method and device for constructing service model and processing service request
CN115801873A (en) Service distribution method, system, electronic device and storage medium
CN113312900A (en) Data verification method and device
CN114070889A (en) Configuration method, traffic forwarding method, device, storage medium, and program product
CN113378346A (en) Method and device for model simulation
CN113762910A (en) Document monitoring method and device
CN115442420A (en) Block chain cross-chain service management method and device
CN113741888A (en) Service processing method and device
CN113760695A (en) Method and device for positioning problem code
CN113760487A (en) Service processing method and device
CN113448602A (en) Version updating method and device
CN112559001A (en) Method and device for updating application
CN112131287A (en) Method and device for reading data
CN113448960A (en) Method and device for importing form file

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination