CN110740163B - Idempotent control method, idempotent control device, electronic equipment and readable storage medium - Google Patents

Idempotent control method, idempotent control device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN110740163B
CN110740163B CN201910830805.1A CN201910830805A CN110740163B CN 110740163 B CN110740163 B CN 110740163B CN 201910830805 A CN201910830805 A CN 201910830805A CN 110740163 B CN110740163 B CN 110740163B
Authority
CN
China
Prior art keywords
interface
token
request
interface request
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910830805.1A
Other languages
Chinese (zh)
Other versions
CN110740163A (en
Inventor
王永建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huayun Data Holding Group Co Ltd
Original Assignee
Huayun Data Holding Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huayun Data Holding Group Co Ltd filed Critical Huayun Data Holding Group Co Ltd
Priority to CN201910830805.1A priority Critical patent/CN110740163B/en
Publication of CN110740163A publication Critical patent/CN110740163A/en
Application granted granted Critical
Publication of CN110740163B publication Critical patent/CN110740163B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides an idempotent control method, an idempotent control device, electronic equipment and a readable storage medium, wherein the idempotent control method comprises the steps that characteristic information in an interface request sent to a server by a calling terminal is obtained, a token uniquely corresponding to the interface request is generated according to the characteristic information of the interface request, the server is triggered to carry out business processing according to the interface request when the generated token does not exist, and the server gives up the interface request when the generated token exists. The idempotency of the interface request is effectively realized, and compared with the related technology, the calling terminal does not need to specially carry out the acquisition request of the token once, the flow of the calling terminal is simplified, and the experience is better for the user.

Description

Idempotent control method, idempotent control device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of information technology, and in particular, to an idempotent control method, apparatus, electronic device, and readable storage medium.
Background
With the rapid development of the internet, more and more websites open their own API (Application Program Interface) to the outside, and how to ensure the idempotency of the API is a very important topic.
At present, the implementation mode for ensuring the API idempotency is that a calling end requests a server end to obtain a token before requesting an API, the server end creates the token for the server end after receiving the request and stores the token in a cache, and then returns the token to the calling end. After the calling end has the token, generating an interface request carrying the token and sending the interface request to the server end, verifying the token by the server end, and if the token exists in the cache, deleting the token in the cache and performing service processing according to the interface request; if the token does not exist in the cache, the token is illegal, the verification is not passed, and the service end does not perform service processing according to the interface request. The implementation method requires the calling end to make at least two requests, the process complexity is high, the calling end is usually the user end, the calling end needs to make at least two requests, and the experience is not good for the user.
Disclosure of Invention
An objective of embodiments of the present application is to provide an idempotent control method, an idempotent control device, an electronic device, and a readable storage medium, so as to solve the problem that a call end needs to make at least two requests in the related art and the process complexity is high.
The embodiment of the application provides an idempotent control method, which comprises the following steps: acquiring characteristic information in an interface request sent to a server by a calling terminal; generating a token uniquely corresponding to the interface request according to the characteristic information of the interface request; tokens generated for the same interface request are the same; judging whether the same token is stored or not; if not, storing the token and returning first information to the server; the first information is used for triggering the server to call the interface requested by the interface request to perform service processing; if yes, the process is terminated, or second information is returned to the server; the second information is used for triggering the server to abandon the interface request.
In the implementation process, the feature information in the interface request sent by the calling terminal to the server terminal is acquired, a token uniquely corresponding to the interface request is generated according to the feature information of the interface request, the server terminal is triggered to perform service processing according to the interface request when the generated token does not exist, and the process is terminated or the server terminal is triggered to give up the interface request when the generated token exists. The idempotency of the interface request is effectively realized, and compared with the related technology, the calling terminal does not need to specially carry out the acquisition request of the token once, the flow of the calling terminal is simplified, and the experience is better for the user.
Further, the obtaining of the feature information in the interface request sent by the calling terminal to the server terminal includes: receiving a token generation request sent by the server; the token generation request comprises the characteristic information of the interface request; or, in the process of sending the interface request to the server side by the calling side, intercepting the interface request, and analyzing the interface request to obtain the characteristic information of the interface request.
In the implementation process, the characteristic information can be directly sent by the server side, and can also be actively intercepted and obtained in the process of sending the interface request to the server side by the calling side, so that the validity and the reliability of the control on the idempotent are ensured.
Further, the characteristic information requested by the interface includes: the interface method signature and request parameters of the interface request.
In the implementation process, the generation of the token is realized through the interface method signature and the request parameter of the interface request, the interface method signature and the request parameter have high identification degree for one interface request, and when the token is generated by adopting the interface method signature and the request parameter, the tokens generated by different interface request parameters can be effectively ensured to be different, so that the reliability of the scheme of the application is improved.
Further, the generating a token uniquely corresponding to the interface request according to the feature information of the interface request includes: and calculating the interface method signature and the request parameters of the interface request by adopting a Hash algorithm to obtain a token uniquely corresponding to the interface request.
In the implementation process, the signature of the interface method of the interface request and the request parameter are calculated through a Hash algorithm to obtain the token uniquely corresponding to the interface request, and the implementation is simple and the reliability is high.
Further, said saving said token comprises: storing the token into a preset database; the determining whether the same token has been stored comprises: determining whether the generated token already exists in the database.
In the implementation process, the token is stored in the preset database, and compared with the traditional way of storing the token in the cache, the token is stored for a long time, and the scheme reliability is higher.
Further, after the returning the first information to the server, the method further includes: when third information returned by the server is received, deleting the token; the third information is information generated by the server when the service processing fails.
In the implementation process, the server generates the third information when the service processing fails. When the third information returned by the server is received, the token of the interface request corresponding to the service can be deleted, so that when the server receives the interface request again, the result of judging whether the same token is stored is negative, and the server can perform service processing on the interface request again.
The embodiment of the application also provides an idempotent control method, which comprises the following steps: receiving an interface request; the interface request is a service request sent to a server by a calling terminal; when token verification information of the interface request returned by the idempotent device is received, if the token verification information is first information, calling the interface requested by the interface request to perform service processing; if the token verification information is second information, giving up the interface request; or, when the first information returned by the idempotent device is received in a preset duration, calling an interface requested by the interface request to perform service processing; and when the first information returned by the idempotent device is not received in the preset duration, the interface request is abandoned.
In the implementation process, an interface request is received; calling an interface requested by an interface request to perform service processing when first information returned by the idempotent device is received, and abandoning the interface request when second information returned by the idempotent device is received; or, when the first information returned by the idempotent device is not received within the preset duration, the interface request is abandoned. Therefore, the interface requested by the interface request is called for service processing only when the first information returned by the idempotent device is received, the idempotent of the interface request is effectively realized, and meanwhile, compared with the related technology, the calling end does not need to specially carry out a token acquisition request, the flow of the calling end is simplified, and the experience of a user is better.
Further, after receiving the interface request, the method further includes: sending a token generation request to an idempotent device; the token generation request includes the characteristic information of the interface request.
In the implementation process, the token generation request is sent to the idempotent device, and the token generation request contains the characteristic information of the interface request, so that the idempotent device can acquire the characteristic information of the interface request, and further generate a token uniquely corresponding to the interface request, and the reliability of token verification information returned by the idempotent device is ensured.
Further, the characteristic information requested by the interface includes: the interface method signature and request parameters of the interface request.
In the implementation process, the characteristic information of the interface request comprises an interface method signature and request parameters of the interface request, and the interface method signature and the request parameters have high identification degree for one interface request, so that when the idempotent device adopts the interface method signature and the request parameters to generate tokens, different tokens generated by different interface request parameters can be effectively ensured, and the reliability of the scheme of the application is improved.
Further, after receiving the interface request and before sending a token generation request to the idempotent device, the method further includes: and determining the interface requested by the interface request as an interface in a preset interface set.
In the implementation process, an interface set can be preset, and the interfaces in the interface set need to be subjected to idempotent control, while the interfaces outside the interface set do not need to be subjected to idempotent control. Before sending a token generation request to the idempotent device, the interface requested by the interface request is determined to be the interface in the preset interface set, so that the adjustability and the reliability of the interface are ensured.
Further, after the invoking the interface requested by the interface request performs service processing, the method further includes: if the result of the service processing is failure, generating third information and sending the third information to the idempotent device; the third information is used for triggering the idempotent device to delete the token corresponding to the interface request.
In the implementation process, when the service processing fails, the third information is generated and sent to the idempotent device, and the idempotent device deletes the token corresponding to the stored interface request. Therefore, when the server side receives the interface request again, the idempotent device can return the first information again, and the service processing can be carried out on the interface request again.
The embodiment of the application also provides an idempotent control method, which comprises the following steps: when an interface request sent by a calling end is received, a token uniquely corresponding to the interface request is generated according to the characteristic information of the interface request; tokens generated for the same interface request are the same; judging whether the same token is stored or not; if not, the token is stored, and the interface requested by the interface request is called to carry out service processing; if so, the interface request is discarded.
In the implementation process, when an interface request sent by a calling end is received, a token uniquely corresponding to the interface request is generated according to the characteristic information of the interface request (the tokens generated for the same interface request are the same), the token is stored when the generated token does not exist, and the interface requested by the interface request is called for service processing; the interface request is discarded if the generated token is present. The idempotency of the interface request is effectively realized, and compared with the related technology, the calling terminal does not need to specially carry out the acquisition request of the token once, the flow of the calling terminal is simplified, and the experience is better for the user.
Further, the characteristic information requested by the interface includes: the interface method signature and request parameters of the interface request.
In the implementation process, the generation of the token is realized through the interface method signature and the request parameter of the interface request, the interface method signature and the request parameter have high identification degree for one interface request, and when the token is generated by adopting the interface method signature and the request parameter, the tokens generated by different interface request parameters can be effectively ensured to be different, so that the reliability of the scheme of the application is improved.
Further, the generating a token uniquely corresponding to the interface request according to the feature information of the interface request includes: and calculating the interface method signature and the request parameters of the interface request by adopting a Hash algorithm to obtain a token uniquely corresponding to the interface request.
In the implementation process, the signature of the interface method of the interface request and the request parameter are calculated through a Hash algorithm to obtain the token uniquely corresponding to the interface request, and the implementation is simple and the reliability is high.
Further, the saving the token comprises: storing the token into a preset database; the determining whether the same token has been stored comprises: determining whether the generated token already exists in the database.
In the implementation process, the token is stored in the preset database, and compared with the traditional way of storing the token in the cache, the token is stored for a long time, and the scheme reliability is higher.
Further, after receiving the interface request sent by the calling terminal, before generating a token uniquely corresponding to the interface request according to the feature information of the interface request, the method further includes: and determining the interface requested by the interface request as an interface in a preset interface set.
In the implementation process, an interface set can be preset, and the interfaces in the interface set need to be subjected to idempotent control, while the interfaces outside the interface set do not need to be subjected to idempotent control. Before a token uniquely corresponding to the interface request is generated according to the characteristic information of the interface request, the interface requested by the interface request is determined to be the interface in the preset interface set, so that the adjustability and the reliability of the interface are ensured.
Further, after the invoking the interface requested by the interface request performs service processing, the method further includes: and deleting the stored token when the service processing fails.
In the implementation process, when the service processing fails, the token of the interface request corresponding to the service is deleted, so that when the interface request is received again, the result of judging whether the same token is stored is negative, and the service processing can be performed on the interface request again.
An embodiment of the present application further provides an idempotent control apparatus, including: the system comprises a first acquisition module, a first processing module and a first sending module; the first acquisition module is used for acquiring the characteristic information in the interface request sent by the calling terminal to the server terminal; the first processing module is used for generating a token uniquely corresponding to the interface request according to the characteristic information of the interface request and judging whether the same token is stored or not; tokens generated for the same interface request are the same; the first processing module is further used for saving the token when the judgment result is negative; the first sending module is used for returning first information to the server if the first information is not returned to the server; the first information is used for triggering the server to call the interface requested by the interface request to perform service processing; the first processing module is further used for terminating the process when the judgment result is yes; or the first sending module is further used for returning second information to the server if the first sending module is used for returning the second information to the server; the second information is used for triggering the server to abandon the interface request.
In the implementation process, the feature information in the interface request sent by the calling terminal to the server terminal is acquired, a token uniquely corresponding to the interface request is generated according to the feature information of the interface request, the server terminal is triggered to perform service processing according to the interface request when the generated token does not exist, and the process is terminated or the server terminal is triggered to give up the interface request when the generated token exists. The idempotency of the interface request is effectively realized, and compared with the related technology, the calling terminal does not need to specially carry out the acquisition request of the token once, the flow of the calling terminal is simplified, and the experience is better for the user.
An embodiment of the present application further provides an idempotent control apparatus, including: the second receiving module, the second processing module and the second sending module; the second receiving module is used for receiving an interface request, wherein the interface request is a service request sent to the server by the calling terminal; the second processing module is used for calling the interface requested by the interface request to perform service processing if the token verification information is the first information when the token verification information of the interface request returned by the idempotent device is received; if the token verification information is second information, giving up the interface request; or, the second processing module is configured to call an interface requested by the interface request to perform service processing when receiving the first information returned by the idempotent device within a preset duration; and when the first information returned by the idempotent device is not received in the preset duration, the interface request is abandoned. And when the first information returned by the idempotent device is not received within a preset duration, the interface request is abandoned.
In the implementation process, an interface request is received; calling an interface requested by an interface request to perform service processing when first information returned by the idempotent device is received, and abandoning the interface request when second information returned by the idempotent device is received; or, when the first information returned by the idempotent device is not received within the preset duration, the interface request is abandoned. Therefore, the interface requested by the interface request is called for service processing only when the first information returned by the idempotent device is received, the idempotent of the interface request is effectively realized, and meanwhile, compared with the related technology, the calling end does not need to specially carry out a token acquisition request, the flow of the calling end is simplified, and the experience of a user is better.
An embodiment of the present application further provides an idempotent control apparatus, including: a third receiving module and a third processing module; the third receiving module is used for receiving an interface request sent by a calling end; the third processing module is used for generating a token uniquely corresponding to the interface request according to the characteristic information of the interface request and judging whether the same token is stored or not; if not, the token is stored, and the interface requested by the interface request is called to carry out service processing; if so, discarding the interface request; the tokens generated for the same interface request are the same.
In the implementation process, when an interface request sent by a calling end is received, a token uniquely corresponding to the interface request is generated according to the characteristic information of the interface request (the tokens generated for the same interface request are the same), the token is stored when the generated token does not exist, and the interface requested by the interface request is called for service processing; the interface request is discarded if the generated token is present. The idempotency of the interface request is effectively realized, and compared with the related technology, the calling terminal does not need to specially carry out the acquisition request of the token once, the flow of the calling terminal is simplified, and the experience is better for the user.
The embodiment of the application also provides electronic equipment, which comprises a processor, a memory and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute one or more first programs stored in the memory to implement the first idempotent control method; or the processor is used for executing one or more second programs stored in the memory to realize the steps of the second idempotent control method; or, the processor is configured to execute one or more third programs stored in the memory to implement the steps of the third idempotent control method.
Embodiments of the present application also provide a readable storage medium having one or more programs stored thereon that are executable by one or more processors to perform the steps of the first idempotent control method, or to perform the steps of the second idempotent control method, or to perform the steps of the third idempotent control method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is an interaction diagram of an idempotent control method implemented by an idempotent device and a server in cooperation according to an embodiment of the present disclosure;
fig. 2 is an interaction diagram of another idempotent control method implemented by the idempotent device and the server in cooperation according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of an idempotent control method implemented only by a server according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart illustrating a more specific interface request idempotency control process according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an idempotent control apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an idempotent control apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of another idempotent control apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The first embodiment is as follows:
in order to solve the problems that a calling end needs to make at least two requests, the process complexity is high, and the experience is not good for a user in the related art, the embodiment of the application provides the idempotent control method which is realized by the mutual matching of an idempotent device and a service end. As can be seen in fig. 1 and 2.
Referring to fig. 1, fig. 1 illustrates a possible idempotent control process provided by an embodiment of the present application, including:
s101: and when the server receives the interface request sent by the calling end, sending a token generation request to the idempotent device.
It should be noted that, in the embodiment of the present application, the invoking end refers to an end that requests a service, and the service end refers to an end that provides a service, and is used for performing service processing on a request of the invoking end. It should be further noted that, in the embodiment of the present application, the token generation request may include feature information of the interface request.
S102: and generating a token uniquely corresponding to the interface request according to the characteristic information of the interface request in the token generation request.
It should be noted that, in all embodiments of the present application, the feature information is the same for the same interface request, and the generated token is the same. It should be further noted that the token in the embodiment of the present application is used to verify whether the same interface request is received before, and it may also be referred to as token in the industry.
S103: judging whether the same token is stored or not; if not, go to step S104; if yes, go to step S107.
When the same token does not exist, that is, the server has not received the same interface request before, this time, the interface request is received for the first time, and needs to be processed. On the contrary, when the same token is stored, that is, the server has received the same interface request before, the interface request received this time is not necessary to be processed.
S104: the generated token is saved.
S105: and returning the first information to the server.
Note that there is no strict timing restriction between steps S104 and S105. Step S104 may be performed before or after step S105, or may be performed simultaneously with step S105.
S106: and the server calls the interface requested by the interface request to perform service processing.
In the embodiment of the application, after the service end calls the interface requested by the interface request to perform service processing, the service end may return the processing result to the calling end.
S107: and returning the second information to the server.
S108: the server abandons the interface request.
Referring to fig. 2, fig. 2 shows another possible idempotent control process provided by the embodiment of the present application, including:
s201: and the idempotent device intercepts an interface request sent by a calling terminal to a server terminal.
It should be noted that, in the feasible idempotent control process, when the idempotent device intercepts an interface request sent by a calling end to a server, the idempotent device can allow the interface request to reach the server through interception while acquiring the interface request, and the interface request is received by the server; the interface request may not be allowed to pass the interception, and the server may not receive the interface request. Fig. 2 is a diagram illustrating a case where an interface request is not allowed to pass through an intercept.
It should be further noted that, in this embodiment of the application, the idempotent device may further implement interception of an interface request sent by the calling terminal to the server terminal by installing an interception program on the electronic device where the server terminal is located.
S202: and analyzing the interface request to obtain the characteristic information of the interface request.
S203: and generating a token uniquely corresponding to the interface request according to the characteristic information of the interface request in the token generation request.
S204: judging whether the same token is stored or not; if not, go to step S205; if yes, go to step S208.
S205: the generated token is saved.
S206: and returning the first information and the interface request to the server.
It should be noted that fig. 2 is a description of a case where the interface request is not allowed to pass through the interception. At this time, the first information and the interface request need to be returned to the server. If the idempotent device allows the interface request to reach the server end to be received by the server end by intercepting while acquiring the interface request, step S206 may only return the first information to the server end, or may return the first information and the interface request at the same time as fig. 2.
S207: and the server calls the interface requested by the interface request to perform service processing.
S208: and returning the second information to the server.
S209: the server abandons the interface request.
It is to be noted that, in the embodiment of the present application, the idempotent device may generate and determine the token and return the first information or the second information as long as the idempotent device acquires the feature information in the interface request sent by the calling terminal to the server terminal. Whether the idempotent device is obtained by the method in fig. 1 (sent by the server), the method in fig. 2 (the idempotent device actively intercepts the interface request), or by other methods is all feasible and should fall within the scope of the embodiments of the present application, and the embodiments of the present application cannot be considered to be realized only by the methods in fig. 1 and fig. 2.
It should be noted that, in this embodiment of the application, the first information and the second information may be messages agreed by the idempotent device and the server, for example, the first message is agreed to be 1, the second message is agreed to be 0, the server sets that when receiving the 1 message, the interface requested by the interface request is called to perform service processing, and when receiving the 0 message, the interface request is abandoned. In addition, in this embodiment of the present application, the first information may be information including content that passes the verification (that is, the same token is not stored), and the second information may be information including content that fails the verification (that is, the same token is stored), and after the information content is analyzed by the server, the server executes an operation of calling an interface requested by the interface request to perform service processing or discarding the interface request.
In a possible implementation manner of the embodiment of the present application, when the determination result of the step "determining whether the same token is already stored" is yes, the idempotent device may directly terminate the flow without going to the step "returning the second information to the server". On the server side, a timer can be set, timing is started after a token generation request is sent to the idempotent device or an interface request sent by a calling end is received, first information returned by the idempotent device is not received within a preset duration, the idempotent device can be considered to terminate the flow, and the interface request is abandoned at the moment. The preset time can be set by an engineer according to actual needs.
It should be noted that, in this embodiment of the application, the feature information of the interface request may adopt information such as an interface method signature and a request parameter of the interface request. Generally speaking, the interface method signatures and request parameters of different interface requests cannot be completely the same, so that tokens uniquely corresponding to different interface requests obtained by the same calculation method are different, and thus whether the interface requests are the same or not can be determined by whether the tokens are the same, and the reliability of the scheme is ensured.
In a possible implementation manner of the embodiment of the present application, a hash algorithm may be used to calculate an interface method signature and a request parameter of an interface request, so as to obtain a token uniquely corresponding to the interface request. In addition, in the embodiment of the present application, an algorithm such as MD2, MD4, MD5, or the like may also be used to calculate a token uniquely corresponding to the interface request. In the embodiment of the present application, the generation manner of the token is not limited.
In the embodiment of the application, when the generated token is saved, the token can be saved in a preset database, which is longer in storage time of the token and higher in scheme reliability compared with a traditional way of saving the token in a cache. At this time, it is determined whether the same token is stored, and it is sufficient to search whether the same token is stored in the database.
In the embodiment of the application, after the server receives the first information and calls the interface requested by the interface request to perform service processing, there may be two situations at this time. One condition is that the service processing is successful, and the processed content is returned to the calling end at the moment; and if the other condition is a service processing failure, at this time, since the token of the interface request corresponding to the service is stored in the database, when the same interface request is newly received, the server loses the ability to re-process the same interface request to obtain a result of successful processing. In order to enable the server to have the capability of reprocessing the same interface request when the service processing fails, the server may generate and send third information to the idempotent device when the service processing fails. And the idempotent device deletes the stored token corresponding to the interface request with the failed service processing when receiving the third information.
In the embodiment of the present application, an interface set may be preset, and the idempotent control is only required for the interfaces in the interface set, and the idempotent control is not required for the interfaces outside the interface set. This allows freedom in defining which interfaces need to be idempotent controlled. Specifically, after an interface set is preset, the server side can judge whether an interface requested by an interface request is an interface in the interface set after receiving the interface request, and if so, an idempotent device is adopted to generate a token and verify the token (namely, whether the token is stored is judged); otherwise, the server side directly calls the interface requested by the interface request to perform service processing.
It should be noted that the idempotent device may be an electronic device having a single chip or a central processing unit and having the above logic processing function, and the idempotent device may further have a memory, and a database is constructed in the memory to store information such as tokens. It should be noted that, in the embodiment of the present application, the idempotent device may be constructed as a pluggable device, which is inserted into the server during use and automatically establishes a connection with the server, so as to implement the solution of the embodiment of the present application.
In the idempotent control method provided by the embodiment of the application, the idempotent device generates a token uniquely corresponding to an interface request according to the characteristic information of the interface request by acquiring the characteristic information in the interface request sent to a server by a calling terminal, triggers the server to perform service processing according to the interface request when the generated token does not exist, and enables the server to give up the interface request when the generated token exists. The idempotency of the interface request is effectively realized, and compared with the related technology, the calling terminal does not need to specially carry out the acquisition request of the token once, the flow of the calling terminal is simplified, and the experience is better for the user.
Example two:
it should be noted that, in addition to the problem that the idempotent device and the server are mutually matched to solve the problem that the calling terminal in the related art needs to make at least two requests, the complexity of the process is high, and the user experiences no good experience in the first embodiment, the embodiment of the present application further provides an idempotent control method that can be implemented only by the server, and can solve the problem that the calling terminal in the related art needs to make at least two requests, the complexity of the process is high, and the user experiences no good experience in the first embodiment. See fig. 3 for an illustration:
s301: when an interface request sent by a calling end is received, a token uniquely corresponding to the interface request is generated according to the characteristic information of the interface request.
It should be noted that the explanation made in the first embodiment is also applicable to the embodiments of the present application. For example: in the embodiment of the present application, the feature information is the same for the same interface request, and the generated token is the same. In the embodiment of the present application, the feature information of the interface request may adopt information such as an interface method signature and a request parameter of the interface request. In a possible implementation manner of the embodiment of the present application, a hash algorithm may be used to calculate an interface method signature and a request parameter of an interface request, so as to obtain a token and the like uniquely corresponding to the interface request.
S302: judging whether the same token is stored or not; if not, go to step S303; if yes, go to step S304.
S303: and storing the token and calling the interface requested by the interface request to perform service processing.
In the embodiment of the application, the token can be stored in the preset database, so that the storage is longer in time and the reliability of the scheme is higher compared with the traditional storage in the cache.
In the embodiment of the present application, after the interface requested by the interface request is called to perform service processing, there may be a case that the service processing fails at this time. When the service processing fails, the token corresponding to the interface condition of the service processing failure may be deleted.
S304: the interface request is discarded.
Similarly to the first embodiment, in this embodiment, one interface set may be preset, and the idempotent control is not required for the interfaces in the interface set, but is not required for the interfaces outside the interface set. This allows freedom in defining which interfaces need to be idempotent controlled. Specifically, after an interface set is preset, after an interface request is received, it may be determined whether an interface requested by the interface request is an interface in the interface set, and if so, a token is generated and verified (i.e., it is determined whether the token is stored); otherwise, directly calling the interface requested by the interface request to perform service processing.
According to the idempotent control method provided by the embodiment of the application, when an interface request sent by a calling end is received, a token uniquely corresponding to the interface request is generated according to the characteristic information of the interface request (the tokens generated aiming at the same interface request are the same), the token is stored when the generated token does not exist, and the interface requested by the interface request is called to perform service processing; the interface request is discarded if the generated token is present. The idempotency of the interface request is effectively realized, and compared with the related technology, the calling terminal does not need to specially carry out the acquisition request of the token once, the flow of the calling terminal is simplified, and the experience is better for the user.
Example three:
based on the first embodiment, the present embodiment takes a more specific interface request idempotent control process as an example to further illustrate the present application.
Referring to fig. 4, firstly, the calling side sends an interface request to the server side, and after receiving the interface request, the server side sends a token generation request carrying an interface method signature and a request parameter to the idempotent device. The idempotent device generates a token corresponding to the interface request according to the interface method signature and the request parameter, and judges whether the token is stored in the database. When the token is stored in the database, returning 'do not submit repeat request' to the server, and giving up the interface request after the server receives the message; and when the token is not stored in the database, storing the generated token, the interface method signature and the request parameter in the database correspondingly, and returning the token to the server. And after receiving the token, the server performs service processing of the interface request and returns a processing result to the calling end.
It should be noted that, when the processing result is a service processing failure, the idempotent device is notified, and when receiving a notification of the service processing failure (the notification may carry at least one of an interface method signature, a request parameter, and a corresponding token of an interface request corresponding to the service), the idempotent device deletes the token of the interface request corresponding to the service processing failure from the database according to the notification.
In addition, in the embodiment of the present application, it is allowed that the configuration of the interface request for a part of the interfaces on the server side requires performing the above-mentioned idempotent control, while the rest of the interfaces do not require performing the above-mentioned idempotent control.
Through the scheme, the whole idempotent control process has no perception on the calling end, the related technology needs the calling end to request for obtaining the token once, unnecessary operation is added for the calling end, the token is generated by the idempotent device, and the effect of no perception on the calling end is achieved. In addition, the token in the related art is stored in the cache, and has certain timeliness, so that the cache fails. The scheme is stored in a persistent database, and the token has long-term effectiveness.
Example four:
based on the same concept, the present application provides an idempotent control apparatus 100 (applied to an idempotent apparatus) and an idempotent control apparatus 200 (applied to a server), as shown in fig. 5 and 6. It should be understood that the apparatus 100 and the apparatus 200 together may perform the various steps involved in the methods of fig. 1 and 2 described above; the specific functions of the apparatuses 100 and 200 can be referred to the description in the first embodiment, and the detailed description is omitted here as appropriate to avoid redundancy. The devices 100 and 200 include at least one software functional module that can be stored in a memory in the form of software or firmware or solidified in an operating system of the devices 100 and 200. Specifically, the method comprises the following steps:
referring to fig. 5, the apparatus 100 includes: a first obtaining module 101, a first processing module 102 and a first sending module 103. Wherein:
the first obtaining module 101 is configured to obtain feature information in an interface request sent by a calling end to a server end;
the first processing module 102 is configured to generate a token uniquely corresponding to the interface request according to the feature information of the interface request, and determine whether the same token is stored; tokens generated for the same interface request are the same;
the first processing module 102 is further configured to store the token when the determination result is negative; the first sending module 103 is configured to return the first information to the server if the first information is not returned; the first information is used for triggering the server to call the interface requested by the interface request to perform service processing;
the first processing module 102 is further configured to terminate the process when the determination result is yes; or the first sending module 103 is further configured to return the second information to the server if the first information is received; the second information is used for triggering the server to abandon the interface request.
In this embodiment of the present application, the first obtaining module 101 is specifically configured to receive a token generation request sent by a server; the token generation request comprises the characteristic information of the interface request; or, in the process of sending the interface request to the server side by the calling side, intercepting the interface request, and analyzing the interface request to obtain the characteristic information of the interface request.
In the embodiment of the present application, the feature information requested by the interface includes: the interface method signature of the interface request and the request parameters.
In this embodiment of the application, the first processing module 102 is specifically configured to calculate an interface method signature and a request parameter of an interface request by using a hash algorithm to obtain a token uniquely corresponding to the interface request.
In this embodiment of the application, the first processing module 102 is specifically configured to store the token in a preset database; it is determined whether the generated token already exists in the database.
In this embodiment of the application, the first processing module 102 is further specifically configured to delete the token when receiving third information returned by the server; the third information is information generated by the server when the service processing fails.
Referring to fig. 6, the apparatus 200 includes: a second receiving module 201, a second processing module 202 and a second sending module 203. Wherein:
the second receiving module 201 is configured to receive an interface request; the interface request is a service request sent to the server by the calling terminal;
the second processing module 202 is configured to, when receiving token verification information of an interface request returned by the idempotent device, call an interface requested by the interface request to perform service processing if the token verification information is first information; if the token verification information is second information, giving up the interface request;
or, the second processing module 202 is configured to, when receiving the first information returned by the idempotent device within the preset duration, call an interface requested by the interface request to perform service processing; and when the first information returned by the idempotent device is not received within the preset duration, the interface request is abandoned.
In this embodiment of the present application, the second sending module 203 is further configured to send a token generation request to the idempotent device after receiving the interface request; the token generation request includes the feature information of the interface request.
In this embodiment of the application, the second processing module 202 is further configured to determine, after receiving the interface request and before sending the token generation request to the idempotent device, that the interface requested by the interface request is an interface in a preset interface set.
In this embodiment of the application, the second processing module 202 is further configured to generate third information after the interface requested by the interface request is called to perform service processing and if a result of the service processing is a failure; the second sending module 203 is further configured to send third information to the idempotent device; and the third information is used for triggering the idempotent device to delete the token corresponding to the interface request.
Based on the same inventive concept, the present embodiment also provides an idempotent control apparatus 300. Referring to fig. 7, fig. 7 shows an idempotent control apparatus corresponding to the method steps shown in fig. 3. It should be understood that the apparatus 300 corresponds to the method embodiment of fig. 3 described above, and is capable of performing the various steps involved in the method of fig. 3 described above. The specific functions of the apparatus 300 can be referred to the above description, and the detailed description is appropriately omitted here to avoid redundancy. The apparatus 300 includes at least one software functional module that can be stored in a memory in the form of software or firmware or solidified in an operating system of the apparatus 300. Specifically, the method comprises the following steps:
referring to fig. 7, the apparatus 300 includes: a third receiving module 301 and a third processing module 302.
Wherein:
the third receiving module 301 is configured to receive an interface request sent by a calling end;
the third processing module 302 is configured to generate a token uniquely corresponding to the interface request according to the feature information of the interface request, and determine whether the same token is stored; if not, the token is stored, and the interface requested by the interface request is called to perform service processing; if the interface request exists, giving up the interface request; the tokens generated for the same interface request are the same.
In this embodiment of the application, the third processing module 302 is specifically configured to calculate an interface method signature and a request parameter of an interface request by using a hash algorithm to obtain a token uniquely corresponding to the interface request.
In this embodiment of the application, the third processing module 302 is specifically configured to store the token in a preset database; it is determined whether the generated token already exists in the database.
In this embodiment of the application, the third processing module 302 is specifically configured to determine that an interface requested by the interface request is an interface in a preset interface set after the third receiving module 301 receives the interface request sent by the calling terminal and before a token uniquely corresponding to the interface request is generated according to feature information of the interface request.
In this embodiment of the application, the third processing module 302 is further configured to delete the saved token when the service processing fails after the interface requested by the interface request is called to perform the service processing.
It is to be understood that the contents of the method steps described in the first embodiment above can be implemented by the apparatuses 100 and 200 of the present embodiment, and the contents of the method steps described in the second embodiment above can be implemented by the apparatus 300 of the present embodiment. For the sake of brevity, the contents described in some embodiments one and two are not repeated in this embodiment.
Example five:
the present embodiment provides an electronic device, which is shown in fig. 8 and includes a processor 801, a memory 802, and a communication bus 803. Wherein:
the communication bus 803 is used to enable communications between the processor 801 and the memory 802.
The processor 801 is configured to execute one or more first programs stored in the memory 802 to implement the steps performed by the idempotent device in the idempotent control method in the first embodiment;
or, the processor 801 is configured to execute one or more second programs stored in the memory 802 to implement the steps performed by the server in the idempotent control method in the first embodiment;
alternatively, the processor 801 is configured to execute one or more third programs stored in the memory 802 to implement the steps of the idempotent control method in the second embodiment.
It will be appreciated that the configuration shown in fig. 8 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 8 or have a different configuration than shown in fig. 8.
The present embodiment further provides a readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash Memory, a usb (Secure Digital Card), an MMC (Multimedia Card), etc., in which one or more programs for implementing the above steps are stored, and the one or more programs can be executed by one or more processors to implement the steps executed by the idempotent device in the idempotent control method in the first embodiment, or to implement the steps executed by the server in the idempotent control method in the first embodiment; or to implement the steps of the idempotent control method in the second embodiment. And will not be described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (18)

1. An idempotent control method applied to an idempotent device, comprising:
acquiring characteristic information in an interface request sent to a server by a calling terminal;
generating a token uniquely corresponding to the interface request according to the characteristic information of the interface request; tokens generated for the same interface request are the same;
judging whether the same token is stored or not;
if not, storing the token and returning first information to the server; the first information is used for triggering the server to call the interface requested by the interface request to perform service processing;
if yes, the process is terminated, or second information is returned to the server; the second information is used for triggering the server to abandon the interface request;
the acquiring the characteristic information in the interface request sent by the calling terminal to the server terminal comprises:
receiving a token generation request sent by the server; the token generation request comprises the characteristic information of the interface request;
or, in the process of sending the interface request to the server side by the calling side, intercepting the interface request, and analyzing the interface request to obtain the characteristic information of the interface request.
2. The idempotent control method of claim 1 wherein the interface requested feature information comprises: the interface method signature and request parameters of the interface request.
3. The idempotent control method of claim 1 wherein the saving the token comprises: storing the token into a preset database;
the determining whether the same token has been stored comprises: determining whether the generated token already exists in the database.
4. The idempotent control method of any of claims 1-3 further comprising, after the returning the first information to the server:
when third information returned by the server is received, deleting the token; the third information is information generated by the server when the service processing fails.
5. An idempotent control method applied to a server side comprises the following steps:
receiving an interface request sent by a calling end; the interface request is a service request sent to a server by a calling terminal;
sending a token generation request to an idempotent device; the token generation request comprises the characteristic information of the interface request;
when token verification information of the interface request returned by the idempotent device is received, if the token verification information is first information, calling the interface requested by the interface request to perform service processing; if the token verification information is second information, giving up the interface request;
or the like, or, alternatively,
when the first information returned by the idempotent device is received in a preset duration, calling an interface requested by the interface request to perform service processing; and when the first information returned by the idempotent device is not received in the preset duration, the interface request is abandoned.
6. The idempotent control method of claim 5 wherein the interface requested feature information comprises: the interface method signature and request parameters of the interface request.
7. The idempotent control method of claim 5 wherein, after receiving the interface request and before sending a token generation request to an idempotent device, further comprising:
and determining the interface requested by the interface request as an interface in a preset interface set.
8. The idempotent control method of any of claims 5-7, wherein after the invoking the interface requests the requested interface for traffic processing, further comprising:
if the result of the service processing is failure, generating third information and sending the third information to the idempotent device; the third information is used for triggering the idempotent device to delete the token corresponding to the interface request.
9. An idempotent control method applied to a server side comprises the following steps:
when an interface request sent by a calling end is received, a token uniquely corresponding to the interface request is generated according to the characteristic information of the interface request; tokens generated for the same interface request are the same;
judging whether the same token is stored or not;
if not, the token is stored, and the interface requested by the interface request is called to carry out service processing;
if so, the interface request is discarded.
10. The idempotent control method of claim 9 wherein the interface requested feature information comprises: the interface method signature and request parameters of the interface request.
11. The idempotent control method of claim 9 wherein the saving the token comprises: storing the token into a preset database;
the determining whether the same token has been stored comprises: determining whether the generated token already exists in the database.
12. The idempotent control method according to claim 9, wherein after receiving an interface request from a calling end, before generating a token uniquely corresponding to the interface request according to feature information of the interface request, the idempotent control method further comprises:
and determining the interface requested by the interface request as an interface in a preset interface set.
13. The idempotent control method of any of claims 9-12, wherein after the invoking the interface requests the requested interface for traffic processing, further comprising:
and deleting the stored token when the service processing fails.
14. An idempotent control apparatus, applied to an idempotent apparatus, comprising: the system comprises a first acquisition module, a first processing module and a first sending module;
the first acquisition module is used for acquiring the characteristic information in the interface request sent by the calling terminal to the server terminal;
the first processing module is used for generating a token uniquely corresponding to the interface request according to the characteristic information of the interface request and judging whether the same token is stored or not; tokens generated for the same interface request are the same;
the first processing module is also used for saving the token if the token is not the same as the first token; the first sending module is used for returning first information to the server side when the judgment result is negative; the first information is used for triggering the server to call the interface requested by the interface request to perform service processing;
the first processing module is further used for terminating the process when the judgment result is yes; or the first sending module is further used for returning second information to the server if the first sending module is used for returning the second information to the server; the second information is used for triggering the server to abandon the interface request;
the first obtaining module is specifically configured to receive a token generation request sent by the server; the token generation request comprises the characteristic information of the interface request; or, in the process of sending the interface request to the server side by the calling side, intercepting the interface request, and analyzing the interface request to obtain the characteristic information of the interface request.
15. An idempotent control apparatus, applied to a server, comprising: the second receiving module, the second processing module and the second sending module;
the second receiving module is used for receiving an interface request sent by a calling terminal, wherein the interface request is a service request sent to a server terminal by the calling terminal;
the second sending module is used for sending a token generation request to the idempotent device; the token generation request comprises the characteristic information of the interface request;
the second processing module is used for calling the interface requested by the interface request to perform service processing if the token verification information is the first information when the token verification information of the interface request returned by the idempotent device is received; if the token verification information is second information, giving up the interface request;
or, the second processing module is configured to call an interface requested by the interface request to perform service processing when receiving the first information returned by the idempotent device within a preset duration; and when the first information returned by the idempotent device is not received in the preset duration, the interface request is abandoned.
16. An idempotent control apparatus, applied to a server, comprising: a third receiving module and a third processing module;
the third receiving module is used for receiving an interface request sent by a calling end;
the third processing module is used for generating a token uniquely corresponding to the interface request according to the characteristic information of the interface request and judging whether the same token is stored or not; if not, the token is stored, and the interface requested by the interface request is called to carry out service processing; if so, discarding the interface request; the tokens generated for the same interface request are the same.
17. An electronic device comprising a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more first programs stored in the memory to implement the steps of the idempotent control method according to any of claims 1 to 4;
or the processor is configured to execute one or more second programs stored in the memory to implement the steps of the idempotent control method according to any of claims 5 to 8;
or the processor is configured to execute one or more third programs stored in the memory to implement the steps of the idempotent control method according to any of claims 9 to 13.
18. A computer readable storage medium, having stored thereon one or more programs executable by one or more processors to perform the steps of the idempotent control method of any of claims 1-4, or to perform the steps of the idempotent control method of any of claims 5-8, or to perform the steps of the idempotent control method of any of claims 9-13.
CN201910830805.1A 2019-09-04 2019-09-04 Idempotent control method, idempotent control device, electronic equipment and readable storage medium Active CN110740163B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910830805.1A CN110740163B (en) 2019-09-04 2019-09-04 Idempotent control method, idempotent control device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910830805.1A CN110740163B (en) 2019-09-04 2019-09-04 Idempotent control method, idempotent control device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110740163A CN110740163A (en) 2020-01-31
CN110740163B true CN110740163B (en) 2021-04-02

Family

ID=69267425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910830805.1A Active CN110740163B (en) 2019-09-04 2019-09-04 Idempotent control method, idempotent control device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110740163B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865970B (en) * 2020-07-17 2022-09-16 北京百度网讯科技有限公司 Method and apparatus for implementing interface idempotency
CN114095575A (en) * 2021-09-27 2022-02-25 上海信宝博通电子商务有限公司 Data processing method and device
CN115277857A (en) * 2022-07-28 2022-11-01 中国工商银行股份有限公司 Method and device for interface verification, electronic equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532989A (en) * 2012-07-02 2014-01-22 北京兴宇中科科技开发股份有限公司 Downloading method of file data
US8707449B2 (en) * 2010-12-16 2014-04-22 International Business Machines Corporation Acquiring access to a token controlled system resource
CN105740258A (en) * 2014-12-09 2016-07-06 阿里巴巴集团控股有限公司 Business processing method and device based on power equal sign check
CN106921645A (en) * 2016-06-28 2017-07-04 阿里巴巴集团控股有限公司 Information issuing method, client and service end
CN106921712A (en) * 2015-12-28 2017-07-04 阿里巴巴集团控股有限公司 A kind of method for processing business and device
CN107180048A (en) * 2016-03-10 2017-09-19 阿里巴巴集团控股有限公司 The recognition methods of idempotent state and device in database
CN107193827A (en) * 2016-03-14 2017-09-22 阿里巴巴集团控股有限公司 Divide the idempotent control method and device of storehouse point table
CN107613005A (en) * 2017-09-20 2018-01-19 携程旅游信息技术(上海)有限公司 Reverse proxy method and device, electronic equipment, storage medium
US10031948B1 (en) * 2013-12-02 2018-07-24 Amazon Technologies, Inc. Idempotence service
CN108650093A (en) * 2018-03-30 2018-10-12 深圳市富途网络科技有限公司 A kind of interface realizing method based on idempotence
CN108830099A (en) * 2018-05-04 2018-11-16 平安科技(深圳)有限公司 Call verification method, device, computer equipment and the storage medium of api interface
CN109063027A (en) * 2018-07-16 2018-12-21 阿里巴巴集团控股有限公司 A kind of method and device for business processing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9781053B1 (en) * 2013-09-05 2017-10-03 Amazon Technologies, Inc. Request routing and processing using a cancellation token

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8707449B2 (en) * 2010-12-16 2014-04-22 International Business Machines Corporation Acquiring access to a token controlled system resource
CN103532989A (en) * 2012-07-02 2014-01-22 北京兴宇中科科技开发股份有限公司 Downloading method of file data
US10031948B1 (en) * 2013-12-02 2018-07-24 Amazon Technologies, Inc. Idempotence service
CN105740258A (en) * 2014-12-09 2016-07-06 阿里巴巴集团控股有限公司 Business processing method and device based on power equal sign check
CN106921712A (en) * 2015-12-28 2017-07-04 阿里巴巴集团控股有限公司 A kind of method for processing business and device
CN107180048A (en) * 2016-03-10 2017-09-19 阿里巴巴集团控股有限公司 The recognition methods of idempotent state and device in database
CN107193827A (en) * 2016-03-14 2017-09-22 阿里巴巴集团控股有限公司 Divide the idempotent control method and device of storehouse point table
CN106921645A (en) * 2016-06-28 2017-07-04 阿里巴巴集团控股有限公司 Information issuing method, client and service end
CN107613005A (en) * 2017-09-20 2018-01-19 携程旅游信息技术(上海)有限公司 Reverse proxy method and device, electronic equipment, storage medium
CN108650093A (en) * 2018-03-30 2018-10-12 深圳市富途网络科技有限公司 A kind of interface realizing method based on idempotence
CN108830099A (en) * 2018-05-04 2018-11-16 平安科技(深圳)有限公司 Call verification method, device, computer equipment and the storage medium of api interface
CN109063027A (en) * 2018-07-16 2018-12-21 阿里巴巴集团控股有限公司 A kind of method and device for business processing

Also Published As

Publication number Publication date
CN110740163A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN110740163B (en) Idempotent control method, idempotent control device, electronic equipment and readable storage medium
US9053306B2 (en) Authentication system, authentication server, service providing server, authentication method, and computer-readable recording medium
CN111953770B (en) Route forwarding method and device, route equipment and readable storage medium
CN112261172B (en) Service addressing access method, device, system, equipment and medium
CN108683668B (en) Resource checking method, device, storage medium and equipment in content distribution network
CN107465693B (en) Request message processing method and device
CN111625301A (en) Idempotent processing method, apparatus, device and storage medium
CN110958119A (en) Identity verification method and device
CN109873863B (en) Asynchronous calling method and device of service
CN109918191B (en) Method and device for preventing frequency of service request
US11537336B2 (en) Resource service system, control method, and storage medium
CN111666745A (en) File downloading method, device, server and medium
CN111371881A (en) Service calling method and device
CN113760976B (en) Service processing method, device, equipment and storage medium
CN105165035B (en) Have both the multimedia message transmission of text message transmission
CN111260475A (en) Data processing method, block chain node point equipment and storage medium
CN110601832A (en) Data access method and device
CN108234122B (en) Token checking method and device
CN109547427B (en) Blacklist user identification method and device, computer equipment and storage medium
CN109710692B (en) User information processing method and device in block chain network and storage medium
CN113225348B (en) Request anti-replay verification method and device
CN109510816B (en) Service request validity verification method, client and server
CN112330366A (en) Redemption code redemption request verification method, apparatus, device and computer readable medium
CN110087201B (en) Information processing method, device and storage medium
CN109117647B (en) Authority control management method and management system of mobile application SDK

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: No. 6 Science and Education Software Park, Binhu District, Wuxi City, Jiangsu Province

Applicant after: Huayun data holding group Co., Ltd

Address before: No. 6 Science and Education Software Park, Binhu District, Wuxi City, Jiangsu Province

Applicant before: WUXI CHINAC DATA TECHNICAL SERVICE Co.,Ltd.

GR01 Patent grant
GR01 Patent grant