CN115757584A - System access method based on query interface - Google Patents

System access method based on query interface Download PDF

Info

Publication number
CN115757584A
CN115757584A CN202211511441.9A CN202211511441A CN115757584A CN 115757584 A CN115757584 A CN 115757584A CN 202211511441 A CN202211511441 A CN 202211511441A CN 115757584 A CN115757584 A CN 115757584A
Authority
CN
China
Prior art keywords
message
routing
field
processing
query
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211511441.9A
Other languages
Chinese (zh)
Inventor
王训帆
刘佳
叶惠明
王立
张国彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Guangfa Bank Co Ltd
Original Assignee
China Guangfa Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Guangfa Bank Co Ltd filed Critical China Guangfa Bank Co Ltd
Priority to CN202211511441.9A priority Critical patent/CN115757584A/en
Publication of CN115757584A publication Critical patent/CN115757584A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a system access method based on a query interface. The method comprises the following steps: receiving a first message sent by a request system, and analyzing the first message according to the message type of the first message; the message types of the first message comprise a JSON message, an XML message, a fixed-length message, a specific separator message and an 8583 message; processing the message field of the first message, and recording the association relation among the message field, the processing field and the output field; carrying out route distribution according to a preset route mode, wherein the preset route mode comprises concurrent routing, sequential routing, weight routing and user-defined routing; and assembling a second message for data query and sending the second message to a corresponding query system so as to enable the request system to access the query system. The technical scheme of the invention improves the flexibility and the universality of system access by supporting the request system to send a plurality of message types.

Description

System access method based on query interface
Technical Field
The invention relates to the technical field of system access, in particular to a system access method based on a query interface.
Background
Most enterprises in a new era have gone on a digital transformation road, and the API becomes a core carrier of enterprise connection business. The rapidly increased API scale and the calling amount enable enterprise IT to face a plurality of challenges in architecture, mode and even business ecological layer, in order to unify the development of a data service interface of big data and standardize the development and management of the interface of real-time data query access and real-time data access, the data query application provides a rapid data query API interface access method (comprising interface access of various message formats, variable processing, blood margin management and version management) for a big data platform and an artificial intelligence platform, and the visualization, configuration, standardization and flow of interface configuration are realized.
In the existing technical scheme, an API is generated based on a data table. Firstly, the fixed message format supported by the API is JSON, the request message header and the return message header are fixed, but different enterprise development histories or specification situations are different, and for various reasons, sometimes a service system calls the API to limit the message format, which is not necessarily JSON, even the request or return message header is not unified, and the existing industry scheme does not support the message format. And secondly, intermediate data processing of returned results before and after the API executes the query, wherein the field of the request message of the industry scheme and the intermediate processing field are in an unrecorded incidence relation and a field-level consanguinity relation is not maintained. And thirdly, intermediate data processing, the technical scheme in the industry aims at processing the whole message by using a python script, and the function is single and cannot meet most service scenes. And finally, the interface is called and arranged, and the scheme in the industry only supports the routing by single condition judgment, has single function and is not flexible enough and cannot meet most service scenes.
Disclosure of Invention
The invention provides a system access method based on a query interface, which improves the flexibility and the universality of system access by supporting a request system to send a plurality of message types.
An embodiment of the present invention provides a system access method based on a query interface, which is applied to the query interface and includes the following steps:
receiving a first message sent by a request system, and analyzing the first message according to the message type of the first message; the message types of the first message comprise a JSON message, an XML message, a fixed-length message, a specific separator message and an 8583 message;
processing the message field of the first message, and recording the association relation among the message field, the processed field and the output field; the processing comprises character string processing, fel expression processing, enumeration mapping processing and custom javascript processing;
carrying out route distribution according to a preset route mode, wherein the preset route mode comprises concurrent routing, sequential routing, weight routing and user-defined routing;
and assembling a second message for data query and sending the second message to a corresponding query system so as to enable the request system to access the query system.
Further, analyzing the first message according to the message type of the first message, specifically including; and when the first message is a JSON message, traversing a pre-configured first analysis rule by using the JSON message analysis class, converting a traversal result into a JSON analysis rule, and analyzing the JSON message according to the JSON analysis rule.
Further, analyzing the first message according to the message type of the first message, specifically including; when the message type of the first message is a specific delimiter message, analyzing the first message into a character String array by using a specific delimiter message analysis method and a String type split method, and analyzing the character String array according to a second analysis rule obtained by traversal configuration.
Further, the fel expression processing is performed according to the following steps:
when the first message is subjected to message field analysis, field variables and field values obtained through analysis are stored in a Map object;
replacing variables in a preset fel expression by calling the fel expression engine processing class;
and calculating the value of the replaced fel expression by executing a fel expression engine eval method.
Further, the enumeration mapping process is performed according to the following steps:
when the message field of the first message is analyzed, the field variable and the field value obtained by analysis are stored in a first Map object;
acquiring a third Map object corresponding to the field variable from a second Map object by taking the field variable as a key value, and acquiring a mapped second field variable from a fourth Map object by taking the field variable as a key value;
acquiring a mapped enumeration value from the third Map object according to a field value corresponding to the field variable;
and saving the second field variable and the enumeration value into a fifth Map object in a form of a key-value pair.
Further, recording the association relationship among the message field, the processing field, and the output field specifically includes:
and assembling the message field, the processing field, the return field, the query data source, the query table and the query condition field data into a json message, sending the json message to Kafka and storing the json message in a database.
Further, when the preset routing mode is concurrent routing and the interface processing flow reaches the routing component for processing, acquiring a thread pool of the routing and a server component set of the routing;
traversing the server component set, creating a server component thread, and submitting the server component thread to the thread pool;
and carrying out concurrent routing by asynchronously calling corresponding component implementation classes.
Further, when the preset routing mode is sequential routing and the interface processing flow reaches the routing component for processing, defining the processing step sequence number, and acquiring a thread pool of the routing and a server component set of the routing;
traversing the server component set, creating a server component thread, and submitting the server component thread to the thread pool;
and carrying out sequential routing by synchronously calling corresponding component implementation classes.
Further, when the preset routing mode is weight routing and an interface processing flow reaches a routing component for processing, acquiring a routing object array and calculating the length of the routing object array;
and calling a nextInt () method of a Random class according to the length of the routing object array to obtain a server and routing to the server.
Furthermore, when the preset routing mode is concurrent routing, sequential routing, weight routing or user-defined routing, the condition judgment rule of the routing is set simultaneously
The embodiment of the invention has the following beneficial effects:
the invention provides a system access method based on a query interface. By developing message analyzers with different message formats, message formats with different formats are analyzed, and interfaces support multiple message formats (JSON, XML, fixed length, specific separators, multiple message formats and non-fixed message headers), so that more types of API (application program interface) requirements of various service systems can be supported. According to the invention, through the configuration of the interface request message, the return message and the processing field, the incidence relation among the message field variable, the processing field variable and the output field variable is automatically analyzed and recorded, and the API field level consanguinity relation is formed. The method carries out variable processing by compiling the javascript function on line through java call, configured fel expression and enumeration mapping, and covers more comprehensive scenes, thereby meeting most processing logics. The invention supports concurrency, sequence, weight and self-defined routing strategy logic.
Drawings
Fig. 1 is a schematic flowchart of a system access method based on a query interface according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a record field relationship of a system access method based on a query interface according to an embodiment of the present invention.
Detailed Description
The technical solutions in the present invention will be described clearly and completely with reference to the drawings in the present invention, and it should be apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a data query interface access method, which includes the following steps:
step S101: receiving a first message sent by a request party, and analyzing a message header and a message body according to the message type of the first message; the message types of the first message comprise a JSON message, an XML message, a fixed-length message, a specific separator message and a 8583 message.
As one embodiment, the JSON packet is analyzed, which specifically includes: and traversing a pre-configured JSON analysis rule by using a JSON message analysis class, and analyzing the JSON message according to the JSON analysis rule obtained by traversing, wherein the analysis rule comprises an analysis field expression.
As one embodiment, a JSON message parsing class and a JSON parsing rule are configured on a front-end interface in advance, where the parsing rule includes parsing field expressions, and the parsing field expressions include interface codes ($. Head.tradcode), transaction flow, transaction states, list lists ($. Body.list), and the like.
And when the received first message is a JSON message, traversing a pre-configured first parsing rule by using the JSON message parsing class, converting the first parsing rule into a JSON parsing rule, and parsing the JSON message according to the JSON parsing rule. For example, when the "interface coding" field is parsed, the first parsing rule is traversed by using a complex method in the JSONPath class in the fastjson packet and is converted into the JSONPath (i.e., the first parsing rule is converted into the JSON parsing rule), then the "interface coding" object is read by using an eval method in the JSONPath class, and then the toString method of the "interface coding" object is called to obtain the "interface coding" field value. For example, when a "list" field is parsed, a help method in a JSONPath class in the fashJson packet is used to traverse a first parsing rule, the obtained first parsing rule is converted into the JSONPath, and then an eval method in the JSONPath class is used to read an object array value of the "list" field.
As one embodiment, a specific delimiter message parsing class and a second parsing rule are configured in advance on the front-end interface, where the second parsing rule includes a specific delimiter and a parsing field sequence number. Such as: interface coding (including characteristics separator: @, resolution field sequence number: 0), transaction running water, transaction state, list and other fields. When the received first message is a specific delimiter message, analyzing the first message into a character String array arr1 by using a specific delimiter message analysis class and String class split method, and analyzing the character String array arr1 according to the second analysis rule obtained by traversing configuration. If the interface coding field is analyzed, the first element value of the character string array arr1 is obtained according to the sequence number 0 of the analyzed field.
As an embodiment, an XML message parsing class and a third parsing rule are configured in advance on a front-end interface, where the third parsing rule includes a parsing field expression, and the parsing field expression includes field expressions such as an interface code (gateway | tradecocode), a transaction flow, a transaction state, and a list (gateway | list). When the received first message is an XML message, reading the first message by using the XML message parsing class to obtain an XML format queue form file, specifically: calling an xmlParser method of a Parser class in a jsoup packet to read the first message; and traversing a third preset analysis rule, and analyzing the message field according to the third analysis rule. For example, when the "interface code" field is parsed, the third parsing rule is read and converted into Elements by using a select method in the Document class in the jsoup package, and the first element value of the Elements is obtained. For example, when the "list" field is parsed, the third parsing rule is read by using a select method in the Document class in the jsoup package and converted into Elements, and the Elements are object arrays.
As one embodiment, a fixed-length message parsing class and a fourth parsing rule are configured on a front-end interface in advance, where the fourth parsing rule includes a parsing field start position and a parsing field end position. Such as: interface code (including start position: 0, end position 5), transaction flow, transaction status, list of listings, etc.
When the received first message is a fixed-length message, the fixed-length message analysis class is used for converting the first message and storing the first message into a byte array arr, and the byte array arr is analyzed according to the fourth analysis rule obtained through traversal configuration. For example, when the "interface code" field is parsed, the byte array arr is read by using the subarray method in the ArrayLists class in the lang3 packet, the bytes from the start position 0 to the end position 5 are copied and assembled into a new byte array tradecoarr, and then the new byte array tradecoarr is converted into the String object by using the String class.
As one embodiment, a 8583 message parsing class and a fifth parsing rule are configured on the front-end interface in advance, where the fifth parsing rule includes a message length, a TPDU, a message header, a message type, a bitmap, and a data field (including a field number, a field length, a field data type, a field length type, whether to lengthen or not, and a length byte to lengthen). And when the received first message is an 8583 message, analyzing by using the fifth analysis rule obtained by traversing 8583 message analysis classes. For example, the 8583 message is: 005960001600006001100000001007024048000C0801116625966000000001;
message length: configuring a starting position 0 and an ending position 4, and acquiring a message length value of 0059 by using a Sting type substring method;
TPDU: configuring a starting position 4 and an ending position 14, and acquiring a TPDU value of 6000160000 by using a Sting (0, 4) method;
message header: configuring a starting position 14 and an ending position 26, and acquiring a message header value of 60011000000 by using a Sting type substring (14, 26) method;
message type: configuring a starting position 26 and an ending position 30, and acquiring a message type value of 0100 by using a Sting type substring (26, 30) method;
bitmap: configuring a start position 30, acquiring bitmap decimal data 7024048000C08011 at an end position 46 by using a substring (26, 30) method of a Sting class, converting the bitmap decimal data into binary data 0111000000100100100 00000100 10000000 0000 11000000 10000000 00010001, traversing the binary data from left to right (a value of 1 indicates that the data field is used, and the data field starts from 1), and acquiring a bitmap array ([ 2,3,4, 11, 14, 22, 25, 41, 42, 49, 60, 64 ]);
a data field: the method comprises the steps of configuring a domain number (2), a domain length (16), a domain data type (BCD), a domain length type (BCD), whether the length is increased (yes) or not and a length-increased byte (2), acquiring the length of the domain number (2) to be 16 by using substring (46, 48) of a Sting class as the configured length-increased byte is 2, and then acquiring user account data 625966000000001 by using substring (48, 48+ 16) of the Sting class. (the value of domain number 2 is 16625966000000001).
Step S102: processing the message field of the first message, and recording API field level consanguinity relations among the message field, the processed field and the output field; the processing comprises character string processing, fel expression processing, enumeration mapping processing and custom javascript processing.
As one embodiment, processing is performed on a message field variable, and the processing includes string processing, fel expression processing, enumeration mapping processing, and custom javascript processing.
And (4) calling fel expressions by java to realize calculation of operators, logic judgment operation and variable attribute value calculation. And processing by calling a character string intercepting, splicing and replacing method through java. The parsed field value is mapped to an enumerated value by java.
As an embodiment, the fel expression processing is performed on the message field variable according to the following steps:
step S1021: and configuring fel expressions (such as ampout 100) on the front-end interface in advance, and generating new processing fields ampout 2.
Step S1022: when the first message is analyzed, saving the field variable and the field value obtained by analysis into a Map object;
step S1023: and replacing the configured variables of the fel expressions by calling the fel expression engine processing class. For example, map is used to obtain the value of amout as 0.01, and then the amout variable in fel expression amout 100 is replaced with 0.01, resulting in 0.01 × 100.
Step S1024: calculating the value of the replaced fel expression 0.01 x 100 to be 1 by executing the eval method in the fel expression engine.
As an embodiment, the enumeration mapping process is performed on a message field variable according to the following steps:
step S1025: mapping enumeration values (such as type: tradeCode, code value: a1, and mapping value: a1_ dcp) of message field variables are configured on a front-end interface in advance.
Step S1026: when the first message is analyzed, the field variable and the field value obtained through analysis are stored in a first Map object; for example, the tradeCode: a1 is saved to the first Map object in the form of a key-value pair.
Step S1027: acquiring a third Map object from the second Map object according to the field variable, and acquiring a mapped second field variable from a fourth Map object according to the field variable; specifically, the second Map object is a preconfigured enumeration value object Map < String, map >, a third Map object (e.g., key: a1, value: a1_ dcp) is obtained from the second Map object with the field variable tracecode as a key value, and the third Map object is an enumeration value object mapped through the interface coding field. The third Map object is used for saving enumerated values of the field variable mapping, and the fourth Map object is used for saving second field variables of the field variable mapping.
Step S1028: acquiring a mapped enumeration value from the third Map object according to the field value;
step S1029: and saving the second field variable and the enumeration value into a fifth Map object in a form of a key-value pair.
As one embodiment, the string processing is performed on a message field variable, where the string processing includes string interception, concatenation, and replacement processing, and specifically includes: performing character String interception processing by using a substring () method of a String class; carrying out single character String replacement processing by using a String type replace () method; carrying out whole character String replacement processing by using a String replaceAll () method; and carrying out character string splicing processing by using an apned () method of a StringBuffer class.
As one embodiment, the custom javascript script processing is performed on the message field variable according to the following steps:
step S10210: a javascript script is configured in advance on the front-end interface, for example, the javascript script is function testaaa (obj loader) { obj. Tradeco code2= "a1_ dcp"; return obj; }).
Step S10211: when the first message is analyzed, the field variable and the field value obtained by the analysis are stored in a Map object (such as a tradecocode: a 1).
Step S10213: and calling the eval method of the script engine script type to set the javascript script, calling the invokeFunction method of the script engine script type to execute the javascript script, transmitting an execution result to the Map object and the log type setter object in the step S10211, returning an execution completion result, and finally adding a 'tradeCode 2' field in the Map in the step S10211, wherein the value of the field is a1_ dcp.
As an embodiment, as shown in fig. 2, the association relationship among the message field, the processing field variable, and the output field is recorded according to the following steps to form an API field level blood relationship:
step S10214: configuring request message field analysis rules (such as interface codes, transaction flow, certificate types, certificate numbers and mobile phone number fields), field processing rules, returned message field analysis rules (such as amount account fields), query data sources, query tables and query condition field mapping relations on a front-end interface in advance.
Step S10215: and analyzing the first message according to the message field analysis rule configured in the step S10214 to obtain a message field, and processing the message field according to the configured processed field rule. For example: and processing the analyzed message field certificate type, certificate number and mobile phone number field into a new field rowId field. And then inquiring an abc table of an Hbase data source according to the rowKey field mapped by the rowId field. And analyzing the message field (such as the money amount field) of the returned query result.
Step S10216: and assembling the request message field, the processing field, the return field, the query data source, the query table and the query condition field data related to the request into a json message, and issuing the json message to Kafka to store the API interface blood margin data into a database.
Step S103: and carrying out route distribution according to a preset route mode, wherein the route mode comprises concurrent route, sequential route, weight route and self-defined route.
As one embodiment, a routing component is configured on a front-end interface in advance, the routing component is set to be a concurrent route, and other components (such as a server component 1 and a server component 2) are defined under the concurrent route component;
when the route mode of the first message analysis is a concurrent route and an interface processing flow reaches a route component for processing, acquiring a thread Pool of the route (the thread Pool is created by using a threadPoolexecutor) and a server component set of the route (comprising a server component 1 and a server component 2); traversing the server component set, creating a server component Thread, and submitting the server component Thread to the Thread pool; and carrying out concurrent routing processing by asynchronously calling the server side component implementation class.
As one embodiment, a routing component is configured on a front-end interface in advance, the routing component is set to be a sequential route, other components (such as a server component 1 and a server component 2) are defined under the sequential routing component, and the sequence of the other components under the sequential routing component is defined;
when the route mode of the first message analysis is sequential route and the interface processing flow reaches the route component for processing, defining a processing step sequence number (default is 0), and acquiring a thread Pool of the route (created by using a threadpool executive) and a server component set of the route; traversing the server component set, creating a server component Thread, and submitting the server component Thread to the Thread Pool;
and synchronously calling the server side component implementation class to perform routing processing, adding 1 to the sequence number of the step each time the processing is completed, and sequentially circulating until all the components are processed.
As one embodiment, a routing component is configured on a front-end interface in advance, the routing component is set as a weighted route, a service side component is defined under the weighted route component, and weight information of the service side component is defined (for example, the weight of a service side is 1, and the weight of a service side is 2); when the routing mode of the first message analysis is weight routing and the interface processing flow reaches the routing component for processing, acquiring all routing object arrays list (an A service party, a B service party and a B service party) cached by an interface, calculating the size of the object array list to be 3, and calling a Random type nextInt (3) method to acquire the routing service party.
As one embodiment, a dry file (such as rule "agenUp 12" while $ map. Get ") >12then $ map. Put"; "agenUp 12" true) and a routing component are configured in advance on a front-end interface, and the routing component is set as a custom route. And then selects the associated drl file and defines other components (e.g., server component 1) under the routing component. When the routing mode of the first message analysis is weight routing and the interface processing flow reaches the routing component for processing, routing is carried out according to the following steps:
step S1031: acquiring a drl file: and loading the preconfigured drl file by using an add method of a KnowledgeBuilder class.
Step S1032: the knowledge package set kpackages is obtained using getknowledggepacks of the KnowledgeBuilder class.
Step S1033: kBase instances were created using the newknowledgbasemethod of the KnowledgeBuilder class.
Step S1034: the knowledge package set kpackages is deployed to kBase instances using the addknowledgpackages packages (kpackages) method of the kBase class.
Step S1035: and creating the kSessision by using a newStateful KnowledSesion method of the kBase class, and then adding a Map variable value (the Map variable is obtained by analyzing the first message and is used for storing field information in the first message) by using a kSessision class insert (Map) method.
Step S1036: and executing the codes in the drl file by using a fireAllRules method in the kSession class, and finally returning the Map data. And judging whether the value of the ageUp12 field in the Map object is true, and if so, processing the next step.
As one embodiment, when the preset routing mode is concurrent routing, sequential routing, weighted routing or custom routing, the condition judgment rule of the routing is set at the same time. Configuring a condition component (including selecting which field as a judgment condition, such as selecting 'mobile flag-mobile phone tail number 0000' as the judgment condition) in advance on the front-end interface, and defining a routing component under the condition component. When the interface processing flow reaches the condition component processing step, judging whether the mobifeflag value in the Map object (the Map variable is obtained by analyzing the first message and is used for storing the field information in the first message) is true, and if the mobifeflag value is true, then processing the next step.
Step S104: and assembling a second message for data query and sending the second message to a corresponding query system.
The invention provides a data service visualization, configuration, flow and standardization scheme, and has the following beneficial effects:
1) The invention utilizes java to develop message analyzers with different message formats to analyze message formats with various different formats, and the interface supports various message formats (JSON, XML, fixed length, specific separator and various message formats, and does not fix the message header), thereby supporting more types of API appeal of each service system. The prior art only supports JSON format messages.
2) According to the invention, through the configuration of the interface request message, the return message and the processing field, the incidence relation among the message field variable, the processing field variable and the output field variable is automatically analyzed and recorded, and the API field level consanguinity relation is formed. The prior art does not support API field level kindred relationships.
3) The method carries out variable processing by compiling the javascript function on line through java call, configured fel expression and enumeration mapping, and covers more comprehensive scenes, thereby meeting most processing logics. The prior art only supports processing by python scripts.
4) The invention realizes the logic of concurrency, sequence, weight and self-defined routing strategy through java, and judges the distribution of the route by calling the routing strategy through java, thereby being more flexible. And (3) concurrence: supporting distribution to different downstream; the sequence is as follows: distributed to different downstream in order; and (3) weighting: distributing the weight proportion to different downstream; self-defining routing: and executing the routing rule, and judging whether to distribute the routing rule to downstream according to the return result. The prior art only supports routing with a single conditional decision.
One of ordinary skill in the art can understand and implement it without inventive effort. While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention. It will be understood by those skilled in the art that all or part of the processes of the above embodiments may be implemented by hardware related to instructions of a computer program, and the computer program may be stored in a computer readable storage medium, and when executed, may include the processes of the above embodiments. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

Claims (10)

1. A system access method based on a query interface is characterized in that the method is applied to the query interface and comprises the following steps:
receiving a first message sent by a request system, and analyzing the first message according to the message type of the first message; the message types of the first message comprise a JSON message, an XML message, a fixed-length message, a specific separator message and a 8583 message;
processing the message field of the first message, and recording the association relation among the message field, the processing field and the output field; the processing comprises character string processing, fel expression processing, enumeration mapping processing and custom javascript processing;
carrying out route distribution according to a preset route mode, wherein the preset route mode comprises concurrent routing, sequential routing, weight routing and user-defined routing;
and assembling a second message for data query and sending the second message to a corresponding query system so as to enable the request system to access the query system.
2. The system access method based on the query interface according to claim 1, wherein the first packet is parsed according to a packet type of the first packet, specifically; and when the first message is a JSON message, traversing a pre-configured first analysis rule by using the JSON message analysis class, converting a traversal result into the JSON analysis rule, and analyzing the JSON message according to the JSON analysis rule.
3. The system access method based on the query interface according to claim 2, wherein the first packet is parsed according to a packet type of the first packet, specifically; when the message type of the first message is a specific delimiter message, analyzing the first message into a character String array by using a specific delimiter message analysis method and a String type split method, and analyzing the character String array according to a second analysis rule obtained by traversal configuration.
4. The query interface-based system access method of claim 3, wherein the fel expression processing is performed according to the following steps:
when the first message is subjected to message field analysis, field variables and field values obtained through analysis are stored in a Map object;
replacing variables in a preset fel expression by calling a fel expression engine processing class;
and calculating the value of the replaced fel expression by executing a fel expression engine eval method.
5. The query interface based system access method of claim 4, wherein the enumeration mapping process is performed according to the following steps:
when the message field of the first message is analyzed, the field variable and the field value obtained by analysis are stored in a first Map object;
acquiring a third Map object corresponding to the field variable from a second Map object by taking the field variable as a key value, and acquiring a mapped second field variable from a fourth Map object by taking the field variable as a key value;
acquiring a mapped enumeration value from the third Map object according to a field value corresponding to the field variable;
and saving the second field variable and the enumeration value into a fifth Map object in a form of a key-value pair.
6. The system access method based on the query interface according to claim 1, wherein the recording of the association relationship among the message field, the processing field, and the output field specifically includes:
and assembling the message field, the processing field, the return field, the query data source, the query table and the query condition field data into a json message, sending the json message to Kafka and storing the json message in a database.
7. The system access method based on query interface of claim 1, wherein when the preset routing mode is concurrent routing and the interface processing flow reaches the routing component for processing, the thread pool of the routing and the server component set of the routing are obtained;
traversing the server component set, creating a server component thread, and submitting the server component thread to the thread pool;
concurrent routing is performed by asynchronously calling the corresponding component implementation classes.
8. The system access method based on the query interface of claim 7, wherein when the preset routing manner is sequential routing and the interface processing flow reaches the processing of the routing component, the sequence number of the processing step is defined, and a thread pool of the routing and a server component set of the routing are obtained;
traversing the server component set, creating a server component thread, and submitting the server component thread to the thread pool;
and carrying out sequential routing by synchronously calling corresponding component implementation classes.
9. The system access method based on query interface of claim 8, wherein when the preset routing manner is weight routing and the interface processing flow reaches the routing component for processing, obtaining the routing object array and calculating the length of the routing object array;
and calling a nextInt () method of a Random class according to the length of the routing object array to obtain a server and routing to the server.
10. The system access method based on the query interface according to any one of claims 1 to 9, wherein when the preset routing manner is a concurrent routing, a sequential routing, a weighted routing or a custom routing, a condition judgment rule of the routing is set at the same time.
CN202211511441.9A 2022-11-29 2022-11-29 System access method based on query interface Pending CN115757584A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211511441.9A CN115757584A (en) 2022-11-29 2022-11-29 System access method based on query interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211511441.9A CN115757584A (en) 2022-11-29 2022-11-29 System access method based on query interface

Publications (1)

Publication Number Publication Date
CN115757584A true CN115757584A (en) 2023-03-07

Family

ID=85340260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211511441.9A Pending CN115757584A (en) 2022-11-29 2022-11-29 System access method based on query interface

Country Status (1)

Country Link
CN (1) CN115757584A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107689977A (en) * 2016-08-05 2018-02-13 厦门雅迅网络股份有限公司 Distributed caching and the method for routing and its system of push
CN112102063A (en) * 2020-08-31 2020-12-18 深圳前海微众银行股份有限公司 Data request method, device, equipment, platform and computer storage medium
CN113765857A (en) * 2020-06-04 2021-12-07 华为技术有限公司 Message forwarding method, device, equipment and storage medium
CN114025015A (en) * 2021-11-29 2022-02-08 中电金信软件有限公司 Message transmission method and device
CN114721910A (en) * 2022-04-13 2022-07-08 中国银行股份有限公司 Data extraction method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107689977A (en) * 2016-08-05 2018-02-13 厦门雅迅网络股份有限公司 Distributed caching and the method for routing and its system of push
CN113765857A (en) * 2020-06-04 2021-12-07 华为技术有限公司 Message forwarding method, device, equipment and storage medium
CN112102063A (en) * 2020-08-31 2020-12-18 深圳前海微众银行股份有限公司 Data request method, device, equipment, platform and computer storage medium
CN114025015A (en) * 2021-11-29 2022-02-08 中电金信软件有限公司 Message transmission method and device
CN114721910A (en) * 2022-04-13 2022-07-08 中国银行股份有限公司 Data extraction method and device and electronic equipment

Similar Documents

Publication Publication Date Title
JP5400305B2 (en) Method, apparatus, and computer program for improving expression processing
KR101499599B1 (en) Data logging in graph-based computations
US9882844B2 (en) Opaque message parsing
CN102667718A (en) Method and system for processing network events
CN111324619B (en) Object updating method, device, equipment and storage medium in micro-service system
CN111562885A (en) Data processing method and device, computer equipment and storage medium
CN111400246B (en) Asynchronous file import method, device, computer equipment and storage medium
CN111553652B (en) Service processing method and device
US8819135B2 (en) Method of performing data mediation, and an associated computer program product, data mediation device and information system
CN111240772A (en) Data processing method and device based on block chain and storage medium
CN112860412B (en) Service data processing method and device, electronic equipment and storage medium
CN110866022A (en) Data analysis method, system and device based on log file
CN112365239A (en) Event-based cloud service management handling method and system
CN115757584A (en) System access method based on query interface
CN112330202B (en) Control intention work order processing method based on arrangement control flow service fulfillment
JP2006146615A (en) Object-related information management program, management method and management apparatus
CN112286767B (en) Redis cache analysis method
US8868424B1 (en) Interactive voice response data collection object framework, vertical benchmarking, and bootstrapping engine
CN112925655B (en) Decoupling system for dividing service and method thereof
CN115756399B (en) Scene type assembled middle-stage service integration method and system
CN116401243A (en) Engine implementation method, device, terminal and storage medium
CN117527895A (en) HTTP request processing method and system based on AOP
CN115658431A (en) Method for link tracing, electronic device and computer readable storage medium
CN114090506A (en) Log creating method and device and storage medium
CN117311673A (en) Data processing system, method, equipment and computer readable storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230307