CN114221836A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN114221836A
CN114221836A CN202111533802.5A CN202111533802A CN114221836A CN 114221836 A CN114221836 A CN 114221836A CN 202111533802 A CN202111533802 A CN 202111533802A CN 114221836 A CN114221836 A CN 114221836A
Authority
CN
China
Prior art keywords
service request
service
request
instance
information
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
CN202111533802.5A
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.)
Hangzhou Chengying Data Technology Co ltd
Original Assignee
Hangzhou Chengying Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Chengying Data Technology Co ltd filed Critical Hangzhou Chengying Data Technology Co ltd
Priority to CN202111533802.5A priority Critical patent/CN114221836A/en
Publication of CN114221836A publication Critical patent/CN114221836A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a data processing method and a device, wherein the data processing method comprises the following steps: a service requester acquires service request template information provided by a service provider, creates a service request instance based on the service request template information, and sends the service request instance to a routing server through a service request gateway, wherein the service request template information is pre-configured on a gateway management platform by the service provider; the routing server receives the service request instance, determines a service provider according to a service interface identifier in the service request instance, and forwards the service request instance to a service provider gateway of the service provider; and the service provider receives the service request example, analyzes the service request example to obtain service request information, determines a service request result in a service database based on the service request information, and sends the service request result to the service requester.

Description

Data processing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method and apparatus, a computing device, and a computer-readable storage medium.
Background
With the development of computer technology, more and more service providers provide respective service APIs (Application Programming interfaces) to the outside, and request formats, authentication protocols, and return data formats of the API interfaces provided by each service provider are all different, and an Application calls a data service through a gateway, and request API data must be well-defined with the service provider for a relevant request and return data, or customized development and analysis are provided for each service provider, so that the development cost of the service caller is increased, and the user experience is poor.
Disclosure of Invention
In view of this, embodiments of the present application provide a data processing method and apparatus, a computing device, and a computer-readable storage medium, so as to solve technical defects in the prior art.
According to a first aspect of embodiments of the present application, there is provided a data processing method, including:
a service requester acquires service request template information provided by a service provider, creates a service request instance based on the service request template information, and sends the service request instance to a routing server through a service request gateway, wherein the service request template information is pre-configured on a gateway management platform by the service provider;
the routing server receives the service request instance, determines a service provider according to a service interface identifier in the service request instance, and forwards the service request instance to a service provider gateway of the service provider;
and the service provider receives the service request example, analyzes the service request example to obtain service request information, determines a service request result in a service database based on the service request information, and sends the service request result to the service requester, wherein the service request result is a standardized service request result.
Optionally, the obtaining, by the service requester, service request template information provided by the service provider includes:
and the service request party determines a service request template identifier and determines service request template information in a service request template library according to the service request template identifier.
Optionally, creating a service request instance based on the service request template information includes:
creating an interface request body based on the service request template information;
and constructing a service request identifier, service request header information, service request authentication information and service request parameters in the interface request body to generate a service request instance.
Optionally, sending the service request instance to the routing server through the service request gateway includes:
generating a service request link according to the service request example;
and sending the service request link to a routing server through a service request gateway.
Optionally, determining a service provider according to the service interface identifier in the service request instance includes:
analyzing the service request instance to obtain a service interface identifier contained in the service request instance;
and searching a service provider corresponding to the service interface identifier through a prestored service directory mapping table.
Optionally, forwarding the service request instance to a service providing gateway of the service provider, where the service providing gateway includes:
determining a service providing gateway address of the service provider through the service directory mapping table;
and sending the service request instance to a corresponding service providing gateway according to the service providing gateway address.
Optionally, determining a service request result in a service database based on the service request information includes:
inquiring target service data in a service database according to the service request information;
and determining a service request result based on the target service data.
Optionally, determining a service request result based on the target service data includes:
determining an initial service request result based on the target service data;
and standardizing the initial service request result according to a preset request return format to obtain a service request result.
Optionally, determining an initial service request result based on the target service data includes:
under the condition that the target service data is inquired, acquiring the target service data, and generating request success information based on the target service data;
and generating error reporting information under the condition that the target service data is not inquired, and generating request failure information based on the error reporting information.
Optionally, the method further includes:
and the service requester receives the service request result sent by the service provider.
Optionally, the method further includes:
and the service provider acquires a gateway management platform interface template, creates a service request template based on the gateway management platform interface template, and uploads the service request template to the gateway management platform.
According to a second aspect of the embodiments of the present application, there is provided a data processing method applied to a service requester, including:
acquiring service request template information provided by a service provider;
creating a service request instance based on the service request template information;
sending the service request instance to a routing server through a service request gateway, wherein the service request template information is configured in a gateway management platform in advance by a service provider;
and receiving a service request result provided by the service provider.
According to a third aspect of the embodiments of the present application, there is provided a data processing method applied to a service provider, including:
receiving a service request instance;
analyzing the service request instance to obtain service request information;
determining a service request result in a service database based on the service request information;
and determining a service request party according to the service request information, and sending a service request result to the service request party, wherein the service request result is a standardized service request result.
According to a fourth aspect of embodiments of the present application, there is provided a data processing system including:
the system comprises a service request party, a gateway management platform and a service provider, wherein the service request party is configured to acquire service request template information provided by the service provider, create a service request instance based on the service request template information and send the service request instance to the routing server through a service request gateway, and the service request template information is configured in advance on the gateway management platform by the service provider;
the routing server is configured to receive the service request instance, determine a service provider according to a service interface identifier in the service request instance, and forward the service request instance to a service providing gateway of the service provider;
and the service provider is configured to receive the service request example, analyze the service request example to obtain service request information, determine a service request result in a service database based on the service request information, and send the service request result to a service requester, wherein the service request result is a standardized service request result.
Optionally, the service requester is further configured to:
and the service request party determines a service request template identifier and determines service request template information in a service request template library according to the service request template identifier.
Optionally, the service requester is further configured to:
creating an interface request body based on the service request template information;
and constructing a service request identifier, service request header information, service request authentication information and service request parameters in the interface request body to generate a service request instance.
Optionally, the service requester is further configured to:
generating a service request link according to the service request example;
and sending the service request link to a routing server through a service request gateway.
Optionally, the routing server is further configured to:
analyzing the service request instance to obtain a service interface identifier contained in the service request instance;
and searching a service provider corresponding to the service interface identifier through a prestored service directory mapping table.
Optionally, the routing server is further configured to:
determining a service providing gateway address of the service provider through the service directory mapping table;
and sending the service request instance to a corresponding service providing gateway according to the service providing gateway address.
Optionally, the service provider is further configured to:
inquiring target service data in a service database according to the service request information;
and determining a service request result based on the target service data.
Optionally, the service provider is further configured to:
determining an initial service request result based on the target service data;
and standardizing the initial service request result according to a preset request return format to obtain a service request result.
Optionally, the service provider is further configured to:
under the condition that the target service data is inquired, acquiring the target service data, and generating request success information based on the target service data;
and generating error reporting information under the condition that the target service data is not inquired, and generating request failure information based on the error reporting information.
Optionally, the service requester is further configured to:
and receiving the service request result sent by the service provider.
Optionally, the service requester is further configured to:
the method comprises the steps of obtaining a gateway management platform interface template, creating a service request template based on the gateway management platform interface template, and uploading the service request template to a gateway management platform.
According to a fifth aspect of the embodiments of the present application, there is provided a data processing apparatus, applied to a service requester, including:
the acquisition module is configured to acquire service request template information provided by a service provider;
a creation module configured to create a service request instance based on the service request template information;
the sending module is configured to send the service request instance to a routing server through a service request gateway, wherein the service request template information is configured in a gateway management platform by a service provider in advance;
a receiving module configured to receive a service request result provided by the service provider.
According to a sixth aspect of the embodiments of the present application, there is provided a data processing apparatus, applied to a service provider, including:
a receiving module configured to receive a service request instance;
the analysis module is configured to analyze the service request instance to obtain service request information;
a determining module configured to determine a service request result in a service database based on the service request information;
and the sending module is configured to determine a service request party according to the service request information and send a service request result to the service request party, wherein the service request result is a standardized service request result.
According to a seventh aspect of embodiments of the present application, there is provided a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the data processing method when executing the computer instructions.
According to an eighth aspect of embodiments of the present application, there is provided a computer-readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the data processing method.
The data processing method provided by the embodiment of the application comprises the steps that a service requester acquires service request template information provided by a service provider, creates a service request example based on the service request template information, and sends the service request example to a routing server through a service request gateway, wherein the service request template information is configured on a gateway management platform in advance by the service provider; the routing server receives the service request instance, determines a service provider according to a service interface identifier in the service request instance, and forwards the service request instance to a service provider gateway of the service provider; and the service provider receives the service request example, analyzes the service request example to obtain service request information, determines a service request result in a service database based on the service request information, and sends the service request result to the service requester, wherein the service request result is a standardized service request result. The method realizes the normalization processing of the parameters of the service request template, quickly realizes the loading of the service request configuration, and the gateway automatically encapsulates the service request instance through the service request template, thereby improving the request efficiency of the service request and improving the use experience of users.
Drawings
FIG. 1 is a block diagram of a computing device provided by an embodiment of the present application;
FIG. 2 is a flow chart of a data processing method provided by an embodiment of the present application;
fig. 3 is a schematic diagram of a gateway call link provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of a data processing system provided by an embodiment of the present application;
fig. 5 is a flowchart of a data processing method applied to a service requester according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a data processing apparatus applied to a service requester according to an embodiment of the present application;
fig. 7 is a flowchart of a data processing method applied to a service provider according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data processing device applied to a service provider according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application is intended to encompass any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present invention relate are explained.
A gateway: the gateway realizes the equipment and application of network interconnection above a network layer, and is used for the interconnection of two networks with different high-level protocols and the forwarding of network requests.
JS: JavaScript is a script that can be used to create dynamically updated content.
http: the hypertext Transfer Protocol (HTTP) is a simple request-response Protocol that typically runs on top of TCP.
http 2.0: http2.0 is a safe and efficient next generation http transport protocol.
API: an application programming interface.
responseBody: http requests return of data content.
json: is a lightweight data exchange format.
In the present application, a data processing method and apparatus, a computing device, and a computer-readable storage medium are provided, and detailed descriptions are individually made in the following embodiments.
FIG. 1 shows a block diagram of a computing device 100 according to an embodiment of the present application. The components of the computing device 100 include, but are not limited to, memory 110 and processor 120. The processor 120 is coupled to the memory 110 via a bus 130 and a database 150 is used to store data.
Computing device 100 also includes access device 140, access device 140 enabling computing device 100 to communicate via one or more networks 160. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 140 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present application, the above-mentioned components of the computing device 100 and other components not shown in fig. 1 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 1 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 100 may also be a mobile or stationary server.
Wherein the processor 120 may perform the steps of the data processing method shown in fig. 2. Fig. 2 shows a flow chart of a data processing method according to an embodiment of the present application, comprising steps 202 to 206.
Step 202: the method comprises the steps that a service requester acquires service request template information provided by a service provider, creates a service request instance based on the service request template information, and sends the service request instance to a routing server through a service request gateway, wherein the service request template information is configured on a gateway management platform in advance by the service provider.
The service requester is specifically a party that needs to use a certain service, and the service provider is specifically a party that provides a service to the outside, for example, the first enterprise needs to use the service a and sends out a service request for invoking the service a, and the service a is maintained by the second enterprise, so the first enterprise is the service requester and the second enterprise is the service provider.
The service request template information is service request template information which is configured in the gateway management platform in advance by a service provider, information such as an interface identifier, parameter information and parameter rules required by service services provided by the service provider is specified in the service request template information, the service requester can perform relevant configuration according to the service request template to create a corresponding service request instance, and the service request instance specifically refers to a service request created by the service requester according to the service request template information and is used for requesting the service provider for the corresponding service services.
The service request gateway is a gateway of a service requester, and the gateway refers to equipment and application for realizing network interconnection on a network layer and is used for network interconnection, network request forwarding and the like with different high-level protocols.
In practical application, because request formats, authentication protocol return data formats and the like required by various service providers are different, in order to facilitate unified management, a gateway management platform interface template is configured in advance on a gateway management platform, and a service provider configures a corresponding service request template according to the gateway management platform interface template.
A service request template identification parameter, a single request parameter, a batch request parameter and the like are set in an interface template of a gateway management platform, wherein the single request parameter is used for storing a parameter map of an interface request, the request parameter does not support a data nesting structure, a first-layer array scene needs to be supported, and an Object map is supported, and examples of the single request parameter are as follows:
Figure BDA0003412401610000091
Figure BDA0003412401610000101
wherein, the wall _ data _ availability _ id is a template identification parameter, and params is a single request parameter.
In order to extend the compatibility of the gateway management platform interface template, a batch request parameter may be further set, where the batch request parameter sets a parameter map of the interface request in batch, the batch request parameter supports a scenario of Object batch operation, a single element is an Object map, and a parameter structure is [ Object1, Object2 … … ], and specifically, the example of the batch request parameter is as follows:
Figure BDA0003412401610000102
wherein, the wall _ data _ availability _ id is a template identification parameter, and the batch _ params is a batch request parameter.
And the service provider acquires the gateway management platform interface template, sets corresponding parameter information according to the provided service, generates a corresponding service request template, and uploads the service request template to a database corresponding to the gateway management platform so that the service requester can determine the service request template information.
Specifically, the obtaining, by the service requester, service request template information provided by the service provider includes:
and the service request party determines a service request template identifier and determines service request template information in a service request template library according to the service request template identifier.
In practical application, after a service requester is connected to a gateway management platform, a service request template list uploaded to the gateway management platform is acquired, a service request template required by the service requester is selected from the service request template list to send a selection instruction, a service request template identifier corresponding to the selection instruction is determined, and corresponding service request template information is determined in the service request template according to the service request template identifier.
In a specific embodiment provided by the present application, an enterprise a is taken as an example for explanation, and the enterprise a needs to use a service request a issued by an enterprise b, and obtain service request template information corresponding to the service request a uploaded by the enterprise b in advance through a service request template list in a gateway management platform.
The service request template information generally includes related template parameter information, and a service request instance is created based on the service request template information, including:
creating an interface request body based on the service request template information;
and constructing a service request identifier, service request header information, service request authentication information and service request parameters in the interface request body to generate a service request instance.
After the service request party obtains the service request template information, a corresponding interface request body can be created according to the service request template information, corresponding parameters such as a service request identifier, service request header information, service request authentication information, service request parameters and the like are set in the interface request body, and corresponding parameter information is input in the interface request body and is used for generating a corresponding service request instance. The service request instance specifically refers to a service request sent to a service provider.
After obtaining the service request instance, the service request instance is a specific interface request body, and the service request instance is sent to the routing server through the service request gateway, including:
generating a service request link according to the service request example;
and sending the service request link to a routing server through a service request gateway.
The service request instance is specifically an interface request body, and cannot be directly sent to the routing server, so that a corresponding service request connection (actual request url) needs to be generated according to the service request instance, and an http request is initiated to the routing server through the service request gateway.
Step 204: and the routing server receives the service request instance, determines a service provider according to a service interface identifier in the service request instance, and forwards the service request instance to a service providing gateway of the service provider.
In practical applications, data cannot be directly transmitted between gateways, because the gateways cannot acquire the gateway addresses of the other parties, a routing server needs to be connected through the gateways, the routing server is also called an intermediate service and is used for determining the gateway addresses of the other parties, and a service directory mapping table, such as a mapping relationship between a service request template identifier and service provider gateway information, is stored in the intermediate service. The service request instance of the service requester can be sent to the corresponding service provider in the routing server.
Specifically, determining a service provider according to a service interface identifier in the service request instance specifically includes:
analyzing the service request instance to obtain a service interface identifier contained in the service request instance;
and searching a service provider corresponding to the service interface identifier through a prestored service directory mapping table.
After receiving the service request instance, the routing server parses the service request instance to obtain a service interface identifier in the service request instance, where the service interface identifier is used to determine a service provided by which service provider the service interface is, specifically, when each service provider creates a service interface, the routing server establishes a corresponding service directory mapping table between the service interface identifier and the service provider, and stores the service directory mapping table in the routing server, and after obtaining the service interface identifier, queries a service target mapping table to determine the service provider corresponding to the service interface identifier.
Correspondingly, forwarding the service request instance to the service providing gateway of the service provider includes:
determining a service providing gateway address of the service provider through the service directory mapping table;
and sending the service request instance to a corresponding service providing gateway according to the service providing gateway address.
Namely, after the service provider is determined, the service providing gateway address corresponding to the service provider can be determined according to the service directory mapping table, and the service request instance is sent to the service providing gateway through the service providing gateway address, so that data transmission among gateways is realized.
Step 206: and the service provider receives the service request example, analyzes the service request example to obtain service request information, determines a service request result in a service database based on the service request information, and sends the service request result to the service requester, wherein the service request result is a standardized service request result.
The service provider is specifically a party providing service to the outside, and after receiving the service request instance forwarded by the routing server, the service provider analyzes the service request instance to obtain actual service request information of the service requester, and it should be noted that the service provider also needs to obtain service request authentication information in the service request instance, and performs authentication based on the service request authentication information, and only if the authentication is successful, the subsequent processing step can be executed, and if the authentication is failed, prompt information indicating that the calling is failed is returned.
In the case of successful authentication, determining a corresponding service request result in a service database of a service provider according to service request information, specifically, determining a service request result in a service database based on the service request information includes:
inquiring target service data in a service database according to the service request information;
and determining a service request result based on the target service data.
After the service request information is obtained through analysis, target service data is inquired in a service database according to the service request information, and a corresponding service request result is determined according to whether the target service data is inquired. Specifically, determining a service request result based on the target service data includes:
determining an initial service request result based on the target service data;
and standardizing the initial service request result according to a preset request return format to obtain a service request result.
In practical applications, each service provider has its own judgment logic for success and failure of a request, for example, some service providers return "success" to represent that the request is successful, and some service providers return "0" to represent that the request is successful. For a service requester, a corresponding judgment expression needs to be queried according to a technical document of a service provider to judge whether a service request is successful, which is very inconvenient for the service requester.
The initial service request result is an access request judgment logic of the service provider itself, so that the service provider can quickly know the access result of the service provider, and the initial service request result needs to be standardized to obtain a standardized service request result, which may be referred to as the following example:
Figure BDA0003412401610000141
the request _ id is a service request identifier, the success identifier requests successfully, the code identifier success code is 0, the content displayed by the message identifier is success, and the data identifier returns specific content. It should be noted that the above is only an illustrative illustration of the standardized service request result, and in practical applications, the practical application is the standard.
In practical applications, determining an initial service request result based on the target service data includes:
under the condition that the target service data is inquired, acquiring the target service data, and generating request success information based on the target service data;
and generating error reporting information under the condition that the target service data is not inquired, and generating a request failure message based on the error reporting information.
In practical application, if target service data is inquired, the target service data is acquired, request success information is generated according to the target service data, if the target service data is not inquired, error reporting information is generated, specific error reporting content is acquired, and corresponding request failure information is generated based on the error reporting information. And then, standardizing the request success information or the request failure information to realize the normalization of the returned data.
In a specific embodiment provided by the present application, the data processing method further includes:
and the service requester receives the service request result sent by the service provider.
Specifically, after the service provider obtains the normalized and standardized service request result, the service request result is returned to the service requester, and the service requester receives the service request result to complete the task of the service request.
The data processing method provided by the embodiment of the application comprises the steps that a service requester acquires service request template information provided by a service provider, creates a service request example based on the service request template information, and sends the service request example to a routing server through a service request gateway, wherein the service request template information is configured on a gateway management platform in advance by the service provider; the routing server receives the service request instance, determines a service provider according to a service interface identifier in the service request instance, and forwards the service request instance to a service provider gateway of the service provider; and the service provider receives the service request example, analyzes the service request example to obtain service request information, determines a service request result in a service database based on the service request information, and sends the service request result to the service requester, wherein the service request result is a standardized service request result. The method realizes the normalization processing of the parameters of the service request template, quickly realizes the loading of the service request configuration, and the gateway automatically encapsulates the service request instance through the service request template, thereby improving the request efficiency of the service request and improving the use experience of users.
And secondly, return data normalization such as dynamically loading a custom parameter expression, returning logic judgment js and the like can be realized, and the use experience of a user is further improved.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a gateway call link according to an embodiment of the present application. As shown in fig. 3:
step 302: and the service provider issues a service request template according to the gateway management platform interface template.
Step 304: the service request template is synchronized to the service requestor.
Step 306: the business request template is synchronized to a directory of intermediary services.
Step 308: the service directory mapping table is updated in the intermediary service.
Step 310: the service request party obtains the service request template information.
Step 312: and creating a service request instance, and sending the service request instance to the intermediate service through the service request gateway.
Step 314: the gateway address of the service provider is obtained in a service directory mapping table in the intermediate service.
Step 316: and forwarding the service request instance to a service providing gateway of the service provider.
Step 318: and analyzing the service request instance and obtaining a service request message.
Step 320: and accessing the service database according to the service request message, and returning a service request result.
Step 322: and linking the service request result to the service block chain.
Step 324: the service request party obtains the service request result from the service block chain.
Step 326: and the service request party returns the service request result to the application.
According to the data processing method provided by the embodiment of the application, the request parameters are sent to the service request gateway, and the service request gateway realizes http request parameter encapsulation and authentication according to the service request template, so that the normalization of the request parameters of a service request party is realized.
Corresponding to the above method embodiments, the present application further provides data processing system embodiments, and fig. 4 shows a schematic structural diagram of a data processing system according to an embodiment of the present application. As shown in fig. 4, the system includes:
a service requester 402 configured to obtain service request template information provided by a service provider 406, create a service request instance based on the service request template information, and send the service request instance to a routing server 404 through a service request gateway, wherein the service request template information is pre-configured on a gateway management platform by the service provider 406;
the routing server 404 is configured to receive the service request instance, determine a service provider 406 according to a service interface identifier in the service request instance, and forward the service request instance to a service providing gateway of the service provider 406;
and the service provider 406 is configured to receive the service request instance, parse the service request instance to obtain service request information, determine a service request result in a service database based on the service request information, and send the service request result to the service requester 402, where the service request result is a standardized service request result.
Optionally, the service requester 402 is further configured to:
the service requester 402 determines a service request template identifier, and determines service request template information in a service request template library according to the service request template identifier.
Optionally, the service requester 402 is further configured to:
creating an interface request body based on the service request template information;
and constructing a service request identifier, service request header information, service request authentication information and service request parameters in the interface request body to generate a service request instance.
Optionally, the service requester 402 is further configured to:
generating a service request link according to the service request example;
the service request link is sent to the routing server 404 through the service request gateway.
Optionally, the routing server 404 is further configured to:
analyzing the service request instance to obtain a service interface identifier contained in the service request instance;
and searching the service provider 406 corresponding to the service interface identifier through a pre-stored service directory mapping table.
Optionally, the routing server 404 is further configured to:
determining a service providing gateway address of the service provider 406 through the service directory mapping table;
and sending the service request instance to a corresponding service providing gateway according to the service providing gateway address.
Optionally, the service provider 406 is further configured to:
inquiring target service data in a service database according to the service request information;
and determining a service request result based on the target service data.
Optionally, the service provider 406 is further configured to:
determining an initial service request result based on the target service data;
and standardizing the initial service request result according to a preset request return format to obtain a service request result.
Optionally, the service provider 406 is further configured to:
under the condition that the target service data is inquired, acquiring the target service data, and generating request success information based on the target service data;
and generating error reporting information under the condition that the target service data is not inquired, and generating request failure information based on the error reporting information.
Optionally, the service requester 402 is further configured to:
receiving the service request result sent by the service provider 406.
Optionally, the service requester 402 is further configured to:
the method comprises the steps of obtaining a gateway management platform interface template, creating a service request template based on the gateway management platform interface template, and uploading the service request template to a gateway management platform.
The above is a schematic scheme of a data processing system of the present embodiment. It should be noted that the technical solution of the data processing system and the technical solution of the data processing method belong to the same concept, and details that are not described in detail in the technical solution of the data processing system can be referred to the description of the technical solution of the data processing method.
The data processing system provided by the embodiment of the application comprises a service requester, a service request gateway and a routing server, wherein the service requester acquires service request template information provided by a service provider, creates a service request instance based on the service request template information, and sends the service request instance to the routing server through the service request gateway, and the service request template information is configured in a gateway management platform by the service provider in advance; the routing server receives the service request instance, determines a service provider according to a service interface identifier in the service request instance, and forwards the service request instance to a service provider gateway of the service provider; and the service provider receives the service request example, analyzes the service request example to obtain service request information, determines a service request result in a service database based on the service request information, and sends the service request result to the service requester, wherein the service request result is a standardized service request result. The system realizes the normalization processing of the parameters of the service request template, quickly realizes the loading of service request configuration, and the gateway automatically encapsulates the service request instance through the service request template, thereby improving the request efficiency of the service request and improving the use experience of users.
And secondly, return data normalization such as dynamically loading a custom parameter expression, returning logic judgment js and the like can be realized, and the use experience of a user is further improved.
Fig. 5 illustrates a data processing method provided by an embodiment of the present application, which is applied to a service requester and includes steps 502 to 508.
Step 502: and acquiring service request template information provided by a service provider.
Step 504: and creating a service request instance based on the service request template information.
Step 506: and sending the service request instance to a routing server through a service request gateway, wherein the service request template information is configured in a gateway management platform in advance by a service provider.
Step 508: and receiving a service request result provided by the service provider.
Corresponding to the above method embodiment, the present application further provides an embodiment of a data processing apparatus, and fig. 6 shows a schematic structural diagram of the data processing apparatus according to an embodiment of the present application. As shown in fig. 6, the apparatus is applied to a service requester, and includes:
an obtaining module 602 configured to obtain service request template information provided by a service provider.
A creation module 604 configured to create a service request instance based on the service request template information.
A sending module 606 configured to send the service request instance to the routing server through a service request gateway, where the service request template information is configured in advance on a gateway management platform by a service provider.
A receiving module 608 configured to receive a service request result provided by the service provider.
The above is a schematic configuration of a data processing apparatus of the present embodiment. It should be noted that the technical solution of the data processing apparatus belongs to the same concept as the above technical solution applied to the data processing method of the service provider, and details of the technical solution of the data processing apparatus, which are not described in detail, can be referred to the description of the above technical solution of the data processing method.
Fig. 7 illustrates a data processing method provided by an embodiment of the present application, which is applied to a service provider and includes steps 702 to 708.
Step 702: a service request instance is received.
Step 704: and analyzing the service request example to obtain service request information.
Step 706: and determining a service request result in a service database based on the service request information.
Step 708: and determining a service request party according to the service request information, and sending a service request result to the service request party, wherein the service request result is a standardized service request result.
Corresponding to the above method embodiment, the present application further provides an embodiment of a data processing apparatus, and fig. 8 shows a schematic structural diagram of the data processing apparatus according to an embodiment of the present application. As shown in fig. 8, the apparatus is applied to a service provider, and includes:
a receiving module 802 configured to receive a service request instance.
And the analysis module 804 is configured to analyze the service request instance to obtain the service request information.
A determining module 806 configured to determine a service request result in a service database based on the service request information.
A sending module 808, configured to determine a service requester according to the service request information, and send the service request result to the service requester, where the service request result is a standardized service request result.
The above is a schematic configuration of a data processing apparatus of the present embodiment. It should be noted that the technical solution of the data processing apparatus belongs to the same concept as the above technical solution applied to the data processing method of the service provider, and details of the technical solution of the data processing apparatus, which are not described in detail, can be referred to the description of the above technical solution of the data processing method.
An embodiment of the present application further provides a computing device, which includes a memory, a processor, and computer instructions stored in the memory and executable on the processor, and when the processor executes the computer instructions, the steps of the data processing method are implemented.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the data processing method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the data processing method.
An embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, and the computer instructions, when executed by a processor, implement the steps of the data processing method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the data processing method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the data processing method.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (18)

1. A data processing method, comprising:
a service requester acquires service request template information provided by a service provider, creates a service request instance based on the service request template information, and sends the service request instance to a routing server through a service request gateway, wherein the service request template information is pre-configured on a gateway management platform by the service provider;
the routing server receives the service request instance, determines a service provider according to a service interface identifier in the service request instance, and forwards the service request instance to a service provider gateway of the service provider;
and the service provider receives the service request example, analyzes the service request example to obtain service request information, determines a service request result in a service database based on the service request information, and sends the service request result to the service requester, wherein the service request result is a standardized service request result.
2. The data processing method of claim 1, wherein the service requester obtains service request template information provided by the service provider, comprising:
and the service request party determines a service request template identifier and determines service request template information in a service request template library according to the service request template identifier.
3. The data processing method of claim 1, wherein creating a service request instance based on the service request template information comprises:
creating an interface request body based on the service request template information;
and constructing a service request identifier, service request header information, service request authentication information and service request parameters in the interface request body to generate a service request instance.
4. The data processing method of claim 1, wherein sending the service request instance to a routing server through a service request gateway comprises:
generating a service request link according to the service request example;
and sending the service request link to a routing server through a service request gateway.
5. The data processing method of claim 1, wherein determining a service provider based on the service interface identifier in the service request instance comprises:
analyzing the service request instance to obtain a service interface identifier contained in the service request instance;
and searching a service provider corresponding to the service interface identifier through a prestored service directory mapping table.
6. The data processing method of claim 5, wherein forwarding the service request instance to a service providing gateway of the service provider comprises:
determining a service providing gateway address of the service provider through the service directory mapping table;
and sending the service request instance to a corresponding service providing gateway according to the service providing gateway address.
7. The data processing method of claim 1, wherein determining a service request result in a service database based on the service request information comprises:
inquiring target service data in a service database according to the service request information;
and determining a service request result based on the target service data.
8. The data processing method of claim 7, wherein determining a service request result based on the target service data comprises:
determining an initial service request result based on the target service data;
and standardizing the initial service request result according to a preset request return format to obtain a service request result.
9. The data processing method of claim 8, wherein determining an initial service request result based on the target service data comprises:
under the condition that the target service data is inquired, acquiring the target service data, and generating request success information based on the target service data;
and generating error reporting information under the condition that the target service data is not inquired, and generating request failure information based on the error reporting information.
10. The data processing method of claim 1, wherein the method further comprises:
and the service requester receives the service request result sent by the service provider.
11. The data processing method of claim 1, wherein the method further comprises:
and the service provider acquires a gateway management platform interface template, creates a service request template based on the gateway management platform interface template, and uploads the service request template to the gateway management platform.
12. A data processing method is applied to a service requester and comprises the following steps:
acquiring service request template information provided by a service provider;
creating a service request instance based on the service request template information;
sending the service request instance to a routing server through a service request gateway, wherein the service request template information is configured in a gateway management platform in advance by a service provider;
and receiving a service request result provided by the service provider.
13. A data processing method is applied to a service provider and comprises the following steps:
receiving a service request instance;
analyzing the service request instance to obtain service request information;
determining a service request result in a service database based on the service request information;
and determining a service request party according to the service request information, and sending a service request result to the service request party, wherein the service request result is a standardized service request result.
14. A data processing system, comprising:
the system comprises a service request party, a gateway management platform and a service provider, wherein the service request party is configured to acquire service request template information provided by the service provider, create a service request instance based on the service request template information and send the service request instance to the routing server through a service request gateway, and the service request template information is configured in advance on the gateway management platform by the service provider;
the routing server is configured to receive the service request instance, determine a service provider according to a service interface identifier in the service request instance, and forward the service request instance to a service providing gateway of the service provider;
and the service provider is configured to receive the service request example, analyze the service request example to obtain service request information, determine a service request result in a service database based on the service request information, and send the service request result to a service requester, wherein the service request result is a standardized service request result.
15. A data processing apparatus, applied to a service requester, comprising:
the acquisition module is configured to acquire service request template information provided by a service provider;
a creation module configured to create a service request instance based on the service request template information;
the sending module is configured to send the service request instance to a routing server through a service request gateway, wherein the service request template information is configured in a gateway management platform by a service provider in advance;
a receiving module configured to receive a service request result provided by the service provider.
16. A data processing apparatus, applied to a service provider, comprising:
a receiving module configured to receive a service request instance;
the analysis module is configured to analyze the service request instance to obtain service request information;
a determining module configured to determine a service request result in a service database based on the service request information;
and the sending module is configured to determine a service request party according to the service request information and send a service request result to the service request party, wherein the service request result is a standardized service request result.
17. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 12 or 13 when executing the computer instructions.
18. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 12 or 13.
CN202111533802.5A 2021-12-15 2021-12-15 Data processing method and device Pending CN114221836A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111533802.5A CN114221836A (en) 2021-12-15 2021-12-15 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111533802.5A CN114221836A (en) 2021-12-15 2021-12-15 Data processing method and device

Publications (1)

Publication Number Publication Date
CN114221836A true CN114221836A (en) 2022-03-22

Family

ID=80702287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111533802.5A Pending CN114221836A (en) 2021-12-15 2021-12-15 Data processing method and device

Country Status (1)

Country Link
CN (1) CN114221836A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396525A (en) * 2022-08-26 2022-11-25 上海柯林布瑞信息技术有限公司 Data interaction method and device based on service template mapping
CN117081976A (en) * 2023-10-17 2023-11-17 建银工程咨询有限责任公司 Method and device for configuring gateway route

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118370A (en) * 2009-12-31 2011-07-06 华为技术有限公司 Service management method, device and system
WO2020134329A1 (en) * 2018-12-29 2020-07-02 中兴通讯股份有限公司 Gateway service implementation method, control device, and gateway
CN111507674A (en) * 2019-01-30 2020-08-07 阿里巴巴集团控股有限公司 Task information processing method, device and system
CN113225379A (en) * 2021-03-31 2021-08-06 北京三快在线科技有限公司 Method and device for sending HTTP request message

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118370A (en) * 2009-12-31 2011-07-06 华为技术有限公司 Service management method, device and system
WO2020134329A1 (en) * 2018-12-29 2020-07-02 中兴通讯股份有限公司 Gateway service implementation method, control device, and gateway
CN111507674A (en) * 2019-01-30 2020-08-07 阿里巴巴集团控股有限公司 Task information processing method, device and system
CN113225379A (en) * 2021-03-31 2021-08-06 北京三快在线科技有限公司 Method and device for sending HTTP request message

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115396525A (en) * 2022-08-26 2022-11-25 上海柯林布瑞信息技术有限公司 Data interaction method and device based on service template mapping
CN117081976A (en) * 2023-10-17 2023-11-17 建银工程咨询有限责任公司 Method and device for configuring gateway route
CN117081976B (en) * 2023-10-17 2024-01-16 建银工程咨询有限责任公司 Method and device for configuring gateway route

Similar Documents

Publication Publication Date Title
US8656417B2 (en) Interface for telecommunication services using uniform resource identifiers
US10057734B2 (en) System and method for transmitting and receiving media messages
RU2608190C2 (en) Contact information synchronization system and method
KR100873711B1 (en) Method and device for handling synchronization related information
US7269602B2 (en) Method and device for defining objects allowing establishment of a device management tree for mobile communication devices
US6629130B2 (en) Method and apparatus for processing electronic mail
CN101159730B (en) Information processing method, system and device of multimedia affiliation center
CN114221836A (en) Data processing method and device
US20100241664A1 (en) Smart web pages provisioning system and method for mobile devices
US8453158B2 (en) Method, apparatus, and system for enhancing application reliability of a script-based service
CN111510476B (en) Communication method, communication device, computer equipment and computer readable storage medium
EP2779590B1 (en) Determining peer-to-peer communication paths between service providers
CN112486074A (en) Data processing system, method and device
US8478313B2 (en) Message service method and message service system
US8861503B2 (en) Method and system for synchronizing data between mobile terminal and internet phone
CN112532764A (en) Data acquisition method and device
CN109005250B (en) Method and device for accessing server
CN108737350B (en) Information processing method and client
CN101547412B (en) A wireless pre-configured service realizing method and system
CN112714068A (en) Method, device and system for processing coded image, storage medium and electronic device
CN102325187A (en) System and method for integrating multiple function services
CN114827274A (en) Request processing method and device
CN114827197B (en) Service communication method, device, equipment and medium based on Internet of things
WO2023226338A1 (en) Communication method, apparatus, and system
JPWO2006040991A1 (en) Terminal device, server device, and Web service providing system

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20220322