CN111045751B - Multi-service configuration chained processing method and device - Google Patents

Multi-service configuration chained processing method and device Download PDF

Info

Publication number
CN111045751B
CN111045751B CN201911374019.1A CN201911374019A CN111045751B CN 111045751 B CN111045751 B CN 111045751B CN 201911374019 A CN201911374019 A CN 201911374019A CN 111045751 B CN111045751 B CN 111045751B
Authority
CN
China
Prior art keywords
service
business
configuration
function
service function
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.)
Active
Application number
CN201911374019.1A
Other languages
Chinese (zh)
Other versions
CN111045751A (en
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201911374019.1A priority Critical patent/CN111045751B/en
Publication of CN111045751A publication Critical patent/CN111045751A/en
Application granted granted Critical
Publication of CN111045751B publication Critical patent/CN111045751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a multi-service configuration chained processing method and a device, comprising the following steps: generating configuration file scripts in an XML format according to different business service processing rules, wherein business service chain information comprises business service chain identifications, a plurality of business function identifications corresponding to business services and executive program information of the business functions; receiving a business service processing request, wherein the business service execution request comprises a business service chain identifier and a business function identifier; and searching corresponding service chain identifiers and service function identifiers from the configuration file script in the XML format according to the service chain identifiers and the service function identifiers in the service execution request, calling corresponding service function execution programs according to the corresponding service function identifiers, and executing the corresponding service function execution programs to obtain an execution result. The scheme can realize business service processing by flexibly configuring business service processing rules in the XML file without any additional workload.

Description

Multi-service configuration chained processing method and device
Technical Field
The present invention relates to the field of service processing technologies, and in particular, to a multi-service configuration chained processing method and apparatus.
Background
In program development of many IT companies, since a service scenario is complex, a service is processed from beginning to end by a plurality of module method processing steps, each step needs to be processed by writing a corresponding code method, and the processing result of each step needs to be judged and then the next processing can be performed. Therefore, the service rules are different, the processed programs are different, and different service logics are required to develop different services, so that the service logic development function is not flexible enough, the universality is poor, the function can not be reused, the efficiency is low, and the like. In addition, unnecessary workload is increased for different business rules, and meanwhile, quality risks are introduced to codes; but also increases the workload of the developer.
Disclosure of Invention
The embodiment of the invention provides a multi-service configuration chained processing method and device, which solve the technical problems that in the prior art, due to complex service scene, the development of service logic functions is inflexible and unnecessary workload is increased.
The embodiment of the invention provides a multi-service configuration chained processing method, which comprises the following steps:
generating an XML format configuration file script according to different business service processing rules, wherein the XML format configuration file script comprises business service chain information, and the business service chain information comprises business service chain identifiers, a plurality of business function identifiers corresponding to business services and executive program information of the business functions;
receiving a business service processing request, wherein the business service execution request comprises a business service chain identifier and a business function identifier;
according to the service chain identification and the service function identification in the service execution request, the corresponding service chain identification and the corresponding service function identification are searched from the configuration file script in the XML format, and the corresponding service function execution program is called according to the corresponding service function identification, so that the corresponding service function execution program is executed, and an execution result is obtained;
executing the corresponding service function execution program, including: and automatically analyzing the functions in the configuration file script by writing universal tool codes in JAVA, and loading and executing programs according to the service chain relation in the configuration.
The embodiment of the invention also provides a multi-service configuration chained processing device, which comprises:
the configuration module is used for generating an XML format configuration file script according to different business service processing rules, wherein the XML format configuration file script comprises business service chain information, and the business service chain information comprises business service chain identifiers, a plurality of business function identifiers corresponding to business services and executive program information of a plurality of business functions;
the receiving module is used for receiving a business service processing request, and the business service execution request comprises a business service chain identifier and a business function identifier;
the program calling execution module is used for searching the corresponding service chain identification and service function identification from the configuration file script in the XML format according to the service chain identification and the service function identification in the service execution request, calling the corresponding service function execution program according to the corresponding service function identification, and executing the corresponding service function execution program to obtain an execution result;
and automatically analyzing the functions in the configuration file script by writing universal tool codes in JAVA, and loading and executing programs according to the service chain relation in the configuration.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program for executing the method.
In the embodiment of the invention, the configuration file script in the XML format is generated according to different business service processing rules, so that flexible configuration analysis and logic processing can be carried out on the business service in the XML file, and no additional workload is required.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a multi-service configuration chained processing method according to an embodiment of the present invention (I);
FIG. 2 is a flowchart of a multi-service configuration chained processing method (II) according to an embodiment of the present invention;
FIG. 3 is a block diagram of a multi-service configuration chain processing apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of a multi-service configuration chain processing apparatus according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Technical term interpretation:
XML file: a subset of the standard generic markup language, the extensible markup language, is a markup language used to mark electronic files to be structured. XML is an important tool for data transmission over the Internet, and can span any platform of the Internet without being limited by programming language and operating system, so to speak, it is a data carrier with the highest level passes of the Internet. XML is a fairly powerful technique in currently handling structured document information, and it helps shuttle structured data between servers, which makes the storage and transmission of control data more handful for developers. XML is a source language that allows users to define their own markup language. XML is a subset of the standard generalized markup language (SGML, standard Generalized Markup Language) and is well suited for Web transport. XML provides a unified approach to describing and exchanging structured data that is independent of an application or vendor.
jar: that is, java Archive, a Java package, and a Java compiled file, it is inconvenient if these class files are directly released, so many class files are packaged into a jar, which may include some resources and configuration files in addition to the class files, and typically, a jar package is a Java program or a Java library.
In an embodiment of the present invention, a method for multi-service configuration chained processing apparatus is provided, as shown in fig. 1, where the method includes:
step 102: generating an XML format configuration file script according to different business service processing rules, wherein the XML format configuration file script comprises business service chain information, and the business service chain information comprises business service chain identifiers, a plurality of business function identifiers corresponding to business services and executive program information of the business functions;
step 104: receiving a business service processing request, wherein the business service execution request comprises a business service chain identifier and a business function identifier;
step 106: and searching corresponding service chain identifiers and service function identifiers from the configuration file script in the XML format according to the service chain identifiers and the service function identifiers in the service execution request, calling corresponding service function execution programs according to the corresponding service function identifiers, and executing the corresponding service function execution programs to obtain an execution result.
Specifically, the service function execution program is packaged in a Jar package.
For step 106, the present invention automatically analyzes the functions in the configuration file script by writing the universal tool code in JAVA, and loads and executes the program according to the service chain relation in the configuration.
In the embodiment of the invention, a plurality of service function identifiers are arranged according to the calling sequence of the service function execution program;
the calling the corresponding service function executing program according to the corresponding service function identifier comprises the following steps:
and calling a corresponding service function execution program according to the corresponding service function identification according to the calling sequence.
Specifically, the XML format profile script is as follows:
1. chained invocation of different services:
2. different functional configurations:
the chained calls described above refer to how many different business process logic a plurality of chains can be configured. Each different business logic corresponds to a different < transaction id >, and there are how many different business logic and how many different < transaction ids >. Where "a001" is a business service chain id value that cannot be repeated throughout the configuration file. Each < transaction id > contains many steps (because of a complex business processing logic, many steps are needed to realize), many steps < refname= >, each row is a step, how many rows represent how many steps, the order of each row is the order of the names of steps successfully executed in the specific step < bean >, ref name = corresponding value cannot be repeated, and the corresponding value must be found in < bean id= "…", otherwise the corresponding execution program reports errors. If the failure or abnormality occurs, the execution is performed according to the abnormal or failed configuration; both the names of success and failure must be contained in the < actions > configuration. Each row has a corresponding execution step, but the row configured here is just the name of one step, and no specific execution program class path exists, each row represents the name of one step, the name of each step can be found from the whole XML configuration file, and only one can report errors if not found. The name corresponding to < transaction id > in the whole configuration file is also unique, and represents the name of the business processing logic, and the unique name in the whole configuration file can be used for configuring the same step by different business processing logic.
The configuration of the different functions refers to the steps within the specific business process logic, where the specific execution method path of each step is configured. How many different processing steps are needed, how many < bean id= >, the name of each step < bean id= >, there are and only in the whole XML configuration file, < bean > configuration class = corresponding to the specific execution class path of the step, and the execution program is packaged in the Jar package. In the execution process, three situations exist: 1. success, 2, failure; 3. an abnormality occurs in the middle, and the process cannot be continued. The < bean > configuration also contains the names of three case configurations: success, failure, the names of these three case configurations must be found in < bean id >. If the execution returns in the program steps: 1. the name configured in the Success tag is the corresponding < bean id > program name to be executed next. 2. The name configured in the failure tag is the name of the corresponding < bean id > program to be executed next. 3. The name configured in the exception, fault tag, is the name of the corresponding < bean id > program to be executed next.
In an embodiment of the present invention, as shown in fig. 2, the method further includes:
step 108: and after the configuration is completed, verifying the correctness of the XML-format configuration file script.
Based on the same inventive concept, the embodiment of the invention also provides a multi-service configuration chained processing device, as described in the following embodiment. Since the principle of the multi-service configuration chained processing device for solving the problem is similar to that of the multi-service configuration chained processing method, the implementation of the multi-service configuration chained processing device can refer to the implementation of the multi-service configuration chained processing method, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
FIG. 3 is a block diagram of a multi-service configuration chained processing apparatus according to an embodiment of the invention, as shown in FIG. 3, including:
a configuration module 02, configured to generate an XML format configuration file script according to different service processing rules, where the XML format configuration file script includes service chain information, where the service chain information includes a service chain identifier, multiple service function identifiers corresponding to a service, and execution program information of multiple service functions;
the receiving module 04 is used for receiving a business service processing request, wherein the business service execution request comprises a business service chain identifier and a business function identifier;
program calling execution module 06, configured to find a corresponding service chain identifier and a corresponding service function identifier from the XML format configuration file script according to the service chain identifier and the service function identifier in the service execution request, call a corresponding service function execution program according to the corresponding service function identifier, and execute the corresponding service function execution program to obtain an execution result.
In the embodiment of the invention, a plurality of service function identifiers are arranged according to the calling sequence of the service function execution program;
the program call execution module 06 is specifically configured to:
and calling a corresponding service function execution program according to the corresponding service function identification according to the calling sequence.
In an embodiment of the present invention, as shown in fig. 4, the method further includes: and the verification module 08 is used for verifying the correctness of the XML-format configuration file script after the configuration is completed.
In the embodiment of the invention, the service function execution program is packaged in a Jar package.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program for executing the method.
In summary, the invention can realize business service processing only by flexibly configuring business service processing rules in the XML file and simultaneously introducing corresponding Jar packets, and does not need any extra workload.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations can be made to the embodiments of the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. 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 multi-service configuration chained processing method, comprising:
generating an XML format configuration file script according to different business service processing rules, wherein the XML format configuration file script comprises business service chain information, and the business service chain information comprises business service chain identifiers, a plurality of business function identifiers corresponding to business services and executive program information of the business functions;
receiving a business service processing request, wherein the business service execution request comprises a business service chain identifier and a business function identifier;
according to the service chain identification and the service function identification in the service execution request, the corresponding service chain identification and the corresponding service function identification are searched from the configuration file script in the XML format, and the corresponding service function execution program is called according to the corresponding service function identification, so that the corresponding service function execution program is executed, and an execution result is obtained;
executing the corresponding service function execution program, including: and automatically analyzing the functions in the configuration file script by writing universal tool codes in JAVA, and loading and executing programs according to the service chain relation in the configuration.
2. The multi-service configuration chained processing method as claimed in claim 1, wherein the plurality of service function identifiers are arranged in a service function execution program call order;
the calling the corresponding service function executing program according to the corresponding service function identifier comprises the following steps:
and calling a corresponding service function execution program according to the corresponding service function identification according to the calling sequence.
3. The multi-service configuration chained processing method as claimed in claim 1, further comprising:
and after the configuration is completed, verifying the correctness of the XML-format configuration file script.
4. The multi-service configuration chaining method of claim 1 wherein the service function execution program is packaged in a Jar package.
5. A multi-service configuration chained processing apparatus, comprising:
the configuration module is used for generating an XML format configuration file script according to different business service processing rules, wherein the XML format configuration file script comprises business service chain information, and the business service chain information comprises business service chain identifiers, a plurality of business function identifiers corresponding to business services and executive program information of a plurality of business functions;
the receiving module is used for receiving a business service processing request, and the business service execution request comprises a business service chain identifier and a business function identifier;
the program calling execution module is used for searching the corresponding service chain identification and service function identification from the configuration file script in the XML format according to the service chain identification and the service function identification in the service execution request, calling the corresponding service function execution program according to the corresponding service function identification, and executing the corresponding service function execution program to obtain an execution result;
and automatically analyzing the functions in the configuration file script by writing universal tool codes in JAVA, and loading and executing programs according to the service chain relation in the configuration.
6. The multi-service configuration chained processing apparatus according to claim 5, wherein the plurality of service function identifiers are arranged in a service function execution program calling order;
the program call execution module is specifically used for:
and calling a corresponding service function execution program according to the corresponding service function identification according to the calling sequence.
7. The multi-service configuration chained processing apparatus of claim 5, further comprising: and the verification module is used for verifying the correctness of the XML-format configuration file script after the configuration is completed.
8. The multi-service configuration chained processing apparatus of claim 5 wherein the business function execution program is packaged in a Jar package.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 4 when executing the computer program.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for executing the method of any one of claims 1 to 4.
CN201911374019.1A 2019-12-27 2019-12-27 Multi-service configuration chained processing method and device Active CN111045751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911374019.1A CN111045751B (en) 2019-12-27 2019-12-27 Multi-service configuration chained processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911374019.1A CN111045751B (en) 2019-12-27 2019-12-27 Multi-service configuration chained processing method and device

Publications (2)

Publication Number Publication Date
CN111045751A CN111045751A (en) 2020-04-21
CN111045751B true CN111045751B (en) 2023-09-19

Family

ID=70240535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911374019.1A Active CN111045751B (en) 2019-12-27 2019-12-27 Multi-service configuration chained processing method and device

Country Status (1)

Country Link
CN (1) CN111045751B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726249B (en) * 2020-06-02 2022-10-04 中盈优创资讯科技有限公司 Configuration file processing method and device of network equipment
CN112051987B (en) * 2020-09-03 2023-10-24 中国银行股份有限公司 Service data processing method, device and equipment, program generating method and device
CN112099882B (en) * 2020-09-11 2023-08-25 杭州海康威视数字技术股份有限公司 Service processing method, device and equipment
CN112925584A (en) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 Scene-based file configuration method, device, storage medium, and program product
CN113656116B (en) * 2021-08-18 2024-08-16 中国邮政储蓄银行股份有限公司 Business process processing method and device
CN116248570B (en) * 2022-12-16 2024-05-14 中国联合网络通信集团有限公司 Service chain configuration method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106604A (en) * 2007-05-09 2008-01-16 北京邮电大学 Translator and system and method for processing multiple services based on translator
CN103269280A (en) * 2013-04-23 2013-08-28 华为技术有限公司 Method, device and system for developing service in network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100030596A1 (en) * 2008-07-30 2010-02-04 Gaurav Johari Business Process Intelligence

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106604A (en) * 2007-05-09 2008-01-16 北京邮电大学 Translator and system and method for processing multiple services based on translator
CN103269280A (en) * 2013-04-23 2013-08-28 华为技术有限公司 Method, device and system for developing service in network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗昂等.基于异构平台的面向业务流整合的数据交换平台设计.福建电脑.2007,(第11期),全文. *

Also Published As

Publication number Publication date
CN111045751A (en) 2020-04-21

Similar Documents

Publication Publication Date Title
CN111045751B (en) Multi-service configuration chained processing method and device
CN108614770B (en) Automatic test assertion method, device, storage medium and equipment
CN111782340B (en) Data processing method, device, equipment and system based on byte codes
US7472379B2 (en) Flexible navigation of a workflow graph
Mariani et al. Dynamic detection of cots component incompatibility
US20170255886A1 (en) Workflow execution
US11366713B2 (en) System and method for automatically identifying and resolving computing errors
CN107391366B (en) Test case generation method, test case execution method and test case execution device
CN113127098B (en) Application program creation method based on micro-service architecture and related equipment
CN108965375B (en) Service call proxy control system, method, server and readable storage medium
WO2012052215A1 (en) Software development
CN113971031A (en) Software package dependency relationship checking method and device
CN110543427A (en) Test case storage method and device, electronic equipment and storage medium
CN111105289B (en) Method and device for judging cancellation of client order based on aop mode
Mahmood et al. A framework for automated API fuzzing at enterprise scale
CN114579467A (en) Smoking test system and method based on release subscription mechanism
CN114489676A (en) Source code processing method, system, storage medium and electronic equipment
CN111562942B (en) Gitlab-based mobile APP continuous integration device and method
CN116795378B (en) Method and device for arranging and executing process based on code dynamic compiling
US20080270430A1 (en) File management system, file management method, support device thereof, and program thereof
Ma et al. Analyzing distributed Java applications by automatic centralization
CN112394939B (en) User contract automatic deployment method, device and storage medium based on alliance chain
CN105912468B (en) The method and open platform system of open platform Run Script
US20130042224A1 (en) Application analysis device
Hodován et al. Fuzzinator: an open-source modular random testing framework

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
GR01 Patent grant
GR01 Patent grant