External interface adaptation method, device, equipment and storage medium

By detecting the external interface adaptation request in the OMS system, extracting and verifying the interface parameters, the problem of difficult external interface adaptation in the existing technology is solved, and fast and accurate interface adaptation and security improvement are achieved.

CN113190366BActive Publication Date: 2024-08-27SHANGHAI DONGPU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110498552.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-08
Publication Date
2024-08-27
Estimated Expiration
2041-05-08

AI Technical Summary

Technical Problem

Existing technology is difficult to quickly and accurately adapt to external interfaces, resulting in the need to re-develop system-level parameters and business processes when the system connects to external customers and platforms.

Method used

By detecting the external interface adaptation request within the OMS system, extracting the request parameters and extracting the corresponding interface and its processing method from the preset interface configuration table, the signature verification and data processing methods are compared to ensure the accuracy of the interface adaptation. sex and safety.

Benefits of technology

It improves the safety and efficiency of interface adaptation calls, reduces the false detection rate and development costs, and enables quick and accurate positioning of the external interfaces that need to be called.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113190366B
    Figure CN113190366B
Patent Text Reader

Abstract

The present invention relates to the field of interface calling, and discloses an external interface adaptation method, device, equipment and storage medium, the method comprising: when an external interface adaptation request is detected inside an OMS system, extracting request parameters and its interface name in the external interface adaptation request, and extracting an interface corresponding to the interface name and its processing method from a preset interface configuration table; verifying the request parameters according to the processing method, and performing external interface adaptation on the interface according to the verification result. The present invention verifies the request parameters according to the processing method corresponding to the preset interface, and when the verification passes, performs interface adaptation and calling on the interface, and by verifying the external interface adaptation request, quickly and accurately locates the external interface to be called, thereby improving the security of the interface adaptation call.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of interface calling, and in particular to an external interface adaptation method, device, equipment and storage medium. Background Art

[0002] The integrated warehousing and distribution management systems on the market need to connect to different business types of external customers and platforms. If a customer places a warehouse order with a customized interface requirement, the system will generally provide the customer with a new interface solution for new access, and all the main processes and business processes of system-level parameters need to be redeveloped.

[0003] In order to connect to various external interfaces and their interface solutions, a unified entrance is often set up inside the system, and the unified entrance is used to interconnect and communicate with the external interface. However, when the system calls an external interface, it is often difficult to quickly and accurately adapt to the external interface to be called due to the large number of external interfaces and the inconsistent interface solutions of each interface. Therefore, how to quickly and accurately adapt the external interface according to the interface adaptation request is an urgent problem to be solved. Summary of the invention

[0004] The main purpose of the present invention is to solve the technical problem in the prior art that the external interface cannot be quickly adapted.

[0005] The first aspect of the present invention provides an external interface adaptation method based on an OMS system, and the external interface adaptation method based on the OMS system includes: when detecting that there is an external interface adaptation request inside the OMS system, extracting the request parameters in the external interface adaptation request; extracting the interface name in the request parameters, and extracting the interface corresponding to the interface name and its processing method from a preset interface configuration table; according to the processing method, verifying the request parameters to obtain a verification result; and according to the verification result, performing external interface adaptation on the interface.

[0006] Optionally, in a first implementation manner of the first aspect of the present invention, extracting the interface name in the request parameters and extracting the interface corresponding to the interface name and its processing method from the preset interface configuration table includes: calling a preset parameter parsing function, parsing the request parameters, and obtaining parsed data, wherein the parsed data includes verification parameters, interface name, a first signature verification processing method, and a first data processing method; searching the preset interface configuration table for the interface corresponding to the interface name in the parsed data, and extracting the processing method corresponding to the interface, wherein the processing method includes a second signature verification processing method and a second data processing method.

[0007] Optionally, in a second implementation manner of the first aspect of the present invention, the request parameters are verified according to the processing method to obtain a verification result, including: comparing the first signature verification processing method in the parsed data with the second signature verification processing method in the processing method to obtain a signature comparison result; when the signature comparison result is that the first signature verification processing method and the second signature verification processing method are consistent, analyzing and verifying the data processing method in the parsed data and the data processing method in the processing method to obtain a verification result.

[0008] Optionally, in a third implementation manner of the first aspect of the present invention, the first signature verification processing method in the parsed data and the second signature verification processing method in the processing method are compared to obtain a signature comparison result, including: extracting verification parameters in the parsed data; constructing a first character string to be signed using the verification parameters according to the first signature verification processing method in the parsed data; calling a preset encryption algorithm to encrypt the first character string to be signed to generate a first signature; constructing a second character string to be signed using the verification parameters according to the second signature verification processing method in the processing method; calling the encryption algorithm to encrypt the second character string to be signed to generate a second signature; comparing the first signature and the second signature to see if they are consistent. If they are consistent, the signature comparison result is that the first signature verification processing method and the second signature verification processing method are consistent.

[0009] Optionally, in a fourth implementation manner of the first aspect of the present invention, constructing a first character string to be signed by using the verification parameters according to the first signature verification processing method in the parsed data includes: extracting the name characters in the verification parameters based on the first signature verification processing method; sorting the verification parameters in ascending order according to the name characters to obtain a character sequence; calling a preset connector to concatenate the character sequence to generate a first character string to be signed.

[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the data processing method in the parsed data and the data processing method in the processing method are analyzed and verified to obtain a verification result, including: analyzing and comparing the data conversion method in the parsed data and the data conversion method in the processing method, and analyzing and comparing the data filtering method in the parsed data and the data filtering method in the processing method to obtain a verification result.

[0011] Optionally, in the sixth implementation method of the first aspect of the present invention, after the interface is adapted to the external interface according to the verification result, it also includes: obtaining business data from the external interface, and extracting the interface business process processing method corresponding to the external interface from the interface configuration table; performing business process processing on the business data according to the interface business process processing method.

[0012] The second aspect of the present invention proposes an external interface adaptation device based on an OMS system, and the external interface adaptation device based on the OMS system includes: a detection module, which is used to detect that there is an external interface adaptation request inside the OMS system, and extract the request parameters in the external interface adaptation request; an extraction module, which is used to extract the interface name in the request parameters, and extract the interface corresponding to the interface name and its processing method from a preset interface configuration table; a verification module, which is used to verify the request parameters according to the processing method to obtain a verification result; an adaptation module, which is used to perform external interface adaptation on the interface according to the verification result.

[0013] Optionally, in a first implementation manner of the second aspect of the present invention, the extraction module is specifically used to: call a preset parameter parsing function, parse the request parameters, and obtain parsed data, wherein the parsed data includes verification parameters, an interface name, a first signature verification processing method, and a first data processing method; search a preset interface configuration table for an interface corresponding to the interface name in the parsed data, and extract a processing method corresponding to the interface, wherein the processing method includes a second signature verification processing method and a second data processing method.

[0014] Optionally, in a second implementation of the second aspect of the present invention, the verification module includes: a comparison unit, used to compare the first signature verification processing method in the parsed data with the second signature verification processing method in the processing method to obtain a signature comparison result; a verification unit, used to analyze and verify the data processing method in the parsed data and the data processing method in the processing method to obtain a verification result when the signature comparison result is that the first signature verification processing method and the second signature verification processing method are consistent.

[0015] Optionally, in a third implementation manner of the second aspect of the present invention, the comparison unit is specifically used for: an extraction subunit, used to extract verification parameters from the parsed data; a first construction subunit, used to construct a first character string to be signed using the verification parameters according to a first signature verification processing method in the parsed data; a first encryption unit, used to call a preset encryption algorithm, encrypt the first character string to be signed, and generate a first signature; a second construction subunit, used to construct a second character string to be signed using the verification parameters according to a second signature verification processing method in the processing method; a second encryption subunit, used to call the encryption algorithm, encrypt the second character string to be signed, and generate a second signature; a comparison subunit, used to compare whether the first signature and the second signature are consistent. If they are consistent, the signature comparison result is that the first signature verification processing method and the second signature verification processing method are consistent.

[0016] Optionally, in a fourth implementation of the second aspect of the present invention, the first construction unit is specifically used to: extract the name characters in the verification parameters based on the first signature verification processing method; sort the verification parameters in ascending order according to the name characters to obtain a character sequence; call a preset connector to concatenate the character sequence to generate a first character string to be signed.

[0017] Optionally, in a fifth implementation of the second aspect of the present invention, the verification unit is specifically used to: analyze and compare the data conversion method in the parsed data and the data conversion method in the processing method, and analyze and compare the data filtering method in the parsed data and the data filtering method in the processing method to obtain a verification result.

[0018] Optionally, in a sixth implementation method of the second aspect of the present invention, the external interface adaptation device based on the OMS system also includes a processing module, which is specifically used to: obtain business data from the external interface, and extract the interface business process processing method corresponding to the external interface from the interface configuration table; perform business process processing on the business data according to the interface business process processing method.

[0019] The third aspect of the present invention provides an external interface adaptation device based on an OMS system, the external interface adaptation device based on the OMS system comprising: a memory and at least one processor, the memory storing instructions, the memory and the at least one processor being interconnected via a line; the at least one processor calling the instructions in the memory so that the external interface adaptation device based on the OMS system executes the steps of the above-mentioned external interface adaptation method based on the OMS system.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium, on which instructions are stored, and when the computer-readable storage medium is run on a computer, the computer executes the steps of the above-mentioned external interface adaptation method based on the OMS system.

[0021] In the technical solution provided by the present invention, when an external interface adaptation request is detected inside the OMS system, the request parameters and the interface name in the external interface adaptation request are extracted, and the interface corresponding to the interface name and its processing method are extracted from the preset interface configuration table; according to the processing method, the request parameters are verified, and according to the verification result, the interface is externally adapted. The technical solution provided by the present invention verifies the request parameters according to the processing method corresponding to the preset interface, and when the verification passes, the interface is interface adapted and called, and by verifying the external interface adaptation request, the external interface to be called is quickly and accurately located, thereby improving the security of the interface adaptation call, and automatically verifying the request parameters according to the processing method corresponding to the preset interface, thereby improving the verification efficiency and reducing the false detection rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic diagram of a first embodiment of an external interface adaptation method in an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of a second embodiment of the external interface adaptation method in an embodiment of the present invention;

[0024] Figure 3 A schematic diagram of a third embodiment of the external interface adaptation method in an embodiment of the present invention;

[0025] Figure 4 A schematic diagram of an embodiment of an external interface adapter device in an embodiment of the present invention;

[0026] Figure 5 A schematic diagram of another embodiment of the external interface adapter device in an embodiment of the present invention;

[0027] Figure 6 The figure is a schematic diagram of an embodiment of an external interface adapter device in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The embodiment of the present invention provides an external interface adaptation method, device, equipment and storage medium. When an external interface adaptation request is detected inside the OMS system, the request parameters and the interface name in the external interface adaptation request are extracted, and the interface corresponding to the interface name and its processing method are extracted from the preset interface configuration table; the request parameters are verified according to the processing method, and the interface is externally adapted according to the verification result. The embodiment of the present invention verifies the request parameters according to the processing method corresponding to the preset interface, and when the verification passes, the interface is interface adapted and called. By verifying the external interface adaptation request, the external interface to be called is quickly and accurately located, thereby improving the security of the interface adaptation call, and automatically verifying the request parameters according to the processing method corresponding to the preset interface, thereby improving the verification efficiency, reducing the false detection rate, and thus reducing the verification cost.

[0029] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] For ease of understanding, the specific contents of the embodiments of the present invention are described below. Figure 1 The first embodiment of the external interface adaptation method based on the OMS system in the embodiment of the present invention includes:

[0031] 101, when detecting that there is an external interface adaptation request in the OMS system, extracting request parameters in the external interface adaptation request;

[0032] The OMS system adapts and connects with the interface of the external system through a unified entrance to obtain the business data of the external system. When it is necessary to connect with the interface of the external system, the OMS system sends an external interface adaptation request internally and detects the external interface adaptation request, wherein the external interface adaptation request carries request parameters.

[0033] When an external interface adaptation request is detected inside the OMS system, the request parameters in the external interface adaptation request are extracted, and the interface address is requested through POST, the interface entry file is obtained through the interface address, and the interface entry file is called to parse the request parameters in the external interface adaptation request, wherein the request parameters include but are not limited to the interface name and the verification method.

[0034] 102, extracting the interface name in the request parameter, and extracting the interface corresponding to the interface name and its processing method from the preset interface configuration table;

[0035] The OMS system pre-acquires the interface information corresponding to all external interfaces, and based on the interface information, configures all external interfaces, and enters the interface information corresponding to the external interfaces into the interface configuration table preset in the internal database of the OMS system, where the interface information includes the interface name, interface docking platform, data direction, class name and processing method.

[0036] When an external interface adaptation request is detected inside the OMS system, the interface name of the request parameter in the external interface adaptation request is extracted, and the interface information corresponding to the interface name is searched from the interface configuration table through the interface name. This process is equivalent to searching all external interfaces for the interface corresponding to the interface name of the interface that the OMS system needs to make an adaptation request and its processing method. For ease of distinction, the interface that the OMS system needs to make an adaptation request is taken as the first interface, and the interface corresponding to the interface name of the interface that the OMS system needs to make an adaptation request is taken as the second interface.

[0037] Furthermore, the process of extracting interface information corresponding to the interface name from the interface configuration table is equivalent to an automatic routing processor. The automatic routing processor is called to find the specific processing method for each interface, so that when new interfaces or business segment interfaces are added to this business later, we only need to add the interface processing details, and the remaining system-level parameters and interface processing processes only need to follow the existing processes, thereby greatly reducing the workload of adding new businesses and development.

[0038] 103. Verify the request parameters according to the processing method and obtain a verification result;

[0039] According to the processing method, the verification method contained in the request parameters in the external interface adaptation request is analyzed to determine whether the processing method of the interface configured by the OMS system is consistent with the processing method in the request parameters, that is, to determine whether the processing method of the first interface is consistent with the processing method of the second interface. Based on the comparison analysis of the processing method, it can be determined whether the first interface is consistent with the second interface, wherein the verification method includes a first signature verification method and a first data processing method; the processing method includes a second signature verification processing method and a second data processing method.

[0040] The process of determining whether the verification method of the first interface is consistent with the processing method of the second interface is to compare the parsed data with the signature verification processing method contained in the processing method to obtain a signature comparison result; when the signature comparison result is that the signature verification processing method is consistent, the data processing method in the parsed data and the data processing method in the processing method are analyzed and verified to obtain a verification result. The data processing method includes a data conversion method and a data filtering method.

[0041] Specifically, the process of comparing the first signature verification processing method and the second signature verification processing method is to extract the verification parameters in the parsed data; construct the first string to be signed according to the verification parameters in the first signature verification processing method; call the preset encryption algorithm to encrypt the first string to be signed to generate the first signature; construct the second string to be signed according to the verification parameters in the second signature verification processing method; call the preset encryption algorithm to encrypt the second string to be signed to generate the second signature; compare whether the first signature and the second signature are consistent; if they are consistent, the signature comparison result is that the first signature verification processing method and the second signature verification processing method are consistent. The process of analyzing and verifying the data processing method in the parsed data and the data processing method in the processing method is to analyze and compare the first data conversion method in the parsed data and the second data conversion method in the processing method, and to analyze and compare the first data filtering method in the parsed data and the second data filtering method in the processing method, and combine the comparison results of the signature verification processing method, the data conversion method and the data filtering method to obtain the verification result. In this embodiment, the specific processing flow of the methods included in the verification method and the processing method is not limited here, and can be set according to actual conditions.

[0042] Furthermore, comparing the verification method with the processing method can also be to divide the verification method and the processing method into fields, and compare each field in the verification method with each field in the processing method. When each field in the verification method is consistent with each field in the processing method, it is determined that the verification method is consistent with the processing method.

[0043] 104. According to the verification result, the interface is adapted to the external interface.

[0044] The OMS system receives the verification result through its interface adapter module, and determines whether the external interface is successfully adapted based on the verification result. When the verification result shows that the verification method of the first interface is consistent with the processing method of the second interface, the OMS system is successfully adapted to the external interface, and a successful adaptation message is generated inside the OMS system. The message carries a successful adaptation identifier, and the OMS system can capture and identify it through the interface adapter module. When the OMS system receives successful adaptation information through the interface adapter module, for information with a large amount of data, a kafka queue or rabbitMQ queue can generally be used to shorten the information transmission time and improve the system's ability and efficiency to collect information at the same time.

[0045] Specifically, only when the first signature verification processing method and the second signature verification processing method are consistent in comparison, and the first data processing method and the second data processing method are consistent in comparison, can the above-mentioned interface call request be responded to. If any one of the signature verification processing method and the data processing method is inconsistent in comparison, it is considered that the verification has failed, and thus the external interface adaptation request cannot be responded to. Specifically, when responding to the external interface adaptation request, the function module corresponding to the corresponding interface can be opened to the interface adaptation module of the ONS system, and the request parameters in the external interface adaptation request sent by the interface adaptation module are processed through the function module, and the processing result is returned to the interface adaptation module. After the OMS system is successfully adapted to the external interface, the OMS system can communicate with the external interface and obtain the business data of the system corresponding to the external interface through the external interface, thereby processing the business data.

[0046] In an embodiment of the present invention, the request parameters are verified according to the processing method corresponding to the preset interface. When the verification passes, the interface is adapted and called. By verifying the external interface adaptation request, the external interface to be called is quickly and accurately located, thereby improving the security of the interface adaptation call.

[0047] See also Figure 2 The second embodiment of the external interface adaptation method based on the OMS system in the embodiment of the present invention includes:

[0048] 201, when detecting that there is an external interface adaptation request in the OMS system, extracting request parameters in the external interface adaptation request;

[0049] The OMS system adapts and connects with the interface of the external system through a unified entrance to obtain the business data of the external system. When it is necessary to connect with the interface of the external system, the interface adaptation module inside the OMS system sends an external interface adaptation request and detects the external interface adaptation request, wherein the external interface adaptation request carries request parameters.

[0050] When an external interface adaptation request is detected inside the OMS system, the request parameters in the external interface adaptation request are extracted, and the interface address is requested through POST, the interface entry file is obtained through the interface address, and the interface entry file is called to parse the request parameters in the external interface adaptation request, wherein the request parameters include but are not limited to the interface name, verification method and verification parameters.

[0051] 202, calling a preset parameter parsing function to parse the request parameters and obtain parsed data;

[0052] The OMS system presets a parameter parsing function. When an external interface adaptation request is detected, the request parameters in the external interface adaptation request are extracted, and the preset parameter parsing function is called to parse the request parameters to obtain parsed data. The parsed data includes but is not limited to the interface name, verification method and verification parameters; the verification method includes but is not limited to the first signature verification processing method and the first data processing method; in addition, calling the parameter parsing function to parse the request parameters is a prior art and will not be described in detail here.

[0053] 203, searching the preset interface configuration table for an interface corresponding to the interface name in the parsed data, and extracting a processing method corresponding to the interface;

[0054] The OMS system pre-acquires interface information corresponding to all external interfaces, and based on the interface information, configures all external interfaces, and enters the interface information corresponding to the external interfaces into the interface configuration table preset in the internal database of the OMS system, wherein the interface information includes but is not limited to the interface name, interface docking platform, data direction, class name and processing method; the processing method includes but is not limited to the second signature verification processing method and the second data processing method.

[0055] After parsing the request parameters in the external interface adaptation request to obtain the parsed data, extract the interface name in the parsed data, and use the interface name to search the interface information corresponding to the interface name from the interface configuration table. This process is equivalent to searching all external interfaces for the interface corresponding to the interface name of the interface that the OMS system needs to make an adaptation request and its processing method. For ease of distinction, the interface that the OMS system needs to make an adaptation request is taken as the first interface, and the interface corresponding to the interface name of the interface that the OMS system needs to make an adaptation request is taken as the second interface.

[0056] 204, extracting the verification parameter in the parsed data;

[0057] 205, constructing a first character string to be signed using the verification parameter according to the first signature verification processing method in the parsed data;

[0058] Extract the verification parameter in the parsed data, and convert the verification parameter into a first character string to be signed according to the first signature verification processing method in the parsed data. Specifically, based on the first signature verification processing method, extract the name characters in the verification parameter; sort the verification parameter in ascending order according to the name characters to obtain a character sequence; call the connector preset in the OMS system to concatenate the character sequence to generate the first character string to be signed.

[0059] 206, calling a preset encryption algorithm to encrypt the first character string to be signed and generate a first signature;

[0060] The OMS system has a preset MD5 encryption algorithm. When it is detected that a first character string to be signed is generated, the MD5 encryption algorithm is called to encrypt the first character string to be signed, thereby converting the first character string to be signed into a first signature.

[0061] 207, constructing a second character string to be signed according to the second signature verification processing method in the processing method using the verification parameter;

[0062] Consistent with the generation process of the first character string to be signed, the generation process of the second character string to be signed is: based on the second signature verification processing method, extract the name characters in the verification parameters; sort the verification parameters in ascending order according to the name characters to obtain a character sequence; call the connector preset in the OMS system to concatenate the character sequence to generate the second character string to be signed.

[0063] 208, calling a preset encryption algorithm to encrypt the second character string to be signed and generate a second signature;

[0064] When it is detected that the second character string to be signed is generated, the MD5 encryption algorithm is called to encrypt the second character string to be signed, thereby converting the first character string to be signed into a first signature.

[0065] 209, comparing the first signature and the second signature to see whether they are consistent;

[0066] The generated first signature is compared with the second signature, that is, the characters in the first signature and the second signature are compared one by one. If the characters in the first signature and the second signature are consistent, it means that the first signature and the second signature are consistent. If the characters in the first signature and the second signature are inconsistent, it means that the first signature and the second signature are inconsistent.

[0067] 210, if the first signature is consistent with the second signature, the signature comparison result is that the first signature verification processing method is consistent with the second signature verification processing method;

[0068] When the first signature is consistent with the second signature, it is determined that the first signature verification processing method is consistent with the second signature verification processing method, that is, the signature comparison result is that the first signature verification processing method is consistent with the second signature verification processing method.

[0069] 211, analyzing and verifying the data processing method in the parsed data and the data processing method in the processing method to obtain a verification result;

[0070] When the signature comparison result shows that the first signature verification processing method and the second signature verification processing method are consistent, the parsed data and the data processing method in the processing method are analyzed and verified. Specifically, the first data conversion method in the parsed data and the second data conversion method in the processing method are analyzed and compared, and the first data filtering method in the parsed data and the second data filtering method in the processing method are analyzed and compared to obtain the verification result. Specifically, the verification parameters are converted into data formats according to the first data conversion method and the second data conversion method respectively to generate the first data and the second data, and the first data and the second data are compared. If the first data is consistent with the second data, it is determined that the first data conversion method is consistent with the second data conversion method. The verification parameters are filtered according to the first data filtering method and the second data filtering method respectively to generate the third data and the fourth data, and the third data and the fourth data are compared. If the third data and the fourth data are consistent, it is determined that the first data filtering method is consistent with the second data filtering method, and the result of the comparison of the data conversion method and the data filtering method is used as the verification result.

[0071] 212. According to the verification result, the interface is adapted to the external interface.

[0072] The OMS system receives the verification result through its interface adapter module, and determines whether the external interface is successfully adapted based on the verification result. When the verification result shows that the verification method of the first interface is consistent with the processing method of the second interface, the OMS system is successfully adapted to the external interface, and a successful adaptation message is generated inside the OMS system. The message carries a successful adaptation identifier, and the OMS system can capture and identify it through the interface adapter module. When the OMS system receives successful adaptation information through the interface adapter module, for information with a large amount of data, a kafka queue or rabbitMQ queue can generally be used to shorten the information transmission time and improve the system's ability and efficiency to collect information at the same time.

[0073] Specifically, only when the first signature verification processing method and the second signature verification processing method are consistent in comparison, and the first data processing method and the second data processing method are consistent in comparison, can the above-mentioned interface call request be responded to. If any one of the signature verification processing method and the data processing method is inconsistent in comparison, it is considered that the verification has failed, and thus the external interface adaptation request cannot be responded to. Specifically, when responding to the external interface adaptation request, the function module corresponding to the corresponding interface can be opened to the interface adaptation module of the ONS system, and the request parameters in the external interface adaptation request sent by the interface adaptation module are processed through the function module, and the processing result is returned to the interface adaptation module. After the OMS system is successfully adapted to the external interface, the OMS system can communicate with the external interface and obtain the business data of the system corresponding to the external interface through the external interface, thereby processing the business data.

[0074] In the embodiment of the present invention, by comparing the request parameters with the signature verification processing method and the data processing method in the preset processing method, the request parameters are automatically verified, which improves the verification efficiency, reduces the false detection rate, and thus reduces the verification cost.

[0075] See also Figure 3 The third embodiment of the external interface adaptation method based on the OMS system in the embodiment of the present invention includes:

[0076] 301, when detecting that there is an external interface adaptation request in the OMS system, extracting request parameters in the external interface adaptation request;

[0077] The OMS system adapts and connects with the interface of the external system through a unified entrance to obtain the business data of the external system. When it is necessary to connect with the interface of the external system, the OMS system sends an external interface adaptation request internally and detects the external interface adaptation request, wherein the external interface adaptation request carries request parameters.

[0078] When an external interface adaptation request is detected inside the OMS system, the request parameters in the external interface adaptation request are extracted, and the interface address is requested through POST, the interface entry file is obtained through the interface address, and the interface entry file is called to parse the request parameters in the external interface adaptation request, wherein the request parameters include but are not limited to the interface name and the verification method.

[0079] 302, calling a preset parameter parsing function to parse the request parameters and obtain parsed data;

[0080] The OMS system presets a parameter parsing function. When an external interface adaptation request is detected, the request parameters in the external interface adaptation request are extracted, and the preset parameter parsing function is called to parse the request parameters to obtain parsed data. The parsed data includes but is not limited to the interface name, verification method and verification parameters; the verification method includes but is not limited to the first signature verification processing method and the first data processing method; in addition, calling the parameter parsing function to parse the request parameters is a prior art and will not be described in detail here.

[0081] 303, searching the preset interface configuration table for an interface corresponding to the interface name in the parsed data, and extracting a processing method corresponding to the interface;

[0082] The OMS system pre-acquires interface information corresponding to all external interfaces, and based on the interface information, configures all external interfaces, and enters the interface information corresponding to the external interfaces into the interface configuration table preset in the internal database of the OMS system, wherein the interface information includes but is not limited to the interface name, interface docking platform, data direction, class name and processing method; the processing method includes but is not limited to the second signature verification processing method and the second data processing method.

[0083] After parsing the request parameters in the external interface adaptation request to obtain the parsed data, extract the interface name in the parsed data, and use the interface name to search the interface information corresponding to the interface name from the interface configuration table. This process is equivalent to searching all external interfaces for the interface corresponding to the interface name of the interface that the OMS system needs to make an adaptation request and its processing method. For ease of distinction, the interface that the OMS system needs to make an adaptation request is taken as the first interface, and the interface corresponding to the interface name of the interface that the OMS system needs to make an adaptation request is taken as the second interface.

[0084] 304, extracting the verification parameter in the parsed data;

[0085] Extract the verification parameter in the parsed data, and convert the verification parameter into a first character string to be signed according to the first signature verification processing method in the parsed data. Specifically, based on the first signature verification processing method, extract the name characters in the verification parameter; sort the verification parameter in ascending order according to the name characters to obtain a character sequence; call the connector preset in the OMS system to concatenate the character sequence to generate the first character string to be signed.

[0086] 305, extracting name characters in the verification parameter based on the first signature verification processing method;

[0087] 306, sorting the verification parameters in ascending order according to the name characters to obtain a character sequence;

[0088] 307, calling a preset connector to concatenate the character sequence to generate a character string to be signed;

[0089] The OMS system converts all request parameters into signatures according to the first signature verification processing method, except for the sign character end; specifically, all request parameters are arranged in ascending order according to the name characters (parameter names are not allowed to be the same) to generate a character sequence; if the parameter value contains Chinese characters, the character set encoding needs to be set to UTF-8; if the parameter value is empty, then the parameter does not participate in the signature; the cooperation key preset in the OMS system is used as the last parameter, and its parameter name is: key, and the parameter value is the cooperation key itself; the request parameters are concatenated with the preset connector "&", and during the concatenation process, the request parameters are arranged in ascending order according to the name characters, that is, the connector is called to concatenate the character sequence to generate the first string to be signed.

[0090] 308, calling a preset encryption algorithm to encrypt the first character string to be signed and generate a first signature;

[0091] When it is detected that there is a first character string to be signed inside the OMS system, the MD5 encryption algorithm preset inside the OMS system is called to encrypt the first character string to be signed to generate a first signature, wherein the first signature is 32 lowercase characters, and the first signature is the value of sign in the public parameters inside the OMS system. It should be noted that calling the MD5 encryption algorithm to encrypt the character string to be signed to generate a signature is a prior art and will not be described in detail here.

[0092] 309, constructing a second character string to be signed using the verification parameter according to the second signature verification processing method;

[0093] The OMS system converts all request parameters into signatures according to the second signature verification processing method, except for the sign character end; specifically, all request parameters are arranged in ascending order according to the name characters (parameter names are not allowed to be the same) to generate a character sequence; if the parameter value contains Chinese characters, the character set encoding needs to be set to UTF-8; if the parameter value is empty, then the parameter does not participate in the signature; the cooperation key preset in the OMS system is used as the last parameter, and its parameter name is: key, and the parameter value is the cooperation key itself; the request parameters are concatenated with the preset connector "&", and during the concatenation process, the request parameters are arranged in ascending order according to the name characters, that is, the connector is called to concatenate the character sequence to generate the second string to be signed.

[0094] 310, calling a preset encryption algorithm to encrypt the second character string to be signed and generate a second signature;

[0095] When it is detected that there is a second string to be signed inside the OMS system, the MD5 encryption algorithm preset inside the OMS system is called to encrypt the second string to be signed to generate a second signature, where the second signature is 32 lowercase characters, and the second signature is the value of sign in the public parameters inside the OMS system. It should be noted that calling the MD5 encryption algorithm to encrypt the string to be signed to generate a signature is a prior art and will not be described in detail here.

[0096] 311, comparing the first signature and the second signature to see whether they are consistent;

[0097] After the first signature and the second signature are generated, the first signature and the second signature are compared, that is, the characters in the first signature and the second signature are compared one by one. If the characters in the first signature and the second signature are consistent, it means that the first signature is consistent with the second signature. If the characters in the first signature and the second signature are inconsistent, it means that the first signature is inconsistent with the second signature.

[0098] 312, if the first signature is consistent with the second signature, the signature comparison result is that the first signature verification processing method is consistent with the second signature verification processing method;

[0099] When the first signature is consistent with the second signature, it is determined that the first signature verification processing method is consistent with the second signature verification processing method, that is, the signature comparison result is that the first signature verification processing method is consistent with the second signature verification processing method.

[0100] 313, analyzing and verifying the data processing method in the parsed data and the data processing method in the processing method to obtain a verification result;

[0101] When the signature comparison result shows that the first signature verification processing method and the second signature verification processing method are consistent, the parsed data and the data processing method in the processing method are analyzed and verified. Specifically, the first data conversion method in the parsed data and the second data conversion method in the processing method are analyzed and compared, and the first data filtering method in the parsed data and the second data filtering method in the processing method are analyzed and compared to obtain the verification result. Specifically, the verification parameters are converted into data formats according to the first data conversion method and the second data conversion method respectively to generate the first data and the second data, and the first data and the second data are compared. If the first data is consistent with the second data, it is determined that the first data conversion method is consistent with the second data conversion method. The verification parameters are filtered according to the first data filtering method and the second data filtering method respectively to generate the third data and the fourth data, and the third data and the fourth data are compared. If the third data and the fourth data are consistent, it is determined that the first data filtering method is consistent with the second data filtering method, and the result of the comparison of the data conversion method and the data filtering method is used as the verification result.

[0102] Furthermore, the data processing method also includes an interface business process processing method, which analyzes and compares the first interface business process processing method in the verification method and the second interface business process processing method in the processing method, that is, calls the verification parameters, performs business process processing according to the first interface business process processing method and the second interface business process processing method, respectively, obtains the first business process and the second business process, compares whether the first business process and the second business process are consistent, and uses the comparison result as the verification result.

[0103] By comparing the signature verification processing method, data conversion method, data filtering method and interface business process processing method, if the above four methods are all compared and consistent, the verification result is that the verification method is consistent with the processing method, that is, the first interface is consistent with the second interface, and the OMS system can communicate with the second interface.

[0104] 314, performing external interface adaptation on the interface according to the verification result;

[0105] The OMS system receives the verification result through its interface adapter module, and determines whether the external interface is successfully adapted based on the verification result. When the verification result shows that the verification method of the first interface is consistent with the processing method of the second interface, the OMS system is successfully adapted to the external interface, and a successful adaptation message is generated inside the OMS system. The message carries a successful adaptation identifier, and the OMS system can capture and identify it through the interface adapter module. When the OMS system receives successful adaptation information through the interface adapter module, for information with a large amount of data, a kafka queue or rabbitMQ queue can generally be used to shorten the information transmission time and improve the system's ability and efficiency to collect information at the same time.

[0106] Specifically, when the first signature verification processing method and the second signature verification processing method are consistent in comparison, and the first data processing method and the second data processing method are consistent in comparison, the above-mentioned interface call request can be responded to. If any one of the signature verification processing method and the data processing method is inconsistent in comparison, it is considered that the verification has failed, and thus the external interface adaptation request cannot be responded to. Specifically, when responding to the external interface adaptation request, the functional module corresponding to the corresponding interface can be opened to the interface adaptation module of the OMS system, and the request parameters in the external interface adaptation request sent by the interface adaptation module are processed through the functional module, and the processing result is returned to the interface adaptation module.

[0107] 315, obtaining business data from the external interface, and extracting the interface business process processing method corresponding to the external interface from the interface configuration table;

[0108] 316, performing business process processing on the business data according to the interface business process processing method.

[0109] When the OMS system is successfully adapted to the external interface, the OMS system communicates with the external interface and obtains the business data of the downstream WNS system corresponding to the external interface through the external interface, thereby processing the business data. Specifically, the business data is obtained from the external interface, and the interface business process processing method corresponding to the external interface is extracted from the interface configuration table inside the OMS system, and the business data is processed according to the interface business process processing method.

[0110] Furthermore, the OMS system accesses the downstream WMS system by connecting to an external interface. Based on the message returned by the WMS system, it splices and returns the message to the upstream, records data and logs, and records the total request record duration, so that when the interface access is abnormal, the developer can check the abnormal problem.

[0111] In an embodiment of the present invention, a first signature is generated by a verification parameter in a request parameter using a first signature verification processing method, and a second signature is generated by a second signature verification processing method. By comparing whether the first signature and the second signature are consistent, the request parameters are verified, thereby improving the accuracy of the verification result.

[0112] The above describes the external interface adaptation method based on the OMS system in the embodiment of the present invention. The following describes the external interface adaptation device based on the OMS system in the embodiment of the present invention. Please refer to Figure 4 An embodiment of the external interface adaptation device based on the OMS system in the embodiment of the present invention includes:

[0113] The detection module 401 is used to detect that there is an external interface adaptation request in the OMS system and extract the request parameters in the external interface adaptation request;

[0114] Extraction module 402, used to extract the interface name in the request parameter, and extract the interface corresponding to the interface name and its processing method from the preset interface configuration table;

[0115] Verification module 403, used to verify the request parameters according to the processing method to obtain a verification result;

[0116] The adaptation module 404 is used to perform external interface adaptation on the interface according to the verification result.

[0117] The external interface adaptation device based on the OMS system provided in the embodiment of the present invention verifies the request parameters through the processing method corresponding to the preset interface. When the verification passes, the interface is adapted and called. By verifying the external interface adaptation request, the external interface to be called is quickly and accurately located, thereby improving the security of the interface adaptation call.

[0118] See also Figure 5 Another embodiment of the external interface adaptation device based on the OMS system in the embodiment of the present invention includes:

[0119] The detection module 401 is used to detect that there is an external interface adaptation request in the OMS system and extract the request parameters in the external interface adaptation request;

[0120] Extraction module 402, used to extract the interface name in the request parameter, and extract the interface corresponding to the interface name and its processing method from the preset interface configuration table;

[0121] Verification module 403, used to verify the request parameters according to the processing method to obtain a verification result;

[0122] The adaptation module 404 is used to perform external interface adaptation on the interface according to the verification result.

[0123] Optionally, the extraction module 402 is specifically used for:

[0124] Calling a preset parameter parsing function to parse the request parameters to obtain parsed data, wherein the parsed data includes a verification parameter, an interface name, a first signature verification processing method, and a first data processing method;

[0125] An interface corresponding to the interface name in the parsed data is searched from a preset interface configuration table, and a processing method corresponding to the interface is extracted, wherein the processing method includes a second signature verification processing method and a second data processing method.

[0126] Optionally, the verification module 403 includes:

[0127] The comparison unit 4031 is used to compare the first signature verification processing method in the parsed data with the second signature verification processing method in the processing method to obtain a signature comparison result;

[0128] The verification unit 4032 is used to analyze and verify the data processing method in the parsed data and the data processing method in the processing method when the signature comparison result shows that the first signature verification processing method and the second signature verification processing method are consistent, to obtain a verification result.

[0129] Optionally, the comparison unit 4031 includes:

[0130] An extraction subunit 40311 is used to extract the verification parameters in the parsed data;

[0131] The first construction subunit 40312 is used to construct a first character string to be signed according to the first signature verification processing method in the parsed data using the verification parameter;

[0132] The first encryption unit 40313 is used to call a preset encryption algorithm to encrypt the first character string to be signed and generate a first signature;

[0133] The second construction subunit 40314 is used to construct a second character string to be signed according to the second signature verification processing method in the processing method by using the verification parameter;

[0134] The second encryption subunit 40315 is used to call the encryption algorithm to encrypt the second character string to be signed and generate a second signature;

[0135] The comparison subunit 40316 is used to compare whether the first signature and the second signature are consistent. If they are consistent, the signature comparison result is that the first signature verification processing method and the second signature verification processing method are consistent.

[0136] Optionally, the first construction subunit 40312 is specifically used for:

[0137] Based on the first signature verification processing method, extract the name characters in the verification parameter;

[0138] Sort the verification parameters in ascending order according to the name characters to obtain a character sequence;

[0139] A preset connector is called to concatenate the character sequence to generate a first character string to be signed.

[0140] Optionally, the verification unit 4032 is specifically used for:

[0141] The data conversion method in the parsed data and the data conversion method in the processing method are analyzed and compared, and the data filtering method in the parsed data and the data filtering method in the processing method are analyzed and compared to obtain a verification result.

[0142] Optionally, the OMS-based external interface adaptation device further includes a processing module 405, which is specifically used to:

[0143] Acquire business data from the external interface, and extract the interface business process processing method corresponding to the external interface from the interface configuration table;

[0144] The business data is processed according to the interface business process processing method.

[0145] The external interface adapter device based on the OMS system provided in the embodiment of the present invention automatically verifies the request parameters by comparing the request parameters with the signature verification processing method and the data processing method in the preset processing method, thereby improving the verification efficiency, reducing the false detection rate, and thus reducing the verification cost.

[0146] See also Figure 6 , an embodiment of the external interface adapter device in the embodiment of the present invention is described in detail below from the perspective of hardware processing.

[0147] Figure 6 It is a structural schematic diagram of an external interface adapter device based on an OMS system provided by an embodiment of the present invention. The external interface adapter device 600 based on the OMS system may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 610 (for example, one or more processors) and a memory 620, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 633 or data 632. Among them, the memory 620 and the storage medium 630 can be short-term storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the external interface adapter device 600 based on the OMS system. Furthermore, the processor 610 can be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the external interface adapter device 600 based on the OMS system.

[0148] The external interface adapter device 600 based on the OMS system may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and or, one or more operating systems 631, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 6 The illustrated structure of the external interface adapter device based on the OMS system does not constitute a limitation on the external interface adapter device based on the OMS system, and may include more or less components than illustrated, or a combination of certain components, or a different arrangement of components.

[0149] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the external interface adaptation method based on the OMS system.

[0150] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0152] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An external interface adaptation method based on an OMS system, characterized in that: The external interface adaptation method based on the OMS system includes: When detecting that there is an external interface adaptation request inside the OMS system, extracting request parameters in the external interface adaptation request; Extracting the interface name in the request parameter, and extracting the interface corresponding to the interface name and its processing method from the preset interface configuration table; According to the processing method, the request parameters are verified to obtain a verification result; According to the verification result, performing external interface adaptation on the interface; The method of extracting the interface name in the request parameter and extracting the interface corresponding to the interface name from the preset interface configuration table and the processing method thereof include: Calling a preset parameter parsing function to parse the request parameters to obtain parsed data, wherein the parsed data includes a verification parameter, an interface name, a first signature verification processing method, and a first data processing method; Searching for an interface corresponding to the interface name in the parsed data from a preset interface configuration table, and extracting a processing method corresponding to the interface, wherein the processing method includes a second signature verification processing method and a second data processing method; According to the processing method, the request parameters are verified to obtain the verification result, which includes: Comparing the first signature verification processing method in the parsed data with the second signature verification processing method in the processing method to obtain a signature comparison result; When the signature comparison result shows that the first signature verification processing method and the second signature verification processing method are consistent, the first data processing method in the parsed data and the second data processing method in the processing method are analyzed and verified to obtain a verification result.

2. The external interface adaptation method based on the OMS system according to claim 1 is characterized in that: The comparing the first signature verification processing method in the parsed data with the second signature verification processing method in the processing method to obtain a signature comparison result includes: Extracting verification parameters from the parsed data; Constructing a first character string to be signed using the verification parameter according to the first signature verification processing method in the parsed data; Calling a preset encryption algorithm to encrypt the first character string to be signed and generate a first signature; Constructing a second character string to be signed by using the verification parameter according to the second signature verification processing method in the processing method; Calling the encryption algorithm to encrypt the second character string to be signed and generate a second signature; The first signature and the second signature are compared to see if they are consistent. If they are consistent, the signature comparison result is that the first signature verification processing method and the second signature verification processing method are consistent.

3. The external interface adaptation method based on the OMS system according to claim 2 is characterized in that: The constructing a first character string to be signed by using the verification parameter according to the first signature verification processing method in the parsed data comprises: Based on the first signature verification processing method, extract the name characters in the verification parameter; Sort the verification parameters in ascending order according to the name characters to obtain a character sequence; A preset connector is called to concatenate the character sequence to generate a first character string to be signed.

4. The external interface adaptation method based on the OMS system according to claim 1, characterized in that: The analyzing and verifying the data processing method in the parsed data and the data processing method in the processing method to obtain the verification result includes: The data conversion method in the parsed data and the data conversion method in the processing method are analyzed and compared, and the data filtering method in the parsed data and the data filtering method in the processing method are analyzed and compared to obtain a verification result.

5. The external interface adaptation method based on the OMS system according to any one of claims 1 to 4, characterized in that: After the interface is adapted to the external interface according to the verification result, the method further includes: Acquire business data from the external interface, and extract the interface business process processing method corresponding to the external interface from the interface configuration table; The business data is processed according to the interface business process processing method.

6. An external interface adapter device based on an OMS system, characterized in that: The external interface adapter device based on the OMS system includes: A detection module, used to detect that there is an external interface adaptation request inside the OMS system, and extract the request parameters in the external interface adaptation request; An extraction module, used to extract the interface name in the request parameter, and extract the interface corresponding to the interface name and its processing method from a preset interface configuration table; A verification module, used to verify the request parameters according to the processing method to obtain a verification result; An adaptation module, used for performing external interface adaptation on the interface according to the verification result; The extraction module is specifically used to: call a preset parameter parsing function to parse the request parameters to obtain parsed data, wherein the parsed data includes verification parameters, an interface name, a first signature verification processing method, and a first data processing method; search a preset interface configuration table for an interface corresponding to the interface name in the parsed data, and extract a processing method corresponding to the interface, wherein the processing method includes a second signature verification processing method and a second data processing method; The verification module includes: a comparison unit, which is used to compare the first signature verification processing method in the parsed data and the second signature verification processing method in the processing method to obtain a signature comparison result; a verification unit, which is used to analyze and verify the first data processing method in the parsed data and the second data processing method in the processing method to obtain a verification result when the signature comparison result shows that the first signature verification processing method and the second signature verification processing method are consistent.

7. The external interface adapter device based on the OMS system according to claim 6, characterized in that: The comparison unit is specifically used for: an extraction subunit, used for extracting the verification parameter in the parsed data; a first construction subunit, used for constructing a first character string to be signed according to the verification parameter according to the first signature verification processing method in the parsed data; A first encryption unit, used to call a preset encryption algorithm to encrypt the first character string to be signed and generate a first signature; A second construction subunit is used to construct a second character string to be signed according to the second signature verification processing method in the processing method by using the verification parameter; A second encryption subunit is used to call the encryption algorithm to encrypt the second character string to be signed and generate a second signature; The comparison subunit is used to compare whether the first signature and the second signature are consistent. If they are consistent, the signature comparison result is that the first signature verification processing method and the second signature verification processing method are consistent.

8. The external interface adapter device based on the OMS system according to claim 7, characterized in that: The first construction subunit is specifically used to: extract the name characters in the verification parameters based on the first signature verification processing method; sort the verification parameters in ascending order according to the name characters to obtain a character sequence; call a preset connector to concatenate the character sequence to generate a first character string to be signed.

9. An external interface adapter device based on an OMS system, characterized in that: The external interface adapter device based on the OMS system includes: A memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory to enable the OMS system-based external interface adaptation device to perform the steps of the OMS system-based external interface adaptation method according to any one of claims 1-5.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the external interface adaptation method based on the OMS system as described in any one of claims 1 to 5 are implemented.