CN118410095B - Service request processing method, computer device and storage medium - Google Patents

Service request processing method, computer device and storage medium Download PDF

Info

Publication number
CN118410095B
CN118410095B CN202410874445.6A CN202410874445A CN118410095B CN 118410095 B CN118410095 B CN 118410095B CN 202410874445 A CN202410874445 A CN 202410874445A CN 118410095 B CN118410095 B CN 118410095B
Authority
CN
China
Prior art keywords
interface
service
converted
script
conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410874445.6A
Other languages
Chinese (zh)
Other versions
CN118410095A (en
Inventor
徐帅
刘硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan 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 Inspur Jinan data Technology Co ltd filed Critical Inspur Jinan data Technology Co ltd
Priority to CN202410874445.6A priority Critical patent/CN118410095B/en
Publication of CN118410095A publication Critical patent/CN118410095A/en
Application granted granted Critical
Publication of CN118410095B publication Critical patent/CN118410095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The application relates to a service request processing method, a computer device and a storage medium. The method comprises the following steps: determining a sending interface of the request information in response to receiving the request information; calling a pre-configured standard processing interface in a cloud management platform corresponding to the sending interface, analyzing and processing keywords of the request information to obtain service keywords, determining a service interface to be converted according to the service keywords, and searching an interface conversion script cache database according to the service keywords to obtain an interface conversion script; responding to the type of the interface conversion script as format conversion, converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion; and forwarding the request information after format conversion to a service interface to be converted, and receiving a return value fed back by the service interface to be converted. The method can reduce cost and avoid resource waste.

Description

Service request processing method, computer device and storage medium
Technical Field
The present application relates to the field of data processing technology, and in particular, to a service request processing method, a computer device, a storage medium, and a computer program product.
Background
The cloud platform is an open platform and requires the ability to interface with various third party business interfaces. When the cloud platform service interface and the third party service interface are in interface butt joint, different platforms have different interface specifications and service specifications, such as interface uniform resource locators, request heads, request parameters and structure return values. In the service request process, the cloud platform service interface and the third party service interface are coordinated and interface-adjusted through a customized docking conversion module or a customized docking conversion system to realize the request sending and the return value outputting.
However, the service request processing between the traditional cloud platform service interface and the third party service interface needs to coordinate and adjust interfaces of the two interfaces through a customized independent docking conversion module or an independent docking conversion system, so that the problems of high cost, resource waste and the like exist.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a service request processing method, a computer device, a storage medium, and a computer program product that can reduce costs and save resources.
In a first aspect, a service request processing method is provided, where the method is applied to a cloud management platform of a cloud server, and the method includes:
determining a sending interface of the request information in response to receiving the request information; the sending interface comprises a third party service interface and a cloud platform service interface;
Calling a pre-configured standard processing interface in a cloud management platform corresponding to the sending interface, analyzing and processing keywords of the request information to obtain service keywords, determining a service interface to be converted according to the service keywords, and searching an interface conversion script cache database according to the service keywords to obtain an interface conversion script;
Responding to the type of the interface conversion script as format conversion, converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion;
And forwarding the request information after format conversion to a service interface to be converted, receiving a return value fed back by the service interface to be converted, and feeding back the return value to a sending interface.
In one embodiment, the types of standard processing interfaces include a standard ingress interface and a standard egress interface; the type of the standard processing interface is a standard transfer-in interface when the sending interface is a third-party service interface, and the type of the standard processing interface is a standard transfer-out interface when the sending interface is a cloud platform service interface.
In one embodiment, calling a standard processing interface pre-configured in a cloud management platform corresponding to a sending interface, and obtaining a service keyword after performing keyword analysis processing on request information, wherein the method comprises the following steps: responding to the sending interface as a third party service interface, and analyzing authentication information of the request information to obtain identity authentication information; based on gateway equipment in the cloud management platform, carrying out identity authentication on the identity authentication information to obtain an authentication result; the authentication result comprises a legal request or an illegal request; responding to the authentication result as a legal request, and forwarding the request information to a standard transfer interface; and carrying out keyword analysis processing on the request information based on the standard transfer interface to obtain service keywords.
In one embodiment, a standard processing interface pre-configured in a cloud management platform corresponding to the sending interface is called, and a service keyword is obtained after keyword analysis processing is performed on the request information, and the method further includes: and responding to the authentication result as an illegal request, and outputting authentication failure information to a third party service interface.
In one embodiment, when the sending interface is a third party service interface, the service interface to be converted is a cloud platform service interface, and when the sending interface is a cloud platform service interface, the service interface to be converted is a third party service interface.
In one embodiment, determining the service interface to be converted according to the service keyword includes: responding to the sending interface as a third party service interface, and analyzing an interface list according to the service keywords to obtain a cloud platform service interface list; the cloud platform service interface list is used for storing each cloud platform service interface.
In one embodiment, determining the service interface to be converted according to the service keyword further includes: invoking an authentication interface of the cloud management platform, and performing authority authentication on each cloud platform service interface according to the identity authentication information to obtain a corresponding authentication result; the authentication result comprises authentication success or authentication failure; and determining each cloud platform service interface as a service interface to be converted in response to each authentication result being authentication success.
In one embodiment, determining the service interface to be converted according to the service keyword further includes: responding to the authentication result that the authentication fails, determining each first target cloud platform service interface as a service interface to be converted, and outputting authentication failure information to a third party service interface; the authentication failure information is used for representing authentication failure of the service interface authorities of the second target cloud platform; the second target cloud platform service interface is a cloud platform service interface with authentication results of authentication failure; the first target cloud platform service interface is a cloud platform service interface with an authentication result being authentication success.
In one embodiment, determining the service interface to be converted according to the service keyword includes: responding to the sending interface as a cloud platform service interface, and analyzing an interface list according to the service keywords to obtain a third-party service interface list; the third party service interface list is used for storing each third party service interface; and determining each third-party service interface as a service interface to be converted.
In one embodiment, a standard processing interface pre-configured in a cloud management platform corresponding to the sending interface is called, and a service keyword is obtained after keyword analysis processing is performed on the request information, and the method further includes: responding to the sending interface as a cloud platform service interface, and forwarding the request information to a standard transfer-out interface; and carrying out keyword analysis processing on the request information based on the standard transfer-out interface to obtain service keywords.
In one embodiment, converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion includes: generating an object-oriented programming language byte code file according to the interface conversion script; the interface conversion script adopts agile development language; and converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted by operating the object-oriented programming language byte code file through the object-oriented programming language virtual machine, and obtaining the request information after format conversion.
In one embodiment, the method further comprises: responding to the input operation of a business keyword input box, a business interface input box to be converted and an initial script input box of an interface conversion script configuration interface, and determining a business keyword, a business interface to be converted and an initial script; and generating an interface conversion script according to the service keywords, the service interface to be converted and the initial script.
In one embodiment, the method further comprises: calling a script test running interface of the cloud management platform, and testing the interface conversion script to obtain a test result; responding to the debugging operation of the interface conversion script according to the test result, and generating a debugged interface conversion script; updating the interface conversion script into the debugged interface conversion script.
In one embodiment, the method further comprises: matching and checking the interface conversion script according to the dangerous instruction set to obtain a checking result; the verification result comprises verification passing or verification failing; responding to the verification result as verification passing, and caching the interface conversion script into an interface conversion script cache database; and outputting matching verification failure information in response to the verification result being verification failure.
In one embodiment, the caching the interface conversion script into the interface conversion script cache database further comprises: encrypting the interface conversion script to obtain an encrypted interface conversion script; and storing the encrypted interface conversion script into an interface conversion script database.
In one embodiment, the defining criteria of the standard processing interface includes: interface name, uniform resource locator address, type of standard processing interface, service key, request mode, input parameters and return value.
In one embodiment, the method further comprises: and responding to the type of the interface conversion script as non-format conversion, forwarding the request information to the service interface to be converted according to the interface conversion script, receiving a return value fed back by the service interface to be converted, and feeding back the return value to the sending interface.
In one embodiment, feeding back a return value to the transmit interface includes: responding to the type of the interface conversion script as format conversion, assembling the return value from the parameter format of the service interface to be converted into the parameter format of the sending interface, and obtaining the return value after format conversion; outputting the return value after format conversion to a transmitting interface; and outputting the return value to the sending interface in response to the type of the interface conversion script being non-format conversion.
In a second aspect, a service request processing apparatus is provided, where the apparatus is applied to a cloud management platform of a cloud server, and the apparatus includes: the system comprises a sending interface determining module, a conversion script retrieving module, an interface format converting module and a return value feedback module.
The sending interface determining module is used for determining a sending interface of the request information in response to receiving the request information; the sending interface comprises a third party service interface and a cloud platform service interface; the conversion script retrieval module is used for calling a standard processing interface which is pre-configured in the cloud management platform and corresponds to the sending interface, obtaining a service keyword after the keyword analysis processing is carried out on the request information, determining a service interface to be converted according to the service keyword, and obtaining an interface conversion script after retrieving in the interface conversion script cache database according to the service keyword; the interface format conversion module is used for responding to the type of the interface conversion script as format conversion, converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion; the return value feedback module is used for forwarding the request information after format conversion to the service interface to be converted, receiving a return value fed back by the service interface to be converted, and feeding back the return value to the sending interface.
In a third aspect, a computer device is provided, comprising a memory storing a computer program and a processor implementing the steps of any of the above method embodiments when said computer program is executed by the processor.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of any of the above-described method embodiments.
In a fifth aspect, a computer program product is provided comprising a computer program which, when executed by a processor, implements the steps of any of the method embodiments described above.
The service request processing method, the computer device, the storage medium and the computer program product, respond to the received request information, and determine a sending interface of the request information; the sending interface comprises a third party service interface and a cloud platform service interface; and then, calling a standard processing interface which is pre-configured in a cloud management platform and corresponds to the sending interface, analyzing and processing the keywords of the request information to obtain service keywords, determining a service interface to be converted according to the service keywords, and searching in an interface conversion script cache database according to the service keywords to obtain an interface conversion script; then, responding to the type of the interface conversion script as format conversion, converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion; finally, forwarding the request information after format conversion to a service interface to be converted, receiving a return value fed back by the service interface to be converted, and feeding back the return value to a sending interface, so that the problems of customization development, service coupling and the like caused by different interface specifications when the cloud platform service interface is in butt joint with a third party service interface are solved, the problem that the service request processing needs to coordinate and interface adjustment on the interfaces of the two parties through a customized independent butt joint conversion module or an independent butt joint conversion system is avoided, the complexity of a cloud management platform is not affected, the resource occupation is reduced, and the maintenance cost is reduced; according to the method, the interface format conversion can be completed through the interface conversion script according to the interface conversion script obtained after the interface conversion script cache database is searched, so that the joint debugging and the joint debugging work are greatly reduced, the interface conversion script cache database does not need secondary development, and the service request processing efficiency and convenience are improved.
Drawings
FIG. 1 is an application environment diagram of a service request processing method in one embodiment;
FIG. 2 is a first flow chart of a method for processing a service request according to one embodiment;
Fig. 3 is a schematic flow chart of a first procedure for obtaining a service keyword after a keyword analysis process is performed on request information by calling a standard processing interface configured in advance in a cloud management platform corresponding to a sending interface in an embodiment;
Fig. 4 is a schematic diagram of a second flow of obtaining a service keyword after performing keyword analysis processing on the request information by calling a standard processing interface configured in advance in a cloud management platform corresponding to the sending interface in one embodiment;
FIG. 5 is a schematic diagram of a first process for determining a service interface to be converted according to a service key in one embodiment;
FIG. 6 is a schematic diagram of a second flow chart of determining a service interface to be converted according to a service key in one embodiment;
FIG. 7 is a second flow diagram of a method of processing a service request according to one embodiment;
FIG. 8 is a flow chart of a request message after format conversion after converting the request message from a parameter format of a sending interface to a parameter format of a service interface to be converted according to an interface conversion script in an embodiment;
FIG. 9 is a third flow diagram of a method for processing a service request according to one embodiment;
FIG. 10 is a flow diagram of feedback of a return value to a sending interface in one embodiment;
FIG. 11 is a block diagram of a service request processing apparatus in one embodiment;
fig. 12 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In order that the application may be readily understood, a more complete description of the application will be rendered by reference to the appended drawings. Embodiments of the application are illustrated in the accompanying drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
It will be understood that the terms first, second, etc. as used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first resistance may be referred to as a second resistance, and similarly, a second resistance may be referred to as a first resistance, without departing from the scope of the application. Both the first resistor and the second resistor are resistors, but they are not the same resistor.
It is to be understood that in the following embodiments, "connected" is understood to mean "electrically connected", "communicatively connected", etc., if the connected circuits, modules, units, etc., have electrical or data transfer between them.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," and/or the like, specify the presence of stated features, integers, steps, operations, elements, components, or groups thereof, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof.
Next, an application environment of the service request processing method provided by the embodiment of the present application will be briefly described.
As shown in fig. 1, the application environment is a service request processing system. The service request processing system described above may include the cloud server 1000 and the third party server 2000. The cloud server 1000 is configured with cloud platform service interfaces 1110 corresponding to the first preset number of cloud platform service modules 1100 and standard processing interfaces 1210 configured in advance in the cloud management platform 1200. The third party server 2000 is configured with a second preset number of third party service interfaces 2110 corresponding to the third party systems 2100. It is understood that the cloud server 1000 and the third party server 2000 may be implemented by a separate server or a server cluster composed of a plurality of servers.
In one particular example, as shown in fig. 1, the standard processing interface 1210 includes a standard in-interface 1211 and a standard out-interface 1212. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
In a first aspect, as shown in fig. 2, a service request processing method is provided, and an example of application of the method to the cloud management platform 1200 in fig. 1 is described, where the method includes steps 201 to 204.
In response to receiving the request information, a transmit interface for the request information is determined, step 201.
The sending interfaces include a third party service interface 2110 and a cloud platform service interface 1110. It may be appreciated that the request information received by the cloud management platform 1200 includes request information sent by the third party service interface 2110 and conforming to the third party service specification and request information sent by the cloud platform service interface 1110 and conforming to the cloud platform service specification. Specifically, the cloud management platform 1200 may determine a transmission interface of the request information according to the request information when the request information is received.
In one particular example, the request information may be, but is not limited to, an http request. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
Step 202, calling a standard processing interface which is pre-configured in a cloud management platform and corresponds to the sending interface, analyzing and processing keywords of the request information to obtain service keywords, determining a service interface to be converted according to the service keywords, and searching in an interface conversion script cache database according to the service keywords to obtain an interface conversion script.
The cloud management platform 1200 is preconfigured with a standard processing interface and an interface conversion script cache database. The interface conversion script cache database is used for caching each interface conversion script. The cloud management platform 1200 may call a standard processing interface 1210 configured in advance in the cloud management platform 1200 corresponding to the sending interface, obtain a service key (key) after performing keyword analysis processing on the request information through the standard processing interface 1210, determine a corresponding service interface to be converted according to the service key, and obtain an interface conversion script after searching in an interface conversion script cache database according to the service key.
And 203, responding to the type of the interface conversion script as a format conversion type, and converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion.
Specifically, when the type of the interface conversion script is a format conversion type, the cloud management platform 1200 converts the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion, thereby realizing the conversion of the request information from the specification conforming to the sending interface to the specification conforming to the service interface to be converted.
In a specific example, the types of the interface conversion scripts include a format conversion type and a non-format conversion type, and when the types of the interface conversion scripts are the format conversion type, the request information representing the moment needs to be subjected to parameter format conversion through the corresponding interface conversion scripts; when the type of the interface conversion script is a non-format conversion type, the request information representing the moment does not need to be subjected to parameter format conversion through the corresponding interface conversion script; in addition, the interface conversion script may be configured with a type identifier, through which whether the type of the interface conversion script is a format conversion type or a non-format conversion type may be identified, which is merely a specific example, and may be flexibly set according to the user requirement in practical applications, which is not limited herein.
And 204, forwarding the request information after format conversion to a service interface to be converted, receiving a return value fed back by the service interface to be converted, and feeding back the return value to a sending interface.
Specifically, the cloud management platform 1200 can forward the request information after format conversion to the service interface to be converted, namely, can receive a return value fed back after the service interface to be converted processes the request information after format conversion, and feeds back the return value to the sending interface, so that the problems of customization development, service coupling and the like caused by different interface specifications when the cloud platform service interface 1110 and the third party service interface 2110 are in butt joint are solved, the problem that the service request processing needs to coordinate and interface adjustment to the interfaces of the two parties through a customized independent butt joint conversion module or an independent butt joint conversion system is avoided, the complexity of the cloud management platform is not affected, the resource occupation is reduced, and the maintenance cost is reduced; according to the method, the interface format conversion can be completed through the interface conversion script according to the interface conversion script obtained after the interface conversion script cache database is searched, so that the joint debugging and the joint debugging work are greatly reduced, the interface conversion script cache database does not need secondary development, and the service request processing efficiency and convenience are improved.
Based on the request, the service request processing method determines a sending interface of the request information in response to receiving the request information; the sending interfaces include a third party service interface 2110 and a cloud platform service interface 1110; and then, calling a standard processing interface which is pre-configured in a cloud management platform and corresponds to the sending interface, analyzing and processing the keywords of the request information to obtain service keywords, determining a service interface to be converted according to the service keywords, and searching in an interface conversion script cache database according to the service keywords to obtain an interface conversion script; then, responding to the type of the interface conversion script as format conversion, converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion; finally, forwarding the request information after format conversion to a service interface to be converted, receiving a return value fed back by the service interface to be converted, and feeding back the return value to a sending interface, so that the problems of customization development, service coupling and the like caused by different interface specifications when the cloud platform service interface 1110 and the third party service interface 2110 are in butt joint are solved, the problem that the service request processing needs to coordinate and interface adjustment on the interfaces of the two parties through a customized independent butt joint conversion module or an independent butt joint conversion system is avoided, the complexity of a cloud management platform is not affected, the resource occupation is reduced, and the maintenance cost is reduced; according to the method, the interface format conversion can be completed through the interface conversion script according to the interface conversion script obtained after the interface conversion script cache database is searched, so that the joint debugging and the joint debugging work are greatly reduced, the interface conversion script cache database does not need secondary development, and the service request processing efficiency and convenience are improved.
In one embodiment, the types of standard processing interfaces 1210 include a standard in-interface 1211 and a standard out-interface 1212. It can be appreciated that the type of the standard processing interface 1210 is the standard ingress interface 1211 when the sending interface is the third party service interface 2110, and the type of the standard processing interface 1210 is the standard egress interface 1212 when the sending interface is the cloud platform service interface 1110.
Specifically, when the sending interface is the third party service interface 2110, the standard transfer interface 1211 is called, the keyword analysis processing is performed on the request information to obtain a service keyword, the corresponding cloud platform service interface 1110 is determined according to the service keyword, and the interface conversion script is obtained after the retrieval is performed on the interface conversion script cache database according to the service keyword; meanwhile, when the sending interface is the cloud platform service interface 1110, the standard transfer-out interface 1212 is called, the service keyword is obtained after the keyword analysis processing is performed on the request information, the corresponding third party service interface 2110 is determined according to the service keyword, and the interface conversion script is obtained after the retrieval is performed on the interface conversion script cache database according to the service keyword.
In this embodiment, the service key is obtained after the key analysis processing is performed on the request information through the pre-configured standard processing interface 1210 including the standard in-coming interface 1211 and the standard out-coming interface 1212, the service interface to be converted is determined according to the service key, and the interface conversion script is obtained after the retrieval is performed on the interface conversion script cache database according to the service key, so that coordination and interface adjustment on the interfaces of the two parties through the customized independent docking conversion module or the customized independent docking conversion system are avoided, the customized development cost is reduced, and the efficiency of service request processing is improved.
In one embodiment, the defining criteria of the standard processing interface includes: interface name, uniform resource locator address, type of standard processing interface, service key, request mode, input parameters and return value.
In one specific example, the definition criteria of the standard transfer interface 1211 include:
url:/v1/cloud/in/{key}/**
The request mode is as follows: arbitrary
Inputting parameters: arbitrary
Return value: arbitrary
The standard transfer interface 1211 is a general interface, that is, not limiting to specific url requests, all requests with fixed prefixes may enter the standard transfer interface 1211, and the technical cloud platform java framework is supported for implementation. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
In one specific example, the definition criteria of the standard roll-out interface 1212 include:
url:/v1/cloud/out/{key}/**
The request mode is as follows: arbitrary
Entering into the ginseng: arbitrary
Return value: arbitrary
The standard outgoing interface 1212 is a general interface, that is, without limiting specific url requests, all requests with fixed prefixes may enter the standard outgoing interface 1212, and the technical cloud platform java framework supports implementation. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
In this embodiment, the standard processing interface 1210 including the standard in-interface 1211 and the standard out-interface 1212 can be preconfigured by the definition standard of the standard processing interface, which avoids the need of coordinating and adjusting the interfaces of the two interfaces through a customized independent docking conversion module or an independent docking conversion system, reduces the cost of customized development, and improves the efficiency of service request processing.
In one embodiment, as shown in fig. 3, a standard processing interface pre-configured in a cloud management platform corresponding to a sending interface is called, and a service keyword is obtained after keyword analysis processing is performed on request information, including steps 301 to 304.
Step 301, in response to the sending interface being a third party service interface, the authentication information of the request message is analyzed to obtain identity authentication information.
Step 302, based on gateway equipment in the cloud management platform, identity authentication is performed on the identity authentication information, and an authentication result is obtained.
And step 303, in response to the authentication result being a legal request, forwarding the request information to a standard transfer interface.
And step 304, carrying out keyword analysis processing on the request information based on the standard transfer interface to obtain service keywords.
The authentication result comprises a legal request or an illegal request. Specifically, when the sending interface is the third party service interface 2110, the cloud management platform 1200 analyzes authentication information of the request information to obtain identity authentication information; then, based on gateway equipment in the cloud management platform, carrying out identity authentication on the identity authentication information to obtain an authentication result; then, when the authentication result is a legal request, forwarding the request information to the standard transfer interface 1211; then, based on the standard transfer interface 1211, the keyword analysis processing is performed on the request information, so that the service keyword can be obtained, thereby improving the security of service request processing and ensuring that the request information entering the cloud platform service interface 1110 is a legal request.
In one particular example, the authentication information may be, but is not limited to, token information. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
In this embodiment, in response to the sending interface being the third party service interface 2110, the authentication information of the request information is analyzed to obtain identity authentication information; then, based on gateway equipment in the cloud management platform, carrying out identity authentication on the identity authentication information to obtain an authentication result; then, in response to the authentication result being a legal request, forwarding the request information to the standard transfer-in interface 1211; then, the keyword analysis processing is performed on the request information based on the standard transfer interface 1211, so as to obtain a service keyword, thereby improving the security of service request processing, and ensuring that the request information entering the cloud platform service interface 1110 is a legal request.
In one embodiment, as shown in fig. 3, a standard processing interface pre-configured in a cloud management platform corresponding to a sending interface is called, and a service keyword is obtained after keyword analysis processing is performed on the request information, which further includes step 305.
And step 305, outputting authentication failure information to the third party service interface in response to the authentication result being an illegal request.
Specifically, when the authentication result is an illegal request, the cloud management platform 1200 outputs authentication failure information to the third party service interface 2110, so that the third party system 2100 corresponding to the third party service interface 2110 timely knows that the request information sent at this time is an illegal request, thereby improving the security of service request processing and ensuring that the request information entering the cloud platform service interface 1110 is a legal request.
In this embodiment, in response to the authentication result being an illegal request, authentication failure information is output to the third party service interface 2110, so that the third party system 2100 corresponding to the third party service interface 2110 timely knows that the request information sent at this time is an illegal request, thereby improving security of service request processing and ensuring that the request information entering the cloud platform service interface 1110 is a legal request.
In one embodiment, as shown in fig. 4, a standard processing interface pre-configured in a cloud management platform corresponding to a sending interface is called, and a service keyword is obtained after keyword analysis processing is performed on the request information, which further includes steps 401 to 402.
And step 401, in response to the sending interface being a cloud platform service interface, forwarding the request information to a standard forwarding-out interface.
And step 402, carrying out keyword analysis processing on the request information based on the standard transfer-out interface to obtain a service keyword.
Specifically, the cloud management platform 1200 forwards the request information to the standard forwarding interface 1212 when the sending interface is the cloud platform service interface 1110; then, based on the standard transfer-out interface 1212, keyword analysis processing is performed on the request information, and a service keyword is obtained.
In a specific example, when the sending interface is the cloud platform service interface 1110, if the third party service interface 2110 needs to perform identity authentication on the request information, the request information can be analyzed to obtain identity authentication information; and based on gateway equipment in the cloud management platform, carrying out identity authentication on the identity authentication information to obtain an authentication result which is added into a corresponding interface conversion script, thereby realizing the identity authentication on the request information by the third party service interface 2110. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
In this embodiment, in response to the sending interface being the cloud platform service interface 1110, forwarding the request information to the standard egress interface 1212; then, based on the standard output interface 1212, the keyword analysis processing is performed on the request information to obtain the service keyword, so that the efficiency and convenience of determining the service keyword are improved.
In one embodiment, when the sending interface is the third party service interface 2110, the service interface to be converted is the cloud platform service interface 1110, and when the sending interface is the cloud platform service interface 1110, the service interface to be converted is the third party service interface 2110.
Specifically, when the sending interface is the third party service interface 2110, determining the service interface to be converted as the cloud platform service interface 1110, that is, sending the request information after format conversion to the corresponding cloud platform service interface 1110; when the sending interface is the cloud platform service interface 1110, the service interface to be converted is determined to be the third party service interface 2110, and the format-converted request information is sent to the corresponding third party service interface 2110, so that convenience and efficiency of service request processing are improved.
In a specific example, when the sending interface is the cloud platform service interface 1110, the service interface to be converted may be another cloud platform service interface 1110, that is, service request interaction of service modules inside the cloud management platform is implemented, and rapid decoupling and docking between service modules inside the cloud management platform may be implemented. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
In this embodiment, when the sending interface is the third party service interface 2110, the service interface to be converted is the cloud platform service interface 1110, and when the sending interface is the cloud platform service interface 1110, the service interface to be converted is the third party service interface 2110, so that convenience and efficiency of service request processing are improved.
In one embodiment, as shown in fig. 5, determining a service interface to be converted according to a service key includes step 501.
Step 501, in response to the sending interface being a third party service interface, performing interface list analysis according to the service keywords to obtain a cloud platform service interface list.
The cloud platform service interface list is used for storing each cloud platform service interface 1110. When the sending interface is the third party service interface 2110, the cloud management platform 1200 performs interface list analysis according to the service keywords to obtain a cloud platform service interface list, so that the cloud platform service interfaces 1110 are stored in the cloud platform service interface list to determine that the cloud platform service interfaces are to be converted, that is, request information sent by the third party service interface 2110 can call one or more to-be-converted service interfaces to achieve, and convenience and efficiency of service request processing are improved.
In this embodiment, in response to the sending interface being the third party service interface 2110, the interface list is parsed according to the service keywords, so as to obtain a cloud platform service interface list, thereby improving the convenience and efficiency of service request processing.
In one embodiment, as shown in fig. 5, the service interface to be converted is determined according to the service keyword, and steps 502 to 503 are further included.
Step 502, invoking an authentication interface of the cloud management platform, and performing authority authentication on each cloud platform service interface according to the identity authentication information to obtain a corresponding authentication result.
And step 503, determining each cloud platform service interface as a service interface to be converted in response to each authentication result being authentication success.
Wherein, the authentication result comprises authentication success or authentication failure. Specifically, the cloud management platform 1200 may call an authentication interface of the cloud management platform, and perform authority authentication on each cloud platform service interface 1110 according to the identity authentication information, so as to obtain a corresponding authentication result; and then, when the authentication results are authentication success, determining each cloud platform service interface 1110 as a service interface to be converted, so as to prevent the user corresponding to the third party service interface 2110 from carrying out service authority override operation on the cloud platform service interface 1110, for example, the common user corresponding to the third party service interface 2110 only has query authority but does not have newly added authority, thereby improving the safety and reliability of service request processing.
It can be understood that in the process of performing authority authentication on each cloud platform service interface 1110 according to the identity authentication information, whether the authority carried in the identity authentication information is consistent with the authority limited by the corresponding service interface to be converted is analyzed, when the authority carried in the identity authentication information is consistent with the authority limited by the corresponding service interface to be converted, the authentication result corresponding to the platform service interface is successful in authentication, and when the authority carried in the identity authentication information is inconsistent with the authority limited by the corresponding service interface to be converted, the authentication result corresponding to the platform service interface is failed in authentication.
In this embodiment, an authentication interface of the cloud management platform is called, and authority authentication is performed on each cloud platform service interface 1110 according to identity authentication information, so as to obtain a corresponding authentication result; then, in response to each authentication result being authentication success, each cloud platform service interface 1110 is determined as a service interface to be converted; the safety and reliability of service request processing are improved.
In one embodiment, as shown in fig. 5, the service interface to be converted is determined according to the service key, and the method further includes step 504.
And step 504, determining each first target cloud platform service interface as a service interface to be converted in response to the authentication failure as the authentication result, and outputting authentication failure information to a third party service interface.
The authentication failure information is used for representing authentication failure of the service interface authorities of the second target cloud platform; the second target cloud platform service interface is a cloud platform service interface 1110 with authentication result of authentication failure; the first target cloud platform service interface is a cloud platform service interface 1110 with an authentication result of successful authentication. Specifically, when the authentication result is authentication failure, the cloud management platform 1200 determines each first target cloud platform service interface as a service interface to be converted, and outputs authentication failure information to the third party service interface 2110, thereby improving security and convenience of service request processing.
In this embodiment, in response to the authentication result being authentication failure, each first target cloud platform service interface is determined to be a service interface to be converted, so that security and convenience of service request processing are improved.
In one embodiment, as shown in fig. 6, determining a service interface to be converted according to a service keyword includes step 601 and step 602.
And step 601, responding to the sending interface as a cloud platform service interface, and analyzing an interface list according to the service keywords to obtain a third-party service interface list.
In step 602, each third party service interface is determined as a service interface to be converted.
Wherein the third party service interface list is used to store each third party service interface 2110. When the sending interface is the cloud platform service interface 1110, the cloud management platform 1200 performs interface list analysis according to the service keywords, so as to obtain a third party service interface list for storing each third party service interface 2110; and, each third party service interface 2110 is determined as a service interface to be converted, so that the convenience and convenience of service request processing are improved.
In a specific example, when the sending interface is the cloud platform service interface 1110, if the third party service interface 2110 needs to perform authority authentication on the request information, the authentication interface of the cloud management platform may be called, authority authentication is performed on each cloud platform service interface 1110 according to the identity authentication information, and a corresponding authentication result is obtained and added to a corresponding interface conversion script, so that authority authentication on the request information by the third party service interface 2110 is implemented. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
In this embodiment, in response to the sending interface being the cloud platform service interface 1110, performing interface list analysis according to the service keywords to obtain a third party service interface list; and, each third party service interface 2110 is determined as a service interface to be converted, so that the convenience and convenience of service request processing are improved.
In one embodiment, as shown in fig. 7, the method further comprises step 701 and step 702.
And step 701, determining the service keywords, the service interface to be converted and the initial script in response to the input operation of the service keyword input box, the service interface to be converted input box and the initial script input box of the interface conversion script configuration interface.
And step 702, generating an interface conversion script according to the service key word, the service interface to be converted and the initial script.
Specifically, the cloud management platform 1200 performs input operations on a service keyword input box, a service interface input box to be converted and an initial script input box of the interface conversion script configuration interface, and determines a service keyword, a service interface to be converted and an initial script; and then, generating an interface conversion script according to the service key word, the service interface to be converted and the initial script, so as to realize the conversion of the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted through the interface conversion script, and further realize the extraction of the service coupling logic from the code to the editable pluggable script, thereby solving the problem of the service code logic and platform coupling.
In the embodiment, a service keyword, a service interface to be converted and an initial script are determined in response to input operations of a service keyword input box, a service interface to be converted and an initial script input box of the interface conversion script configuration interface; and then, generating an interface conversion script according to the service key word, the service interface to be converted and the initial script, thereby converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted through the interface conversion script, and further realizing that the service coupling logic is extracted from the code to the editable pluggable script, solving the problem of service code logic and platform coupling, and improving the convenience of service request processing.
In one embodiment, as shown in fig. 7, the method further comprises steps 703 to 705.
And step 703, calling a script test running interface of the cloud management platform, and testing the interface conversion script to obtain a test result.
Step 704, in response to performing the debugging operation on the interface conversion script according to the test result, generating a debugged interface conversion script.
Step 705, updating the interface conversion script to the debugged interface conversion script.
Specifically, the cloud management platform 1200 calls a script test running interface of the cloud management platform, tests the interface conversion script, and obtains a test result; then, when the interface conversion script is debugged according to the test result, generating a debugged interface conversion script; and then, updating the interface conversion script into the debugged interface conversion script, thereby ensuring that the interface conversion script meets the service requirement, improving the efficiency of developing joint debugging and improving the reliability of service request processing.
In the embodiment, a script test running interface of a cloud management platform is called, and a interface conversion script is tested to obtain a test result; then, debugging operation is carried out on the interface conversion script according to the test result, and a debugged interface conversion script is generated; and then, updating the interface conversion script into the debugged interface conversion script, thereby ensuring that the interface conversion script meets the service requirement, improving the efficiency of developing joint debugging and improving the reliability of service request processing.
In one embodiment, as shown in FIG. 7, the method further includes steps 706 through 708.
And step 706, performing matching verification on the interface conversion script according to the dangerous instruction set to obtain a verification result.
And step 707, in response to the verification result being that the verification is passed, caching the interface conversion script into an interface conversion script cache database.
Step 708, in response to the verification result being verification failure, outputting matching verification failure information.
Specifically, the verification result includes a verification pass or a verification fail. The set of hazard instructions includes hazard system instructions. In a specific example, the dangerous system instruction includes a kill instruction and an rm instruction, which are only specific examples, and may be flexibly set according to the needs of a user in practical applications, which is not limited herein.
Specifically, the cloud management platform 1200 performs matching verification on the interface conversion script according to the dangerous instruction set to obtain a verification result; then, when the verification result is that the verification passes, caching the interface conversion script into an interface conversion script cache database; and then, when the verification result is that the verification fails, outputting matching verification failure information, ensuring the normal operation of the interface conversion script, improving the reliability of the interface conversion script, and avoiding the mixing of instructions in a dangerous instruction set in the script.
In the embodiment, matching verification is performed on the interface conversion script according to the dangerous instruction set to obtain a verification result; then, in response to the verification result being that the verification is passed, caching the interface conversion script into an interface conversion script cache database; and then, in response to the verification result being that the verification is passed, caching the interface conversion script into an interface conversion script cache database, ensuring the normal operation of the interface conversion script, improving the reliability of the interface conversion script, and avoiding the mixing of instructions in a dangerous instruction set in the script.
In one embodiment, as shown in FIG. 7, step 709 and step 710 are included after caching the interface conversion script into the interface conversion script cache database.
Step 709, performing encryption processing on the interface conversion script to obtain an encrypted interface conversion script.
And step 710, storing the encrypted interface conversion script into an interface conversion script database.
Specifically, the cloud management platform 1200 performs encryption processing on the interface conversion script to obtain an encrypted interface conversion script; and then, storing the encrypted interface conversion script into an interface conversion script database, thereby avoiding random tampering of the interface conversion script, improving the safety of the interface conversion script, and simultaneously completing database call by storing the encrypted interface conversion script into the interface conversion script database, so that the corresponding interface conversion script can be directly applied without secondary development, and improving the convenience and efficiency of service request processing.
In a specific example, as shown in fig. 7, steps 701 to 710 are further included before step 201 of the service request processing method shown in fig. 2. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
In a specific example, an asymmetric national cryptographic SM2 algorithm and a symmetric national cryptographic SM4 algorithm may be used to encrypt the interface conversion script, so as to obtain an encrypted interface conversion script. Storing the encrypted interface conversion script in the interface conversion script database further comprises storing the encrypted interface conversion script in the cloud management platform 1200 everywhere in an SQL form, so that convenience and efficiency of service request processing are improved. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
In this embodiment, the interface conversion script is encrypted, so as to obtain an encrypted interface conversion script; and then, storing the encrypted interface conversion script into an interface conversion script database so as to avoid random falsification of the interface conversion script, improving the safety of the interface conversion script, and simultaneously, completing database call by storing the encrypted interface conversion script into the interface conversion script database so as to directly apply the corresponding interface conversion script without secondary development, thereby improving the convenience and efficiency of service request processing.
In one embodiment, as shown in fig. 8, after converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script, the format-converted request information is obtained, which includes steps 801 to 802.
Step 801, generating an object-oriented programming language byte code file according to an interface conversion script;
Step 802, converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted by running the object-oriented programming language byte code file through the object-oriented programming language virtual machine, and obtaining the request information after format conversion.
The interface conversion script adopts agile development language. The cloud management platform 1200 generates an object-oriented programming language bytecode file according to the interface conversion script; and then, the object-oriented programming language virtual machine operates an object-oriented programming language byte code file to convert the request information from a parameter format of a sending interface to a parameter format of a service interface to be converted to obtain the request information after format conversion, so that the combination and integration of codes of the object-oriented programming language and interface conversion scripts adopting agile development languages through the rear end face of the cloud management platform are realized, namely, the service request is cooperatively processed through the object-oriented programming language and the agile development languages, the suitability and the associativity of the interface conversion scripts are improved, and the efficiency and the convenience of service request processing are improved.
In one specific example, the interface conversion script is in a agile development language, that is, when the interface conversion script is groovy scripts. The object-oriented programming language byte code file is a class file, and the object-oriented programming language virtual machine is not a Java virtual machine. The groovy script language has the advantages that the combination of the groovy language and the java language at the back end of the cloud management platform is better and is easier to adapt, meanwhile, when the interface conversion script is executed, the execution mode is similar to that of the java, a class file is generated when the interface conversion script is executed, and the class file runs in the JVM. The conversion of service logic is realized in the corresponding groovy script, the parameter format of the sending interface is converted into the parameter format of the service interface to be converted by writing the script in groovy grammar, then the http request is initiated by the interface conversion script or the cloud platform service interface 1110 is called based on the java framework in a feign calling mode, and meanwhile, the call return value is spliced into the parameter format of the sending interface to return, so that the method is only a specific example, can be flexibly set according to the user requirement in practical application, and is not limited.
In this embodiment, an object-oriented programming language bytecode file is generated according to an interface conversion script; and then, the object-oriented programming language virtual machine operates an object-oriented programming language byte code file to convert the request information from a parameter format of a sending interface to a parameter format of a service interface to be converted, so that the request information after format conversion is obtained, and the combination and integration of codes of the object programming language and interface conversion scripts adopting agile development languages through the rear end face of the cloud management platform are realized, namely, the service request is cooperatively processed through the object-oriented programming language and agile development languages, so that the suitability and the associativity of the interface conversion scripts are improved, and the efficiency and the convenience of service request processing are improved.
In one embodiment, as shown in fig. 9, the method further includes step 901.
Step 901, responding to the type of the interface conversion script as non-format conversion, forwarding the request information to the service interface to be converted according to the interface conversion script, receiving a return value fed back by the service interface to be converted, and feeding back the return value to the sending interface.
In a specific example, as shown in fig. 9, step 901 is further included after step 202 of the service request processing method shown in fig. 2. The foregoing is merely a specific example, and may be flexibly set according to the user's requirement in practical application, which is not limited herein.
Specifically, when the type of the interface conversion script is a non-format conversion type, the cloud management platform 1200 indicates that the request information does not need to be converted from the specification conforming to the sending interface to the specification conforming to the service interface to be converted at this time, forwards the request information to the service interface to be converted according to the interface conversion script, receives a return value fed back by the service interface to be converted, and feeds back the return value to the sending interface, thereby improving convenience of service request processing.
In this embodiment, in response to the type of the interface conversion script being non-format conversion, the request information is forwarded to the service interface to be converted according to the interface conversion script, a return value fed back by the service interface to be converted is received, and the return value is fed back to the sending interface, so that convenience in service request processing is improved.
In one embodiment, as shown in fig. 10, feeding back a return value to the transmitting interface includes:
In step 1001, in response to the type of the interface conversion script being a format conversion type, the return value is assembled from the parameter format of the service interface to be converted into the parameter format of the sending interface, so as to obtain the return value after format conversion.
Step 1002, outputting the return value after format conversion to a transmitting interface;
In step 1003, in response to the type of the interface conversion script being a non-format conversion type, a return value is output to the transmission interface.
Specifically, when the type of the interface conversion script is format conversion, the cloud management platform 1200 assembles the return value from the parameter format of the service interface to be converted into the parameter format of the sending interface, so as to obtain the return value after format conversion; meanwhile, outputting the return value after format conversion to a transmitting interface; and when the type of the interface conversion script is non-format conversion type, the return value is output to the sending interface, so that the sending interface can receive the return value meeting the specification conveniently, and the convenience and efficiency of the service request are improved.
In this embodiment, in response to the type of the interface conversion script being a format conversion type, assembling the return value from the parameter format of the service interface to be converted into the parameter format of the sending interface, to obtain the return value after format conversion; meanwhile, outputting the return value after format conversion to a transmitting interface; and in response to the type of the interface conversion script being non-format conversion, the return value is output to the sending interface, so that the convenience and efficiency of the service request are improved.
It should be understood that, although the steps in the flowcharts of fig. 2-10 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-10 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
In a second aspect, as shown in fig. 11, there is provided a service request processing apparatus, the apparatus being applied to a cloud management platform of a cloud server, the apparatus including: a transmission interface determination module 1101, a conversion script retrieval module 1102, an interface format conversion module 1103, and a return value feedback module 1104.
Wherein, the sending interface determining module 1101 is configured to determine, in response to receiving the request information, a sending interface of the request information; the sending interface comprises a third party service interface and a cloud platform service interface; the conversion script retrieval module 1102 is used for calling a standard processing interface which is pre-configured in a cloud management platform and corresponds to the sending interface, obtaining a service keyword after the keyword analysis processing is carried out on the request information, determining a service interface to be converted according to the service keyword, and obtaining an interface conversion script after retrieving in an interface conversion script cache database according to the service keyword; the interface format conversion module 1103 is configured to convert the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion in response to the type of the interface conversion script being format conversion; the return value feedback module 1104 is configured to forward the request information after format conversion to the service interface to be converted, receive a return value fed back by the service interface to be converted, and feed back the return value to the sending interface.
In one embodiment, the types of standard processing interfaces include a standard ingress interface and a standard egress interface; the type of the standard processing interface is a standard transfer-in interface when the sending interface is a third-party service interface, and the type of the standard processing interface is a standard transfer-out interface when the sending interface is a cloud platform service interface.
In one embodiment, the conversion script retrieval module 1102 includes a business key determination unit.
The service keyword determining unit is used for responding that the sending interface is a third party service interface, and obtaining identity authentication information after carrying out authentication information analysis on the request information; the service keyword determining unit is used for carrying out identity authentication on the identity authentication information based on gateway equipment in the cloud management platform to obtain an authentication result; the authentication result comprises a legal request or an illegal request; the service keyword determining unit is used for responding the authentication result as a legal request and forwarding the request information to the standard transfer interface; and the service keyword determining unit is used for carrying out keyword analysis processing on the request information based on the standard transfer interface to obtain the service keyword.
In one embodiment, the service key determining unit is configured to output authentication failure information to the third party service interface in response to the authentication result being an illegal request.
In one embodiment, when the sending interface is a third party service interface, the service interface to be converted is a cloud platform service interface, and when the sending interface is a cloud platform service interface, the service interface to be converted is a third party service interface.
In one embodiment, the conversion script retrieval module 1102 includes: and a conversion service interface determining unit. The conversion service interface determining unit is used for responding to the sending interface as a third-party service interface, and analyzing the interface list according to the service keywords to obtain a cloud platform service interface list; the cloud platform service interface list is used for storing each cloud platform service interface.
In one embodiment, a service interface to be converted is determined according to the service keywords, the conversion service interface determining unit is further used for calling an authentication interface of the cloud management platform, and authority authentication is performed on each cloud platform service interface according to the identity authentication information to obtain a corresponding authentication result; the authentication result comprises authentication success or authentication failure; the conversion service interface determining unit is further configured to determine each cloud platform service interface as a service interface to be converted in response to each authentication result being authentication success.
In one embodiment, the conversion service interface determining unit is further configured to determine each first target cloud platform service interface as a service interface to be converted in response to the authentication failure as the authentication result, and output authentication failure information to the third party service interface; the authentication failure information is used for representing authentication failure of the service interface authorities of the second target cloud platform; the second target cloud platform service interface is a cloud platform service interface with authentication results of authentication failure; the first target cloud platform service interface is a cloud platform service interface with an authentication result being authentication success.
In one embodiment, the conversion service interface determining unit is further configured to, in response to the sending interface being a cloud platform service interface, parse the interface list according to the service keyword to obtain a third party service interface list; the third party service interface list is used for storing each third party service interface; the conversion service interface determining unit is further configured to determine each third party service interface as a service interface to be converted.
In one embodiment, the service keyword determining unit is configured to forward the request information to the standard forwarding interface in response to the sending interface being a cloud platform service interface; the service keyword determining unit is used for carrying out keyword analysis processing on the request information based on the standard transfer-out interface to obtain the service keyword.
In one embodiment, the interface format conversion module 1103 includes an interface format conversion unit. The interface format conversion unit is used for generating an object-oriented programming language byte code file according to the interface conversion script; the interface conversion script adopts agile development language; the interface format conversion unit is used for converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted through the object-oriented programming language virtual machine running the object-oriented programming language byte code file, and obtaining the request information after format conversion.
In one embodiment, the service request processing device further includes an interface conversion script generation module.
The interface conversion script generation module is used for responding to the business keyword input box, the business interface input box to be converted and the initial script input box of the interface conversion script configuration interface to carry out input operation, and determining the business keyword, the business interface to be converted and the initial script; the interface conversion script generation module is used for generating an interface conversion script according to the service keywords, the service interface to be converted and the initial script.
In one embodiment, the interface conversion script generating module is used for calling a script test running interface of the cloud management platform, and testing the interface conversion script to obtain a test result; the interface conversion script generation module is used for responding to the debugging operation of the interface conversion script according to the test result and generating a debugged interface conversion script; the interface conversion script generation module is used for updating the interface conversion script into the debugged interface conversion script.
In one embodiment, the interface conversion script generation module is used for carrying out matching verification on the interface conversion script according to the dangerous instruction set to obtain a verification result; the verification result comprises verification passing or verification failing; the interface conversion script generation module is used for caching the interface conversion script to the interface conversion script cache database in response to the verification result being that the verification is passed; the interface conversion script generation module is used for responding to the verification result as verification failure and outputting matching verification failure information.
In one embodiment, the interface conversion script generating module is configured to encrypt the interface conversion script to obtain an encrypted interface conversion script; the interface conversion script generation module is used for storing the encrypted interface conversion script into the interface conversion script database.
In one embodiment, the defining criteria of the standard processing interface includes: interface name, uniform resource locator address, type of standard processing interface, service key, request mode, input parameters and return value.
In one embodiment, the return value feedback module 1104 is further configured to, in response to the type of the interface conversion script being non-format conversion, forward the request information to the service interface to be converted according to the interface conversion script, receive a return value fed back by the service interface to be converted, and feed back the return value to the sending interface.
In one embodiment, the return value feedback module 1104 includes: and a return value feedback unit.
The return value feedback unit is used for responding to the type of the interface conversion script as format conversion, assembling the return value from the parameter format of the service interface to be converted into the parameter format of the sending interface, and obtaining the return value after format conversion; the return value feedback unit is used for outputting the return value after format conversion to the sending interface; the return value feedback unit is used for responding to the type of the interface conversion script to be a non-format conversion type and outputting a return value to the sending interface.
The specific limitation of the service request processing device can be referred to the limitation of the service request processing method hereinabove, and will not be repeated here. The above-described respective modules in the service request processing apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 12. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing an interface conversion script cache database. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a service request handling method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 12 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In a third aspect, a computer device is provided, comprising a memory storing a computer program and a processor implementing the steps of any of the above method embodiments when said computer program is executed by the processor.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of any of the above-described method embodiments.
In a fifth aspect, a computer program product is provided comprising a computer program which, when executed by a processor, implements the steps of any of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application.

Claims (21)

1. A service request processing method, the method being applied to a cloud management platform of a cloud server, the method comprising:
Determining a sending interface of the request information in response to receiving the request information; the sending interface comprises a third party service interface and a cloud platform service interface;
Calling a standard processing interface which is preset in the cloud management platform and corresponds to the sending interface, analyzing and processing the keywords of the request information to obtain service keywords, determining a service interface to be converted according to the service keywords, and searching an interface conversion script cache database according to the service keywords to obtain an interface conversion script;
responding to the type of the interface conversion script as format conversion, converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion;
And forwarding the request information after format conversion to the service interface to be converted, receiving a return value fed back by the service interface to be converted, and feeding back the return value to the sending interface.
2. The method of claim 1, wherein the types of standard processing interfaces include a standard ingress interface and a standard egress interface; and when the sending interface is the third-party service interface, the type of the standard processing interface is the standard transfer-in interface, and when the sending interface is the cloud platform service interface, the type of the standard processing interface is the standard transfer-out interface.
3. The method of claim 2, wherein the calling the standard processing interface pre-configured in the cloud management platform corresponding to the sending interface, performing keyword analysis processing on the request information to obtain a service keyword, includes:
responding to the sending interface as the third party service interface, and analyzing the authentication information of the request information to obtain identity authentication information;
Based on gateway equipment in the cloud management platform, carrying out identity authentication on the identity authentication information to obtain an authentication result; the authentication result comprises a legal request or an illegal request;
Responding to the authentication result as the legal request, and forwarding the request information to the standard transfer interface;
and carrying out the keyword analysis processing on the request information based on the standard transfer interface to obtain the service keywords.
4. The method of claim 3, wherein the calling the standard processing interface pre-configured in the cloud management platform corresponding to the sending interface obtains a service keyword after performing keyword analysis processing on the request information, and further comprises:
And responding to the authentication result as the illegal request, and outputting authentication failure information to the third party service interface.
5. A method according to claim 3, wherein the service interface to be converted is the cloud platform service interface when the transmission interface is the third party service interface, and the service interface to be converted is the third party service interface when the transmission interface is the cloud platform service interface.
6. The method of claim 5, wherein said determining a service interface to be converted from said service key comprises:
Responding to the sending interface as the third party service interface, and analyzing an interface list according to the service keywords to obtain a cloud platform service interface list; the cloud platform service interface list is used for storing each cloud platform service interface.
7. The method of claim 6, wherein said determining a service interface to be converted from said service key further comprises:
Invoking an authentication interface of the cloud management platform, and performing authority authentication on each cloud platform service interface according to the identity authentication information to obtain a corresponding authentication result; the authentication result comprises authentication success or authentication failure;
And determining each cloud platform service interface as the service interface to be converted according to each authentication result as authentication success.
8. The method of claim 7, wherein said determining a service interface to be converted from said service key further comprises:
Responding to the authentication result that the authentication fails, determining each first target cloud platform service interface as the service interface to be converted, and outputting authentication failure information to the third party service interface; the authentication failure information is used for representing authentication failure of the service interface authorities of the second target cloud platform; the second target cloud platform service interface is the cloud platform service interface with the authentication result being authentication failure; the first target cloud platform service interface is the cloud platform service interface with the authentication result being authentication success.
9. The method of claim 5, wherein said determining a service interface to be converted from said service key comprises:
responding to the sending interface as the cloud platform service interface, and analyzing an interface list according to the service keywords to obtain a third-party service interface list; the third party service interface list is used for storing each third party service interface;
And determining each third-party service interface as the service interface to be converted.
10. The method of claim 2, wherein the calling the standard processing interface pre-configured in the cloud management platform corresponding to the sending interface obtains a service keyword after performing keyword analysis processing on the request information, and further comprises:
Responding to the sending interface as the cloud platform service interface, and forwarding the request information to the standard forwarding-out interface;
And carrying out the keyword analysis processing on the request information based on the standard transfer-out interface to obtain the service keywords.
11. The method according to claim 1, wherein said converting the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted according to the interface conversion script to obtain the request information after format conversion includes:
generating an object-oriented programming language byte code file according to the interface conversion script; the interface conversion script adopts agile development language;
And operating the object-oriented programming language byte code file through the object-oriented programming language virtual machine to convert the request information from the parameter format of the sending interface to the parameter format of the service interface to be converted, so as to obtain the request information after format conversion.
12. The method according to claim 1, wherein the method further comprises:
Responding to a business keyword input box, a business interface input box to be converted and an initial script input box of a script configuration interface for converting the interface, and determining the business keyword, the business interface to be converted and the initial script;
and generating the interface conversion script according to the service keyword, the service interface to be converted and the initial script.
13. The method according to claim 12, wherein the method further comprises:
calling a script test running interface of the cloud management platform, and testing the interface conversion script to obtain a test result;
Responding to the debugging operation of the interface conversion script according to the test result, and generating the interface conversion script after debugging;
Updating the interface conversion script into the debugged interface conversion script.
14. The method according to claim 12, wherein the method further comprises:
matching and checking the interface conversion script according to the dangerous instruction set to obtain a checking result; the verification result comprises verification passing or verification failure;
responding to the verification result that the verification is passed, and caching the interface conversion script to the interface conversion script cache database;
And responding to the verification result as the verification failure, and outputting matching verification failure information.
15. The method of claim 14, wherein the caching the interface conversion script into the interface conversion script cache database further comprises:
encrypting the interface conversion script to obtain the encrypted interface conversion script;
And storing the encrypted interface conversion script into an interface conversion script database.
16. The method of claim 1, wherein the standard processing interface definition criteria comprises: interface name, uniform resource locator address, type of the standard processing interface, the service key, request mode, input parameters and the return value.
17. The method according to claim 1, wherein the method further comprises:
and responding to the type of the interface conversion script as non-format conversion, forwarding the request information to the service interface to be converted according to the interface conversion script, receiving a return value fed back by the service interface to be converted, and feeding back the return value to the sending interface.
18. The method of claim 1, wherein the feeding back the return value to the transmit interface comprises:
Responding to the type of the interface conversion script as format conversion, assembling the return value from the parameter format of the service interface to be converted into the parameter format of the sending interface, and obtaining the return value after format conversion;
outputting the return value after the format conversion to the sending interface;
And outputting the return value to the sending interface in response to the type of the interface conversion script being non-format conversion type.
19. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 18 when the computer program is executed.
20. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 18.
21. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 18.
CN202410874445.6A 2024-07-02 2024-07-02 Service request processing method, computer device and storage medium Active CN118410095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410874445.6A CN118410095B (en) 2024-07-02 2024-07-02 Service request processing method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410874445.6A CN118410095B (en) 2024-07-02 2024-07-02 Service request processing method, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN118410095A CN118410095A (en) 2024-07-30
CN118410095B true CN118410095B (en) 2024-08-20

Family

ID=92003381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410874445.6A Active CN118410095B (en) 2024-07-02 2024-07-02 Service request processing method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN118410095B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105052076A (en) * 2014-02-26 2015-11-11 华为技术有限公司 Interface management service entity, functional service entity and network element management method
CN114648303A (en) * 2022-03-22 2022-06-21 北京三快在线科技有限公司 Service execution method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897724B (en) * 2020-07-21 2022-12-06 国云科技股份有限公司 Automatic testing method and device suitable for cloud platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105052076A (en) * 2014-02-26 2015-11-11 华为技术有限公司 Interface management service entity, functional service entity and network element management method
CN114648303A (en) * 2022-03-22 2022-06-21 北京三快在线科技有限公司 Service execution method and device

Also Published As

Publication number Publication date
CN118410095A (en) 2024-07-30

Similar Documents

Publication Publication Date Title
CN109474578B (en) Message checking method, device, computer equipment and storage medium
WO2020029375A1 (en) Interface testing method and system, and computer device and storage medium
CN110765102B (en) Service data processing method and device, computer equipment and storage medium
CN109802957A (en) Interface butt joint method, device, computer equipment and storage medium
CN111475376B (en) Method, apparatus, computer device and storage medium for processing test data
CN112491659B (en) Flow playback test method and device, computer equipment and storage medium
CN110704312B (en) Method, device, computer equipment and storage medium for pressure test
CN110908778B (en) Task deployment method, system and storage medium
CN110069297A (en) Abnormality eliminating method, device, computer equipment and storage medium based on Spring MVC
CN108629567A (en) Declaration information processing method, device, computer equipment and storage medium
CN110990362A (en) Log query processing method and device, computer equipment and storage medium
CN107241315A (en) Cut-in method, device and the computer-readable recording medium of bank's gateway interface
CN113159737B (en) RPA service processing method, RPA management platform, device and medium
CN111885516A (en) Multi-channel access short message configuration method and device, computer equipment and storage medium
CN109582583B (en) Software testing method, device, computer equipment and storage medium
CN109144865A (en) Method, apparatus, computer equipment and the storage medium of head end test
CN112528201A (en) Method and device for calling third-party platform, computer equipment and storage medium
CN114546837A (en) Interface test method, device, equipment and storage medium
CN111143532A (en) Dialogue unit access method, device, equipment and storage medium
CN112199441B (en) Data synchronous processing method, device, equipment and medium based on big data platform
CN110190974A (en) Present quotation data distributing method and device
CN118410095B (en) Service request processing method, computer device and storage medium
CN108667919A (en) Data processing method, device, computer equipment and storage medium
CN115396221A (en) Authorization processing method, device and system, electronic equipment and storage medium
CN113778709B (en) Interface calling method, device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant