Method for modifying callback address of service interface in self-service manner

By providing a method of self-service modification of service interface callback addresses, the inefficiency caused by channel merchants frequently changing service interface call addresses is solved, and the convenience of channel merchants' self-service modification and the liberation of labor force for technicians is achieved.

CN119440567APending Publication Date: 2025-02-14SHOUYUE TECH BEIJING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310958643.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-01
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, channel merchants frequently change service interface call addresses, resulting in frequent communication and manual adjustments by technicians, which is inefficient and wastes manpower.

Method used

Provide a method to self-service modification of the service interface callback address. By receiving requests, verifying parameters, querying encryption keys, verifying signatures, updating databases, recording operation logs, etc., it allows channel providers to self-service modification of the service interface callback address of the test and production environment. .

Benefits of technology

The channel merchants have realized the self-service modification of service interface addresses, which reduces the intervention of technicians, improves efficiency, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440567A_ABST
    Figure CN119440567A_ABST
Patent Text Reader

Abstract

The invention discloses a method for modifying a callback address of a service interface in a self-service manner, which comprises the following steps of: receiving a request for modifying the callback address of the service interface on a page, and requesting core parameters including an environment type, a service type, a new interface address, a signature verification string and a channel number; verifying whether the environment type, the service type, the new interface address, the signature verification string and the channel number are all not empty; querying an encryption key Key from a database according to the channel number; calling an original encryption interface service by taking a Key as an input parameter to obtain a signature verification string of our party; judging whether the interface return code is 0, and continuing if the interface return code is 0; judging whether the signature verification string of our party is consistent with the request parameter signature verification string or not; judging whether the environment type parameters are legal or not; judging whether the new interface address is legal or not; the channel side can modify the service interface callback address of the test and production environment in a self-service mode, convenience and rapidness are achieved, and experience is better; the modification process does not need the intervention of our person, thereby liberating the technical personnel of our side and reducing the labor cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of online car-hailing operation, and specifically relates to a method for self-service modification of a service interface callback address. Background Art

[0002] As the company cooperates with more and more channel partners, the total number of external service interfaces that need to be called back is also increasing. Each service interface has a global and unique calling address to match it, and the address is used to locate and identify the service interface. In order to test a certain business function or upgrade a certain service interface, each channel often informs us through communication groups or emails, allowing our technical staff to manually adjust the calling address of the service interface. This frequent communication and manual operation have related problems such as low efficiency and waste of manpower. The present invention aims to solve the above problems. Summary of the invention

[0003] The purpose of the present invention is to provide a method for self-service modification of a service interface callback address to solve the problems raised in the above background technology.

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] A method for self-service modification of a service interface callback address, comprising the following specific steps: S1: receiving a request for modification of a service interface callback address on a page, wherein the core parameters of the request include environment type, business type, new interface address, signature verification string, and channel number;

[0006] S2: Verify whether the environment type, business type, new interface address, signature verification string, and channel number are all valid. If they are all valid, continue. Otherwise, return an error.

[0007] S3: Query the encryption key Key from the database according to the channel number;

[0008] S4: Use the secret key as the input parameter to call the original encryption interface service to obtain our signature verification string;

[0009] S5: Determine whether the interface return code is 0. If it is 0, continue; otherwise, return an error prompt;

[0010] S6: Determine whether our verification string is consistent with the request parameter verification string. If they are consistent, continue. Otherwise, return a verification failure error.

[0011] S7: Determine whether the environment type parameter is legal. If it is legal, continue. Otherwise, return an illegal parameter error.

[0012] S8: Determine whether the new interface address is legal, if not, return; if legal, continue;

[0013] S9: If the environment type parameter is 1, execute the database SQL of the test environment to update the service interface callback address of the corresponding business type of the channel;

[0014] S10: If the environment type parameter is 2, execute the database SQL of the production environment to update the service interface callback address of the business type corresponding to the channel;

[0015] S11: Determine whether the update result of step S9 or step S10 is successful, if successful, continue, otherwise return an update failure error;

[0016] S12: Get the current system time;

[0017] S13: Save the above request parameters and the current system time as operation log records in the database;

[0018] S14: Return modification success;

[0019] S15: End.

[0020] Preferably, there are two parameter values ​​for the environment type, 1 for testing and 2 for production.

[0021] Preferably, the business type indicates the business purpose of the service interface, and its value is a number, such as: 1 indicates order status synchronization, and 2 indicates customer complaint callback notification.

[0022] Preferably, the function of the signature verification string is to verify the legitimacy of the request to modify the address, and the channel number is a globally unique string assigned by me to the channel, which is used to identify the channel.

[0023] Preferably, in step S7, whether the environment type parameter is legal is determined by determining whether the environment type parameter is 1 indicating testing, or 2 indicating production.

[0024] Preferably, in step S8, whether the new interface address is legal is determined based on whether it begins with http or https.

[0025] Compared with the prior art, the beneficial effects of the present invention are: the present invention provides a way for the channel to self-service modify the service interface address; the channel side can self-service modify the service interface callback address of the test and production environments, which is convenient and fast, and has a better experience; the modification process does not require the intervention of our personnel, which frees up our technical personnel and reduces labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] See also Figure 1 ,The present invention provides a technical solution: a method for self-service modification of service interface callback address, the specific steps include: S1: receiving a request for modifying the service interface callback address on a page, the core parameters of the request include environment type, business type, new interface address, signature verification string, and channel number;

[0029] S2: Verify whether the environment type, business type, new interface address, signature verification string, and channel number are all valid. If they are all valid, continue. Otherwise, return an error.

[0030] S3: Query the encryption key Key from the database according to the channel number;

[0031] S4: Use the secret key as the input parameter, call the original encryption interface service, and obtain our signature verification string;

[0032] The following is an example of the response from the encryption interface service:

[0033] {

[0034] "result":0, / / Interface return code: 0 for success, 1 for failure

[0035] "errmsg":"SUCCESS",

[0036] "data":{

[0037] "sign":"6db5a303a8c82fadc0a09b5f1fc4d699" / / The signature string calculated by us

[0038] }

[0039] }

[0040] S5: Determine whether the interface return code is 0. If it is 0, continue; otherwise, return an error prompt;

[0041] S6: Determine whether our verification string is consistent with the request parameter verification string. If they are consistent, continue. Otherwise, return a verification failure error.

[0042] S7: Determine whether the environment type parameter is legal. If it is legal, continue. Otherwise, return an illegal parameter error.

[0043] S8: Determine whether the new interface address is legal, if not, return; if legal, continue;

[0044] S9: If the environment type parameter is 1, execute the database SQL of the test environment to update the service interface callback address of the corresponding business type of the channel;

[0045] S10: If the environment type parameter is 2, execute the database SQL of the production environment to update the service interface callback address of the business type corresponding to the channel;

[0046] S11: Determine whether the update result of step S9 or step S10 is successful, if successful, continue, otherwise return an update failure error;

[0047] S12: Get the current system time;

[0048] S13: Save the above request parameters and the current system time as operation log records in the database;

[0049] S14: Return modification success;

[0050] S15: End.

[0051] In this embodiment, preferably, there are two parameter values ​​of the environment type, 1 represents testing, and 2 represents production.

[0052] In this embodiment, preferably, the business type indicates the business purpose of the service interface, and its value is a number, such as: 1 indicates order status synchronization, and 2 indicates customer complaint callback notification.

[0053] In this embodiment, preferably, the role of the signature verification string is to verify the legitimacy of the address modification request, and the channel number is a globally unique string allocated by my side to the channel and is used to identify the channel.

[0054] In this embodiment, preferably, in step S7, judging whether the environment type parameter is legal is performed by judging whether the environment type parameter is 1 indicating testing, or 2 indicating production.

[0055] In this embodiment, preferably, in step S8, whether the new interface address is legal is determined based on whether it starts with http or https.

[0056] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for self-service modification of a service interface callback address, characterized in that: The specific steps include: S1: Receive the request to modify the service interface callback address on the page. The core parameters of the request include environment type, business type, new interface address, signature verification string, and channel number. S2: Verify whether the environment type, business type, new interface address, signature verification string, and channel number are all valid. If they are all valid, continue. Otherwise, return an error. S3: Query the encryption key Key from the database according to the channel number; S4: Use the secret key as the input parameter to call the original encryption interface service to obtain our signature verification string; S5: Determine whether the interface return code is 0. If it is 0, continue; otherwise, return an error prompt; S6: Determine whether our verification string is consistent with the request parameter verification string. If they are consistent, continue. Otherwise, return a verification failure error. S7: Determine whether the environment type parameter is legal. If it is legal, continue. Otherwise, return an illegal parameter error. S8: Determine whether the new interface address is legal, if not, return; if legal, continue; S9: If the environment type parameter is 1, execute the database SQL of the test environment to update the service interface callback address of the corresponding business type of the channel; S10: If the environment type parameter is 2, execute the database SQL of the production environment to update the service interface callback address of the business type corresponding to the channel; S11: Determine whether the update result of step S9 or step S10 is successful, if successful, continue, otherwise return an update failure error; S12: Get the current system time; S13: Save the above request parameters and the current system time as operation log records in the database; S14: Return modification success; S15: End.

2. A method for self-service modification of service interface callback address according to claim 1, characterized in that: There are two parameter values ​​for the environment type, 1 for testing and 2 for production.

3. A method for self-service modification of service interface callback address according to claim 1, characterized in that: The business type indicates the business purpose of the service interface. Its value is a number, such as 1 for order status synchronization and 2 for customer complaint callback notification.

4. A method for self-service modification of service interface callback address according to claim 1, characterized in that: The function of the signature verification string is to verify the legitimacy of the request to modify the address. The channel number is a globally unique string assigned by me to the channel, which is used to identify the channel.

5. A method for self-service modification of service interface callback address according to claim 2, characterized in that: In step S7, whether the environment type parameter is legal is determined by determining whether the environment type parameter is 1 indicating testing or 2 indicating production.

6. A method for self-service modification of service interface callback address according to claim 1, characterized in that: In step S8, whether the new interface address is legal is determined by whether it begins with http or https.