Business processing method and device and computer equipment
By maintaining a conversion rule base in the cloud platform, compatibility with business processing requests from older versions of the application programming interface was achieved, solving the problem of insufficient cloud platform compatibility and improving the system's flexibility and stability.
Patent Information
- Application Number
- CN202411706167.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-07
AI Technical Summary
In existing technologies, cloud platforms have difficulty being compatible with business processing requests from older versions of application programming interfaces, resulting in insufficient flexibility and stability.
By maintaining a conversion rule library in the cloud platform, parameter conversion rules are obtained based on the current interface version and compatible interface versions of the target business, and the parameter information is converted to ensure that old version business requests are processed without changing the interface.
This improves the cloud platform's compatibility with business processing requests from older versions of the application programming interface, enhancing the system's flexibility and stability.
Smart Images

Figure CN119576406A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a service processing method, device and computer equipment. Background Art
[0002] With the rapid development of cloud computing technology, more and more companies are choosing to launch cloud services through cloud platforms.
[0003] Usually, enterprises can use application programming interfaces to open cloud services on cloud platforms, for example, open application programming interfaces (openapi). However, with the continuous upgrading of cloud network technology, many new protocols and new functions will be added, which involves the change of application programming interfaces. In related technologies, there are often many existing customers who need stable services and do not want to change the application programming interface at will. Therefore, how cloud platforms can be compatible with business processing requests of old versions of application programming interfaces has become a problem that needs to be solved urgently. Summary of the invention
[0004] Based on this, it is necessary to provide a business processing method, apparatus and computer equipment to address the above technical problems, which can be compatible with business processing requests of old versions of application programming interfaces to improve the flexibility and stability of the cloud platform system.
[0005] In a first aspect, an embodiment of the present application provides a service processing method, including:
[0006] In response to a processing request for a target service, a target parameter conversion rule is obtained from a conversion rule base according to a current interface version of the target service and a compatible interface version corresponding to the target service; the conversion rule base includes parameter conversion rules between multiple different interface versions maintained in advance;
[0007] According to the target parameter conversion rule, parameter conversion is performed on the parameter information of the target business;
[0008] The processing result of the target business is determined based on the converted parameter information.
[0009] In one embodiment, according to the current interface version of the target service and the compatible interface version corresponding to the target service, obtaining the target parameter conversion rule from the conversion rule library includes:
[0010] In the case that no intermediate interface version is included between the current interface version and the compatible interface version, obtaining a target parameter conversion rule from a conversion rule library according to the current interface version and the compatible interface version;
[0011] In the case where an intermediate interface version is included between the current interface version and the compatible interface version, a target parameter conversion rule is acquired from a conversion rule base according to the current interface version, the compatible interface version and the intermediate interface version.
[0012] In one embodiment, according to the current interface version and the compatible interface version, the target parameter conversion rule is obtained from the conversion rule library, including:
[0013] Obtain a rule file for converting the current interface version to a compatible interface version from a conversion rule library;
[0014] The parameter conversion rule in the rule file is determined as the target parameter conversion rule.
[0015] In one embodiment, according to the current interface version, the compatible interface version and the intermediate interface version, the target parameter conversion rule is obtained from the conversion rule library, including:
[0016] Obtaining from the conversion rule library an intermediate rule file for converting from the current interface version to the intermediate interface version and a rule file for converting from the intermediate interface version to the compatible interface version;
[0017] The parameter conversion rules in the intermediate rule file and the parameter conversion rules in the rule file are determined as target parameter conversion rules.
[0018] In one embodiment, according to the target parameter conversion rule, parameter conversion is performed on the parameter information of the target service, including:
[0019] Get the change type of parameter information;
[0020] According to the change type, the parameter mapping relationship of the parameter information is obtained from the target parameter conversion rule;
[0021] According to the parameter mapping relationship, the parameter information is converted to obtain the converted parameter information.
[0022] In one embodiment, determining the processing result of the target service according to the converted parameter information includes:
[0023] Process the target business according to the converted parameter information to obtain output parameters corresponding to the converted parameter information;
[0024] Convert the output parameter from the compatible interface version to the current interface version to obtain the converted output parameter;
[0025] Determine the processing result of the target business based on the converted output parameters.
[0026] In one embodiment, the method further comprises:
[0027] For any historical interface version, when the cloud platform processes multiple business processing requests of the historical interface version, obtain the pass rate of multiple business processing requests;
[0028] If the pass rate is less than or equal to the preset warning value threshold, the parameter conversion rule from the historical interface version to the compatible interface version is analyzed and adjusted to obtain the adjusted parameter conversion rule.
[0029] In one embodiment, the processing request carries an interface version number parameter; the method further includes:
[0030] According to the interface version number parameter, obtain the interface format file that matches the current interface version;
[0031] According to the interface format file, the address carried in the processing request is parsed to obtain parameter information of the target business.
[0032] In a second aspect, an embodiment of the present application further provides a service processing device, including:
[0033] A rule acquisition module, for responding to a processing request for a target service, and acquiring a target parameter conversion rule from a conversion rule library according to the current interface version of the target service and the compatible interface version corresponding to the target service; the conversion rule library includes parameter conversion rules between multiple different interface versions maintained in advance;
[0034] A parameter conversion module, used to perform parameter conversion on the parameter information of the target service according to the target parameter conversion rule;
[0035] The result determination module is used to determine the processing result of the target business according to the converted parameter information.
[0036] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the embodiments of the first aspect are implemented.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any one of the embodiments of the first aspect above.
[0038] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method in any one of the embodiments of the first aspect above.
[0039] The business processing method, apparatus and computer equipment provided in the embodiments of the present application respond to a processing request for a target business, obtain a target parameter conversion rule from a conversion rule library according to the current interface version of the target business and the compatible interface version corresponding to the target business; the conversion rule library includes pre-maintained parameter conversion rules between multiple different interface versions, and then according to the target parameter conversion rule, parameter information of the target business is converted, and then the processing result of the target business is determined according to the converted parameter information. In the method, when the cloud platform receives a processing request for a target business, it first obtains a target parameter conversion rule based on the current interface version of the target business and the compatible version corresponding to the target business. The target parameter conversion rule is a rule that can convert parameter information of the target business from the current interface version to the compatible interface version. The parameter information of the target business is converted based on the parameter conversion rule, so that the cloud platform can process the target business based on the parameter information under the converted compatible interface version to obtain a processing result of the target business. This is equivalent to converting the interface parameters of the old version to parameters that the cloud platform can process through the parameter conversion rule without changing the interface. In this way, the cloud platform can also perform compatible processing on business processing requests of the old version of the application programming interface, thereby improving the flexibility and stability of the cloud platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 An application environment diagram of a business processing method in an embodiment;
[0042] Figure 2 A flowchart of a business processing method in an embodiment;
[0043] Figure 3 A schematic diagram of a process for obtaining target parameter conversion rules in an embodiment;
[0044] Figure 4 A schematic diagram of a process of performing parameter conversion on parameter information of a target service in an embodiment;
[0045] Figure 5 A schematic diagram of a process for determining a processing result in one embodiment;
[0046] Figure 6 A schematic diagram of a flow chart for adjusting parameter conversion rules in one embodiment;
[0047] Figure 7 A schematic diagram of a process for determining parameter information in an embodiment;
[0048] Figure 8 is a flowchart of a business processing method in another embodiment;
[0049] Fig. 9 A system architecture diagram of an openapi compatible system in one embodiment;
[0050] Fig.10 A schematic diagram of a process for generating a parameter conversion rule file in one embodiment;
[0051] Fig.11 A schematic diagram of a process for processing a request for a historical interface version in one embodiment;
[0052] Fig.12 is a schematic diagram of the structure of a service processing device in an embodiment;
[0053] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] The technical background of the embodiments of the present application is first described below.
[0056] With the rapid development of cloud computing technology, more and more enterprises choose to open cloud services through cloud platforms. In the process of opening cloud services, openapi opening and cloud platform interface opening are two major ways for enterprises to open cloud services. However, with the continuous upgrading of cloud network technology, the networking mode of services and the internal logic of related services will change greatly, which will cause the cloud platform to issue interface parameters. In this case, for the cloud platform interface, it can be solved by changing the page, replacing the old page with a new page at one time, and adapting the underlying model through data cutover. However, for the openapi interface, the situation is somewhat different. Openapi is mostly used for customer internal system docking. If it involves interface docking, if the system update involves interface changes, then the old interface must be considered. The more common way now is to keep the old interface parameters unchanged and add new parameters at the end. However, this method will increase the number of parameters on the one hand, and on the other hand, if only the relevant parameter type changes, or the relevant parameters change slightly compared with the original parameters, it will cause a large number of repeated or slightly different parameters, causing the use of user interfaces. At the same time, if the previous parameter design is not good, it will also compromise due to the need to be compatible with old users, resulting in more and more technical debt, greatly reducing the ease of use and comprehensibility of the interface, and making subsequent interfaces increasingly difficult to use.
[0057] Based on this, the present application provides a business processing method. When the cloud platform receives a processing request for a target business, it first obtains a target parameter conversion rule based on the current interface version of the target business and the compatible version corresponding to the target business. The target parameter conversion rule is a rule that can convert the parameter information of the target business from the current interface version to the compatible interface version. The parameter information of the target business is converted based on the parameter conversion rule, so that the cloud platform can process the target business based on the parameter information under the converted compatible interface version to obtain the processing result of the target business, which is equivalent to converting the interface parameters of the old version to parameters that the cloud platform can process through the parameter conversion rule without changing the interface. In this way, the cloud platform can also perform compatibility processing on the business processing requests of the old version of the application programming interface, thereby improving the flexibility and stability of the cloud platform.
[0058] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to this one, but may also include other implicit or related problems. For details, please refer to the description of the following embodiments.
[0059] The application environment of the service processing method provided in the embodiment of the present application is described below. The service processing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the cloud platform 104 through the network. The data storage system can store the data that the cloud platform 104 needs to process. The data storage system can be integrated on the cloud platform 104, or it can be placed on the cloud or other network servers. Optionally, the terminal 102 is used by the user to initiate a processing request for the target business. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The cloud platform 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0061] In an exemplary embodiment, Figure 2 As shown, a business processing method is provided, which is applied to Figure 1 Taking the cloud platform 104 in FIG. 1 as an example, the method includes the following steps 201 to 203. Among them:
[0062] S201, in response to a processing request for a target service, obtain a target parameter conversion rule from a conversion rule library according to the current interface version of the target service and the compatible interface version corresponding to the target service; the conversion rule library includes parameter conversion rules between multiple different interface versions that are pre-maintained.
[0063] Among them, the processing request of the target business refers to the request triggered when the target business needs to be processed in the business processing application of the cloud platform. Naturally, after the cloud platform receives the processing request, it needs to process the target business. Exemplarily, the request is triggered by the user through the interface in the business processing application; wherein, the triggering method includes but is not limited to external input device clicks, voice control, touch screen triggering, etc., and the embodiment of the present application does not limit the triggering method.
[0064] The interface version refers to the version of the application interface. The current interface version of the target service refers to the interface version used by the application when the user is currently operating the target service. The compatible interface version corresponding to the target service refers to the interface version of the service processing request that is compatible with the current interface version when processing the service, which can be the latest interface version corresponding to the target service, or other interface versions. For example, if the current interface version is 1.1 and the latest interface version is 1.3, the compatible interface version can be 1.3 or 1.2. Among them, the current interface version can be obtained according to the processing request of the target service. In an implementable manner, according to the processing request of the target service, the interface header parameter of the processing request is obtained, and then the current interface version of the target service is determined according to the version number parameter carried in the interface header parameter. The compatible interface version can be obtained based on the service type of the target service. For example, the database stores a mapping relationship between different service types and compatible interface versions. When obtaining the compatible interface version corresponding to the target service, according to the service type of the target service, the compatible interface version matching the service type is obtained from the above mapping relationship, and it is used as the compatible interface version corresponding to the target service.
[0065] The conversion rule base is the parameter conversion rules between multiple different interface versions of the target business maintained in advance by the cloud platform. Taking the interface versions of the target business including 1.1, 1.2 and 1.3 as an example, the conversion rule base includes the parameter conversion rules between version 1.1 and version 1.2, and the parameter conversion rules between version 1.2 and version 1.3.
[0066] In actual applications, when the cloud platform receives a processing request for a target business, it can obtain the parameter conversion rules between the current interface version and the compatible interface version in the conversion rule library based on the current interface version of the target business and the compatible interface version corresponding to the target business, and determine them as the target parameter conversion rules.
[0067] S202: Perform parameter conversion on parameter information of the target service according to a target parameter conversion rule.
[0068] The target service parameter information includes but is not limited to path parameters, query parameters, request body, request header, response body, etc.
[0069] After obtaining the target parameter conversion rule, the parameter information of the target service is converted according to the target parameter conversion rule to convert the parameter information of the target service from the current interface version to the compatible interface version. For example, for any parameter, according to the change situation of the parameter, the parameter conversion rule corresponding to the change situation is obtained from the target parameter conversion rule, and then the parameter is converted according to the parameter conversion rule.
[0070] S203: Determine a processing result of the target service according to the converted parameter information.
[0071] After converting the parameter information of the target business from the current interface version to the compatible interface version, the cloud platform can process the target business according to the converted parameter information, obtain the processing result of the target business, and feed back the processing result to the user.
[0072] In the business processing method provided in the embodiment of the present application, in response to a processing request for a target business, a target parameter conversion rule is obtained from a conversion rule library according to the current interface version of the target business and the compatible interface version corresponding to the target business; the conversion rule library includes pre-maintained parameter conversion rules between multiple different interface versions, and then according to the target parameter conversion rule, parameter information of the target business is converted, and then the processing result of the target business is determined according to the converted parameter information. In the method, when the cloud platform receives a processing request for a target business, it first obtains a target parameter conversion rule based on the current interface version of the target business and the compatible version corresponding to the target business. The target parameter conversion rule is a rule that can convert parameter information of the target business from the current interface version to the compatible interface version. The parameter information of the target business is converted based on the parameter conversion rule, so that the cloud platform can process the target business based on the parameter information under the converted compatible interface version to obtain a processing result of the target business. This is equivalent to converting the interface parameters of the old version to parameters that the cloud platform can process through the parameter conversion rule without changing the interface. In this way, the cloud platform can also perform compatible processing on business processing requests of the old version of the application programming interface, thereby improving the flexibility and stability of the cloud platform.
[0073] Based on the above embodiment, an embodiment is provided to illustrate the process of obtaining the target parameter conversion rule from the conversion rule library.
[0074] In an exemplary embodiment, Figure 3 As shown, according to the current interface version of the target service and the compatible interface version corresponding to the target service, the target parameter conversion rule is obtained from the conversion rule library, including:
[0075] S301 : when no intermediate interface version is included between the current interface version and the compatible interface version, obtaining a target parameter conversion rule from a conversion rule library according to the current interface version and the compatible interface version.
[0076] The intermediate interface version is the other historical interface version between the current interface version and the compatible interface version. For example, if the current interface version is 1.1, if the compatible interface version is 1.2, the intermediate interface version is not included; if the compatible interface version is 1.3, version 1.2 is the intermediate interface version.
[0077] In the embodiment of the present application, if the current interface version and the compatible interface version do not include an intermediate interface version, the target parameter conversion rule is directly obtained from the conversion rule library based on the current interface version and the compatible interface version.
[0078] In one of the embodiments, obtaining target parameter conversion rules from a conversion rule library based on a current interface version and a compatible interface version may include: obtaining a rule file for converting from a current interface version to a compatible interface version from the conversion rule library; and determining the parameter conversion rules in the rule file as target parameter conversion rules.
[0079] In the embodiment of the present application, the conversion rule library includes multiple rule files, and each rule file includes parameter conversion rules between different interface versions. For example, there is a 1.1-1.2 rule file corresponding to interface version 1.1 and interface version 1.2, and the rule file stores parameter conversion rules that can convert parameters from interface version 1.1 to interface version 1.2. For another example, there is a 1.2-1.3 rule file corresponding to interface version 1.2 and interface version 1.3, and the rule file stores parameter conversion rules that can convert parameters from interface version 1.2 to interface version 1.3.
[0080] In the case where there are no other interface versions between the current interface version and the compatible interface version, the cloud platform can obtain the rule file for converting from the current interface version to the compatible interface version from the conversion rule library based on the version number of the current interface version and the version number of the compatible interface version. For example, if the current interface version is 1.1 and the compatible interface version is 1.2, and there are no other interface versions between the two versions, then the rule file of 1.1-1.2 can be obtained from the conversion rule library based on version numbers 1.1 and 1.2, and the parameter conversion rules in the rule file of 1.1-1.2 are determined as the target parameter conversion rules.
[0081] In this embodiment, the multiple rule files in the conversion rule base are rule files between every two adjacent interface versions, rather than crossing the intermediate interface version, directly from the historical interface version to the latest interface version. In this way, when maintaining and modifying the rule files, a certain amount of work is reduced, and the accuracy of the modification can be guaranteed. For example, if there are versions 1.1 and 1.2, there will be rule files 1.1-1.2 from version 1.1 to version 1.2. At this time, if there is a new version 1.3, we can set the rule files of 1.2-1.3. At this time, the system can perform parameter mapping through the rule files of 1.1-1.2 and 1.2-1.3, and use the parameters of version 1.2 as intermediate parameters to automatically generate the rule files of 1.1-1.3. Therefore, each time, only the rule files of the latest version need to be supplemented, and the system can automatically generate the rule files of the historical version, and these do not need to be maintained manually.
[0082] S302: In the case where an intermediate interface version is included between the current interface version and the compatible interface version, a target parameter conversion rule is obtained from a conversion rule library according to the current interface version, the compatible interface version and the intermediate interface version.
[0083] In an embodiment of the present application, if an intermediate interface version is included between the current interface version and the compatible interface version, it is necessary to obtain a target parameter conversion rule from a conversion rule library according to the current interface version, the compatible interface version and the intermediate interface version.
[0084] In one of the embodiments, obtaining target parameter conversion rules from a conversion rule library based on a current interface version, a compatible interface version, and an intermediate interface version may include: obtaining, from the conversion rule library, an intermediate rule file for converting from a current interface version to an intermediate interface version and a rule file for converting from an intermediate interface version to a compatible interface version; and determining the parameter conversion rules in the intermediate rule file and the parameter conversion rules in the rule file as target parameter conversion rules.
[0085] In the case where there is an intermediate interface version between the current interface version and the compatible interface version, the cloud platform can obtain the rule file for converting from the current interface version to the intermediate interface version, and the rule file for converting from the intermediate interface version to the compatible interface version from the conversion rule library based on the version number of the current interface version and the version number of the intermediate interface version, as well as the version number of the intermediate interface version and the version number of the compatible interface version. For example, if the current interface version is 1.1, the compatible interface version is 1.3, and there is an intermediate interface version 1.2 between the two versions, then the rule files of 1.1-1.2 and the rule files of 1.2-1.3 can be obtained from the conversion rule library based on the version numbers 1.1 and 1.2, as well as the version numbers 1.2 and 1.3, and the parameter conversion rules in the rule files of 1.1-1.2 and the parameter conversion rules in the rule files of 1.2-1.3 are determined as the target parameter conversion rules. In addition, when there are multiple intermediate interface versions, it is also necessary to obtain the rule files between different intermediate interface versions. For example, the current interface version is 1.1, the compatible interface version is 1.4, and the intermediate interface versions are 1.2 and 1.3. You need to obtain the rule files of 1.1-1.2, 1.2-1.3, and 1.3-1.4 from the conversion rule library, and determine the parameter conversion rules in the rule files of 1.1-1.2, the parameter conversion rules in the rule files of 1.2-1.3, and the parameter conversion rules in the rule files of 1.3-1.4 as the target parameter conversion rules.
[0086] In this embodiment, when there is an intermediate interface version between the current interface version and the compatible interface version, a rule file for mutual conversion between the current interface version, the intermediate interface version and the compatible interface version is obtained from the conversion rule library in combination with the intermediate interface version, so that the target parameter conversion rule can be quickly determined from the rule file, thereby improving the efficiency and accuracy of determining the conversion rule.
[0087] In the business processing method provided by the embodiment of the present application, when the current interface version and the compatible interface version do not include an intermediate interface version, the target parameter conversion rule is obtained from the conversion rule library according to the current interface version and the compatible interface version; when the current interface version and the compatible interface version include an intermediate interface version, the target parameter conversion rule is obtained from the conversion rule library according to the current interface version, the compatible interface version and the intermediate interface version. In this method, different conversion rules are set according to different situations based on the characteristics of the current interface version and the compatible interface version to obtain the target parameter conversion rule from the conversion rule library, so that the cloud platform can quickly and accurately obtain the target parameter conversion rule based on the matching determination method, thereby improving the accuracy of parameter conversion and the accuracy of business processing, and ensuring the reliability and stability of the cloud platform system.
[0088] Based on the above embodiment, an embodiment is provided to illustrate the process of performing parameter conversion on the parameter information of the target service.
[0089] In an exemplary embodiment, Figure 4 As shown, according to the target parameter conversion rule, parameter conversion is performed on the parameter information of the target service, including:
[0090] S401, obtaining the change type of parameter information.
[0091] The parameter information change type refers to the different changes in the parameters of the compatible interface version corresponding to the parameters of the current interface version. Change types include the same parameter name but different data type, the same data type but different parameter name, model parameter changes, and the addition of other parameters.
[0092] In actual applications, the cloud platform can compare the parameter information of the current interface version with the parameter information of the compatible interface version to determine the change information of the parameter information. For example, the current interface version and the compatible interface version both include parameter a, and the data type of parameter a in the current interface version is integer, while the data type of parameter a in the compatible interface version is changed to string. After comparing the two parameters, it is determined that the parameter name is the same but the data type has changed, and the change type is the same parameter name but different data type.
[0093] S402: Acquire a parameter mapping relationship of parameter information from a target parameter conversion rule according to the change type.
[0094] In an embodiment of the present application, the parameter conversion rules include parameter mapping relationships corresponding to different change types. The change type is that the parameter name is the same but the data type is different, that is, the old version (such as the current interface version) parameter corresponds to the new version (such as the compatible interface version) parameter and the data type has changed. The data type of the old version parameter can be changed to be consistent with the new version. For example, the old version parameter a is an integer and needs to be changed to a string type. The name is still a. At this time, you only need to change the data type of a to a string type. The change type is that the data type is the same but the parameter name is different, that is, the old version parameter corresponds to the new version parameter and the parameter name has changed. The old version parameter name can be changed to be consistent with the new version. For example, the old version parameter a is a string type, but the name is changed to b in the new version. It is still the original parameter, so you only need to add a mapping relationship in the new version rule to map the previous a to b. The change type is model parameter change. The model parameters based on the old version are invalid. New parameters are derived based on the new version model. At this time, the old version parameters are invalid in the new version. The new version parameters are rectified through the conversion parameter rules. For example, the old version parameters a, b, c, the new version parameter c remains unchanged, but x and y can be deduced according to a and b according to certain rules. For example, the deduction rules are x=a+b, y=ab. In this case, c remains unchanged, and x and y are deduced according to a and b through the deduction rules to obtain the new version parameters. The change type is adding other parameters. The new version has more parameters than the old version. According to the compatibility rules, the default values of the parameters are increased to be compatible with the old version. For example, the old version parameters are a, b, c, and the new version parameters are a, b, c, d. In this case, d is a new version parameter and cannot be introduced through the old version. However, d is a required parameter in the new version. At this time, a default value needs to be set for d.
[0095] After obtaining the change type of the parameter information, the cloud platform obtains the parameter mapping relationship that matches the change type in the target parameter conversion rule, and then performs parameter conversion on the parameter information based on the matched parameter mapping relationship.
[0096] S403: Perform parameter conversion on the parameter information according to the parameter mapping relationship to obtain converted parameter information.
[0097] Based on the parameter mapping relationship obtained above, corresponding parameter conversion is performed on the parameter information, so that the parameter information is converted from the current interface version to the compatible interface version, and the converted parameter information is obtained.
[0098] In the business processing method provided by the embodiment of the present application, the change type of parameter information is obtained, and according to the change type, the parameter mapping relationship of the parameter information is obtained from the target parameter conversion rule, and then the parameter information is converted according to the parameter mapping relationship to obtain the converted parameter information. In this method, different change types of parameter information correspond to different parameter conversion rules. Therefore, before the parameter information is converted, it is necessary to obtain the parameter conversion rule that matches the change type of the parameter information, and then convert the parameter information accordingly based on the matching parameter conversion rule, so as to improve the accuracy of the parameter conversion, thereby improving the reliability of the cloud platform system in processing business.
[0099] Based on the above embodiment, an embodiment is provided to illustrate the process of determining the processing result of the target service.
[0100] In an exemplary embodiment, Figure 5 As shown, according to the converted parameter information, the processing result of the target business is determined, including:
[0101] S501, processing the target service according to the converted parameter information to obtain output parameters corresponding to the converted parameter information.
[0102] In the embodiment of the present application, the converted parameter information is an input parameter. After the target business is processed according to the converted parameter information and the business processing requirements of the user, the output parameter corresponding to the converted parameter information is obtained.
[0103] S502: Convert the output parameter from the compatible interface version to the current interface version to obtain the converted output parameter.
[0104] Since the converted parameter information is under the compatible version, the output parameters obtained based on the converted parameter information are also under the compatible version, and the client's interface version is still the current interface version. Therefore, before the results are fed back to the user, the output parameters need to be converted from the compatible interface version to the current interface version.
[0105] Exemplarily, the conversion rule library also includes rule files between different interface versions corresponding to the output parameters, and each rule file includes parameter conversion rules for converting output parameters between two adjacent interface versions. When converting the output parameters, the rule files for converting between the compatible interface version and the current interface version can be obtained from the multiple rule files corresponding to the output parameters, and the output parameters can be converted based on the parameter conversion rules in the rule files to convert the output parameters from the compatible interface version to the current interface version to obtain the converted output parameters. Among them, the method for obtaining the parameter conversion rules corresponding to the output parameters is consistent with the aforementioned embodiment, and is divided into two situations: including an intermediate interface version between the current interface version and the compatible interface version and not including an intermediate interface version. The two situations correspond to different acquisition methods, respectively. The specific acquisition method can refer to the aforementioned embodiment and will not be repeated here.
[0106] S503: Determine the processing result of the target service according to the converted output parameters.
[0107] After obtaining the converted output parameters, you can check whether the output parameters meet expectations based on the specific business logic. For example, if it is a user registration request, you need to check whether the user ID is returned, whether the mailbox already exists, etc. Or you can compare the input parameters and output parameters to ensure that the business logic is executed as expected, such as whether the input amount and output amount are consistent.
[0108] If the result is in accordance with the expectation, the target business is determined to be successfully processed and the processing result of the target business is fed back to the user.
[0109] In the business processing method provided in the embodiment of the present application, the target business is processed according to the converted parameter information to obtain the output parameters corresponding to the converted parameter information, and the output parameters are converted from the compatible interface version to the current interface version to obtain the converted output parameters, and then the processing result of the target business is determined according to the converted output parameters. In this method, after processing the target business, the output parameters corresponding to the input parameters are obtained. Since the output parameters are under the compatible version, they need to be converted to the current interface version. The business processing results obtained based on the converted output parameters are more in line with the user's interface version, ensuring that the requests for compatible historical interface versions are compatible in the new system.
[0110] Based on the above embodiment, an embodiment is provided to illustrate the process of adjusting the parameter conversion rule.
[0111] In an exemplary embodiment, Figure 6 As shown, the method also includes:
[0112] S601, for any historical interface version, when the cloud platform has processed multiple business processing requests of the historical interface version, obtain the pass rate of multiple business processing requests.
[0113] Existing customers still make business requests through historical interface versions. When the cloud platform receives business processing requests from these existing customers, it is necessary to first convert the business parameter information through parameter conversion rules to achieve compatibility with business processing requests of historical interface versions.
[0114] For any historical interface version, after the cloud platform processes the business processing requests of multiple historical interface versions, it can monitor the actual success rate of the business processing requests of the historical interface version through a preset monitoring module to evaluate the parameter conversion rules and request compatibility effects.
[0115] The monitoring module is used to monitor whether each business processing request of each historical interface version is successfully processed. For any historical interface version, the number of successfully processed multiple business processing requests of the historical interface version can be obtained through the monitoring module, and then the ratio of the number of successfully processed to the total number of requests of the multiple business processing requests is determined as the pass rate of the multiple business processing requests.
[0116] S602: If the pass rate is less than or equal to the preset warning value threshold, the parameter conversion rule for converting from the historical interface version to the compatible interface version is analyzed and adjusted to obtain an adjusted parameter conversion rule.
[0117] In the embodiment of the present application, a success rate threshold and a warning value threshold can be set, and then the pass rate of the multiple business processing requests can be compared with the success rate threshold and the warning value threshold. If the pass rate is less than or equal to the success rate threshold, it is necessary to focus on whether there is a problem with the parameter conversion; if the pass rate is less than or equal to the warning value threshold, it is necessary to analyze the parameter conversion rules from the historical interface version to the compatible interface version, adjust the error information therein, and obtain the adjusted parameter conversion rules. Among them, the success rate threshold and the warning value threshold can be set according to actual needs. For example, the success rate threshold can be 96%, the warning value threshold can be 80%, etc., and the embodiment of the present application does not limit this.
[0118] In the business processing method provided in the embodiment of the present application, for any historical interface version, when the cloud platform processes multiple business processing requests of the historical interface version, the pass rate of multiple business processing requests is obtained, and if the pass rate is less than or equal to the preset warning value threshold, the parameter conversion rules for converting from the historical interface version to the compatible interface version are analyzed and adjusted to obtain the adjusted parameter conversion rules. In this method, by monitoring and counting the processing success rate of each interface version, the interface version with a higher failure rate is determined based on the processing success rate, and further analysis and improvement are performed to adjust the relevant parameter conversion rules to improve the accuracy of the parameter conversion rules, thereby improving the processing success rate of the business and improving the reliability of the cloud platform system.
[0119] Based on the above embodiment, an embodiment is provided to illustrate the process of obtaining the parameter information of the above target service.
[0120] In an exemplary embodiment, Figure 7 As shown, the processing request carries an interface version number parameter; the method also includes:
[0121] S701, acquiring an interface format file matching the current interface version according to an interface version number parameter.
[0122] In the embodiment of the present application, the processing request carries an interface version number parameter, and parameter information of the target service can be obtained based on the interface version number parameter.
[0123] Exemplarily, the cloud platform maintains interface format files corresponding to different interface versions in advance, and the interface format files store various parameters under the corresponding interface versions. When obtaining parameter information of the target service, the interface format file corresponding to the interface version number parameter of the current interface version can be matched from multiple interface format files, and the interface format file is the interface format file matching the current interface version.
[0124] S702, according to the interface format file, perform parameter parsing on the address carried in the processing request to obtain parameter information of the target service.
[0125] Based on the interface format file obtained above, the address carried in the processing request is parsed to obtain parameter information of the target service. Wherein, the address is a string, and each parameter in the interface format file can be matched with the characters in the string to obtain multiple parameters, which are the parameter information of the target service.
[0126] In the service processing method provided by the embodiment of the present application, an interface format file matching the current interface version is obtained according to the interface version number parameter, and then the address carried in the processing request is parsed according to the interface format file to obtain parameter information of the target service. In this method, the interface format file can perform parameter parsing on the parameters, and different interface versions correspond to different interface format files. Therefore, it is necessary to determine the interface format file matching the current interface version for parsing, so as to improve the accuracy of parameter parsing, thereby improving the accuracy and efficiency of parameter conversion.
[0127] In addition, in an exemplary embodiment, the present application also provides a business processing method, such as Figure 8 As shown, the following steps may be included:
[0128] S801, in response to a processing request for a target service, obtain a target parameter conversion rule from a conversion rule library according to the current interface version of the target service and the compatible interface version corresponding to the target service; the conversion rule library includes parameter conversion rules between multiple different interface versions that are pre-maintained.
[0129] Optionally, in the case where there is no intermediate interface version between the current interface version and the compatible interface version, a rule file for converting from the current interface version to the compatible interface version is obtained from the conversion rule library; and the parameter conversion rules in the rule file are determined as target parameter conversion rules. In the case where there is an intermediate interface version between the current interface version and the compatible interface version, an intermediate rule file for converting from the current interface version to the intermediate interface version and a rule file for converting from the intermediate interface version to the compatible interface version are obtained from the conversion rule library; and the parameter conversion rules in the intermediate rule file and the parameter conversion rules in the rule file are determined as target parameter conversion rules.
[0130] S802: Acquire an interface format file that matches the current interface version according to the interface version number parameter carried in the processing request.
[0131] S803, according to the interface format file, perform parameter parsing on the address carried in the processing request to obtain parameter information of the target service.
[0132] S804: Obtain the change type of parameter information.
[0133] S805: Acquire a parameter mapping relationship of the parameter information from the target parameter conversion rule according to the change type.
[0134] S806: Perform parameter conversion on the parameter information according to the parameter mapping relationship to obtain converted parameter information.
[0135] S807: Process the target service according to the converted parameter information to obtain output parameters corresponding to the converted parameter information.
[0136] S808, converting the output parameter from the compatible interface version to the current interface version to obtain the converted output parameter.
[0137] S809: Determine the processing result of the target service according to the converted output parameters.
[0138] The above process of S801-S809 can refer to the description of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0139] In addition, in an exemplary embodiment, a system architecture diagram of an openapi-compatible system is described.
[0140] like Fig. 9 As shown in the figure, the system mainly needs to go through two steps: parameter parsing and parameter model conversion, and both steps are configured through configuration files. The parameter parsing module mainly manages the interface format files of each parameter. When the parameter is parsed, the corresponding version format file is found through the url (uniform resource location) and the version number parameter of the interface header for parsing, and the corresponding parameters are parsed for the next step of processing; the next step is to convert the parameter into a new parameter, which mainly uses the mapping relationship in the parameter conversion rule file to change the correspondence between the old version parameter and the new version parameter. After the parameter is converted, it enters the backend service. Here, the old version parameter is the same as the new version parameter after parameter conversion, and the business can be completed through the backend service. At the same time, a monitoring module is designed to pull the pass rate of each request and count the actual success rate of each version of the request, which is used to evaluate the parameter model conversion and the compatibility effect of the conversion model. For the version conversion model with a success rate lower than the threshold, further evaluation and optimization are required. For example, you can set a success rate threshold of 96% and a warning value threshold of 80%. When the success rate of a certain interface in the new version is lower than 96%, you need to focus on whether there is a problem with the transformation rule. When the success rate of a certain interface is lower than 80%, you need to roll back the version first and then carefully analyze whether there is a problem with the interface forwarding rule. For successful requests, an output parameter conversion is required before the final output. At this time, the parameter conversion rule file provided by the file modification management module is used to output the parameters required by different versions according to the output format of different versions.
[0141] like Fig.10As shown in the figure, the new version is v1, and other historical versions are v2, v3, v4, etc., to illustrate the generation process of the parameter conversion rule file. First, the entire system needs to be initialized, and the interface format file and parameter conversion file need to be updated. When the initialization starts, the interface first determines whether there is a new interface version update. If not, the initialization ends. If there is, the interface format file of this version is first generated according to the relevant new interface version for the parameter parsing module to perform interface parsing. Then, a parameter mapping document from all version parameters to the latest version parameters is generated. Some rule documents in the current system are rule documents from all version parameters to the next latest version parameters. Therefore, the rules corresponding to v1 of the next latest version v2 are first entered into the file modification management module. The parameter conversion rule file from v2 to v1 is generated through these rules. Then, this rule is superimposed on the previous rule, so that the original historical version (v3, v4, etc.) to v2 version rules are superimposed with the rules from v2 to v1, generating the rules from the historical version (v3, v4, etc.) to v1, and the corresponding parameter conversion rule file is generated through these rules. It should be noted that the files here are divided into two categories, one is the rule file corresponding to the old version of the input parameter converted to the latest version, and the other is the rule file corresponding to the latest version of the output parameter converted to the old version.
[0142] like Fig.11 As shown in the figure, it is a schematic diagram of the whole system compatibility processing requests of historical interface versions. When the cloud platform system receives a request, the system first determines whether the request is the latest version through the URL and version number of the request. If it is, it directly enters the backend service. If not, it first extracts the corresponding version of the interface file in the parameter parsing module through parameter parsing. After the parsing is completed and the corresponding parameters are extracted, it enters the parameter model conversion module, and performs corresponding rule conversion according to the input parameter conversion file of the version to the latest version, and finally forms the input parameters of the latest version. Then, the request that has been converted to the latest version of the parameter enters the backend service and makes corresponding business changes. When the request is completed, the backend service parameter output is the output parameter of the latest version. At this time, it is necessary to convert the latest version of the parameter into the version parameter corresponding to the original demand in the output parameter conversion module, and finally output it, ensuring that the request of the historical version is compatible in the new system. At the same time, there is also a monitoring module in the backend service to monitor the correctness of the final success of requests of different versions. If the correctness is lower than the set threshold, it is necessary to analyze the relevant requests to see if there is a problem with the rule transformation, and then adjust the corresponding rules of the corresponding version in the file modification management module, generate a new parameter conversion rule file, and continue to monitor the new modification.
[0143] Compared with other software systems, cloud networks pursue the stability of platforms and services more. Moreover, cloud network functions are also underlying functions for users' cloud services. Such functions are generally inconvenient to change frequently. On the other hand, with the continuous updating of technology, cloud networks will have many new protocols and new functions added, and these additions will affect the parameter changes of the original business opening changes. On the one hand, existing customers need stable services and do not want to change the interface at will. On the other hand, the development of cloud network's own business has to update the interface, so some improvements are needed to solve such contradictions. Based on this, the present application provides a method for openapi compatible with historical versions. In the embodiment of the present application, only the method of rule file conversion is used to adapt the entire compatible process, which increases the versatility of the system. All conversion rules are pre-designed. After that, it is only necessary to use files to explain which parameters are transformed by what kind of rules to generate what kind of parameters, which ensures the stability and scalability of the system. In addition, due to the large number of interfaces and the increasing number of historical versions, a file modification management module is also added in the embodiment of the present application. The rule file is automatically generated through the mapping of rules and files. As long as the rules correspond correctly, the generated multiple rule files are also correct, which reduces the cost of manual maintenance of many files and also reduces the error rate of manual operations. At the same time, a monitoring module is designed to monitor and count the conversion results, find out the interface versions with higher failure rates, and conduct further analysis and improvement to eventually meet the standards.
[0144] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0145] Based on the same inventive concept, the embodiment of the present application also provides a business processing device for implementing the business processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more business processing device embodiments provided below can refer to the limitations on the business processing method above, and will not be repeated here.
[0146] In an exemplary embodiment, Fig.12As shown, a business processing device 1 is provided, comprising: a rule acquisition module 10, a parameter conversion module 20 and a result determination module 30, wherein:
[0147] The rule acquisition module 10 is used to respond to the processing request for the target service and acquire the target parameter conversion rule from the conversion rule base according to the current interface version of the target service and the compatible interface version corresponding to the target service; the conversion rule base includes parameter conversion rules between multiple different interface versions maintained in advance;
[0148] The parameter conversion module 20 is used to perform parameter conversion on the parameter information of the target service according to the target parameter conversion rule;
[0149] The result determination module 30 is used to determine the processing result of the target service according to the converted parameter information.
[0150] In one embodiment, the rule acquisition module 10 is further used for:
[0151] When there is no intermediate interface version between the current interface version and the compatible interface version, the target parameter conversion rule is obtained from the conversion rule library based on the current interface version and the compatible interface version; when there is an intermediate interface version between the current interface version and the compatible interface version, the target parameter conversion rule is obtained from the conversion rule library based on the current interface version, the compatible interface version and the intermediate interface version.
[0152] In one embodiment, the rule acquisition module 10 is further used for:
[0153] A rule file for converting a current interface version to a compatible interface version is obtained from a conversion rule library; and a parameter conversion rule in the rule file is determined as a target parameter conversion rule.
[0154] In one embodiment, the rule acquisition module 10 is further used for:
[0155] From the conversion rule library, obtain the intermediate rule file for converting from the current interface version to the intermediate interface version and the rule file for converting from the intermediate interface version to the compatible interface version; determine the parameter conversion rules in the intermediate rule file and the parameter conversion rules in the rule file as the target parameter conversion rules.
[0156] In one embodiment, the parameter conversion module 20 is further used for:
[0157] The change type of the parameter information is obtained; according to the change type, the parameter mapping relationship of the parameter information is obtained from the target parameter conversion rule; according to the parameter mapping relationship, the parameter information is parameter converted to obtain the converted parameter information.
[0158] In one embodiment, the result determination module 30 is further used for:
[0159] According to the converted parameter information, the target business is processed to obtain the output parameters corresponding to the converted parameter information; the output parameters are converted from the compatible interface version to the current interface version to obtain the converted output parameters; according to the converted output parameters, the processing result of the target business is determined.
[0160] In one embodiment, the service processing device 1 further includes:
[0161] A pass rate acquisition module is used to obtain the pass rates of multiple business processing requests for any historical interface version when the cloud platform has processed multiple business processing requests of the historical interface version;
[0162] The rule adjustment module is used to analyze and adjust the parameter conversion rule from the historical interface version to the compatible interface version if the pass rate is less than or equal to the preset warning value threshold, so as to obtain the adjusted parameter conversion rule.
[0163] In one embodiment, the service processing device 1 further includes:
[0164] A file acquisition module is used to acquire an interface format file matching the current interface version according to an interface version number parameter;
[0165] The information determination module is used to perform parameter parsing on the address carried in the processing request according to the interface format file to obtain parameter information of the target business.
[0166] Each module in the above-mentioned business processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0167] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.13As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store business processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business processing method is implemented.
[0168] Those skilled in the art will understand that Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0169] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0170] In response to a processing request for a target service, a target parameter conversion rule is obtained from a conversion rule base according to a current interface version of the target service and a compatible interface version corresponding to the target service; the conversion rule base includes parameter conversion rules between multiple different interface versions maintained in advance;
[0171] According to the target parameter conversion rule, parameter conversion is performed on the parameter information of the target business;
[0172] The processing result of the target business is determined based on the converted parameter information.
[0173] The implementation principles and technical effects of each step implemented by the processor in the embodiment of the present application are similar to the principles of the above-mentioned business processing method, and will not be repeated here.
[0174] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0175] In response to a processing request for a target service, a target parameter conversion rule is obtained from a conversion rule base according to a current interface version of the target service and a compatible interface version corresponding to the target service; the conversion rule base includes parameter conversion rules between multiple different interface versions maintained in advance;
[0176] According to the target parameter conversion rule, parameter conversion is performed on the parameter information of the target business;
[0177] The processing result of the target business is determined based on the converted parameter information.
[0178] The implementation principles and technical effects of the steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned business processing method and will not be repeated here.
[0179] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0180] In response to a processing request for a target service, a target parameter conversion rule is obtained from a conversion rule base according to a current interface version of the target service and a compatible interface version corresponding to the target service; the conversion rule base includes parameter conversion rules between multiple different interface versions maintained in advance;
[0181] According to the target parameter conversion rule, parameter conversion is performed on the parameter information of the target business;
[0182] The processing result of the target business is determined based on the converted parameter information.
[0183] It should be noted that the personnel information (including but not limited to personnel equipment information, personnel personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the personnel or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0184] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0185] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0186] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A business processing method, characterized in that: Applied to a cloud platform, the method includes: In response to a processing request for a target service, a target parameter conversion rule is obtained from a conversion rule base according to a current interface version of the target service and a compatible interface version corresponding to the target service; the conversion rule base includes parameter conversion rules between multiple different interface versions maintained in advance; According to the target parameter conversion rule, parameter conversion is performed on the parameter information of the target service; The processing result of the target service is determined according to the converted parameter information.
2. The method according to claim 1, characterized in that The acquiring the target parameter conversion rule from the conversion rule library according to the current interface version of the target service and the compatible interface version corresponding to the target service includes: In a case where no intermediate interface version is included between the current interface version and the compatible interface version, acquiring the target parameter conversion rule from the conversion rule library according to the current interface version and the compatible interface version; In the case where an intermediate interface version is included between the current interface version and the compatible interface version, the target parameter conversion rule is acquired from the conversion rule library according to the current interface version, the compatible interface version and the intermediate interface version.
3. The method according to claim 2, characterized in that The acquiring the target parameter conversion rule from the conversion rule library according to the current interface version and the compatible interface version includes: Obtaining, from the conversion rule library, a rule file for converting from the current interface version to the compatible interface version; The parameter conversion rule in the rule file is determined as the target parameter conversion rule.
4. The method according to claim 2, characterized in that: The acquiring the target parameter conversion rule from the conversion rule library according to the current interface version, the compatible interface version and the intermediate interface version includes: Acquire, from the conversion rule library, an intermediate rule file for converting from the current interface version to the intermediate interface version and a rule file for converting from the intermediate interface version to the compatible interface version; The parameter conversion rules in the intermediate rule file and the parameter conversion rules in the rule file are determined as the target parameter conversion rules.
5. The method according to any one of claims 1 to 4, characterized in that: The performing parameter conversion on the parameter information of the target service according to the target parameter conversion rule includes: Obtaining a change type of the parameter information; According to the change type, obtaining a parameter mapping relationship of the parameter information from the target parameter conversion rule; According to the parameter mapping relationship, parameter conversion is performed on the parameter information to obtain the converted parameter information.
6. The method according to any one of claims 1 to 4, characterized in that: Determining the processing result of the target service according to the converted parameter information includes: Processing the target service according to the converted parameter information to obtain output parameters corresponding to the converted parameter information; Convert the output parameter from the compatible interface version to the current interface version to obtain the converted output parameter; A processing result of the target service is determined according to the converted output parameters.
7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: For any historical interface version, when the cloud platform has processed multiple business processing requests of the historical interface version, obtaining the pass rate of the multiple business processing requests; If the pass rate is less than or equal to the preset warning value threshold, the parameter conversion rule for converting from the historical interface version to the compatible interface version is analyzed and adjusted to obtain an adjusted parameter conversion rule.
8. The method according to any one of claims 1 to 4, characterized in that: The processing request carries an interface version number parameter; the method further includes: According to the interface version number parameter, obtaining an interface format file matching the current interface version; According to the interface format file, the address carried in the processing request is parsed to obtain parameter information of the target service.
9. A service processing device, characterized in that: The device comprises: A rule acquisition module, configured to, in response to a processing request for a target service, acquire a target parameter conversion rule from a conversion rule library according to a current interface version of the target service and a compatible interface version corresponding to the target service; the conversion rule library includes parameter conversion rules between multiple different interface versions maintained in advance; A parameter conversion module, used to perform parameter conversion on the parameter information of the target service according to the target parameter conversion rule; The result determination module is used to determine the processing result of the target business according to the converted parameter information.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Method and system for carrying out version switching on risk control rule, and electronic equipment
CN121658063A