Data callback method, device, equipment and computer readable storage medium

CN117499181BActive Publication Date: 2026-10-09AVATR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311523064.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2026-10-09
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

[0003]鉴于上述问题,本发明实施例提供了一种数据回调方法、装置、设备及计算机可读存储介质,用于解决现有技术中存在的数据回调无法返回正确的环境的问题

Benefits of technology

[0039] Therefore, the data callback method provided in this embodiment of the invention can quickly obtain the callback address of the third party from the first information by acquiring the first information, and retrieve the corresponding configuration item information through the callback address of the third party. Not only can the relevant configuration item information be retrieved according to the callback address of the third party, but the configuration item information can also be parsed to quickly match the interface environment that needs to be called back, thereby returning the callback data to the correct interface environment and improving the convenience of development and testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117499181B_ABST
    Figure CN117499181B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data callback, and provides a data callback method, device, equipment and computer readable storage medium, wherein the method is applied to a public routing gateway, and the method comprises the following steps: obtaining first information, wherein the first information at least comprises a callback address of a third party; calling corresponding configuration item information based on the first information; and forwarding callback data to a corresponding counterpart based on the configuration item information. The data callback method provided in the present application can solve the technical problem that data cannot return to a correct environment when being called back in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data callback technology, specifically to a data callback method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] In related technologies, data callbacks cannot return the correct environment. Summary of the Invention

[0003] In view of the above problems, embodiments of the present invention provide a data callback method, apparatus, device, and computer-readable storage medium to solve the problem that data callback in the prior art cannot return the correct environment.

[0004] According to one aspect of the present invention, a data callback method is provided, applied to a public routing gateway, the method comprising:

[0005] Obtain first information, wherein the first information includes at least the callback address of a third party;

[0006] Based on the first information, retrieve the corresponding configuration item information;

[0007] Based on the configuration information, the callback data is forwarded to the corresponding intermediary.

[0008] In one optional approach, retrieving the corresponding configuration item information based on the first information includes:

[0009] Based on the first information, obtain the request path of the third party's callback address;

[0010] The path variable matching the request path is obtained by querying the configuration item list through the request path;

[0011] The configuration item information is obtained from the configuration item list based on the path variable.

[0012] In one optional approach, the configuration item information includes at least path variables, business primary key field values, environment domain names, and response message processing information. Obtaining the configuration item information from the configuration item list based on the path variables includes:

[0013] Based on the path variable, the business primary key field value, environment domain name, and response message processing information that match the path variable are obtained from the configuration item list;

[0014] In one alternative approach, forwarding the callback data to the corresponding interfacing party based on the configuration information includes:

[0015] Determine whether the callback data requires signature verification or encryption;

[0016] When the callback data requires signature verification or encryption, the processing information of the response message is obtained based on the configuration item information;

[0017] The target strategy is invoked using the processing information to verify or decrypt the callback data, thereby obtaining a callback message.

[0018] The domain name of the environment to be forwarded is determined based on the callback message and the configuration item information;

[0019] The callback message is forwarded to the interface corresponding to the domain name of the environment to be forwarded.

[0020] In one alternative approach, determining the domain name of the environment to be forwarded based on the callback message and the configuration item information includes:

[0021] Obtain the primary key field of the business to be matched from the callback message;

[0022] The business primary key field value and environment domain name are obtained based on the configuration item information;

[0023] Match the business primary key field to be matched with the business primary key field value and the environment domain name;

[0024] When the business primary key field to be matched successfully matches the business primary key field value and the environment domain name, the environment domain name is used as the environment domain name to be forwarded.

[0025] In one alternative approach, matching the business primary key field to be matched with the business primary key field and the environment domain name includes:

[0026] The value of the primary key field of the business to be matched and the environment identifier are obtained based on the primary key field of the business to be matched.

[0027] The environment identifier and the environment domain name are matched, and the value of the business primary key field to be matched is matched with the value of the business primary key field.

[0028] In one alternative approach, prior to obtaining the first information, the method further includes:

[0029] Collect processing information from multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response messages;

[0030] A mapping relationship is established between the path variables, business primary key field values, environment domain names, and response message processing information based on multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response message processing information.

[0031] A configuration item list is established based on the mapping relationship, and the configuration item list is deployed.

[0032] According to another aspect of the present invention, a data callback device is provided, comprising:

[0033] The acquisition module is used to acquire first information, wherein the first information includes at least the callback address of a third party;

[0034] The retrieval module is used to retrieve the corresponding configuration item information based on the first information;

[0035] The forwarding module is used to forward callback data to the corresponding interface party based on the configuration item information.

[0036] According to another aspect of the present invention, a data callback device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus;

[0037] The memory is used to store at least one executable instruction that causes the processor to perform the data callback method as described above.

[0038] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one executable instruction that causes a data callback device / apparatus to perform the operation of the data callback method described above.

[0039] Therefore, the data callback method provided in this embodiment of the invention can quickly obtain the callback address of the third party from the first information by acquiring the first information, and retrieve the corresponding configuration item information through the callback address of the third party. Not only can the relevant configuration item information be retrieved according to the callback address of the third party, but the configuration item information can also be parsed to quickly match the interface environment that needs to be called back, thereby returning the callback data to the correct interface environment and improving the convenience of development and testing.

[0040] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0041] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0042] Figure 1A flowchart illustrating the data callback method provided in an embodiment of the present invention;

[0043] Figure 2 This is a flowchart illustrating the process of retrieving corresponding configuration item information based on first information, provided in an embodiment of the present invention.

[0044] Figure 3 This is a schematic diagram illustrating the process of forwarding callback data to the corresponding receiver based on configuration item information, as provided in an embodiment of the present invention.

[0045] Figure 4 This is a schematic diagram of the overall process of the data callback method provided in the embodiments of the present invention;

[0046] Figure 5 This is a schematic diagram of the process for creating a configuration item list according to an embodiment of the present invention;

[0047] Figure 6 This is a schematic diagram of the structure of the data callback device provided in an embodiment of the present invention;

[0048] Figure 7 This is a schematic diagram of the structure of an embodiment of the data callback device provided in this invention. Detailed Implementation

[0049] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0050] During system development, multiple environments are typically deployed, such as development (DEV), testing (TEST), staging (STG), and production (PRD), each with different characteristics and limitations. When interfacing with third-party external systems, the third party usually only provides two environments: TEST and PRD. This presents a problem: the interfacing system's DEV, TEST, and STG environments all need to interface with the third party's TEST environment. When asynchronous callbacks of data from the third-party system are required, the data cannot be returned to the correct environment. For example, if the interfacing system's business is undergoing acceptance testing in the STG environment, and the third party's callback address has been modified to match the interfacing system's STG environment, and the testers are performing a full-link regression in the TEST environment, the third party will return the data to the STG environment. This forces testers to simulate callbacks by capturing network packets and manually modifying data, causing significant inconvenience for both development and testing.

[0051] This invention first provides a data callback method, which is applied to a public routing gateway.

[0052] It should be noted that the above data callback method can be implemented through a processor deployed on a public routing gateway.

[0053] In one implementation, a configuration item list is deployed in the public routing gateway. The configuration item list includes multiple configuration item information. The public routing gateway is deployed between the third party and the interface party to receive data sent by the third party. The public routing gateway can connect to multiple interface parties and send the data sent by the third party system to multiple interface parties or one of the interface parties. This embodiment of the invention does not limit this.

[0054] Figure 1 This is a schematic diagram illustrating the data callback process of the data callback method provided in an embodiment of the present invention. This method is executed by a public routing gateway. Figure 1 As shown, the process may include steps 101 to 103:

[0055] Step 101: Obtain the first information.

[0056] The first piece of information includes at least the callback address of the third party.

[0057] For example, a public routing gateway may receive first information via a third-party callback.

[0058] In one implementation, when a third party and the interface partner are interfaced, they need to interface with the corresponding environment to perform data callbacks. The third party is an external system.

[0059] In one implementation, the third-party system can be a cloud computing service platform such as Tencent Cloud, which provides cloud infrastructure, data analysis, artificial intelligence and other cloud services. When data callbacks are made for cloud services, the cloud computing service platform connects with the other party.

[0060] In one implementation, the third party can also be a payment processing system, such as a payment gateway or a third-party payment provider, used to process online payment transactions. When making payment data callbacks, the payment processing system connects with the interfacing party.

[0061] In one implementation, the third party may also be an e-commerce platform, used to create online stores and sell products. When product sales data is retrieved, the e-commerce platform connects with the intermediary party.

[0062] In one implementation, the third party needs to register with the public routing gateway and provide relevant information, such as the callback address of the service. Therefore, when data callback is required, the third party will call back to the public routing gateway.

[0063] In one implementation, the first information is sent to the public routing gateway by a third party when making a data callback. The first information can be parsed by a processor deployed on the public routing gateway to obtain the callback address of the third party.

[0064] Step 102: Retrieve the corresponding configuration item information based on the first information.

[0065] For example, a public routing gateway can retrieve the corresponding configuration item information from its own storage space through the callback address in the first information.

[0066] In one embodiment, the configuration item information is located in a configuration item list, which can be pre-deployed in the storage space of the public routing gateway itself.

[0067] In one embodiment, the list of configuration items can also be pre-deployed on the cloud server to which the public routing gateway belongs.

[0068] In one embodiment, the configuration item information can be set according to requirements. For example, the configuration item information may include one or more of the following: path variables, business primary key field values, environment domain names, and response message processing information. It may also include other configuration item information. This embodiment of the invention does not limit this.

[0069] Step 103: Forward the callback data to the corresponding interface based on the configuration information.

[0070] For example, a public routing gateway can obtain the corresponding environment domain name or environment IP based on the configuration items in the obtained configuration information, and then forward the callback data to the corresponding recipient.

[0071] In one embodiment, the public routing gateway can parse the obtained configuration item information to obtain specific configuration items, and match the configuration items to obtain the corresponding environment domain name or environment IP.

[0072] Therefore, the data callback method provided in this embodiment of the invention can quickly obtain the callback address of the third party from the first information by acquiring the first information, and retrieve the corresponding configuration item information through the callback address of the third party. Not only can the relevant configuration item information be retrieved according to the callback address of the third party, but the configuration item information can also be parsed to quickly match the interface environment that needs to be called back, thereby returning the callback data to the correct interface environment and improving the convenience of development and testing.

[0073] Based on the foregoing embodiments, the data callback method provided in this invention may further include: Figure 2 The process shown is as follows: Figure 2 This is a flowchart illustrating the process of retrieving corresponding configuration item information based on first information, as provided in an embodiment of the present invention. Figure 2As shown, the process may include steps 201 to 203:

[0074] Step 201: Obtain the request path of the third party's callback address based on the first information.

[0075] For example, a public routing gateway can obtain the request path of the third-party callback address carried by the first information.

[0076] In one implementation, for example, if the third-party callback address is https: / / xxxx.xxxx.com / common-callback / system1, then the request path obtained through this callback address is system1.

[0077] Step 202: Query the configuration item list through the request path to obtain the path variable that matches the request path.

[0078] For example, a public routing gateway can query a list of configuration items by requesting a path to obtain the path variable that matches the request path.

[0079] In one implementation, the configuration item list includes multiple configuration item information, such as multiple path variables and a detailed description of each path variable.

[0080] In one implementation, the public routing gateway can obtain multiple path variables from a list of configuration items, and match the requested path with the multiple path variables to obtain a path variable that matches the requested path.

[0081] Step 203: Obtain configuration item information from the configuration item list based on the path variable.

[0082] For example, a public routing gateway can obtain configuration item information from the configuration item list based on path variables.

[0083] In one implementation, since it is a public routing gateway, there may be multiple third parties that need to be connected. Therefore, the remaining related configuration items can be obtained through path variables.

[0084] In one implementation, the configuration items in the configuration item list include path variables, business primary key field values, environment domain names, and response message processing information. The remaining configuration items in the configuration item list can be obtained through the path variables, thereby obtaining the configuration item information.

[0085] Therefore, the data callback method provided in this embodiment of the invention can determine the specific request path based on the callback address, quickly and specifically determine the path variable that matches it through the request path, and then obtain the remaining configuration items in the configuration item list based on the path variable. This not only makes the retrieved configuration item information comprehensive, but also enables the accurate determination of the interface environment based on the retrieved configuration item information.

[0086] Based on the foregoing embodiments, the data callback method provided in this embodiment of the invention includes at least path variables, business primary key field values, environment domain names, and response message processing information.

[0087] Retrieving configuration item information from the configuration item list based on path variables can be achieved through step A1:

[0088] Step A1: Based on the path variable, obtain the business primary key field value, environment domain name, and response message processing information that match the path variable from the configuration item list.

[0089] As shown in Table 1, Table 1 is a list of configuration items. The list of configuration items mainly includes the field name, field type and description of each configuration item. The corresponding configuration item information can be obtained by querying the list of configuration items.

[0090] Table 1

[0091]

[0092] For example, the configuration information includes at least the path variable, the business primary key field value, the environment domain name, and the processing information of the response message. The path variable `path` is the callback interface address of the third party, for example: ` / system`, and the field type of `path` is String. The business primary key field value `businessId` is the business primary key field name, for example: `businessId`, and the field type of `businessId` is String. The environment domain name `envTag` is the IP address or domain name corresponding to the interface environment, for example: `{"DEV":"http: / / xxx.dev.com","TEST":"http: / / xxx.test.com"}`, and the field type of `envTag` is Map.<String,String> The processing information signature of the response message is the signature verification method of the response message, and the field type of the processing information signature of the response message is String.

[0093] For example, a public routing gateway can query the configuration item list for other configuration items that match the path variable based on the path variable, and then compare the string with the path in the configuration item list.

[0094] In one implementation, for example, if the path variable is system1, the businessId, envTag, and signature information corresponding to system1 can be found in the configuration item list based on system1.

[0095] For example, a public routing gateway can obtain configuration item information based on path variables, business primary key field values, environment domain names, and response message processing information.

[0096] In one implementation, at least two of the following can be used as configuration items: path variable, business primary key field value, environment domain name, and response message processing information.

[0097] In one implementation, path variables, business primary key field values, environment domain names, and response message processing information are all treated as configuration items.

[0098] As can be seen from the above, the data callback method provided by the embodiments of the present invention can obtain the business primary key field value, environment domain name and response message processing information that match the path variable in the configuration item list based on the path variable, and obtain configuration item information based on the path variable, business primary key field value, environment domain name and response message processing information.

[0099] Therefore, since the configuration item information includes at least path variables, business primary key field values, environment domain names, and response message processing information, the relevant configuration items can be obtained comprehensively and quickly based on the path variables. Then, the corresponding configuration item information can be obtained through matching configuration items, thereby further improving the accuracy of the environment returned during data callback.

[0100] Based on the foregoing embodiments, the data callback method provided in this invention forwards callback data to the corresponding receiver based on configuration item information, which can be achieved through... Figure 3 The process shown is implemented as follows: Figure 3 This is a schematic diagram illustrating the process of forwarding callback data to the corresponding receiver based on configuration item information, as provided in an embodiment of the present invention. Figure 3 As shown, the process may include steps 301 to 305:

[0101] Step 301: Determine whether the callback data is verified or encrypted.

[0102] For example, a public routing gateway can determine whether the callback data is verified or encrypted.

[0103] In one implementation, the callback data from the third party is usually verified or encrypted, so it can be determined whether the callback data is verified or encrypted.

[0104] In one implementation, if the callback data is not verified or encrypted, the callback message can be obtained directly.

[0105] Step 302: When the callback data is subject to signature verification or encryption, obtain the processing information of the response message based on the configuration item information.

[0106] For example, a public routing gateway can obtain response message processing information based on configuration item information.

[0107] In one implementation, the configuration information includes a signature indicating the processing information of the response message.

[0108] In one implementation, the processing information of the response message is typically used to verify whether the received callback data has been tampered with and to ensure its authenticity.

[0109] In one implementation, the processing information of the response message may be signature verification logic or decryption method.

[0110] In one implementation, the processing information of the response message may be: digital signature, asymmetric decryption, hash function-based verification method, etc., and the embodiments of the present invention do not limit this.

[0111] Step 303: Verify or decrypt the callback data by calling the target strategy through information processing to obtain the callback message.

[0112] For example, a public routing gateway can process information and invoke the target policy to verify or decrypt the callback data to obtain a callback message.

[0113] In one implementation, the callback data from the third party is usually verified or encrypted. The specific processing strategy can be determined by the obtained processing information, thereby parsing the callback data to extract the plaintext message, i.e., the callback message.

[0114] For example, if the third-party callback data requires signature verification, the specific signature verification strategy can be determined by processing information, and the callback data can be verified using the signature verification strategy to obtain the callback message.

[0115] For example, if the third-party callback data is encrypted, the specific decryption strategy can be determined by processing the information, and then the callback data can be decrypted using the decryption strategy to obtain the callback message.

[0116] In one implementation, the public routing gateway interface typically uses encrypted transmission or requires signature verification. Different decryption or signature verification logic can be invoked based on the processed information signature. The target policy can be an RPC interface provided by the caller, or a component provided by the business party, invoked through the public routing gateway. This allows the callback data to be decrypted or verified using the target policy, resulting in a plaintext message.

[0117] Step 304: Determine the domain name of the environment to be forwarded based on the callback message and configuration item information.

[0118] For example, a public routing gateway can obtain the domain name of the environment to be forwarded based on callback messages and configuration information.

[0119] In one implementation, keywords can be extracted from the callback message through configuration information to obtain the key fields of the callback message, and the domain name of the environment to be forwarded can be determined through the key fields.

[0120] In one implementation, the domain name of the environment to be forwarded can be one of the development environment domain name, test environment domain name, pre-production environment domain name, and production environment domain name, or it can be other environment domain names. This embodiment of the invention does not limit this.

[0121] Step 305: Forward the callback message to the interface corresponding to the domain name of the environment to be forwarded.

[0122] For example, a public routing gateway can forward callback messages to the interface corresponding to the domain name of the environment to be forwarded.

[0123] In one implementation, after obtaining the domain name of the environment to be forwarded, the specific interface party can be determined based on the domain name of the environment to be forwarded.

[0124] In one implementation, for example, if the domain name of the environment to be forwarded is "DEV":"http: / / xxx.dev.com", then the corresponding interface can be determined as DEV, i.e., the development environment, based on the domain name of the environment to be forwarded.

[0125] In one implementation, once a specific interfacing is identified, the public routing gateway can forward the callback message to this interfacing. For example, if the interfacing is a DEV environment, the callback message will be forwarded to the DEV environment to complete the data callback.

[0126] As can be seen from the above, the data callback method provided in this embodiment of the invention can determine whether the callback data is subject to signature verification or encryption. When signature verification or encryption is present, the processing information of the response message is obtained based on the configuration information. The processing information is then used to invoke the target policy to verify or decrypt the callback data, resulting in a callback message. Based on the callback message and configuration information, the domain name of the environment to be forwarded is obtained. The callback message is then forwarded to the interface corresponding to the domain name of the environment to be forwarded. In practical applications, callback data is always subject to signature verification or encryption. Therefore, verifying or decrypting the callback data by invoking the target policy through the processing information ensures the security of the callback data transmission. Furthermore, the specific domain name of the environment to be forwarded is determined through the processed callback message and configuration information, thereby accurately forwarding the callback message to the correct interface environment and improving the effectiveness of data callback.

[0127] Based on the foregoing embodiments, the data callback method provided in this embodiment of the invention determines the domain name of the environment to be forwarded based on the callback message and configuration item information, which can be achieved through steps A2 to A5:

[0128] Step A2: Obtain the primary key field of the business to be matched from the callback message.

[0129] For example, a public routing gateway can obtain the primary key field of the business to be matched from the callback message.

[0130] In one implementation, the callback message carries the primary key field of the business to be matched. Therefore, the callback message can be parsed to obtain the primary key field of the business to be matched.

[0131] In one implementation, for example, if the callback message content is {"flowId":"aaaaa-DEV", "business attribute 1":"xxx", "business attribute 2":"xxxx"}, then the primary key field to be matched is: "flowId":"aaaaa-DEV".

[0132] Step A3: Obtain the business primary key field value and environment domain name based on the configuration item information.

[0133] For example, a public routing gateway can obtain the business primary key field value and the environment domain name based on the configuration item information.

[0134] In one implementation, the configuration item information consists of pre-configured configuration items from the interface party. Therefore, the business primary key field value and the environment domain name can be obtained through the acquired configuration item information.

[0135] In one implementation, the business primary key field value of the interface party and the environment domain name of the interface party can be obtained based on the configuration item information.

[0136] In one implementation, for example, the business primary key field obtained from the configuration item information is: "businessId":"XXXXX-DEV", and the environment domain name can be placed in the business primary key field, with the business primary key field value being businessId and the environment domain name being DEV.

[0137] Step A4: Match the business primary key field to be matched with the business primary key field value and the environment domain name.

[0138] For example, a public routing gateway can match the business primary key field to be matched with the business primary key field value and the environment domain name.

[0139] In one implementation, the business key field to be matched can be matched with the business primary key field value and environment domain name of the interface party obtained from the configuration item information.

[0140] Step A5: When the business primary key field to be matched successfully matches the business primary key field value and the environment domain name, the environment domain name is used as the environment domain name to be forwarded.

[0141] For example, a public routing gateway can use the environment domain name as the environment domain name to be forwarded when the business primary key field to be matched successfully matches the business primary key field value and the environment domain name.

[0142] In one implementation, for example, if the primary key field of the business to be matched is "flowId": "aaaaa-DEV", the primary key field of the business of the counterparty is "businessId": "XXXXX-DEV", and the environment domain name is DEV, then the key values ​​in the environment domain name envTag can be traversed to obtain "DEV", and "DEV" can be matched with "aaaaa-DEV". If the match is successful, this environment domain name can be used as the environment domain name to be forwarded, thereby forwarding the callback data to the DEB environment.

[0143] As can be seen from the above, the data callback method provided in this embodiment of the invention can obtain the business primary key field to be matched from the callback message; obtain the business primary key field value and environment domain name according to the configuration item information; match the business primary key field to be matched with the business primary key field value and the environment domain name; when the business primary key field to be matched successfully matches the business primary key field value and the environment domain name, the environment domain name is used as the environment domain name to be forwarded. By matching the business primary key field to be matched in the callback message with the business primary key field value and environment domain name in the configuration item information, the environment domain name to be forwarded can be quickly determined when the match is successful, and the callback data can be forwarded to the correct interface environment. The interface only needs to add an environment identifier to the business primary key, reducing the complexity of matching.

[0144] Based on the foregoing embodiments, the data callback method provided in this embodiment of the invention includes matching the business primary key field to be matched with the business primary key field and the environment domain name, which includes: obtaining the business primary key field value to be matched and the environment identifier based on the business primary key field to be matched; matching the environment identifier and the environment domain name; and matching the business primary key field value to be matched with the business primary key field value.

[0145] In one implementation, the primary key field of the business to be matched includes the primary key field value of the business to be matched and the environment identifier. For example, if the primary key field of the business to be matched is "flowId" and "aaaa-DEV", then the primary key field value of the business to be matched is flowId and the environment identifier is DEV.

[0146] In one implementation, the business primary key field value to be matched can be matched with the business primary key field value obtained through configuration item information, and the environment identifier can be matched with the environment domain name. When the business primary key field value to be matched matches the business primary key field value and the environment identifier matches the environment domain name, the match is determined to be successful.

[0147] Figure 4 This is a schematic diagram of the overall process of the data callback method provided in this embodiment of the invention. When a third-party service needs to perform a data callback, it sends first information to the public routing gateway. The public routing gateway determines whether signature verification or decryption is required based on the callback data. If signature verification or decryption is required, it performs signature verification or decryption on the callback data to obtain a plaintext message. If signature verification or decryption is not required, the signature verification or decryption fails and returns to the third-party service. The public routing gateway parses the business primary key field to be matched in the plaintext message, i.e., the businessId field, and matches it with the environment identifier engTag to determine the environment domain name to be forwarded. Then, it forwards the callback message to the interface corresponding to the environment domain name to be forwarded, such as one of the DEV environment, TEST environment, or STG environment.

[0148] As can be seen from the above, in the data callback method provided by the embodiments of the present invention, the value of the business primary key field to be matched and the environment identifier are obtained according to the business primary key field to be matched; the environment identifier and the environment domain name are matched, and the value of the business primary key field to be matched and the business primary key field value are matched.

[0149] Since the primary key field to be matched includes the primary key field value and the environment identifier, the correct interface environment can be quickly determined by matching the environment identifier with the environment domain name in the configuration item list and matching the primary key field value to be matched with the primary key field value in the configuration item list, so that the callback data is returned to the correct interface environment.

[0150] Based on the foregoing embodiments, the data callback method provided in this invention may further include: Figure 5 The process shown is as follows: Figure 5 This is a schematic diagram of the process for creating a configuration item list provided in an embodiment of the present invention, such as... Figure 5 As shown, the process may include steps 104 to 106:

[0151] Step 104: Collect processing information for multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response messages.

[0152] For example, a public routing gateway can collect processing information for multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response messages.

[0153] In one implementation, a public routing gateway can collect multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response message processing information in advance through network traffic records, thereby preparing for the establishment of a configuration item list.

[0154] Step 105: Establish a mapping relationship between path variables, business primary key field values, environment domain names, and response message processing information based on multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response message processing information.

[0155] For example, a public routing gateway can establish a mapping relationship between path variables, business primary key field values, environment domain names, and response message processing information based on multiple path variables, multiple business primary key field values, multiple environment domain names, and processing information of multiple response messages.

[0156] In one implementation, the relationship between path variables, business primary key field values, environment domain names, and signature verification information can be analyzed in advance. For example, different path variables, business primary key field values, environment domain names, and signature verification information of different callback data can be determined by different interfacing parties.

[0157] In one implementation, a mapping relationship can be established between different interface parties' path variables, business primary key field values, environment domain names, and signature verification information.

[0158] Step 106: Establish a configuration item list based on the mapping relationship and deploy the configuration item list.

[0159] For example, a public routing gateway can create a list of configuration items based on mapping relationships and deploy the list of configuration items.

[0160] In one implementation, a configuration item list can be established through mapping relationships. Configuration items such as path variables, business primary key field values, environment domain names, and response message processing information can be added to the configuration item list. The configuration item list can be deployed in the storage space of the public routing gateway or in the cloud, so that the corresponding configuration item information can be quickly retrieved when data callbacks are performed subsequently.

[0161] As can be seen from the above, the data callback method provided in this embodiment of the invention collects processing information of multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response messages; establishes a mapping relationship between the processing information of multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response messages; establishes a configuration item list based on the mapping relationship, and deploys the configuration item list.

[0162] Because the configuration item list is deployed in advance, the configuration item information in the configuration item list can be quickly retrieved when data callback is performed, thus improving the efficiency of data callback.

[0163] Based on the foregoing embodiments, this invention also provides a data callback device 6, which is applied to a public routing gateway. Figure 6 This is a schematic diagram of the structure of the data callback device 6 provided in an embodiment of the present invention, as shown below. Figure 6 As shown, the device may include:

[0164] The acquisition module 601 is used to acquire first information, wherein the first information includes at least the callback address of a third party;

[0165] The retrieval module 602 is used to retrieve the corresponding configuration item information based on the first information;

[0166] The forwarding module 603 is used to forward callback data to the corresponding interface party based on the configuration item information.

[0167] In some embodiments, the retrieval module 602 is used to obtain the request path of the callback address of the third party based on the first information; query the configuration item list through the request path to obtain the path variable that matches the request path; and obtain the configuration item information in the configuration item list based on the path variable.

[0168] In some embodiments, the retrieval module 602 is used to obtain, based on the path variable, the business primary key field value, the environment domain name, and the processing information of the response message that match the path variable from the configuration item list.

[0169] In some embodiments, the forwarding module 603 is used to determine whether the callback data has been verified or encrypted; when the callback data has been verified or encrypted, it obtains the processing information of the response message based on the configuration item information; it calls the target policy through the processing information to verify or decrypt the callback data to obtain the callback message; it determines the domain name of the environment to be forwarded based on the callback message and the configuration item information; and it forwards the callback message to the interface corresponding to the domain name of the environment to be forwarded.

[0170] In some embodiments, the forwarding module 603 is used to obtain the business primary key field to be matched from the callback message; obtain the business primary key field value and the environment domain name according to the configuration item information; match the business primary key field to be matched with the business primary key field value and the environment domain name; and when the business primary key field to be matched successfully matches the business primary key field value and the environment domain name, use the environment domain name as the environment domain name to be forwarded.

[0171] In some embodiments, the forwarding module 603 is used to obtain the value of the primary key field of the business to be matched and the environment identifier based on the primary key field of the business to be matched; match the environment identifier and the environment domain name; and match the value of the primary key field of the business to be matched with the value of the primary key field of the business.

[0172] In some embodiments, the data callback device 6 further includes a collection module and an establishment module, wherein:

[0173] The collection module is used to collect processing information from multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response messages;

[0174] The module is used to establish mapping relationships between path variables, business primary key field values, environment domains, and response message processing information based on multiple path variables, multiple business primary key field values, multiple environment domains, and processing information of multiple response messages.

[0175] The module is also used to create a list of configuration items based on mapping relationships and to deploy the list of configuration items.

[0176] For example, the above-mentioned acquisition module 601, retrieval module 602, forwarding module 603, collection module, and establishment module can be implemented through a public routing gateway.

[0177] As can be seen from the above, the data callback device 6 provided in this embodiment of the invention can not only quickly match the interface environment that needs to be callbacked, thereby returning the callback data to the correct interface environment and improving the convenience of development and testing, but also quickly retrieve the configuration item information in the configuration item list when performing data callback, thereby improving the efficiency of data callback.

[0178] Figure 7 This is a schematic diagram of the structure of an embodiment of the data callback device provided in this invention. The specific implementation of the data callback device is not limited by the specific embodiments of this invention.

[0179] like Figure 7 As shown, the data callback device may include: a processor 702, a communications interface 704, a memory 706, and a communications bus 708.

[0180] The processor 702, communication interface 704, and memory 706 communicate with each other via communication bus 708. Communication interface 704 is used to communicate with other network elements, such as clients or other servers. Processor 702 executes program 710, specifically performing the relevant steps described above in the data callback method embodiment.

[0181] Specifically, program 710 may include program code, which includes computer-executable instructions.

[0182] The processor 702 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The data callback device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0183] Memory 706 is used to store program 710. Memory 706 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0184] Specifically, program 710 can be invoked by processor 702 to cause the data callback device to perform the following operations:

[0185] Obtain first information, wherein the first information includes at least the callback address of the third party;

[0186] Retrieve the corresponding configuration item information based on the first piece of information;

[0187] Based on the configuration information, the callback data is forwarded to the corresponding interface party.

[0188] Therefore, in this embodiment of the invention, by obtaining the first information, the callback address of the third party can be quickly obtained from the first information. Furthermore, by retrieving the corresponding configuration item information through the callback address of the third party, the relevant configuration item information can be retrieved according to the callback address of the third party, and the configuration item information can be parsed to quickly match the interface environment that needs to be called back, thereby returning the callback data to the correct interface environment and improving the convenience of development and testing.

[0189] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on a data callback device / app, causes the data callback device / app to perform the data callback method in any of the above method embodiments.

[0190] Therefore, in this embodiment of the invention, by obtaining the first information, the callback address of the third party can be quickly obtained from the first information. Furthermore, by retrieving the corresponding configuration item information through the callback address of the third party, the relevant configuration item information can be retrieved according to the callback address of the third party, and the configuration item information can be parsed to quickly match the interface environment that needs to be called back, thereby returning the callback data to the correct interface environment and improving the convenience of development and testing.

[0191] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Furthermore, the embodiments of this invention are not directed to any particular programming language.

[0192] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. Similarly, for the sake of brevity and to aid in understanding one or more aspects of the invention, in the description of exemplary embodiments of the invention above, various features of the embodiments are sometimes grouped together in a single embodiment, figure, or description thereof. The claims, which follow the detailed description, are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.

[0193] Those skilled in the art will understand that the modules in the device of the embodiment can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiment can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components, except that at least some of such features and / or processes or units are mutually exclusive.

[0194] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A data callback method, characterized in that, Applied to public routing gateways, the method includes: Obtain first information, wherein the first information includes at least the callback address of a third party; Based on the first information, retrieve the corresponding configuration item information; Based on the configuration information, the callback data is forwarded to the corresponding intermediary. The step of retrieving the corresponding configuration item information based on the first information includes: Based on the first information, obtain the request path of the third party's callback address; The path variable matching the request path is obtained by querying the configuration item list through the request path; The configuration item information is obtained from the configuration item list based on the path variable.

2. The method according to claim 1, characterized in that, The configuration item information includes at least path variables, business primary key field values, environment domain names, and response message processing information. Obtaining the configuration item information from the configuration item list based on the path variables includes: Based on the path variable, the business primary key field value, environment domain name, and response message processing information that match the path variable are obtained from the configuration item list.

3. The method according to claim 1, characterized in that, The step of forwarding callback data to the corresponding interfacing party based on the configuration item information includes: Determine whether the callback data requires signature verification or encryption; When the callback data requires signature verification or encryption, the processing information of the response message is obtained based on the configuration item information; The target strategy is invoked using the processing information to verify or decrypt the callback data, thereby obtaining a callback message. The domain name of the environment to be forwarded is determined based on the callback message and the configuration item information; The callback message is forwarded to the interface corresponding to the domain name of the environment to be forwarded.

4. The method according to claim 3, characterized in that, The step of determining the domain name of the environment to be forwarded based on the callback message and the configuration item information includes: Obtain the primary key field of the business to be matched from the callback message; The business primary key field value and environment domain name are obtained based on the configuration item information; Match the business primary key field to be matched with the business primary key field value and the environment domain name; When the business primary key field to be matched successfully matches the business primary key field value and the environment domain name, the environment domain name is used as the environment domain name to be forwarded.

5. The method according to claim 4, characterized in that, The step of matching the business primary key field to be matched with the business primary key field and the environment domain name includes: The value of the primary key field of the business to be matched and the environment identifier are obtained based on the primary key field of the business to be matched. The environment identifier and the environment domain name are matched, and the value of the business primary key field to be matched is matched with the value of the business primary key field.

6. The method according to any one of claims 1 to 5, characterized in that, Before obtaining the first information, the process also includes: Collect processing information from multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response messages; A mapping relationship is established between the path variables, business primary key field values, environment domain names, and response message processing information based on multiple path variables, multiple business primary key field values, multiple environment domain names, and multiple response message processing information. A configuration item list is established based on the mapping relationship, and the configuration item list is deployed.

7. A data callback device, characterized in that, The device includes: The acquisition module is used to acquire first information, wherein the first information includes at least the callback address of a third party; The retrieval module is used to retrieve the corresponding configuration item information based on the first information; The forwarding module is used to forward callback data to the corresponding interface party based on the configuration item information; The retrieval module is further configured to obtain the request path of the callback address of the third party based on the first information; query the configuration item list through the request path to obtain the path variable that matches the request path; and obtain the configuration item information in the configuration item list based on the path variable.

8. A data callback device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the data callback method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on the data callback device / apparatus, causes the data callback device / apparatus to perform the operation of the data callback method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method and system

    CN111190750A

  • Multi-environment calling method, system, medium and device

    CN115827262A