Request processing method and device, medium and product

By identifying and converting the business request data protocols in government systems, the problem of low response efficiency caused by differences in interface parameters across different regions and institutions was solved, and standardized processing of resource interfaces was achieved, improving request response efficiency and compatibility.

CN121531041APending Publication Date: 2026-02-13CHINA MOBILE INFORMATION SYST INTEGRATION CO LTD +4
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511690221.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-18
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

In government systems, the resource interface response parameter structures provided by different regions and institutions vary greatly, resulting in low efficiency in request response processing and redundant work.

Method used

By identifying the data protocol of business requests, parsing request parameters, and converting them according to different data protocols, the request-response interface is determined, thus achieving standardized processing of resource interfaces.

Benefits of technology

It improves request and response efficiency, provides greater versatility and high compatibility, and reduces the need to match resource interfaces of different protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121531041A_ABST
    Figure CN121531041A_ABST
Patent Text Reader

Abstract

The invention discloses a request processing method and device, a medium and a product. The method comprises the following steps: in response to a first service request, identifying a first data protocol corresponding to request data of the first service request, and analyzing a first request parameter in the request data based on the first data protocol; determining a request response interface of the first service request according to the first request parameter, and determining a second data protocol corresponding to the request response interface; and performing data conversion on the first request parameter according to a second data protocol to obtain a second request parameter, and sending the second request parameter to the request response interface, so that the request response interface determines response data of the first service request according to the second request parameter. According to the technical scheme provided by the invention, the problem that the request response efficiency is low under the condition that the business data resource corresponds to a plurality of resource interfaces and the interface parameters are diversified is solved, a resource interface standardization processing mode can be provided, and the request response efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a request processing method, device, medium and product. Background Technology

[0002] In some business systems, especially in government data service scenarios of some government systems, the same function or resource interface is provided by different regions and different institutions. In the process of receiving and responding to requests, the response parameter structure of different resource interfaces will have significant differences. When implementing a certain standardized business function scenario, there may be repetitive docking work, resulting in low efficiency of request response processing. Summary of the Invention

[0003] This invention provides a request processing method, device, medium, and product, which can provide a standardized processing method for resource interfaces and improve request response efficiency.

[0004] In a first aspect, embodiments of the present invention provide a request processing method, the method comprising:

[0005] In response to the first business request, identify the first data protocol corresponding to the request data of the first business request, and parse the first request parameters in the request data based on the first data protocol;

[0006] The request-response interface for the first business request is determined based on the first request parameters, and the second data protocol corresponding to the request-response interface is determined.

[0007] The first request parameter is converted into a second request parameter according to the second data protocol, and then the second request parameter is sent to the request-response interface so that the request-response interface can determine the response data of the first business request based on the second request parameter.

[0008] In a second aspect, embodiments of the present invention provide a request processing apparatus, the apparatus comprising:

[0009] The request parsing module is used to respond to the first business request, identify the first data protocol corresponding to the request data of the first business request, and parse the first request parameters in the request data based on the first data protocol.

[0010] The request data mapping module is used to determine the request-response interface of the first business request based on the first request parameters, and to determine the second data protocol corresponding to the request-response interface;

[0011] The request processing module is used to perform data conversion on the first request parameters according to the second data protocol to obtain the second request parameters, and send the second request parameters to the request response interface so that the request response interface can determine the response data of the first business request based on the second request parameters.

[0012] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a request processing method as described in any of the embodiments of the present invention.

[0013] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the request processing method as described in any of the embodiments of the present invention.

[0014] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements a request processing method as described in any of the embodiments of the present invention.

[0015] In this embodiment of the invention, in response to a first business request, a first data protocol corresponding to the request data of the first business request is identified, and a first request parameter in the request data is parsed based on the first data protocol. The request-response interface of the first business request is determined according to the first request parameter, and a second data protocol corresponding to the request-response interface is determined. The first request parameter is converted according to the second data protocol to obtain a second request parameter, and the second request parameter is sent to the request-response interface so that the request-response interface determines the response data of the first business request based on the second request parameter. The technical solution of this invention solves the problem of low request-response efficiency when business data resources correspond to multiple resource interfaces and the interface parameters are diverse. It provides a standardized processing method for resource interfaces, converting the requester's request parameters so that the requester does not need to match resource interfaces with different protocols, thus having stronger universality and high compatibility, and improving request-response efficiency. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart of a request processing method provided in an embodiment of the present invention;

[0018] Figure 2 A schematic diagram of request parameter mapping provided in an embodiment of the present invention;

[0019] Figure 3 This is a schematic diagram illustrating the standardization processing of response data provided in an embodiment of the present invention;

[0020] Figure 4 This is a schematic diagram illustrating another standardization process for response data provided in an embodiment of the present invention;

[0021] Figure 5 This is a schematic diagram of the structure of a request processing device provided in an embodiment of the present invention;

[0022] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0023] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0024] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.

[0025] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the relevant content of the solution.

[0026] In some comprehensive business systems, data resources are typically managed by branches at different management levels and in different regions. For example, some government systems are divided into "national-provincial-municipal-county" levels, with vertically managed agencies having different functions. The boundaries of authority and responsibility are clear for different regions and agencies, and data resources are usually managed independently by each unit, lacking unified planning across regions and departments.

[0027] Therefore, different data management units use inconsistent technical standards, leading to variations in data sources and definitions when users access data. Even for the same capability (such as "enterprise information query"), data sources in different regions may come from different business systems, and the fields collected, update frequencies, and statistical definitions may differ, ultimately reflected in the request and response parameters of the interface. This affects the system's business request response efficiency and request success rate.

[0028] Figure 1 This is a flowchart illustrating a request processing method provided in an embodiment of the present invention. This embodiment is applicable to scenarios where an integrated business service system responds to business requests. The method can be executed by a request processing device, which can be implemented in software and / or hardware and integrated into a computer device.

[0029] like Figure 1 As shown, the request processing method includes the following steps:

[0030] S110. In response to the first service request, identify the first data protocol corresponding to the request data of the first service request, and parse the first request parameters in the request data based on the first data protocol.

[0031] The first business request can be a request sent by a user to a business system to obtain corresponding business data resources. The request processing device can be a business request access interface configured in the business system, uniformly preprocessing the request data of first business requests from different users, thus masking the differences in data protocols corresponding to different business data resource interfaces. Data protocols standardize the "common language" for data transmission, exchange, and interpretation between different systems, unifying the format, field meaning, and interaction rules of requests / responses from a technical perspective. Through the request processing method in this embodiment, the requesting client or system of the first business request does not need to be aware of the different data protocol specifications of different data resource systems within the business system.

[0032] Specifically, after obtaining the first business request, the system can identify the first data protocol corresponding to the request data of the first business request, and parse the first request parameters in the request data based on the first data protocol. The first data protocol can be a predefined standard protocol between the first business requester and the business system, used to regulate data interaction between the requester of the first business request and the business system.

[0033] The first request parameters are parsed from the request data based on the first data protocol, that is, the corresponding parameters are identified and extracted according to the data field identifiers defined in the first data protocol. The first request parameters may include identity and permission parameters, such as user identity identifiers, interface access credentials, and permission scope identifiers. The first request parameters may also include business-related parameters, used to determine how the data resource management system corresponding to the business system should respond to the first business request, such as business identifier parameters, business condition parameters, and business data. The first request parameters may also include environment and configuration parameters, as well as parameters used for security verification.

[0034] S120. Determine the request-response interface of the first business request based on the first request parameters, and determine the second data protocol corresponding to the request-response interface.

[0035] Specifically, the request-response interface that can respond to the first business request can be determined based on the business-related parameters in the first request parameters. Different request-response interfaces can correspond to different business data resource providers. The first request parameters used for the request-response interface can be business identification information, regional information, or functional department-related parameter information, etc.

[0036] The second data protocol corresponding to the request-response interface is the protocol for data interaction between the business system and the request-response interface.

[0037] S130. The first request parameter is converted into a second request parameter according to the second data protocol, and the second request parameter is sent to the request-response interface so that the request-response interface can determine the response data of the first business request based on the second request parameter.

[0038] The process of converting the first request parameters into second request parameters can be achieved by mapping the parameter name, parameter type, and parameter position in the first request parameters to the corresponding parameter name, parameter type, and parameter position in the second data protocol, based on the mapping relationship between parameter fields in the first and second data protocols. The parameter type can be data of various types, such as text, tables, images, audio, or video.

[0039] Furthermore, the number of request parameters may differ across different data protocols. In response to the difference in the number of parameters in the first and second request parameters, redundant parameter items in the second request parameter can be identified. The default value of each redundant parameter item can then be used as its corresponding parameter. Redundant parameter items in the second request parameter are those included in the second request parameter but not in the first request parameter. For these redundant parameters, it can be checked whether they have corresponding default values ​​or are required parameters. If a default value exists, it can be used as the corresponding parameter value. If no default value exists and the parameter is not required, it can be ignored, leaving the corresponding redundant data item empty. If no default value exists and the parameter is required, this information can also be fed back to the requester of the first business request.

[0040] In a specific instance, the process of converting request parameters can be as follows: Figure 2 The process is illustrated. The standard capability corresponds to the request processing device in this embodiment, used to uniformly receive the first service requests from various requesters. Different interface resources can correspond to different data protocols. Different mappings map the first request parameters of the first service request according to the different protocols of different interface resources to obtain the second request data that the corresponding interface resource can recognize, thus ensuring compatibility with the complexity and heterogeneity of different request protocols.

[0041] The technical solution of this invention, in response to a first business request, identifies a first data protocol corresponding to the request data of the first business request, and parses a first request parameter in the request data based on the first data protocol; determines the request-response interface of the first business request based on the first request parameter, and determines a second data protocol corresponding to the request-response interface; performs data conversion on the first request parameter according to the second data protocol to obtain a second request parameter, and sends the second request parameter to the request-response interface, so that the request-response interface determines the response data of the first business request based on the second request parameter. This technical solution solves the problem of low request-response efficiency when business data resources correspond to multiple resource interfaces and the interface parameters are diverse. It provides a standardized processing method for resource interfaces, converting the requester's request parameters so that the requester does not need to match resource interfaces with different protocols, thus having stronger universality and high compatibility, and improving request-response efficiency.

[0042] Furthermore, based on the above embodiments, in order to enable the requester of the first business request to receive request response data that it can recognize, the request processing device will also perform standardization processing on the response data fed back by the interface resources to achieve standardization of heterogeneous data in different interface resources. Then, the standardized response data can be fed back to the requester of the first business request. It is understood that standardization can be the data format corresponding to the first data protocol between the requester of the first business request and the business system. For example, it can be converting the response data into response data of a preset format and sending the converted preset format response data to the requester of the first business request.

[0043] In one optional implementation, the process of converting response data into response data in a preset format may involve determining whether the response data matches a preset data mapping rule; if the response data matches a preset data mapping rule, the response data is converted into response data in a preset format according to the preset data mapping rule; or, if the response data does not match any preset data mapping rule, a preset identifier in the response data is identified, and the response data is converted into response data in a preset format according to the preset identifier. Alternatively, if no preset identifier is identified in the response data, the response data is converted into response data in a preset format according to a JSON object mapping method.

[0044] The preset data mapping rules can be conditional. For example, they can be based on the numerical values ​​of data items in the response data. If the value of data item 1 in the response data is A, then the corresponding data is standardized according to the first data mapping rule; if the value of data item 1 in the response data is B, then the corresponding data is standardized according to the second data mapping rule. The judgment conditions of the data mapping rules can be configured according to specific business scenarios.

[0045] A preset identifier can also be a preset identifier. The recognition result of the preset identifier is used to identify and map the data before and after the preset identifier. For example, refer to... Figure 3 The example shown illustrates a response data transformation, using a JSON object as an example. The object is converted into a single-level key-value pair for display. The transformed parameters are connected by periods (.), and a special identifier [Arr] is defined. Using [Arr] as a criterion, the parameter name before [Arr] is used as the key-value pair in the constructed list, and the parameter name immediately following [Arr] is processed recursively. Here, [Arr] is a default identifier.

[0046] In one alternative implementation, converting response data into response data in a preset format can be a method for processing structured field description array conversion objects, used for standardized construction in complex data response scenarios.

[0047] Taking a JSON array description as an example, the data response returned by the request-response interface is a set of data descriptions, including the following fields: title (data field description), name (actual mapped value of the data field), format (formatted content), and info (data information). In business scenarios, the first business requester may only want to focus on the values ​​of the name and info fields, and ultimately only need standardized data in the format name:info. Directly responding with this type of data would require the first business requester to add unnecessary loops, conditional statements, and other logical operations to extract the values ​​of the name and info fields. In this embodiment, after obtaining the response data, it can first determine whether there is a data extraction template that matches the response data. If there is, data extraction is performed in the response data according to the data template, and the data extraction result is fed back to the requester of the first business request. If there is no data extraction template, an expression engine is used to calculate the target data fields to be extracted and their combination relationships. The expression engine calculation process can be achieved by parsing the expression rules in the response data and identifying the meaning of the expression. Then, based on the meaning identification result, the corresponding field data in the response data is matched and extracted. The data extraction template is associated with the interface identifier of the request-response interface, and the matching data extraction template can be determined through the interface identifier.

[0048] To ensure interface efficiency in scenarios with large data volumes, parallel processing of response data can be employed. Specifically, the response data can be grouped based on its volume, resulting in at least one response data group. Data extraction is then performed on each response data group using a cached data extraction template, yielding corresponding extraction results. Based on the extraction results and the extraction template, corresponding key-value pairs are obtained, and these pairs are merged to obtain response data in a pre-formatted format. Multiple threads can be used for parallel processing when extracting data from each response data group. These parallel threads can be implemented using the forkjoin framework.

[0049] For example, you can refer to Figure 4 The example shown illustrates a standardized response. The original interface response data is the response data before standardization. A data extraction template associated with the interface identifier of the request / response interface can be retrieved from the cache, data is extracted, and the extracted data is combined according to the combination relationship of the extracted elements in the template to complete the standardization. If multiple threads are extracting data synchronously, the extraction results from multiple threads can be combined to obtain the final standardized data result.

[0050] The above embodiments can be applied to various government standard capability scenarios, providing a heterogeneous data mapping and conversion method with high versatility, high compatibility, and wide coverage. It can meet the requirements of multiple protocol transmissions and multiple heterogeneous data conversions, and has stronger versatility in practical applications.

[0051] Figure 5 This is a schematic diagram of the request processing device provided in an embodiment of the present invention. This embodiment is applicable to scenarios where an integrated business service system responds to business requests. The device can be implemented in software and / or hardware and integrated into a computer device.

[0052] like Figure 5 As shown, the request processing device includes: a request parsing module 510, a request data mapping module 520, and a request processing module 530.

[0053] The request parsing module 510 is used to respond to the first business request, identify the first data protocol corresponding to the request data of the first business request, and parse the first request parameters in the request data based on the first data protocol; the request data mapping module 520 is used to determine the request response interface of the first business request according to the first request parameters, and determine the second data protocol corresponding to the request response interface; the request processing module 530 is used to perform data conversion on the first request parameters according to the second data protocol to obtain the second request parameters, and send the second request parameters to the request response interface so that the request response interface can determine the response data of the first business request according to the second request parameters.

[0054] The technical solution of this invention, in response to a first business request, identifies a first data protocol corresponding to the request data of the first business request, and parses a first request parameter in the request data based on the first data protocol; determines the request-response interface of the first business request based on the first request parameter, and determines a second data protocol corresponding to the request-response interface; performs data conversion on the first request parameter according to the second data protocol to obtain a second request parameter, and sends the second request parameter to the request-response interface, so that the request-response interface determines the response data of the first business request based on the second request parameter. This technical solution solves the problem of low request-response efficiency when business data resources correspond to multiple resource interfaces and the interface parameters are diverse, and can provide a standardized processing method for resource interfaces to improve request-response efficiency.

[0055] In one alternative implementation, the request processing module 530 is specifically used for:

[0056] The parameter name, parameter type, and parameter position in the first request parameter are mapped to the corresponding parameter name, parameter type, and parameter position in the second data protocol to obtain the second request parameter.

[0057] In an alternative implementation, the request processing module 530 may also be used to:

[0058] In response to the difference in the number of parameters in the first request parameters and the second request parameters, redundant parameter items in the first request parameters relative to the second request parameters are identified.

[0059] Use the default parameter value of the redundant parameter item as the parameter corresponding to the redundant parameter item.

[0060] In an alternative implementation, the request processing module 530 may also be used to:

[0061] The response data is converted into a preset format and then sent to the requester of the first business request.

[0062] In an alternative implementation, the request processing module 530 may also be used to:

[0063] Determine whether the response data matches a preset data mapping rule;

[0064] If the response data matches a preset data mapping rule, the response data is converted into response data in a preset format according to the preset data mapping rule; or, if the response data does not match any preset data mapping rule, a preset identifier in the response data is identified, and the response data is converted into response data in a preset format according to the preset identifier.

[0065] In an alternative implementation, the request processing module 530 may also be used to:

[0066] If the preset identifier is not recognized in the response data, the response data is converted into response data in the preset format according to the JSON object mapping method.

[0067] In an alternative implementation, the request processing module 530 may also be used to:

[0068] The response data is grouped according to its volume to obtain at least one response data group.

[0069] Based on the data extraction template in the cache, data is extracted from each response data group to obtain the corresponding data extraction results;

[0070] Based on the data extraction results and data extraction template, the corresponding data key-value pairs are obtained, and the data key-value pairs corresponding to each response data group are merged to obtain response data in a preset format.

[0071] The request processing apparatus provided in the embodiments of the present invention can execute the request processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0072] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Figure 6 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 6 The computer device 12 shown is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the present invention. The computer device 12 can be any terminal device with computing capabilities, such as intelligent controllers and servers, mobile phones, and other terminal devices.

[0073] like Figure 6As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0074] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0075] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0076] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 6 Not shown; usually referred to as a "hard drive"). Although Figure 6 As not shown, disk drives for reading and writing to removable non-volatile disks (e.g., "floppy disks") and optical disc drives for reading and writing to removable non-volatile optical discs (e.g., CD-ROMs, DVD-ROMs, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0077] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0078] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 6 As not shown, it can be used in conjunction with computer device 12 with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0079] Processing unit 16 executes various functional applications and data processing by running programs stored in system memory 28, such as implementing the request processing method provided in this embodiment, which includes:

[0080] In response to the first business request, identify the first data protocol corresponding to the request data of the first business request, and parse the first request parameters in the request data based on the first data protocol;

[0081] The request-response interface for the first business request is determined based on the first request parameters, and the second data protocol corresponding to the request-response interface is determined.

[0082] The first request parameter is converted into a second request parameter according to the second data protocol, and then the second request parameter is sent to the request-response interface so that the request-response interface can determine the response data of the first business request based on the second request parameter.

[0083] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the program implements the request processing method as provided in any embodiment of the present invention, the method comprising:

[0084] In response to the first business request, identify the first data protocol corresponding to the request data of the first business request, and parse the first request parameters in the request data based on the first data protocol;

[0085] The request-response interface for the first business request is determined based on the first request parameters, and the second data protocol corresponding to the request-response interface is determined.

[0086] The first request parameter is converted into a second request parameter according to the second data protocol, and then the second request parameter is sent to the request-response interface so that the request-response interface can determine the response data of the first business request based on the second request parameter.

[0087] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0088] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0089] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0090] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0091] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computing device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0092] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the request processing method provided in any embodiment of this application.

[0093] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0094] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

[0095] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A request processing method, characterized in that, include: In response to a first service request, the system identifies the first data protocol corresponding to the request data of the first service request and parses the first request parameters in the request data based on the first data protocol. The request-response interface of the first service request is determined based on the first request parameters, and the second data protocol corresponding to the request-response interface is determined. The first request parameter is converted into a second request parameter according to the second data protocol, and the second request parameter is sent to the request response interface so that the request response interface can determine the response data of the first business request based on the second request parameter.

2. The method according to claim 1, characterized in that, The step of converting the first request parameters according to the second data protocol to obtain the second request parameters includes: The parameter name, parameter type, and parameter position in the first request parameter are mapped to the corresponding parameter name, parameter type, and parameter position in the second data protocol to obtain the second request parameter.

3. The method according to claim 2, characterized in that, Also includes: In response to the difference in the number of parameters in the first request parameter and the second request parameter, redundant parameter items in the first request parameter relative to the second request parameter are identified; The default parameter value of the redundant parameter item is used as the parameter corresponding to the redundant parameter item.

4. The method according to claim 1, characterized in that, The method further includes: The response data is converted into response data in a preset format, and the converted response data in the preset format is sent to the requester of the first service request.

5. The method according to claim 4, characterized in that, The step of converting the response data into response data in a preset format includes: Determine whether the response data matches a preset data mapping rule; In response to the response data matching a preset data mapping rule, the response data is converted into response data of a preset format according to the preset data mapping rule; or, in response to the response data not matching any preset data mapping rule, a preset identifier in the response data is identified, and the response data is converted into response data of a preset format according to the preset identifier.

6. The method according to claim 5, characterized in that, The method further includes: In response to the failure to identify the preset identifier in the response data, the response data is converted into response data in a preset format according to the JSON object mapping method.

7. The method according to claim 4, characterized in that, The step of converting the response data into response data in a preset format includes: Based on the amount of data in the response data, the data is grouped to obtain at least one response data group; Based on the data extraction template in the cache, data is extracted from each of the response data groups to obtain the corresponding data extraction results; Based on the data extraction results and the data extraction template, corresponding data key-value pairs are obtained, and the data key-value pairs corresponding to each response data group are merged to obtain the response data in the preset format.

8. An electronic device, characterized in that, The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the request processing method as described in any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the request processing method as described in any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the request processing method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Service control method and device

    CN111935177A

  • Data request processing method and device and storage medium

    CN114598750A

  • Gateway management method and device

    CN114979295A

  • Service protocol conversion method and device

    CN115567616A

  • Remote service calling method and device, equipment and storage medium

    CN115623054A