CN109670081A - The method and device of service request processing - Google Patents

The method and device of service request processing Download PDF

Info

Publication number
CN109670081A
CN109670081A CN201811620772.XA CN201811620772A CN109670081A CN 109670081 A CN109670081 A CN 109670081A CN 201811620772 A CN201811620772 A CN 201811620772A CN 109670081 A CN109670081 A CN 109670081A
Authority
CN
China
Prior art keywords
configuration file
xml configuration
statement
processing
request
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.)
Granted
Application number
CN201811620772.XA
Other languages
Chinese (zh)
Other versions
CN109670081B (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 CN201811620772.XA priority Critical patent/CN109670081B/en
Publication of CN109670081A publication Critical patent/CN109670081A/en
Application granted granted Critical
Publication of CN109670081B publication Critical patent/CN109670081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This application provides a kind of methods of operating database, this method is after receiving business processing request, it obtains business processing and requests corresponding first XML configuration file and the second XML configuration file, target component is extracted from business processing request using the first XML configuration file, read the data base manipulation statement in the second XML configuration file and execution, to obtain database manipulation result, and database manipulation result is assembled by processing result returned packet according to the first XML configuration file, return to processing result returned packet.Compared with the existing mode for carrying out database manipulation using JAVA file, the application does not use JAVA file, but the database of record action statement in the second XML configuration file, since the execution efficiency of the second XML configuration file is better than JAVA file, so that the execution efficiency of the application is higher than existing database manipulation mode.

Description

The method and device of service request processing
Technical field
This application involves technical field of data processing, more specifically, being the method and device of service request processing.
Background technique
Transaction processing system can receive the business processing request of exterior transmission, according to preset processing logic Request is handled, and processing result is returned to the sender of business processing request.It is carried out by taking a specific example as an example Explanation.Bank's processing system can receive user and be requested by the transaction detail query that terminal is sent, in data-storage system Middle inquiry associated transaction detail data, and associated transaction detail data are returned into user terminal.
It is realized currently, data process method generally passes through JAVA file, i.e., writes data process method in JAVA file, JAVA file is called to execute treatment process during processing.However, this processing mode efficiency is lower.
Summary of the invention
In view of this, this application provides a kind of method of service request processing, to improve the place of business processing request Manage efficiency.In addition, present invention also provides a kind of device of service request processing, to guarantee the method answering in practice With and realize.
In order to achieve the object, technical solution provided by the present application is as follows:
In a first aspect, this application provides a kind of methods of service request processing, comprising:
After receiving business processing request, corresponding with business processing request the first XML configuration file and the are obtained Two XML configuration files;The resolution rules and processing returns to knots that wherein the first XML configuration file record has business processing to request The assembling rule of fruit;The second XML configuration file record has the business processing to request relevant processing logical statement, described It handles logical statement and includes at least data base manipulation statement;
According to the resolution rules in first XML configuration file, target component is extracted from business processing request;
The data base manipulation statement in second XML configuration file is read, and the target component is passed to the number According to being executed in the action statement of library, to obtain database manipulation result;
According to the assembling rule in first XML configuration file, the database manipulation result is assembled into processing knot Fruit returned packet;
Return to the processing result returned packet.
Second aspect, this application provides a kind of devices of service request processing, comprising:
Configuration file obtains module, after receiving business processing request, obtains corresponding with business processing request The first XML configuration file and the second XML configuration file;Wherein the first XML configuration file record has business processing request Resolution rules and processing returns to the assembling of result rule;The second XML configuration file record has the business processing to request Relevant processing logical statement, the processing logical statement include at least data base manipulation statement;
The extraction module of target component, for according to the resolution rules in first XML configuration file, from the business Target component is extracted in processing request;
Database manipulation result obtains module, for reading the data base manipulation statement in second XML configuration file, And the target component is passed in the data base manipulation statement and is executed, to obtain database manipulation result;
Returned packet assembles module, for regular according to the assembling in first XML configuration file, by the database Operating result is assembled into processing result returned packet;
Returned packet return module, for returning to the processing result returned packet.
This application provides a kind of method of operating database, this method obtains after receiving business processing request Business processing requests corresponding first XML configuration file and the second XML configuration file, and the first XML configuration file is for parameter It extracts and the encapsulation of result, the second XML configuration file is used to be operated to obtain as a result, using in turn according to library using parameter logistic First XML configuration file extracts target component from business processing request, reads the database in the second XML configuration file Action statement simultaneously executes, to obtain database manipulation as a result, and according to first XML configuration file by the database manipulation As a result it is assembled into processing result returned packet, returns to the processing result returned packet.It is counted with existing using JAVA file It is compared according to the mode that library operates, the application does not use JAVA file, but the database of record in the second XML configuration file Action statement, since the execution efficiency of the second XML configuration file is better than JAVA file, so that the execution efficiency of the application is higher than now Some database manipulation modes.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a flow chart of the method for service request provided by the present application processing;
Fig. 2 is an example of the second XML configuration file provided by the present application;
Fig. 3 is a structural schematic diagram of the device of service request provided by the present application processing.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
Technical solution in order to facilitate understanding, the application connected applications scene first are illustrated.
Business processing scene is that a method, apparatus can send business processing request to another method, apparatus, is sent out for ease of description Method, apparatus is sent to be properly termed as request equipment, receiver equipment is properly termed as processing equipment.Request equipment can be user terminal, It can be other kinds of terminal or system.
It should be noted that the treatment process that processing equipment requests business processing is logical in the application scenarios of the application Often need to obtain required business datum from Database Systems using Database Systems.Also, in order to carry out data base set The inquiry operation of system, it is also necessary to extract required query argument from business processing request.Therefore, it can be seen that processing equipment pair The treatment process of business processing request can be divided into two parts, inquire required parameter first is that extracting from business processing request Process, second is that, using parameter logistic according to the operating process in library.
The operating process of the parameter extraction process and database of current business processing request, all relies on JAVA file In the processing logic write, and the execution efficiency of JAVA file is lower.
Explanation about extracting parameter process in business processing request.
Business processing request is generally sent by way of message, that is to say, that business processing is requested to seal by request equipment Dress is sent to processing equipment in messages.In order to make it easy to understand, message is explained.Message (message), is network The data cell of middle exchange and transmission, i.e. the website data block disposably to be sent.Message contains to be sent complete Business processing solicited message, length is very inconsistent, and length is unlimited and variable.It is also the unit of network transmission, in transmission process Grouping can be constantly packaged into, packet, frame transmit, the mode of encapsulation is exactly to add some message segments, those be exactly heading with The data that certain format is organized.For example there are type of message, message version, message length, message entity etc. information in the inside. Message is exactly when making requests and respond between each system for exchanging information, it is also necessary to the format abided by the regulations. In addition, being mostly when needing to communicate between multiple systems using message, for example bank's ESB system arrives Unionpay to gateway system again System.
After processing equipment receives message, is extracted and looked into from business processing request using the extraction logic of JAVA file edit Ask parameter.The development process of JAVA file is complex, and implementation procedure needs compilation run, and execution efficiency is lower.
Explanation about database manipulation process.
The processing of one business function usually requires to call the business datum in Database Systems.Concrete implementation mode It is that the module of operating database can receive the business processing request of external interface transmission, according to wanting for business processing request It asks, relevant business datum is called from Database Systems.
The module of operating database is properly termed as database operating modules, and the module is in order to realize the processing function to database Can, it needs to call the data base manipulation statement in the JAVA file write in advance, the mode efficiency of this processing database is lower.
In addition, one business processing request may need database manipulation mould due to the complexity of business scenario in reality Tables of data in block and Database Systems carries out multiple interactive operation.The logic of interaction process is included in JAVA file.It should Interaction process logic in file includes that the data that previous secondary data base manipulation statement obtains are assigned to latter secondary database manipulation Sentence, then the operation that carries out database connection etc., and primary data base manipulation statement and Database Systems after executing again into Row interactive operation.It interacts repeatedly, database code should be developed, corresponding calling logic is also developed in JAVA file Code.Not only execution efficiency is slow for this processing logic, but also versatility is poor, and development efficiency is also relatively low.
In order to solve at least one above-mentioned technical problem, this application provides a kind of method flows of operating database, see Fig. 1, this method process specifically comprise the following steps S101~S105.
S101: after receiving business processing request, corresponding with business processing request the first XML configuration file and the are obtained Two XML configuration files;The resolution rules and processing returns to results that wherein the first XML configuration file record has business processing to request Assembling rule;Second XML configuration file record has business processing to request relevant processing logical statement, and processing logical statement is at least Including data base manipulation statement.
Wherein, processing equipment can receive business processing request, need after receiving business processing request according to business Processing request determines corresponding XML configuration file.XML configuration file includes two classes, wherein the first XML configuration file is for extracting Target component and return processing result, the second XML configuration file are used for operating database.For ease of description, two XML configurations File is referred to as the first XML configuration file and the second XML configuration file.
Different business processing requests use different types of message, and different types of message, message field (MFLD) is different, thus Also different the first XML configuration file need to set.
For example, some business processing request for inquiry the same day transaction details, the business processing request in include card number, The fields such as Query Dates, coded format;Another business processing request is query history transaction details, is wrapped in business processing request Contain the fields such as card number, from date, date of expiry, coded format.Two service inquiries request corresponding to be two different First XML configuration file.It should be noted that the particular content of type of message is arranged according to actual needs, do not limit to In above-mentioned examples cited.
In order to search the first required XML configuration file, the mark and the first XML that business processing request can be set are configured The corresponding relationship of file.In this way, in practical applications, after receiving business processing request, according to business processing request Mark and above-mentioned corresponding relationship can find the business processing and request corresponding first XML configuration file.
It should be noted that the number of the first XML configuration file can not be one, it can be two.Two the first XML Configuration file is respectively intended to extract target component, and assembling processing result returned packet.
It is the explanation about the first XML configuration file above, about being described as follows for the second XML configuration file.
It is understood that database processing logic corresponding to different business processing requests is different.
The type of business processing request first is different, and processing logic is then different.For example, a certain business processing request is Transaction details are inquired, then are needed using query sentence of database;The request of another business processing to delete contact person, then need using Database cancel statement.Furthermore even same type business processing is requested, processing logic is not also identical.It such as is all data Library inquiry sentence, but inquire content difference may cause query logic may also be different, as may include in a kind of processing logic The verifying of query argument, another kind is handled not to be needed to verify query argument in logic.
Therefore, it can be requested in advance for different business processings, write corresponding processing logical statement.It needs to illustrate It is that the application is protected using the configuration file of XML (Extensible Markup Language, extensible markup language) format Deposit processing logical statement, that is to say, that different corresponding the second different XML configuration files of business processing request.
After receiving business processing request, the corresponding relationship between the second XML configuration file is requested according to business processing, The second XML configuration file corresponding to it is determined for received business processing request.
Record has business processing to request corresponding processing logical statement, processing logical statement point in second XML configuration file For multiple types, in order to realize the operation to database, processing logical statement includes at least data base manipulation statement.
Wherein, data base manipulation statement refers to the sentence that operation is executed to database, and operation may include inquiry, delete The various types such as remove, increase, modifying.Data base manipulation statement can be specially SQL (Structured Query Language, Structured query language) sentence.
S102: according to the resolution rules in the first XML configuration file, target component is extracted from business processing request.
Wherein, the first XML configuration file is write according to message field (MFLD), includes which field in message, then first The extracting rule of which field will be set in XML configuration file.
In one example, business processing request is encapsulated in request message, and resolution rules mainly include, order of the field and Field length.Then the specific implementation of this step is that the message of each matching field length is successively extracted from request message Segment;And the corresponding parameter of each message segment is determined according to the setting rule of order of the field, wherein the parameter determined The target component extracted.
Specifically, each field arranges in a certain order in request message, and each field is according to the rules Length setting.Therefore after receiving request message, it can split, split according to field length from request message Each message segment may be considered each field, according still further to the regulation of order of the field, determine that each message segment is assorted respectively Field.The field determined i.e. target component.
For example, order of the field is: card number, day in the extracting rule of certain request message for being used to inquire day trade transaction detail Phase and currency type;Field length is respectively 16,8,3.After the request message for receiving day trade transaction detail, first out of message The message segment of 16 length is first extracted in appearance, it is assumed that be 1234567890987654, according to the order of the field message piece Section is card number;The message segment of 8 length is extracted again, it is assumed that is 20180505, according to order of the field, the message segment is Date;The message segment of 3 length is extracted again, it is assumed that is RMB, is currency type according to the order of the field message segment.It is comprehensive From the point of view of, three target components, respectively card number, date and currency type can be extracted from message content.On it should be noted that It states in extracting mode, determines the corresponding content of parameter of message segment after first extracting a message segment, can also be and mention It gets whole message segments and determines the corresponding content of parameter of each message segment respectively again.
On the basis of the above, resolution rules can also include field type, and field type is used to verify extracted mesh Mark parameter data type whether the rule of matching field type.If the field type of target component does not meet preset field type Rule, then can return to miscue message.
For example, the field type for some target component extracted is card number, the field type of card number is number, it is assumed that from The card number parameter extracted in message includes character, then illustrates the type of the parameter and incongruent field type provides;Again Such as, the field type for some target component extracted is the date, it is assumed that the date parameter extracted from message is 20181345, the target component and the rule for not meeting the date, rule be four figures in year, the moon is double figures, and day is double figures, It can then determine the target component and illegal.
Be below include resolution rules the first XML configuration file an example.
In above-mentioned resolution rules, field length is as shown in length attribute, field name such as name attribute, order of the field As shown in the successive sequential write of field.The target component for including in request message can be extracted according to the resolution rules.
The target component extracted includes parameter name and parameter value, and target component can be used and carry out into database Data query, detailed process is as follows shown in a step.
S103: the data base manipulation statement in the second XML configuration file is read, and target component is passed to database manipulation It is executed in sentence, to obtain database manipulation result.
It wherein, include data base manipulation statement in the second XML configuration file, data base manipulation statement may be embodied in label In node, the label node of the second XML configuration file is read, parses data base manipulation statement wherein included, and execute and solved The data base manipulation statement analysed, and then database manipulation result can be obtained.
It should be noted that the data base manipulation statement in this step can be multiple, in practical applications, need successively Each label node in the second XML configuration file is read, the data base manipulation statement in each label node is parsed, by upper one The target component that step obtains is passed to data base manipulation statement and executes.
More specifically, pieces of data library action statement in the second XML configuration file have front and back sequential write, then according to The front and back sequential write, the data base manipulation statement being successively read in the second XML configuration file and execution.2nd XML configuration text When the first data library action statement executes in part, need to connect database, the first data library executes sentence and is finished it Afterwards, subsequent data base manipulation statement can be directly read and executed, and be not required to the mode of operation such as existing JAVA file, There is still a need for connect to be operated with Database.
S104: according to the assembling rule in the first XML configuration file, database manipulation result is assembled into processing result and is returned Return text.
Wherein, the assembling rule of returned packet is set in the first XML configuration file, and assembling rule may include: that field is suitable Sequence, assembling format etc..
It is an example for including the first regular XML configuration file of assembling below.In following assembling rules, return Field respectively include transaction code, return code, return information, summary journal item number, Record to return, customer ID, customer name, friendship Easy card number, Transaction Account number ... charge account, the following sequential write of order of the field, for example following name attributes of assembling format and Shown in length attribute.
After obtaining database manipulation result, data manipulation result is assembled into returned packet according to above-mentioned assembling rule.
S105: processing result returned packet is returned.
Wherein, returned packet is returned to the sender of business processing request.
From the above technical scheme, this application provides a kind of method of operating database, this method is receiving industry After business processing request, obtains business processing and request corresponding first XML configuration file and the second XML configuration file, the first XML Configuration file is for the extraction of parameter and the encapsulation of result, and the second XML configuration file using parameter logistic according to library for being grasped It obtains as a result, extracting target component from business processing request using the first XML configuration file in turn, the 2nd XML of reading matches The data base manipulation statement in file and execution are set, to obtain database manipulation as a result, and will count according to the first XML configuration file It is assembled into processing result returned packet according to library operating result, returns to processing result returned packet.With it is existing using JAVA file into The mode of row database manipulation is compared, and the application does not use JAVA file, but records number in the second XML configuration file According to library action statement, since the execution efficiency of the second XML configuration file is better than JAVA file, so that the execution efficiency of the application is high In existing database manipulation mode.
Specifically, the execution speed of the second XML configuration file is better than the execution speed of JAVA file.The reason is that the Two XML configuration files are loaded into memory, if the query result that last data library action statement obtains is needed in subsequent number According to being used in the action statement of library, then the query result that last data library action statement obtains can be transmitted directly to subsequent number It is used according to library action statement, does not need to be sentenced as the query result of data base manipulation statement each in JAVA file The logical process such as disconnected, assignment are used to other data base manipulation statements again after processing.
In addition, the operational process of the first XML configuration file does not need the Complied executing of JAVA file, to transport Line efficiency is higher.
Advantage in terms of in addition to execution efficiency, the exploitation of the development efficiency of the second XML configuration file also superior to JAVA file Efficiency.The reason is that needing to recompilate the exploitation such as packing after JAVA file modification if the logic of business processing needs to modify Operation.However, not needing to execute these exploitation operations, only configuration file content after the modification of the second XML configuration file Modification.
In the prior art, code development larger workload increases the burden of developer.However, the application can root According to label rule, the processing such as flexible configuration parsing, biography value, result of return inquiry database are patrolled in the second XML configuration file Volume.User only needs to write second XML configuration file and introduces response Jar packet, can realize flexible configuration automatically, Additional any workload is not needed, the unnecessary development amount of developer can be greatly decreased in the application.
The concrete form of the second XML configuration file is illustrated below.
Second XML configuration file is made of label node one by one, and each label node has respective processing Content, the processing logic for collectively forming the second XML configuration file and being recorded of process content.The process content of label node can To be to be operated to database, can be and carry out format verification etc. content to incoming parameter.Second XML configuration file is held Line mode is, according to the successive sequential write of label node, successively executes process content represented by label node.
Processing logical statement in second XML configuration file includes incoming parameter, and the source for being passed to parameter includes two types The request of type, respectively business processing and database manipulation result.That is, extracting parameter in being requested from business processing, The parameter of extraction is as the incoming parameter in data base manipulation statement.Alternatively, the operating result of a data base manipulation statement can Using the incoming parameter as another data base manipulation statement.
If the incoming parameter of data base manipulation statement is requested from business processing, the second XML configuration file is read In data base manipulation statement and execution, specific implementation include:
Target component is extracted from business processing request;Read the data base manipulation statement in the second XML configuration file;It will Target component is passed to data base manipulation statement as incoming parameter, and executes the incoming data base manipulation statement for having parameter.
Processing logical statement in second XML configuration file is in addition to that can also include including above data library action statement The sentence of following two type, i.e. Verification sentence and verification result return statement.
The second XML configuration file based on above-mentioned form, the method for operating database provided by the present application further include following Step, it may be assumed that
It reads the Verification sentence in the second XML configuration file and executes, to obtain the verification result of target component;With And read the verification result return statement in the second XML configuration file and execute, with return parameters verification result.
It wherein include proof rule and parameter and standard in Verification sentence, according to proof rule verifying business processing request In parameter whether meet parameter and standard.The effect of verification result return statement is that verification result is returned to business processing request Sender.
Below by way of specific application scenarios and several second XML configuration file examples, to the shape of the second XML configuration file Formula is illustrated.
Database operating modules receive the business processing request of external interface transmission, it is assumed that business processing request Purpose be, request from database inquire certain time period in bank card business dealing detail.Then database operating modules parse Parameter required for inquiry database is therefrom extracted in business processing request, and parameter includes from date and the termination of period Date.
By taking the second XML configuration file shown in Fig. 2 as an example, it is assumed that the time parameter that extracts is from business processing request STR_DATE (from date of period) and END_DATE (date of expiry of period) includes label in the configuration file Node<ifbf>includes condition field in the label node, and what which indicated is the judgement to two time parameters Condition.The content of Rule of judgment is to judge whether the format of time parameter is inaccurate.According to the processing logic of configuration file, such as The format inaccuracy of fruit time parameter, then return to the content for including in label node<key>, the content which includes is used In expression time parameter format inaccuracy.
It requires supplementation with a bit, the R in Fig. 2 in condition field can be used to indicate that external incoming parameter.
About data base manipulation statement it should be noted that including this type of data base manipulation statement in processing logical statement The sentence of type, query sentence of database may be embodied in various types of label nodes and execute.
A kind of example is that query sentence of database may be embodied in<atom>label node.
The example code of second XML configuration file shown in see below, include in label node<atom>subtab< Content >, it include the SQL statement for indicating inquiry, i.e. SELECT statement in the subtab.
It requires supplementation with a bit, the D in the condition field of above-mentioned example code can be indicated, parameter TIME_SCOPE From the resulting query result of other query sentence of database.
In another example, query sentence of database be may be embodied in Rule of judgment<ifbf>label node.
Still by taking above-mentioned example code as an example, what the condition field in<ifbf>label node may include is data Library action statement.
In another example, data base manipulation statement is further included in circulation class label node.
Circulation class label node refers to that circulation repeatedly carries out the label node of the operation of same treatment.Database manipulation Sentence is included in such label node, can realize the processing to the multiple identical content of database.
In another example, data base manipulation statement is further included in the label node of the types such as text class label node In.
Text class label node refers to the label node comprising JAVA sentence.Data base manipulation statement also may include In such label node.For example, the function of JAVA sentence is, looked into obtaining data base manipulation statement from database After all query results ask, select the partial query result for meeting condition as the inquiry finally returned that from query result As a result.
It should be noted that in addition to above several examples, data base manipulation statement is further included in other kinds of mark It signs in node.
No matter label section of the data base manipulation statement in the label node of which seed type, in the second XML configuration file Point has successive sequential write.
In practical applications, the method for operating database provided by the present application can also include: to the second XML configuration file Verification step.Specifically: the verification step to the second XML configuration file may include:
Obtain the second XML configuration file content format rule, and verify the second XML configuration file content format whether Meet content format rule.
Wherein, the second XML configuration file has certain content format rule, for example, may in the second XML configuration file Which the label node that will appear has, what kind of the title of each label node is, how the cannonical format of label node is , which the field that label node may include has, what kind of the title of field is, what kind of the cannonical format of field is, Etc..
Before executing the processing logical statement in the second XML configuration file, the content to the second XML configuration file is needed Format is verified, its no requirement for meeting above content format convention is verified.Similarly, can to the first XML configuration file into Row verifying.
Two XML configuration files in the application can be run and be executed by JAR packet.From the point of view of specific, JAR packet be can parse Resolution rules in first XML configuration file extract target component from business processing request according to the resolution rules, can also be with According to the assembling of the processing result returned packet in the first XML configuration file rule, database manipulation result is assembled into return Message.The data base manipulation statement in the second XML configuration file can also be performed in JAR packet, to obtain database manipulation result.
See Fig. 3, this application provides a kind of devices of operating database, it specifically includes: configuration file acquisition module 301, The extraction module 302 of target component, database manipulation result obtain module 303, returned packet assembles module 304, returned packet Return module 305.
Configuration file obtains module 301, after receiving business processing request, obtains corresponding with business processing request First XML configuration file and the second XML configuration file;The wherein parsing that the first XML configuration file record has business processing to request Rule and processing returns to the assembling of result rule;Second XML configuration file record has business processing to request relevant processing logic Sentence, processing logical statement include at least data base manipulation statement;
The extraction module 302 of target component, for according to the resolution rules in the first XML configuration file, from business processing Target component is extracted in request;
Database manipulation result obtains module 303, for reading the data base manipulation statement in the second XML configuration file, And target component is passed in data base manipulation statement and is executed, to obtain database manipulation result;
Returned packet assembles module 304, for regular according to the assembling in the first XML configuration file, by database manipulation As a result it is assembled into processing result returned packet;
Returned packet return module 305, for returning to processing result returned packet.
In one example, data base manipulation statement includes a plurality of, and pieces of data library action statement configures text in the 2nd XML There is front and back sequential write in part;Then database manipulation result obtains module and is used to read the data in the second XML configuration file Library action statement simultaneously executes, comprising: database manipulation result obtains module, is specifically used for successively reading according to front and back sequential write Take the data base manipulation statement in the second XML configuration file and execution.
In one example, business processing request is encapsulated in request message, and resolution rules include: order of the field and field Length;Then the extraction module of target component is used for according to the resolution rules in the first XML configuration file, from business processing request Extract target component, comprising: the extraction module of target component, specifically for successively extracting each matching field from request message The message segment of length;And the corresponding parameter of each message segment is determined according to the setting rule of order of the field, wherein really The target component that the parameter made is extracted.
In one example, logical statement is handled further include: Verification sentence and verification result return statement;The then dress It sets further include: Verification module, for reading the Verification sentence in the second XML configuration file and executing, to obtain mesh Mark the verification result of parameter;And read the verification result return statement in the second XML configuration file and execute, with return parameters Verification result.
In one example, the device of service request processing further include: configuration file authentication module, for obtaining first The content format of XML configuration file and the second XML configuration file rule, and verify the first XML configuration file and the 2nd XML configuration Whether the content format of file meets content format rule.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including above-mentioned element.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of method of service request processing characterized by comprising
After receiving business processing request, the first XML configuration file corresponding with business processing request and the 2nd XML are obtained Configuration file;The resolution rules and processing returns to results that wherein the first XML configuration file record has business processing to request Assembling rule;The second XML configuration file record has the business processing to request relevant processing logical statement, the processing Logical statement includes at least data base manipulation statement;
According to the resolution rules in first XML configuration file, target component is extracted from business processing request;
The data base manipulation statement in second XML configuration file is read, and the target component is passed to the database It is executed in action statement, to obtain database manipulation result;
According to the assembling rule in first XML configuration file, the database manipulation result is assembled into processing result and is returned Return text;
Return to the processing result returned packet.
2. the method for service request according to claim 1 processing, which is characterized in that the data base manipulation statement includes A plurality of, pieces of data library action statement has front and back sequential write in second XML configuration file;
The then data base manipulation statement read in second XML configuration file and execution, comprising:
According to the front and back sequential write, the data base manipulation statement being successively read in second XML configuration file and execution.
3. the method for service request processing according to claim 1, which is characterized in that the business processing request is encapsulated in In request message, the resolution rules include: order of the field and field length;
The then resolution rules according in first XML configuration file extract target ginseng from business processing request Number, comprising:
The message segment of each matching field length is successively extracted from the request message;
The corresponding parameter of each message segment is determined according to the setting rule of order of the field, wherein the parameter determined is extracted The target component arrived.
4. the method for service request processing according to claim 1, which is characterized in that the processing logical statement also wraps It includes: Verification sentence and verification result return statement;Then this method further include:
It reads the Verification sentence in second XML configuration file and executes, to obtain the verification result of target component;
It reads the verification result return statement in second XML configuration file and executes, with return parameters verification result.
5. the method for service request processing according to claim 1, which is characterized in that further include: the first XML is matched Set the verification step of file and second XML configuration file;
Wherein the verifying of first XML configuration file and the second XML configuration file specifically includes:
The content format rule of the first XML configuration file and the second XML configuration file is obtained, and verifies the first XML configuration Whether file and the content format of second XML configuration file meet the content format rule.
6. a kind of device of service request processing characterized by comprising
Configuration file obtains module, after receiving business processing request, obtains corresponding with business processing request the One XML configuration file and the second XML configuration file;The wherein solution that the first XML configuration file record has business processing to request Analysis is regular and processing returns to the assembling of result rules;The second XML configuration file record has the business processing request related Processing logical statement, the processing logical statement include at least data base manipulation statement;
The extraction module of target component, for according to the resolution rules in first XML configuration file, from the business processing Target component is extracted in request;
Database manipulation result obtains module, for reading the data base manipulation statement in second XML configuration file, and will The target component is passed in the data base manipulation statement and executes, to obtain database manipulation result;
Returned packet assembles module, for regular according to the assembling in first XML configuration file, by the database manipulation As a result it is assembled into processing result returned packet;
Returned packet return module, for returning to the processing result returned packet.
7. the device of service request according to claim 6 processing, which is characterized in that the data base manipulation statement includes A plurality of, pieces of data library action statement has front and back sequential write in second XML configuration file;
Then the database manipulation result obtains module and is used to read the data base manipulation statement in second XML configuration file And it executes, comprising:
Database manipulation result obtains module, is specifically used for being successively read the 2nd XML according to the front and back sequential write and matching Set the data base manipulation statement in file and execution.
8. the device of service request processing according to claim 6, which is characterized in that the business processing request is encapsulated in In request message, the resolution rules include: order of the field and field length;
Then the extraction module of the target component is used for according to the resolution rules in first XML configuration file, from the industry Target component is extracted in business processing request, comprising:
The extraction module of target component, specifically for successively extracting the message of each matching field length from the request message Segment;And the corresponding parameter of each message segment is determined according to the setting rule of order of the field, wherein the parameter determined The target component extracted.
9. the device of service request processing according to claim 6, which is characterized in that the processing logical statement also wraps It includes: Verification sentence and verification result return statement;The then device further include:
Verification module, for reading the Verification sentence in second XML configuration file and executing, to obtain target The verification result of parameter;And read the verification result return statement in second XML configuration file and execute, to return to ginseng Number verification result.
10. the device of service request processing according to claim 6, which is characterized in that further include:
Configuration file authentication module, for obtaining the content format rule of the first XML configuration file and the second XML configuration file, And whether the content format for verifying first XML configuration file and second XML configuration file meets the content format Rule.
CN201811620772.XA 2018-12-28 2018-12-28 Method and device for processing service request Active CN109670081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811620772.XA CN109670081B (en) 2018-12-28 2018-12-28 Method and device for processing service request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811620772.XA CN109670081B (en) 2018-12-28 2018-12-28 Method and device for processing service request

Publications (2)

Publication Number Publication Date
CN109670081A true CN109670081A (en) 2019-04-23
CN109670081B CN109670081B (en) 2021-02-02

Family

ID=66146538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811620772.XA Active CN109670081B (en) 2018-12-28 2018-12-28 Method and device for processing service request

Country Status (1)

Country Link
CN (1) CN109670081B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110719296A (en) * 2019-10-25 2020-01-21 福建网能科技开发有限责任公司 Method for automatically analyzing message data in terminal communication protocol
CN111124479A (en) * 2019-12-18 2020-05-08 北京像素软件科技股份有限公司 Configuration file analysis method and system and electronic equipment
CN111464608A (en) * 2020-03-30 2020-07-28 山东浪潮通软信息科技有限公司 Message processing method and device
CN111553652A (en) * 2020-04-23 2020-08-18 中国银行股份有限公司 Service processing method and device
CN112286907A (en) * 2020-10-26 2021-01-29 中信百信银行股份有限公司 Database configuration method and device, electronic equipment and readable storage medium
CN112506481A (en) * 2020-12-01 2021-03-16 数字广东网络建设有限公司 Service data interaction method and device, computer equipment and storage medium
CN112769863A (en) * 2021-01-26 2021-05-07 北京树米网络科技有限公司 Method and device for processing service request message data
CN115292624A (en) * 2022-10-08 2022-11-04 成都同步新创科技股份有限公司 Universal message processing method and device based on HTTP (hyper text transport protocol)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080307044A1 (en) * 2007-06-07 2008-12-11 Bea Systems Inc. System and method for url compression
CN101634982A (en) * 2008-07-24 2010-01-27 国际商业机器公司 Method and system used for verifying XML document
CN102073534A (en) * 2011-02-24 2011-05-25 深圳市同洲电子股份有限公司 Data analysis method and device
CN107622091A (en) * 2017-08-23 2018-01-23 阿里巴巴集团控股有限公司 A kind of data base query method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080307044A1 (en) * 2007-06-07 2008-12-11 Bea Systems Inc. System and method for url compression
CN101634982A (en) * 2008-07-24 2010-01-27 国际商业机器公司 Method and system used for verifying XML document
CN102073534A (en) * 2011-02-24 2011-05-25 深圳市同洲电子股份有限公司 Data analysis method and device
CN107622091A (en) * 2017-08-23 2018-01-23 阿里巴巴集团控股有限公司 A kind of data base query method and device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110719296B (en) * 2019-10-25 2022-11-22 福建网能科技开发有限责任公司 Method for automatically analyzing message data in terminal communication protocol
CN110719296A (en) * 2019-10-25 2020-01-21 福建网能科技开发有限责任公司 Method for automatically analyzing message data in terminal communication protocol
CN111124479A (en) * 2019-12-18 2020-05-08 北京像素软件科技股份有限公司 Configuration file analysis method and system and electronic equipment
CN111124479B (en) * 2019-12-18 2024-03-22 北京像素软件科技股份有限公司 Method and system for analyzing configuration file and electronic equipment
CN111464608A (en) * 2020-03-30 2020-07-28 山东浪潮通软信息科技有限公司 Message processing method and device
CN111553652A (en) * 2020-04-23 2020-08-18 中国银行股份有限公司 Service processing method and device
CN111553652B (en) * 2020-04-23 2023-10-27 中国银行股份有限公司 Service processing method and device
CN112286907A (en) * 2020-10-26 2021-01-29 中信百信银行股份有限公司 Database configuration method and device, electronic equipment and readable storage medium
CN112506481A (en) * 2020-12-01 2021-03-16 数字广东网络建设有限公司 Service data interaction method and device, computer equipment and storage medium
CN112769863A (en) * 2021-01-26 2021-05-07 北京树米网络科技有限公司 Method and device for processing service request message data
CN112769863B (en) * 2021-01-26 2021-11-16 北京树米网络科技有限公司 Method and device for processing service request message data, electronic equipment and readable storage medium
CN115292624A (en) * 2022-10-08 2022-11-04 成都同步新创科技股份有限公司 Universal message processing method and device based on HTTP (hyper text transport protocol)
CN115292624B (en) * 2022-10-08 2023-08-04 成都同步新创科技股份有限公司 General message processing method and device based on HTTP protocol

Also Published As

Publication number Publication date
CN109670081B (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN109670081A (en) The method and device of service request processing
CN104699718B (en) Method and apparatus for being rapidly introduced into business datum
CN110032575A (en) Data query method, apparatus, equipment and storage medium
CN107688618B (en) Data comparison method, apparatus, computer equipment and storage medium
CN110134584A (en) A kind of generation method, device, storage medium and the server of interface testing use-case
RU2648966C2 (en) Apparatus and method for processing multiple open api
CN108667725A (en) A kind of industrial AnyRouter and implementation method based on a variety of accesses and edge calculations
CN101655943B (en) Enterprise application integrated working flow management method and system
CN111552838B (en) Data processing method and device, computer equipment and storage medium
CN106599164A (en) Support for a parameterized query/view in complex event processing
CN103189866B (en) Support for a parameterized query/view in complex event processing
CN108062367A (en) The method for uploading and its terminal of a kind of data list
CN109240688A (en) Interface development method, electronic device and readable storage medium storing program for executing
CN104394211A (en) Hadoop-based user behavior analysis system design and implementation method
CN107103064A (en) Data statistical approach and device
CN110134845A (en) Project public sentiment monitoring method, device, computer equipment and storage medium
CN108933774A (en) Data interaction system and method
CN104536963B (en) A kind of dispatching method and system of storing process
CN115994251B (en) Target projectile telemetering data analysis device and analysis system
CN110414259A (en) A kind of method and apparatus for constructing data element, realizing data sharing
CN113887173A (en) XML-based protocol dynamic packaging and analyzing method
CN108134812A (en) Data processing method and device
CN109726313A (en) The method and device of operating database
CN110020243A (en) Querying method, device, Internet of Things server and the storage medium of internet of things data
CN115017182A (en) Visual data analysis method and equipment

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