Request verification method and device, and medium

By introducing a request verification method in the business system, and using anti-re-checking identifiers and bitmap information for anti-re-checking, the data consistency and operation conflicts caused by repeated requests in high concurrency scenarios are solved, and the system reliability and user experience are improved.

CN119854375APending Publication Date: 2025-04-18HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411931206.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In high concurrency scenarios, users may repeatedly submit the same request due to network fluctuations or misoperation, resulting in data duplication, operation errors and business logic confusion. It is difficult for the prior art to effectively avoid these problems.

Method used

Provide a request verification method, by receiving verification requests sent by the client, using anti-re-checking marks and bitmap information to perform anti-re-checking, ensuring that the same request is processed only once.

Benefits of technology

It effectively avoids data inconsistency and operational conflicts, improves the reliability and user experience of the business system, and reduces the storage space requirement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854375A_ABST
    Figure CN119854375A_ABST
Patent Text Reader

Abstract

The invention provides a request verification method and device and a medium. According to the invention, when the server receives the verification request sent by the client, anti-re-verification is carried out on the to-be-processed request based on the anti-re-verification identifier carried by the verification request and the bitmap information recorded in the server, so that the verification result of the to-be-processed request is returned to the client; therefore, the client can determine whether the to-be-processed request is a repeated request or not according to the verification result. Wherein the anti-re-verification identifier is distributed for the to-be-processed request by the client based on an available identifier applied to the server by the client, and the available identifier is sequentially numbered, so that the server can verify the anti-re-verification identifier carried by the to-be-processed request based on bitmap information for recording the used available identifier in a bitmap manner; and determining whether the anti-re-verification identifier carried by the to-be-processed request is used or not, so that anti-re-verification of the to-be-processed request is realized, and the reliability of a service system and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of information technology, and more specifically, embodiments of the present invention relate to a request verification method, device, and medium. Background Art

[0002] This section is intended to provide a background or context to embodiments of the invention that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] As an important mechanism to ensure the stability of business systems and data consistency, request duplication prevention can effectively avoid repeated processing of requests, especially in high-concurrency scenarios, where users may submit the same request repeatedly due to network fluctuations or misoperation, which not only wastes business system resources, but may also lead to data duplication, operational errors, and business logic confusion. Through request duplication prevention, the business system can ensure that the same request is processed only once, thereby effectively avoiding data inconsistency and operational conflicts, and improving the reliability of the business system and user experience. Summary of the invention

[0004] In this context, embodiments of the present invention are intended to provide a request verification method, device, and medium to provide a request verification solution that has little intrusion into a business system, good scalability, and the ability to save storage space.

[0005] In a first aspect of an embodiment of the present invention, a request verification method is provided, the method comprising:

[0006] Receive a verification request sent by a client, the verification request is used to request the server to perform an anti-duplicate verification on the pending request, the verification request carries an anti-duplicate verification identifier assigned by the client to the pending request based on an available identifier applied for from the server, wherein the available identifier applied for by the client to the server is sequentially numbered;

[0007] Based on the anti-duplicate verification identifier carried by the verification request and the bitmap information recorded in the server, the request to be processed is subjected to an anti-duplicate verification, wherein the bitmap information is used to record the available identifiers that have been used in a bitmap manner;

[0008] A verification result of the pending request is returned to the client, where the verification result is used by the client to determine whether the pending request is a repeated request.

[0009] According to the request verification method of the embodiment of the present invention, the server can, when receiving the verification request sent by the client, perform anti-duplicate verification on the request to be processed based on the anti-duplicate verification identifier carried by the verification request and the bitmap information recorded in the server, thereby returning the verification result of the request to be processed to the client, so that the client can determine whether the request to be processed is a duplicate request based on the verification result. Among them, the anti-duplicate verification identifier is allocated by the client to the request to be processed based on the available identifier applied by the client to the server, and the available identifier is a sequential number, so that the server can verify the anti-duplicate verification identifier carried by the request to be processed based on the bitmap information used to record the available identifier that has been used in a bitmap manner, so as to determine whether the anti-duplicate verification identifier carried by the request to be processed has been used, thereby realizing anti-duplicate verification of the request to be processed, ensuring that the same request is only processed once, thereby effectively avoiding the problems of data inconsistency and operation conflict, and improving the reliability of the business system and user experience.

[0010] In one embodiment of the present invention, the value of the used available flag in the bitmap information is 1;

[0011] The performing anti-duplicate check on the request to be processed based on the anti-duplicate check identifier carried by the check request and the bitmap information recorded in the server includes any of the following:

[0012] If the anti-duplicate check flag carried by the check request has a corresponding value of 1 in the bitmap information recorded by the server, it is determined that the request to be processed is a duplicate request;

[0013] If the anti-duplicate check flag carried by the check request has a corresponding value of 0 in the bitmap information recorded by the server, it is determined that the request to be processed is not a duplicate request.

[0014] In one embodiment of the present invention, if the anti-duplicate verification flag carried by the verification request corresponds to a value of 0 in the bitmap information recorded by the server, the method further includes:

[0015] The corresponding value of the anti-duplicate check flag in the bitmap information recorded by the server is updated to 1, so as to record the anti-duplicate check flag of the request to be processed in the bitmap information of the server.

[0016] In one embodiment of the present invention, the method further comprises:

[0017] receiving a cancellation request sent by the client, where the cancellation request is sent by the client when the business process corresponding to the pending request fails to execute;

[0018] Based on the revocation request, the value corresponding to the anti-duplicate check mark of the pending request in the bitmap information recorded by the server is rolled back to 0, so as to delete the record of the anti-duplicate check mark corresponding to the pending request from the bitmap information.

[0019] In one embodiment of the present invention, before receiving the verification request sent by the client, the method further includes:

[0020] Receiving an identification acquisition request sent by the client;

[0021] Based on the identifier acquisition request, a sequentially numbered available identifier is allocated to the client.

[0022] In one embodiment of the present invention, the available identifiers allocated by the server to the client each time are sequentially numbered with a specified number, and the available identifiers allocated by the server to the client each time are sequentially taken from the available identifier allocated by the server to the client last time.

[0023] In one embodiment of the present invention, the available identifier allocated by the server to the client does not exceed the maximum available identifier; when the number of available identifiers starting from the available identifier allocated by the server to the client last time to the maximum available identifier does not meet the specified number, the part exceeding the maximum available identifier is re-sequentially valued starting from 1.

[0024] In a second aspect of the embodiments of the present invention, a request verification method is provided, the method comprising:

[0025] Based on the available identifiers applied to the server, an anti-duplicate verification identifier is assigned to the pending request, wherein the available identifiers applied are sequentially numbered;

[0026] Based on the anti-duplication verification identifier assigned to the pending request, sending a verification request to the server, the verification request is used to request the server to perform an anti-duplication verification on the pending request based on the anti-duplication verification identifier and the bitmap information recorded in the server, wherein the bitmap information is used to record the available identifiers that have been used in a bitmap manner;

[0027] Based on the verification result returned by the server, determine whether the request to be processed is a duplicate request.

[0028] According to the request verification method of the embodiment of the present invention, the client can assign an anti-duplicate verification identifier to the pending request based on the available identifier that has been applied for from the server, and then send a verification request to the server based on the anti-duplicate verification identifier assigned to the pending request, so that the server can perform anti-duplicate verification on the pending request based on the anti-duplicate verification identifier carried by the verification request and the bitmap information recorded in the server, so that the client can determine whether the pending request is a duplicate request based on the verification result returned by the server. Among them, the available identifier is sequentially numbered, so that the server can verify the anti-duplicate verification identifier carried by the pending request based on the bitmap information of the available identifier that has been used in a bitmap manner, so as to determine whether the anti-duplicate verification identifier carried by the pending request has been used, thereby realizing anti-duplicate verification of the pending request, ensuring that the same request is only processed once, thereby effectively avoiding data inconsistency and operation conflicts, and improving the reliability of the business system and user experience.

[0029] In one embodiment of the present invention, allocating an anti-duplicate verification identifier to the pending request based on the available identifier applied for from the server includes any of the following:

[0030] If the available identifiers applied for from the server have not been used up, an anti-duplicate verification identifier is allocated to the pending request based on the remaining available identifiers;

[0031] If the available identifiers applied for from the server have been used up, a new available identifier is applied for from the server again, so as to allocate an anti-duplicate verification identifier for the pending request based on the new available identifier.

[0032] In one embodiment of the present invention, each time the client applies to the server for an available identifier, the method includes:

[0033] Send an identification acquisition request to the server, where the identification acquisition request is used to request the server to allocate an available identification to the client.

[0034] In one embodiment of the present invention, the available identifiers allocated by the server to the client each time are sequentially numbered with a specified number, and the available identifiers allocated by the server to the client each time are sequentially taken from the available identifier allocated by the server to the client last time.

[0035] In one embodiment of the present invention, the available identifier allocated by the server to the client does not exceed the maximum available identifier; when the number of available identifiers starting from the available identifier allocated by the server to the client last time to the maximum available identifier does not meet the specified number, the part exceeding the maximum available identifier is re-sequentially valued starting from 1.

[0036] In one embodiment of the present invention, when the request to be processed is not a duplicate request, the anti-duplicate check mark of the request to be processed is recorded in the bitmap information of the server.

[0037] In one embodiment of the present invention, when the request to be processed is not a repeated request, the method further includes:

[0038] If the business process corresponding to the pending request fails to execute, a cancellation request is sent to the server, and the cancellation request is used to request the server to delete the record of the anti-duplicate verification identifier corresponding to the pending request from the bitmap information.

[0039] In a third aspect of the embodiments of the present invention, a request verification device is provided, the device comprising:

[0040] A receiving module, used to receive a verification request sent by a client, wherein the verification request is used to request the server to perform an anti-duplicate verification on the pending request, and the verification request carries an anti-duplicate verification identifier assigned by the client to the pending request based on an available identifier applied to the server, wherein the available identifier applied by the client to the server is sequentially numbered;

[0041] A verification module, used to perform an anti-duplicate verification on the pending request based on the anti-duplicate verification identifier carried by the verification request and the bitmap information recorded in the server, wherein the bitmap information is used to record the available identifiers that have been used in a bitmap manner;

[0042] The sending module is used to return the verification result of the pending request to the client, and the verification result is used by the client to determine whether the pending request is a repeated request.

[0043] In a fourth aspect of the embodiments of the present invention, a request verification device is provided, the device comprising:

[0044] An allocation module, used to allocate an anti-duplicate verification identifier to a pending request based on an available identifier that has been applied for from a server, wherein the available identifier that has been applied for is sequentially numbered;

[0045] A sending module, configured to send a verification request to the server based on the anti-duplication verification identifier assigned to the pending request, wherein the verification request is used to request the server to perform an anti-duplication verification on the pending request based on the anti-duplication verification identifier and the bitmap information recorded in the server, wherein the bitmap information is used to record the available identifiers that have been used in a bitmap manner;

[0046] The determination module is used to determine whether the request to be processed is a repeated request based on the verification result returned by the server.

[0047] In a fifth aspect of an embodiment of the present invention, a request verification system is provided, comprising a server and a client, wherein the server is used to execute the operations performed by the request verification method described in the first aspect and any embodiment of the first aspect, and the client is used to execute the operations performed by the request verification method described in the second aspect and any embodiment of the second aspect.

[0048] In a sixth aspect of an embodiment of the present invention, a computing device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the operations performed by the request verification method as described in the first aspect and any embodiment of the first aspect are implemented.

[0049] In a seventh aspect of an embodiment of the present invention, a computing device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the operations performed by the request verification method as described in the second aspect and any embodiment of the second aspect are implemented.

[0050] In an eighth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a program is stored, and the program is executed by a processor to implement the operations performed by the request verification method as described in the first aspect and any embodiment of the first aspect.

[0051] In the ninth aspect of the embodiment of the present invention, a computer-readable storage medium is provided, on which a program is stored, and the program is executed by a processor to implement the operations performed by the request verification method as described in the second aspect and any embodiment of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:

[0053] Figure 1 A schematic diagram of a scenario of a request verification method according to an embodiment of the present invention is schematically shown;

[0054] Figure 2 A schematic diagram of a process flow of a request verification method according to an embodiment of the present invention is schematically shown;

[0055] Figure 3A schematic diagram schematically shows a bitmap information according to an embodiment of the present invention;

[0056] Figure 4 A schematic diagram of a process flow of a request verification method according to an embodiment of the present invention is schematically shown;

[0057] Figure 5 A schematic diagram of the architecture of a request verification system according to an embodiment of the present invention is schematically shown;

[0058] Figure 6 A schematic diagram of a process flow of a request verification method according to an embodiment of the present invention is schematically shown;

[0059] Figure 7 A schematic diagram of a process flow of a request verification method according to an embodiment of the present invention is schematically shown;

[0060] Figure 8 A block diagram of a request verification device according to an embodiment of the present invention is schematically shown;

[0061] Fig. 9 A block diagram of a request verification device according to an embodiment of the present invention is schematically shown;

[0062] Fig.10 A schematic diagram schematically shows a computer-readable storage medium according to an embodiment of the present invention;

[0063] Fig.11 A schematic diagram of a computing device according to an embodiment of the present invention is schematically shown.

[0064] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0065] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0066] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0067] According to an embodiment of the present invention, a request verification method, device and medium are proposed.

[0068] In this article, it is to be understood that the term request verification refers to request anti-duplicate. In addition, any number of elements in the drawings is for illustration and not for limitation, and any naming is only for distinction and does not have any limiting meaning.

[0069] The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention. SUMMARY OF THE INVENTION

[0071] The inventors have found that in business systems (especially distributed business systems), repeated user operations, response timeouts, or failed retry policies may lead to repeated submission of requests. Failure to restrict this will result in repeated operations and data confusion in the business system. For example, in an order business system, repeated order requests will cause serious errors in the order business system and cause financial losses. Technical means need to be used to prevent repeated submission of requests to ensure the safety and reliability of the business system.

[0072] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention are described in detail below.

[0073] Application Scenario Overview

[0074] First reference Figure 1 , Figure 1 The following is a schematic diagram of a scenario of a request verification method according to an embodiment of the present invention. The request verification method provided by the embodiment of the present invention can be applied to the following: Figure 1 In the application scenario shown, the application scenario may be composed of a terminal 101, a server 102 and a server 103. The terminal 101 may be a desktop computer, a portable computer, a laptop computer, a tablet computer, a smart phone, a smart watch, etc. The server 102 may be one server, multiple servers, a server cluster, a cloud computing platform, etc. The server 103 may be one server, multiple servers, a server cluster, a cloud computing platform, etc. Among them, a business system client (Client) may be deployed on the terminal 101, and a business system server (server) may be deployed on the server 102. In addition, a part of an anti-duplication verification client (or request verification client) is deployed on the terminal 101 and the server 102, respectively, and an anti-duplication verification server (or request verification server) is deployed on the server 103.

[0075] Optionally, the anti-duplication verification client can be integrated into the business system in the form of a software development kit (SDK). For example, a part of the anti-duplication verification client can be embedded in the business system client in the form of an SDK, and the other part can be embedded in the business system server in the form of an SDK, so as to achieve the purpose of integrating the anti-duplication verification client into the business system in the form of an SDK. The specific architecture will be described in detail in the illustrative method below and will not be repeated here.

[0076] In some embodiments, a user can initiate a pending request through a business system client deployed on the terminal 101. In this case, the anti-duplication verification client deployed on the terminal 101 can assign an anti-duplication verification identifier to the pending request through the solution provided by the present invention, so that the terminal 101 can send the pending request carrying the anti-duplication verification identifier to the server 102; the server 102 can interact with the server 103 when receiving the pending request sent by the terminal 101, so as to request the server 103 to implement anti-duplication verification for the pending request through the solution provided by the present invention based on the anti-duplication verification identifier carried by the pending request through a verification request, thereby returning the verification result obtained from the server 103 to the terminal 101 to implement anti-duplication verification for the pending request.

[0077] Optionally, the business system mentioned above can be an order system, a financial management system, an inventory management system, a human resources management system, an e-commerce platform, an after-sales service management system, an electronic payment system, a digital content management system, an online entertainment platform, a social interaction platform, a ticketing management system, a game system, a recommendation system, a content creation and distribution platform, a live broadcast platform, etc., but is not limited to these.

[0078] It should be noted that Figure 1 The explanation is given by taking the example that the server used to deploy the anti-duplication verification server is different from the server used to deploy the business system server, so that the anti-duplication verification clients deployed in different business systems can interact with the anti-duplication verification server deployed on an independent server to implement their respective request verifications, thereby improving the generalization of the request verification method provided by the present invention, but not limited to this. The server used to deploy the anti-duplication verification server can also be the same as the server used to deploy the business system server, so that the anti-duplication verification client can be used to specifically implement request verification for a certain business system, and the present invention is not limited to this.

[0079] It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present invention, and the embodiments of the present invention are not limited in this regard. On the contrary, the embodiments of the present invention can be applied to any applicable scenarios.

[0080] It should be noted that the following text will focus on the operations performed by the anti-duplication verification client and the anti-duplication verification server. For the sake of convenience, the anti-duplication verification client will be referred to as the client and the anti-duplication verification server will be referred to as the server in the following text.

[0081] Exemplary Methods

[0082] Combine the following Figure 1 For application scenarios, refer to Figure 2 A request verification method according to an exemplary embodiment of the present invention is described below.

[0083] refer to Figure 2 , Figure 2 A schematic diagram of a request verification method according to an embodiment of the present invention is shown schematically. Figure 2 As shown, the method is applied to the server and may include the following steps:

[0084] Step S201, receive a verification request sent by the client, where the verification request is used to request the server to perform anti-duplicate verification on the request to be processed. The verification request carries an anti-duplicate verification identifier assigned by the client to the request to be processed based on an available identifier applied for from the server, wherein the available identifier applied for by the client to the server is sequentially numbered.

[0085] Step S202: Based on the anti-duplication verification identifier carried by the verification request and the bitmap information recorded in the server, an anti-duplication verification is performed on the request to be processed. The bitmap information is used to record the available identifiers that have been used in a bitmap manner.

[0086] It should be noted that a bitmap (BitSet) is a multi-bit binary number that can use 1 bit to indicate whether a number has appeared. Optionally, a method for reading and setting a specified bit can be provided so that integer data can be read and written to the bitmap after bitwise conversion.

[0087] It should be noted that when the used available identifiers are recorded in a bitmap manner through bitmap information, the values ​​of the used available identifiers and the unused available identifiers in the corresponding bits of the bitmap are different, so that the bitmap information can be used to determine whether the available identifier is used or not.

[0088] In one possible implementation, based on the bitmap information recorded in the server, it can be determined whether the anti-duplication verification identifier carried by the verification request is an available identifier that has been used, so as to obtain the anti-duplication verification result for the request to be processed (hereinafter referred to as the verification result).

[0089] Optionally, if the anti-duplicate verification identifier carried by the verification request is an available identifier that has been used, it can be determined that the pending request is a duplicate request; conversely, if the anti-duplicate verification identifier carried by the verification request is an available identifier that has not been used, it can be determined that the pending request is not a duplicate request.

[0090] Step S203: Return the verification result of the pending request to the client, and the verification result is used by the client to determine whether the pending request is a repeated request.

[0091] Optionally, the verification result can be used directly to indicate whether the pending request is a duplicate request, and the client can directly determine whether the pending request is a duplicate request based on the verification result returned by the server; or, the verification result can be used to indicate whether the anti-duplicate verification identifier carried by the verification request is an available identifier that has been used, so that the client can further determine whether the pending request is a duplicate request based on the verification result returned by the server.

[0092] After introducing the basic implementation process of the request verification method provided by the present invention applied to the server, various optional embodiments of the request verification method provided by the present invention on the server are introduced below.

[0093] For ease of understanding, the components that may be included in the server and the functions of each component are first introduced. Through the functional support provided by these components, it is ensured that the server can implement the request verification method provided by the present invention.

[0094] In some embodiments, the server may include an ID storage component (ID Store), an ID allocation component (IDAllocator), a metadata component (Meta Data), and a configuration component (Config). The functions of each component are specifically introduced below.

[0095] In some embodiments, the ID Store may persistently store available identifiers in the form of a bitmap file. Optionally, the size of the bitmap file may be a fixed value, for example, the size of the bitmap file may be fixed to 1GB (i.e., 8*1024*1024*1024bit), which may be used to store 8*1024*1024*1024-1=8589934591 IDs (excluding 0). Optionally, the IDStore may include one or more bitmap files. In the case where the ID store includes multiple bitmap files, these multiple bitmap files may form a combination so that the storage capacity may be expanded by increasing the number of bitmap files to support linear expansion of capacity. It should be noted that for bitmap files with a fixed file size, the offset position of the data in the bitmap file may be calculated, so that data reading and writing may be implemented using memory mapping (Mmap) to obtain higher performance.

[0096] In some embodiments, the ID Allocator may allocate available identifiers to the client. Optionally, the ID Allocator may allocate available identifiers to the client in the form of number segments. For example, the ID Allocator may allocate ID segments to the client in the form of number segments, and the client may generate available identifiers based on the ID segments allocated to it by the server. Optionally, the ID Allocator may allocate available identifiers based on the actual storage and recycling of available identifiers.

[0097] In some embodiments, Meta Data can be used to store metadata of the request verification system (or anti-duplicate verification system) composed of the client and the server, such as the available identifiers currently allocated by the request verification system (such as the number segments currently allocated by the request verification system), but is not limited to this. Optionally, through Meta Data, the operating parameters can be persisted in the form of files to avoid the loss of operating parameters caused by system restart.

[0098] In some embodiments, Config can be used as a configuration file of the request verification system to record configurations such as ID Store capacity and ID recycling interval, but is not limited to this.

[0099] After introducing the various components and functions of the server, the following describes the request verification process on the server.

[0100] In some embodiments, the server can allocate an available identifier to the client according to the needs of the client. Optionally, the client can send an identifier acquisition request to the server when there is no available identifier; the server can receive the identifier acquisition request sent by the client, and allocate a sequentially numbered available identifier to the client based on the received identifier acquisition request, so as to ensure that the client can obtain a new available identifier in a timely manner.

[0101] Optionally, the identifier acquisition request may be a communication protocol instruction, for example, the identifier acquisition request may be an instruction customized according to the protocol requirements of a specified communication protocol, for example, the identifier acquisition request may be an allocate instruction used to apply for a specified number of available identifiers, or for applying for an available number segment with a specified step size, but is not limited to this.

[0102] In some embodiments, the available identifiers allocated by the server to the client each time may be sequentially numbered with a specified number, and the available identifiers allocated by the server to the client each time are sequentially taken from the available identifiers allocated by the server to the client last time.

[0103] Optionally, the server can start from the available identifier allocated to the client last time and sequentially take N values ​​as the available identifier to be allocated to the client this time, where N is a specified number. It should be noted that the available identifiers can be numbered in any step sequence, and the present invention is not limited to this. That is, the difference between two adjacent sequentially numbered available identifiers can be fixed to any value.

[0104] For example, the server allocates a specified number of 5 available identifiers to the client each time, and the available identifiers are numbered sequentially with a step size of 1. The server can allocate 5 sequentially numbered available identifiers 1, 2, 3, 4, and 5 to the client for the first time, 6, 7, 8, 9, and 10 to the client for the second time, 11, 12, 13, 14, and 15 to the client for the third time, and so on.

[0105] Alternatively, the server may allocate an available number segment to the client each time, and the available number segment allocated by the server to the client each time is the next sequential number segment of the available number segment allocated to the client last time, and the length of the available number segment allocated by the server to the client each time is consistent. The client may generate an available identifier by itself based on the available number segment allocated by the server. For example, the client may generate multiple available identifiers within the available number segment according to a specified step size.

[0106] For example, the server allocates a usable number segment of length 5 to the client each time. The server can allocate the usable number segment of 1 to 5 to the client for the first time, the usable number segment of 6 to 10 to the client for the second time, the usable number segment of 11 to 15 to the client for the third time, and so on. The client can generate the usable identifier according to the specified step length of 1. The client can determine the usable identifiers as 1, 2, 3, 4, and 5 according to the usable number segment allocated by the server for the first time, determine the usable identifiers as 6, 7, 8, 9, and 10 according to the usable number segment allocated by the server for the second time, determine the usable identifiers as 11, 12, 13, 14, and 15 according to the usable number segment allocated by the server for the third time, and so on.

[0107] It should be noted that since the size of the bitmap file is not infinite, the available identifier allocated by the server to the client does not exceed the maximum available identifier. Taking the size of the bitmap file as 1GB as an example, the maximum available identifier allocated by the server to the client is 8589934591, that is, the available identifiers allocated by the server to the client are 1 to 8589934591.

[0108] In some embodiments, when the number of available identifiers starting from the available identifier last allocated by the server to the client to the maximum available identifier does not meet the specified number, the part exceeding the maximum available identifier is re-sequentially valued starting from 1. For example, the server allocates 100 available identifiers to the client each time. If the available identifiers allocated by the server to the client last time were 8589934401 to 8589934500 (with a step length of 1), the number of available identifiers sequentially taken by the server from 8589934501 to 8589934591 is 91, which is less than 100. The missing 9 will be reallocated starting from 1, that is, 1 to 9 will be allocated to the client. In other words, the available identifiers allocated by the server to the client this time are 8589934501 to 8589934591 and 1 to 9 (with a step length of 1).

[0109] In other words, when the length from the available identifier last allocated by the server to the maximum available identifier does not meet the length of the available number segment allocated by the server to the client each time, the insufficient part can be compensated by the number segment starting from 1. For example, the server allocates an available number segment with a step length of 1 and a length of 100 to the client each time. If the available number segment allocated by the server to the client last time was 8589934401 to 8589934500, and its length was 100, the server will start to allocate the available number segment from 8589934501 this time. However, starting from 8589934501, the length is 91, and the missing available number segment will be reallocated from 1, that is, the available number segments 1 to 9 will also be allocated to the client. In other words, the available number segments allocated by the server to the client this time are 8589934501 to 8589934591 and 1 to 9.

[0110] It should be noted that after the server allocates an available identifier to the client according to the client's request, the client can add an anti-duplicate verification identifier to the pending request according to the available identifier allocated by the server, so as to request the server to perform an anti-duplicate verification on the pending request through a verification request carrying the anti-duplicate verification identifier. Optionally, the currently available minimum available identifier can be directly allocated to the pending request as the anti-duplicate verification identifier, but is not limited to this.

[0111] In some embodiments, the server may receive a verification request sent by the client through step S201, wherein the verification request may be a communication protocol instruction, for example, the verification request may be an instruction customized according to the protocol requirements of a specified communication protocol, for example, the verification request may be a put instruction for submitting an identifier to bitmap information.

[0112] In some embodiments, after receiving the verification request, step S202 can be used to perform anti-duplication verification on the request to be processed based on the anti-duplication verification identifier carried in the verification request and the bitmap information recorded in the server.

[0113] In some embodiments, the value of the corresponding bit of the used available identifier in the bitmap information is 1, and the value of the corresponding bit of the unused available identifier in the bitmap information is 0. Corresponding to step S202, when anti-duplication verification is performed on the request to be processed based on the anti-duplication verification identifier carried by the verification request and the bitmap information recorded in the server, it can be determined whether the anti-duplication verification identifier is an available identifier that has been used based on the value of the corresponding bit of the anti-duplication verification identifier in the bitmap information, thereby realizing anti-duplication verification for the request to be processed.

[0114] Optionally, if the value of the anti-duplicate verification flag carried by the verification request in the corresponding bit in the bitmap information recorded by the server is 1, it is determined that the request to be processed is a duplicate request.

[0115] Optionally, if the value of the anti-duplicate check flag carried in the check request and the corresponding bit in the bitmap information recorded by the server is 0, it is determined that the request to be processed is not a duplicate request.

[0116] See also Figure 3 , Figure 3 A schematic diagram of a bitmap information according to an embodiment of the present invention is schematically shown. If the anti-duplication check mark is 5, the bit corresponding to the anti-duplication check mark in the bitmap information is the fifth bit from the right, so that it can be determined whether the anti-duplication check mark 5 is used based on the value of the fifth bit from the right, such as Figure 3 As shown, the value of the fifth digit from the right is 1, indicating that the anti-duplicate check mark 5 has been used.

[0117] In some embodiments, after the anti-duplicate check for the pending request is implemented through step S202, the obtained check result can be returned to the client through step S203. Taking the check request as a put instruction as an example, the response to the put instruction can include the following two types: if the submitted identifier recorded in the bitmap information has been used, 0 can be returned to indicate that the submitted identifier has been used; if the submitted identifier recorded in the bitmap information has not been used, 1 can be returned to indicate that the submitted identifier has not been used.

[0118] In some embodiments, when the value of the anti-duplicate check flag carried by the verification request in the bitmap information recorded by the server is 0, the server can also update the value of the anti-duplicate check flag in the bitmap information recorded by the server to 1 after the verification is completed, so as to record the anti-duplicate check flag of the pending request in the bitmap information of the server, so that if there is a subsequent verification request carrying the anti-duplicate check flag, it can be determined that the anti-duplicate check flag has been used based on the bitmap information in which the value of the corresponding bit in the bitmap information is updated to 1, so that the new pending request can be determined to be a duplicate request.

[0119] In some embodiments, for pending requests that are not duplicate requests, the client can instruct the business system client to execute the business process corresponding to the pending request to realize the processing of the pending request. However, the execution of the business process is uncontrollable, and the business process execution may fail due to various reasons. In the case of failure to execute the business process corresponding to the pending request, the client can send a revocation request to the server, and the revocation request is used to request the server to delete the record of the anti-duplicate check mark corresponding to the pending request from the bitmap information; the server can receive the revocation request sent by the client, and then, based on the revocation request, roll back the value corresponding to the anti-duplicate check mark of the pending request in the bitmap information recorded by the server to 0, so as to delete the record of the anti-duplicate check mark corresponding to the pending request from the bitmap information.

[0120] Optionally, the revocation request may be a communication protocol instruction. For example, the revocation request may be an instruction customized according to the protocol requirements of a specified communication protocol. For example, the revocation request may be a clear instruction, which is used to delete the record of the specified available identifier from the bitmap information, which is equivalent to the inverse operation of the put instruction, so as to realize the revocation of the available identifier submission when the requested service is executed abnormally.

[0121] After introducing the request verification process on the server side, the request verification process on the client side is introduced below.

[0122] refer to Figure 4 , Figure 4 A schematic diagram of a request verification method according to an embodiment of the present invention is shown schematically. Figure 4 As shown, the method is applied to the client and may include the following steps:

[0123] Step S401: allocating an anti-duplicate verification identifier to the pending request based on the available identifier applied for from the server, wherein the applied available identifier is sequentially numbered.

[0124] Optionally, when there is no available identifier, the client may apply for an available identifier from the server, thereby allocating an anti-duplicate verification identifier for the pending request based on the available identifier applied for from the server.

[0125] In a possible implementation, the client may assign the currently available minimum available identifier as an anti-duplicate verification identifier to the pending request, but is not limited thereto.

[0126] Step S402: Based on the anti-duplication verification identifier assigned to the request to be processed, a verification request is sent to the server, where the verification request is used to request the server to perform an anti-duplication verification on the request to be processed based on the anti-duplication verification identifier and the bitmap information recorded in the server, wherein the bitmap information is used to record the available identifiers that have been used in the form of a bitmap.

[0127] It should be noted that when the server records the used available identifiers in a bitmap format through bitmap information, the values ​​of the used available identifiers and the unused available identifiers in the corresponding bits of the bitmap are different, so that the bitmap information can be used to determine whether the available identifier is used or not.

[0128] Optionally, if the anti-duplicate verification identifier carried by the verification request is an available identifier that has been used, it can be determined that the pending request is a duplicate request; conversely, if the anti-duplicate verification identifier carried by the verification request is an available identifier that has not been used, it can be determined that the pending request is not a duplicate request.

[0129] Step S403: Based on the verification result returned by the server, determine whether the request to be processed is a duplicate request.

[0130] Optionally, the verification result can be used directly to indicate whether the pending request is a duplicate request, and the client can directly determine whether the pending request is a duplicate request based on the verification result returned by the server; or, the verification result can be used to indicate whether the anti-duplicate verification identifier carried by the verification request is an available identifier that has been used, so that the client can further determine whether the pending request is a duplicate request based on the verification result returned by the server.

[0131] After introducing the basic implementation process of the request verification method provided by the present invention applied to the client, various optional embodiments of the request verification method provided by the present invention on the client are introduced below.

[0132] For ease of understanding, firstly, the components that may be included in the client and the functions of each component are introduced. Through the functional support provided by these components, it is ensured that the client can implement the request verification method provided by the present invention.

[0133] In some embodiments, the client may include an execution component (Executor) and an identification generation component (IDGenerator). The functions of each component are specifically introduced below.

[0134] In some embodiments, the Executor may interact with the ID Store in the server to implement the execution of the request anti-duplicate verification process based on the available identifiers.

[0135] In some embodiments, the ID Generator may interact with the ID Allocator in the server to obtain an available identifier or an available number segment. Furthermore, the ID Generator may generate multiple available identifiers according to the obtained available number segment.

[0136] After introducing the various components and functions of the client, the client's request verification process is introduced below.

[0137] In some embodiments, for step S401, when allocating an anti-duplicate verification identifier for a pending request based on an available identifier applied for from the server, the following two implementation methods may be included:

[0138] In a possible implementation, if the available identifiers applied for from the server have been used up, a new available identifier may be applied for from the server again to allocate an anti-duplicate verification identifier for the pending request based on the new available identifier.

[0139] Optionally, the client can send an identification acquisition request to the server, which is used to request the server to allocate an available identification to the client, so that the server can allocate an available identification to the client based on the identification acquisition request and return the allocated available identification to the client so that the client can obtain a new available identification.

[0140] Optionally, the identifier acquisition request may be a communication protocol instruction, for example, the identifier acquisition request may be an instruction customized according to the protocol requirements of a specified communication protocol, for example, the identifier acquisition request may be an allocate instruction used to apply for a specified number of available identifiers, or for applying for an available number segment with a specified step size, but is not limited to this.

[0141] Optionally, when allocating available identifiers to the client, the server can allocate multiple available identifiers to the client, or allocate an available number segment to the client. The client can generate multiple available identifiers based on the available number segment allocated to it by the server. For details, please refer to the previous article and will not be repeated here.

[0142] Optionally, the available identifiers allocated by the server to the client each time are all sequentially numbered with a specified number, and the available identifiers allocated by the server to the client each time are sequentially taken from the available identifiers allocated by the server to the client last time. In addition, the available identifiers allocated by the server to the client do not exceed the maximum available identifier; if the number of available identifiers sequentially taken from the available identifier allocated by the server to the client last time to the maximum available identifier does not meet the specified number, the part exceeding the maximum available identifier is re-sequentially taken from 1. For a detailed description, please refer to the previous text and will not be repeated here.

[0143] In another possible implementation, if the available identifiers applied for from the server have not been used up, an anti-duplicate verification identifier may be directly allocated to the pending request based on the remaining available identifiers.

[0144] After the anti-duplicate check mark is assigned to the pending request, a check request carrying the anti-duplicate check mark can be sent to the server through step S402. The check request can be a communication protocol instruction, for example, the check request can be a customized instruction according to the protocol requirements of the specified communication protocol, for example, the check request can be a put instruction for submitting an identifier to the bitmap information.

[0145] In some embodiments, after receiving the verification request, the server can perform anti-duplication verification on the request to be processed based on the anti-duplication verification identifier carried by the verification request and the bitmap information recorded in the server, and then return the verification result to the client. For detailed introduction, please refer to the previous text and will not be repeated here.

[0146] In some embodiments, after receiving the verification result sent by the server, the client can determine whether the request to be processed is a duplicate request based on the verification result returned by the server through step S403. Taking the verification request as a put instruction as an example, the response to the put instruction (that is, the verification result) can include the following two types: if the submitted identifier recorded in the bitmap information has been used, the response can be 0 to indicate that the submitted identifier has been used; if the submitted identifier recorded in the bitmap information has not been used, the response can be 1 to indicate that the submitted identifier has not been used.

[0147] In some embodiments, when the value of the anti-duplication check flag carried by the verification request in the bitmap information recorded by the server is 0, the server can also update the value of the anti-duplication check flag in the bitmap information recorded by the server to 1 after the verification is completed, so as to record the anti-duplication check flag of the request to be processed in the bitmap information of the server. For the specific introduction, please refer to the previous text and will not be repeated here.

[0148] In some embodiments, for pending requests that are not duplicate requests, the client can instruct the business system client to execute the business process corresponding to the pending request to realize the processing of the pending request. However, the execution of the business process is uncontrollable, and the business process execution may fail due to various reasons. Optionally, if the business process execution corresponding to the pending request fails, the client can send a revocation request to the server, and the revocation request is used to request the server to delete the record of the anti-duplicate check mark corresponding to the pending request from the bitmap information, so that the server can roll back the value corresponding to the anti-duplicate check mark of the pending request in the bitmap information recorded by the server to 0 based on the received revocation request, so as to delete the record of the anti-duplicate check mark corresponding to the pending request from the bitmap information.

[0149] Optionally, the revocation request may be a communication protocol instruction. For example, the revocation request may be an instruction customized according to the protocol requirements of a specified communication protocol. For example, the revocation request may be a clear instruction, which is used to delete the record of the specified available identifier from the bitmap information, which is equivalent to the inverse operation of the put instruction, so as to realize the revocation of the available identifier submission when the requested service is executed abnormally.

[0150] For ease of understanding, the following describes the request verification process based on the interaction between the client and the server.

[0151] First, the architecture of the request verification system composed of the client and the server is introduced.

[0152] See also Figure 5 , Figure 5 The schematic diagram of the architecture of a request verification system according to an embodiment of the present invention is shown schematically. Figure 5 As shown, the request verification system may include a client and a server, wherein the client may include an Executor and an ID Generator, and the server may include an ID Store, an ID Allocator, Meta Data, and a Config. The ID Store may include multiple configuration files. The functions of each component have been introduced in the previous text and will not be repeated here. In addition, the client may also provide an ID submission interface and an ID application interface to use the bitmap principle and Mmap technology to achieve efficient request anti-duplicate verification, thereby achieving a high-performance verification effect with low business intrusion and resource conservation.

[0153] Optionally, a single long connection based on the Transmission Control Protocol (TCP) can be used between the client and the server to effectively cope with high-concurrency request processing scenarios.

[0154] Optionally, for the interaction between the client and the server, the requests and responses in the interaction process can be encoded using a fixed-length data encoding protocol.

[0155] Optionally, the request in the interaction process can be fixed to 10 bytes in length. The specific format can be found in Table 1 below:

[0156] Table 1

[0157]

[0158] Optionally, the response during the interaction can be fixed to 9 bytes in length. The specific format can be found in Table 2 below:

[0159] Table 2

[0160]

[0161] By defining the formats of requests and responses in the interaction process, the defined formats can be used to encode requests and responses during the interaction between the client and the server, so as to realize the interaction between the client and the server.

[0162] refer to Figure 6 , Figure 6 A schematic diagram of a request verification method according to an embodiment of the present invention is shown schematically. Figure 6 As shown, the method may include the following steps:

[0163] Step S601: The client allocates an anti-duplicate verification identifier for the pending request based on the available identifier applied for from the server.

[0164] In a possible implementation, if the available identifiers that the client has applied for from the server have not been used up, the client can allocate anti-duplicate verification identifiers for pending requests based on the remaining available identifiers.

[0165] In another possible implementation, if the available identifiers applied for by the client from the server have been used up, the client may apply for new available identifiers from the server again to allocate anti-duplicate verification identifiers for pending requests based on the new available identifiers.

[0166] Step S602: The client sends a verification request to the server based on the anti-duplicate verification identifier assigned to the request to be processed.

[0167] Step S603: The server receives the verification request sent by the client.

[0168] Step S604: The server performs an anti-duplication check on the request to be processed based on the anti-duplication check identifier carried in the check request and the bitmap information recorded in the server.

[0169] Step S605: The server sends the verification result to the client.

[0170] Step S606: The client determines whether the request to be processed is a duplicate request based on the verification result returned by the server.

[0171] Among them, the optional implementation methods of each step have been described in detail in the previous article and will not be repeated here.

[0172] For ease of understanding, the request verification method provided by the present invention is further described below in conjunction with the system architecture of the business system and the request verification system.

[0173] refer to Figure 7 , Figure 7 A schematic diagram of a request verification method according to an embodiment of the present invention is shown schematically. Figure 7 As shown, the anti-duplicate verification client can be integrated into the business system client and the business system server respectively. After the business system client receives the pending request, the anti-duplicate verification client can determine whether there is an available identifier at present. If so, the anti-duplicate verification identifier is directly assigned to the pending request based on the available identifier. If not, a new available identifier is applied to the anti-duplicate verification server to assign the anti-duplicate verification identifier to the pending request based on the newly applied available identifier, so that the business system client can send the pending request carrying the anti-duplicate verification identifier to the business system server. The anti-duplicate verification server deployed in the business system server can determine whether the pending request has been executed based on the anti-duplicate verification identifier. If so, the business system server can be instructed to directly end the processing of the pending request; if not, the business processing server can be instructed to perform business execution according to the pending request. If the business execution is successful, the business system server can return a corresponding response to the business system client. If the business execution fails, the anti-duplicate verification client can send a cancellation request to the anti-duplicate verification server to cancel the submission of the current available identifier.

[0174] Through the solution provided by the present invention, a request verification method can be provided which has little intrusion on the business system, good scalability, and saves storage space. It can not only realize accurate and high-performance request anti-duplicate processing, but also support undo operations. Under the same resource configuration, it provides higher processing performance, thereby greatly improving the maximum throughput of the request verification system.

[0175] Exemplary Devices

[0176] After introducing the method of the exemplary embodiment of the present invention, next, refer to Figure 8 A request verification device according to an exemplary embodiment of the present invention is introduced.

[0177] refer to Figure 8 , Figure 8 A block diagram of a request verification device according to an embodiment of the present invention is schematically shown. Figure 8 As shown, the device can be applied to the server, and the device includes:

[0178] The receiving module 801 is used to receive a verification request sent by a client, wherein the verification request is used to request the server to perform an anti-duplicate verification on the pending request, and the verification request carries an anti-duplicate verification identifier assigned by the client to the pending request based on an available identifier applied to the server, wherein the available identifier applied by the client to the server is sequentially numbered;

[0179] A verification module 802, configured to perform an anti-duplicate verification on the request to be processed based on the anti-duplicate verification identifier carried by the verification request and the bitmap information recorded in the server, wherein the bitmap information is used to record the available identifiers that have been used in a bitmap manner;

[0180] The sending module 803 is used to return the verification result of the pending request to the client, and the verification result is used by the client to determine whether the pending request is a repeated request.

[0181] In one embodiment of the present invention, the value of the used available flag in the bitmap information is 1;

[0182] The verification module 802, when used to perform anti-duplication verification on the pending request based on the anti-duplication verification identifier carried by the verification request and the bitmap information recorded in the server, is used for any of the following:

[0183] If the anti-duplicate check flag carried by the check request has a corresponding value of 1 in the bitmap information recorded by the server, it is determined that the request to be processed is a duplicate request;

[0184] If the anti-duplicate check flag carried by the check request has a corresponding value of 0 in the bitmap information recorded by the server, it is determined that the request to be processed is not a duplicate request.

[0185] In one embodiment of the present invention, the device further comprises:

[0186] An update module is used to update the value corresponding to the anti-duplicate check flag carried by the verification request in the bitmap information recorded by the server to 1, when the value corresponding to the anti-duplicate check flag in the bitmap information recorded by the server is 0, so as to record the anti-duplicate check flag of the request to be processed in the bitmap information of the server.

[0187] In one embodiment of the present invention, the receiving module 801 is further configured to receive a cancellation request sent by the client, wherein the cancellation request is sent by the client when the business process corresponding to the pending request fails to execute;

[0188] The device also includes:

[0189] A rollback module is used to roll back the corresponding value of the anti-duplicate check mark of the pending request in the bitmap information recorded by the server to 0 based on the revocation request, so as to delete the record of the anti-duplicate check mark corresponding to the pending request from the bitmap information.

[0190] In one embodiment of the present invention, the receiving module 801 is further configured to receive an identification acquisition request sent by the client;

[0191] The device also includes:

[0192] An allocation module is used to allocate sequentially numbered available identifiers to the client based on the identifier acquisition request.

[0193] In one embodiment of the present invention, the available identifiers allocated by the server to the client each time are sequentially numbered with a specified number, and the available identifiers allocated by the server to the client each time are sequentially taken from the available identifier allocated by the server to the client last time.

[0194] In one embodiment of the present invention, the available identifier allocated by the server to the client does not exceed the maximum available identifier; when the number of available identifiers starting from the available identifier allocated by the server to the client last time to the maximum available identifier does not meet the specified number, the part exceeding the maximum available identifier is re-sequentially valued starting from 1.

[0195] refer to Fig. 9 , Fig. 9 A block diagram of a request verification device according to an embodiment of the present invention is schematically shown. Fig. 9 As shown, the device can be applied to a client, and the device includes:

[0196] The allocation module 901 is used to allocate an anti-duplicate verification identifier to the pending request based on the available identifiers applied for from the server, wherein the applied available identifiers are sequentially numbered;

[0197] A sending module 902 is used to send a verification request to the server based on the anti-duplication verification identifier assigned to the pending request, wherein the verification request is used to request the server to perform an anti-duplication verification on the pending request based on the anti-duplication verification identifier and the bitmap information recorded in the server, wherein the bitmap information is used to record the available identifiers that have been used in a bitmap manner;

[0198] The determination module 903 is used to determine whether the request to be processed is a repeated request based on the verification result returned by the server.

[0199] In one embodiment of the present invention, the allocation module 901, when used to allocate an anti-duplicate verification identifier to a pending request based on an available identifier applied to a server, is used for any of the following:

[0200] If the available identifiers applied for from the server have not been used up, then based on the remaining available identifiers, an anti-duplicate verification identifier is allocated to the pending request;

[0201] If the available identifiers applied for from the server have been used up, a new available identifier is applied for from the server again, so as to allocate an anti-duplicate verification identifier for the pending request based on the new available identifier.

[0202] In one embodiment of the present invention, the sending module 902 is further used to send an identification acquisition request to the server, and the identification acquisition request is used to request the server to allocate an available identification to the client.

[0203] In one embodiment of the present invention, the available identifiers allocated by the server to the client each time are sequentially numbered with a specified number, and the available identifiers allocated by the server to the client each time are sequentially taken from the available identifier allocated by the server to the client last time.

[0204] In one embodiment of the present invention, the available identifier allocated by the server to the client does not exceed the maximum available identifier; when the number of available identifiers starting from the available identifier allocated by the server to the client last time to the maximum available identifier does not meet the specified number, the part exceeding the maximum available identifier is re-sequentially valued starting from 1.

[0205] In one embodiment of the present invention, when the request to be processed is not a duplicate request, the anti-duplicate check mark of the request to be processed is recorded in the bitmap information of the server.

[0206] In one embodiment of the present invention, the sending module is also used to send a revocation request to the server if the business process corresponding to the pending request fails to execute, and the revocation request is used to request the server to delete the record of the anti-duplicate check identifier corresponding to the pending request from the bitmap information.

[0207] It should be noted that, although several modules of the request verification device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules described above can be embodied in one unit / module. Conversely, the features and functions of one module described above can be further divided into multiple units / modules to be embodied.

[0208] Exemplary Media

[0209] After introducing the medium of the exemplary embodiment of the present invention, next, reference is made to Fig.10 A computer-readable storage medium for requesting verification according to an exemplary embodiment of the present invention is introduced.

[0210] refer to Fig.10, Fig.10 A schematic diagram of a computer-readable storage medium according to an embodiment of the present invention is schematically shown. Fig.10 As shown, a computer program 1000 is stored on a computer-readable storage medium, and when the computer program 1000 is executed by a processor of a computing device, the request verification method provided by any embodiment of the present invention can be executed. The computing device can be a terminal or server deployed with an anti-duplication verification client, or the computing device can be a server deployed with an anti-duplication verification server.

[0211] Exemplary Devices

[0212] After introducing the method, medium and apparatus of the exemplary embodiment of the present invention, the computing device for requesting verification of the exemplary embodiment of the present invention is introduced with reference to the figure. The computing device may be a terminal or server deployed with an anti-duplication verification client, or the computing device may be a server deployed with an anti-duplication verification server.

[0213] refer to Fig.11 , Fig.11 A schematic diagram of a computing device according to an embodiment of the present invention is schematically shown. Fig.11 As shown, the computing device 1100 may include, but is not limited to, a processor 1110 , a memory 1120 , and a bus 1130 that connects different system components (including the memory 1120 and the processor 1110 ).

[0214] The memory 1120 stores computer instructions, which can be executed by the processor 1110, so that the processor 1110 can execute the request verification method provided by any embodiment of the present invention. The memory 1120 may include a random access memory unit (Random Access Memory, RAM) 1121, a cache memory unit 1122 and / or a read-only memory unit (Read-Only Memory, ROM) 1123. The memory 1120 may also include: a program tool 1127 having a set of program modules 1124, and the program modules 1124 include but are not limited to: an operating system, one or more application programs, other program modules and program data, and one or more combinations of these program modules may include the implementation of a network environment.

[0215] The bus 1130 may include, for example, a data bus, an address bus, and a control bus. The computing device 1100 may also communicate with an external device 1150 via an input / output (I / O) interface 1140. The external device 1150 may be, for example, a keyboard, a Bluetooth device, etc. The computing device 1100 may also communicate with one or more networks via a network adapter 1160. For example, the network may be a local area network, a wide area network, a public network, etc. Fig.11 As shown, the network adapter 1160 can also communicate with other modules of the computing device 1100 via the bus 1130 .

[0216] Exemplary products

[0217] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the program is executed by the processor 1110 of the computing device 1100, the request verification method provided by any embodiment of the present invention can be implemented.

[0218] In addition, although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0219] Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.

Claims

1. A request verification method, characterized in that: The method comprises: Receive a verification request sent by a client, the verification request is used to request the server to perform an anti-duplicate verification on the pending request, the verification request carries an anti-duplicate verification identifier assigned by the client to the pending request based on an available identifier applied for from the server, wherein the available identifier applied for by the client to the server is sequentially numbered; Based on the anti-duplicate verification identifier carried by the verification request and the bitmap information recorded in the server, the request to be processed is subjected to an anti-duplicate verification, wherein the bitmap information is used to record the available identifiers that have been used in a bitmap manner; A verification result of the pending request is returned to the client, where the verification result is used by the client to determine whether the pending request is a repeated request.

2. The method according to claim 1, characterized in that The corresponding value of the used available flag in the bitmap information is 1; The performing anti-duplicate check on the request to be processed based on the anti-duplicate check identifier carried by the check request and the bitmap information recorded in the server includes any of the following: If the anti-duplicate check flag carried by the check request has a corresponding value of 1 in the bitmap information recorded by the server, it is determined that the request to be processed is a duplicate request; If the anti-duplicate check flag carried by the check request has a corresponding value of 0 in the bitmap information recorded by the server, it is determined that the request to be processed is not a duplicate request.

3. The method according to claim 2, characterized in that If the anti-duplicate verification flag carried by the verification request has a corresponding value of 0 in the bitmap information recorded by the server, the method further includes: The corresponding value of the anti-duplicate check flag in the bitmap information recorded by the server is updated to 1, so as to record the anti-duplicate check flag of the request to be processed in the bitmap information of the server.

4. The method according to claim 1, characterized in that: The method further comprises: receiving a cancellation request sent by the client, where the cancellation request is sent by the client when the business process corresponding to the pending request fails to execute; Based on the revocation request, the value corresponding to the anti-duplicate check mark of the pending request in the bitmap information recorded by the server is rolled back to 0, so as to delete the record of the anti-duplicate check mark corresponding to the pending request from the bitmap information.

5. A request verification method, characterized in that: The method comprises: Based on the available identifiers applied to the server, an anti-duplicate verification identifier is assigned to the pending request, wherein the available identifiers applied are sequentially numbered; Based on the anti-duplication verification identifier assigned to the pending request, sending a verification request to the server, the verification request is used to request the server to perform an anti-duplication verification on the pending request based on the anti-duplication verification identifier and the bitmap information recorded in the server, wherein the bitmap information is used to record the available identifiers that have been used in a bitmap manner; Based on the verification result returned by the server, determine whether the request to be processed is a duplicate request.

6. The method according to claim 5, characterized in that The allocation of an anti-duplicate verification identifier to the pending request based on the available identifier applied to the server includes any of the following: If the available identifiers applied for from the server have not been used up, an anti-duplicate verification identifier is allocated to the pending request based on the remaining available identifiers; If the available identifiers applied for from the server have been used up, a new available identifier is applied for from the server again, so as to allocate an anti-duplicate verification identifier for the pending request based on the new available identifier.

7. The method according to claim 5, characterized in that In the case that the request to be processed is not a repeated request, the method further includes: If the business process corresponding to the pending request fails to execute, a cancellation request is sent to the server, and the cancellation request is used to request the server to delete the record of the anti-duplicate verification identifier corresponding to the pending request from the bitmap information.

8. A request verification system, characterized in that: The request verification system includes a server and a client, wherein the server is used to perform the operations performed by the request verification method as described in any one of claims 1 to 4, and the client is used to perform the operations performed by the request verification method as described in any one of claims 5 to 7.

9. A computing device, characterized in that The computing device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the operations performed by the request verification method as described in any one of claims 1 to 4 are implemented; or, when the processor executes the computer program, the operations performed by the request verification method as described in any one of claims 5 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and the program is executed by a processor to implement the operations performed by the request verification method as described in any one of claims 1 to 4; or, the program is executed by a processor to implement the operations performed by the request verification method as described in any one of claims 5 to 7.