Control method, device and equipment for receiving virtual rights and interests and storage medium

By verifying the identity token and qualification token and performing atomic inventory deduction operations under high concurrency, the problem of virtual rights being over-accepted under high concurrency is solved, and system stability and user experience are improved.

CN119788358AActive Publication Date: 2025-04-08ZHEJIANG WEILIANDA TECHNOLOGY CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411879079.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-08
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In the case of high concurrency, the prior art is difficult to effectively prevent virtual rights from being over-acquisitioned, resulting in system performance degradation and poor user experience.

Method used

By receiving virtual equity collection requests sent by the client, verify the validity of the identity token and qualification token, and perform atomic inventory deduction operations when the inventory margin is sufficient to ensure the accuracy of user equity collection records.

Benefits of technology

It effectively prevents virtual rights from being over-received under high concurrency, improves the stability and user experience of the business system, and reduces the risk of malicious fleece.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788358A_ABST
    Figure CN119788358A_ABST
Patent Text Reader

Abstract

The invention provides a control method and device for receiving virtual rights and interests, equipment and a storage medium, and relates to the technical field of Internet. The method comprises the following steps: receiving a receiving request for target virtual rights and interests sent by a client, wherein the receiving request carries an identity token and a qualification token of the client and a rights and interests main key of the target virtual rights and interests; verifying the validity of the identity token and the qualification token; if the verification is passed, the inventory margin of the target virtual right is obtained according to the right primary key, if the margin is sufficient, secondary margin verification and atomic operation of inventory deduction are carried out, after the inventory deduction is successful, a user right receiving record is cached, and prompt information of right receiving success is returned to the client; and if the verification is not passed, returning prompt information of right receiving failure to the client. According to the invention, the concurrent processing performance of the service system is improved, the problem of virtual right overtaking under the high concurrency condition is effectively solved, and the stability of the service system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a control method, device, equipment and storage medium for receiving virtual rights and interests. Background Art

[0002] In modern e-commerce, electronic virtual rights are an important means to attract users. However, in high-concurrency situations, such as when online marketing activities begin, the system faces huge pressure from user requests. In this case, the system may have the problem of over-claiming virtual rights, that is, users obtain virtual rights exceeding the predetermined amount by submitting requests quickly and repeatedly.

[0003] In order to solve the above problems, some solutions have been proposed in the prior art, but there are still many shortcomings, such as the inability to effectively handle high-concurrency requests, resulting in system performance degradation or poor user experience. Summary of the invention

[0004] The purpose of this application is to provide a control method, device, electronic device and storage medium for the collection of virtual rights, which can effectively prevent the virtual rights from being over-collected under high concurrency conditions, thereby improving the stability of the business system and user experience.

[0005] In a first aspect, an embodiment of the present application provides a method for controlling the collection of virtual rights and interests, including:

[0006] Receive a claim request for a target virtual equity sent by a client, wherein the claim request carries an identity token, a qualification token, and an equity primary key of the target virtual equity of the client;

[0007] Verifying the validity of the identity token and qualification token;

[0008] If the verification is successful, the inventory balance of the target virtual equity is obtained according to the equity primary key. If the balance is sufficient, a secondary balance verification and an atomic operation of inventory deduction are performed. After the inventory deduction is successful, the user equity claim record is cached, and a prompt message indicating that the equity claim is successful is returned to the client;

[0009] If the verification fails, a prompt message indicating that the rights collection failed will be returned to the client.

[0010] In a possible implementation, before receiving the request for claiming the target virtual rights and interests sent by the client, the method further includes:

[0011] Receive an identity authentication request sent by a client, the identity authentication request carrying a network address IP and a mobile phone number;

[0012] Generate and cache a unique and time-limited identity token based on the IP and mobile phone number, and return the identity token to the client;

[0013] Receive a qualification authentication request sent by a client, wherein the qualification authentication request carries an identity token, an IP address, a mobile phone number address, and user permissions;

[0014] If the identity token, IP location, mobile phone number location and user permissions all meet the requirements, a unique and time-limited qualification token is generated and cached, and the qualification token is returned to the client.

[0015] In a possible implementation, before receiving the request for claiming the target virtual rights and interests sent by the client, the method further includes:

[0016] Receive an update request for the target virtual equity inventory, wherein the update request carries the equity primary key of the target virtual equity and its corresponding equity quantity and update method;

[0017] The inventory of the target virtual equity is updated according to the update request.

[0018] In a possible implementation manner, the updating manner is increasing or decreasing.

[0019] In a second aspect, an embodiment of the present application provides a control device for claiming virtual rights, including:

[0020] A receiving module, used to receive a claim request for a target virtual equity sent by a client, wherein the claim request carries an identity token, a qualification token and an equity primary key of the target virtual equity of the client;

[0021] A verification module, used to verify the validity of the identity token and the qualification token;

[0022] The operation module is used to obtain the inventory balance of the target virtual equity according to the equity primary key if the verification is passed, and perform secondary balance verification and atomic operations of inventory deduction if the balance is sufficient. After the inventory deduction is successful, the user equity collection record is cached and a prompt message of successful equity collection is returned to the client; if the verification fails, a prompt message of failed equity collection is returned to the client.

[0023] In a possible implementation, the receiving module is further configured to:

[0024] Before receiving the request for claiming the target virtual rights and interests sent by the client, receiving the identity authentication request sent by the client, wherein the identity authentication request carries the network address IP and the mobile phone number;

[0025] Generate and cache a unique and time-limited identity token based on the IP and mobile phone number, and return the identity token to the client;

[0026] Receive a qualification authentication request sent by a client, wherein the qualification authentication request carries an identity token, an IP address, a mobile phone number address, and user permissions;

[0027] If the identity token, IP location, mobile phone number location and user permissions all meet the requirements, a unique and time-limited qualification token is generated and cached, and the qualification token is returned to the client.

[0028] In a possible implementation, the receiving module is further configured to:

[0029] Before receiving the request for claiming the target virtual equity sent by the client, receiving an update request for the target virtual equity inventory, wherein the update request carries the equity primary key of the target virtual equity and its corresponding equity quantity and update method;

[0030] The inventory of the target virtual equity is updated according to the update request.

[0031] In a possible implementation manner, the updating manner is increasing or decreasing.

[0032] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer-readable instructions stored thereon, and the computer-readable instructions can be executed by a processor to implement the method described in the first aspect.

[0034] Compared with the prior art, the control method for the collection of virtual rights and interests provided in the present application receives a collection request for the target virtual rights and interests sent by the client, wherein the collection request carries the client's identity token, qualification token and the rights and interests primary key of the target virtual rights and interests; verifies the validity of the identity token and qualification token; if the verification is successful, obtains the inventory balance of the target virtual rights and interests according to the rights and interests primary key, and if the balance is sufficient, performs a secondary balance verification and an atomic operation of inventory deduction, caches the user rights and interests collection record after the inventory deduction is successful, and returns a prompt message of successful rights and interests collection to the client; if the verification fails, returns a prompt message of failed rights and interests collection to the client. Compared with the prior art, the present application passes a series of qualification authentications under high concurrency conditions, avoids a lot of time-consuming and repeated verification processing, and improves the concurrent processing performance of the business system; atomic operations are used for the judgment and deduction of the inventory balance of virtual rights and interests, which can avoid dirty reading and operation of inventory under high concurrency conditions, and can effectively solve the problem of over-collection of virtual rights and interests under high concurrency conditions, ensuring the stability of the business system, improving the security of user information and user experience, and reducing the risk of malicious fleecing of the business system. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0036] Figure 1 A flowchart of a control method for claiming virtual rights and interests provided in an embodiment of the present application is shown;

[0037] Figure 2 A flowchart of the interaction between a specific business system and a client provided in an embodiment of the present application is shown;

[0038] Figure 3 A schematic diagram showing a control device for collecting virtual rights and interests provided in an embodiment of the present application is shown;

[0039] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0040] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0041] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.

[0042] In addition, the terms "first" and "second" etc. are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0043] Please refer to Figure 1 , Figure 1 This is a flowchart of a control method for collecting virtual rights and interests provided in an embodiment of the present application. The present application can be applied to a business system. The method includes the following steps S101 to S104:

[0044] S101, receiving a claim request for a target virtual right sent by a client, wherein the claim request carries an identity token, a qualification token and a right master key of the target virtual right of the client;

[0045] An identity token is a digital credential used to verify a user's identity. It is generated during the identity verification process, contains information related to the user's identity, and is transmitted between different system components or services in a secure manner to prove the user's identity. Just like the ID card in our lives, it is presented in situations where identity verification is required to prove the legitimacy of one's identity.

[0046] User identification information is the core part of the identity token, which is used to uniquely identify the user. It usually includes user ID, username, network address, mobile phone number or email address, etc. To ensure security, identity tokens generally have validity limits. It will include the generation time and expiration time of the token. Setting the validity period can prevent the token from being used indefinitely and reduce security risks. Identity tokens usually contain a signature part, which is to ensure the integrity and authenticity of the token. The signature is obtained by processing other parts of the token (such as user identification and validity period) using an encryption algorithm. When the system receives the identity token, it will use the same algorithm and key to verify whether the signature is correct to determine whether the token has been tampered with.

[0047] A qualification token is also a digital credential used to prove that the holder has certain qualifications in a specific field, system or activity. Unlike identity tokens, which are mainly used to verify identity, qualification tokens focus on indicating whether the user meets specific requirements or conditions, thereby being eligible to perform certain operations, obtain specific resources or participate in specific transactions. Qualification tokens also have an expiration date, which specifies the time range in which the qualification token is valid.

[0048] The equity primary key is like the ID number of the virtual equity, through which each independent virtual equity can be accurately located and distinguished. The most important feature of the equity primary key is that it must be unique in the entire equity record set. This ensures that each virtual equity can be clearly identified in the database or system without confusion.

[0049] Specifically, in the control method for claiming virtual rights provided by the present application, before step S101 receives a claim request for a target virtual right sent by a client, the method further includes:

[0050] Receive an identity authentication request sent by a client, the identity authentication request carrying a network address IP and a mobile phone number; generate and cache a unique and time-limited identity token based on the IP and mobile phone number, and return the identity token to the client;

[0051] Receive a qualification authentication request sent by the client, which carries an identity token, IP location, mobile phone number location and user permissions; if the identity token, IP location, mobile phone number location and user permissions meet the requirements, generate and cache a unique and time-limited qualification token, and return the qualification token to the client, otherwise return a prompt message to the client that it is not eligible to receive benefits.

[0052] Specifically, an identity module can be set up in the business system for the generation and verification of identity tokens. The business system can also set up a qualification module for the generation and verification of qualification tokens. For example, the validity period of the identity token can be set to 5 minutes, and the validity period of the qualification token can be set to 1 minute, which avoids a lot of time-consuming and repeated verification processing during the validity period, avoids repeated authentication and consumption of server resources, and improves the concurrent processing performance of the business system.

[0053] S102: Verify the validity of the identity token and the qualification token; for example, verify whether the token is within the validity period and verify the authenticity of the token.

[0054] S103. If the verification is successful, the inventory balance of the target virtual equity is obtained according to the equity primary key. If the balance is sufficient, a secondary balance verification and an atomic operation of inventory deduction are performed. After the inventory deduction is successful, the user equity claim record is cached, and a prompt message indicating that the equity claim is successful is returned to the client.

[0055] In a high-concurrency business system, dirty reads and operations may occur in inventory. In a high-concurrency environment, dirty reads refer to a transaction reading data from another uncommitted transaction. In terms of inventory management, when multiple users operate on inventory at the same time, a situation may occur: one transaction is modifying inventory data (such as deducting inventory) but has not yet committed the modification, while another transaction reads the inventory data that has not yet been finalized, which results in dirty reads.

[0056] In scenarios such as inventory management systems, secondary balance verification and inventory deduction are key operations. Secondary balance verification refers to reconfirming whether the inventory is sufficient to meet the order requirements after the user places an order or other operations. Inventory deduction means subtracting the order quantity from the quantity of the corresponding goods in the inventory after the verification is passed. These two operations are closely related, and in a concurrent environment (such as multiple users placing orders for the same product at the same time), the atomicity of the operation must be guaranteed to avoid data inconsistencies such as overselling. If the secondary balance verification and inventory deduction operations are not atomic, a situation may occur where multiple users pass the balance verification at the same time (because there is enough inventory during verification), but when deducting the inventory, the inventory may be over-deducted due to the non-atomic operation, resulting in overselling. For example, if there is only one item left in the inventory of a product and two users place orders at the same time, if there is no atomic operation guarantee, both users may think that their purchase is successful, which is obviously unreasonable. At the database level, the accuracy of inventory data is crucial. Atomic operations can ensure that the secondary balance verification and inventory deduction are either all successful (sufficient inventory and successful deduction) or not executed at all (no deduction if insufficient inventory), thereby ensuring the consistency of inventory data and order data.

[0057] Specifically, an inventory module can be set up in the business system for inventory management of virtual rights and interests.

[0058] This application adopts atomic operations for the judgment and deduction of equity inventory balance, which can avoid dirty reading and operation of inventory under high concurrency, effectively solve the problem of over-claim of virtual equity under high concurrency, and ensure the stability of the business system.

[0059] S104. If the verification fails, a prompt message indicating that the rights collection failed is returned to the client;

[0060] In some embodiments, the control method for claiming virtual rights and interests may further include the following steps before receiving the claim request for the target virtual rights and interests sent by the client in step S101:

[0061] An update request for the target virtual equity inventory is received, wherein the update request carries an equity primary key of the target virtual equity and its corresponding equity quantity and update method; and the inventory of the target virtual equity is updated according to the update request.

[0062] Specifically, the updating method is to increase or decrease. For example, the inventory quantity of the target virtual equity is increased according to the update request; or the inventory quantity of the target virtual equity is decreased according to the update request.

[0063] For ease of understanding, this application also provides Figure 2 A specific flow chart of interaction between a business system and a client is shown in FIG. , wherein the business system includes the above-mentioned identity module, qualification module and inventory module, such as Figure 2 As shown, the following steps are included:

[0064] Step 1: The client initiates an authentication request to the business system. The business system first authenticates the identity through the identity module. If the identity is valid, an identity token is generated and the authentication success is returned. Otherwise, the authentication failure is returned. After the client passes the business system identity authentication, the authentication result is cached in the cache system (such as Redis). The cache time is set to 5 minutes to reduce the burden of repeated authentication.

[0065] Step 2: The client initiates a qualification authentication request for the virtual rights collection to the business system, including identity token, IP location, mobile phone number location, user permissions, etc., to determine whether the user meets the conditions for collection. If the user is eligible, a qualification token is generated and a qualification authentication success is returned; otherwise, a qualification authentication failure is returned. The business system caches the qualification authentication results to the cache system, and the cache time is set to 1 minute to avoid repeated verification;

[0066] Step 3: If the client's virtual rights claim qualification authentication is successful, the inventory module is used to update the inventory quantity in the storage system through atomic operations; atomic operations can include database transactions or distributed locks to ensure the accuracy of inventory data; if identity authentication or qualification authentication fails, or the inventory is insufficient, the inventory module will return a failure response. The inventory deduction operation record is asynchronously sent to the message queue system (such as RabbitMQ, Kafka), which is asynchronously processed by the message queue system and the record is inserted into the persistent storage system (such as a relational database) to reduce the delay of the main operation.

[0067] The control method for collecting virtual rights provided in the embodiment of the present application receives a collection request for the target virtual rights sent by the client, wherein the collection request carries the client's identity token, qualification token and the rights primary key of the target virtual rights; verifies the validity of the identity token and qualification token; if the verification is successful, obtains the inventory balance of the target virtual rights according to the rights primary key, and if the balance is sufficient, performs a secondary balance verification and atomic operations of inventory deduction, caches the user rights collection record after the inventory deduction is successful, and returns a prompt message of successful rights collection to the client; if the verification fails, returns a prompt message of failed rights collection to the client. Compared with the prior art, the present application avoids a lot of time-consuming and repeated verification processing through a series of qualification authentications under high concurrency, and improves the concurrent processing performance of the business system; atomic operations are used for the judgment and deduction of the virtual rights inventory balance, which can avoid dirty reading and operation of inventory under high concurrency, and can effectively solve the problem of over-collection of virtual rights under high concurrency, ensure the stability of the business system, improve the security of user information and user experience, and reduce the risk of malicious fleecing of the business system.

[0068] In the above-mentioned embodiment, a control method for collecting virtual rights and interests is provided. Correspondingly, the present application also provides a control device for collecting virtual rights and interests. The control device for collecting virtual rights and interests provided in the embodiment of the present application can implement the control method for collecting virtual rights and interests. The control device for collecting virtual rights and interests can be implemented by software, hardware, or a combination of software and hardware. For example, the control device for collecting virtual rights and interests can include integrated or separate functional modules or units to execute the corresponding steps in the above-mentioned methods. Please refer to Figure 3 As shown, the control device 10 for receiving virtual rights and interests of the present application includes:

[0069] The receiving module 101 is used to receive a claim request for a target virtual equity sent by a client, wherein the claim request carries an identity token, a qualification token and an equity primary key of the target virtual equity of the client;

[0070] Verification module 102, used to verify the validity of the identity token and qualification token;

[0071] Operation module 103 is used to obtain the inventory balance of the target virtual equity according to the equity primary key if the verification is passed, and perform secondary balance verification and atomic operations of inventory deduction if the balance is sufficient. After the inventory deduction is successful, the user equity collection record is cached and a prompt message of successful equity collection is returned to the client; if the verification fails, a prompt message of failed equity collection is returned to the client.

[0072] In a possible implementation, the receiving module 101 is further configured to:

[0073] Before receiving the request for claiming the target virtual rights and interests sent by the client, receiving the identity authentication request sent by the client, wherein the identity authentication request carries the network address IP and the mobile phone number;

[0074] Generate and cache a unique and time-limited identity token based on the IP and mobile phone number, and return the identity token to the client;

[0075] Receive a qualification authentication request sent by a client, wherein the qualification authentication request carries an identity token, an IP address, a mobile phone number address, and user permissions;

[0076] If the identity token, IP location, mobile phone number location and user permissions all meet the requirements, a unique and time-limited qualification token is generated and cached, and the qualification token is returned to the client.

[0077] In a possible implementation, the receiving module 101 is further configured to:

[0078] Before receiving the request for claiming the target virtual equity sent by the client, receiving an update request for the target virtual equity inventory, wherein the update request carries the equity primary key of the target virtual equity and its corresponding equity quantity and update method;

[0079] The inventory of the target virtual equity is updated according to the update request.

[0080] In a possible implementation manner, the updating manner is increasing or decreasing.

[0081] The control device for collecting virtual rights and interests provided in the embodiment of the present application and the control method for collecting virtual rights and interests provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.

[0082] An embodiment of the present application also provides an electronic device corresponding to the method provided in the aforementioned embodiment, and the electronic device may be an electronic device for a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the above-mentioned control method for collecting virtual rights and interests.

[0083] Please refer to Figure 4 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 4As shown, the electronic device 20 includes: a processor 200, a memory 201, a bus 202 and a communication interface 203, and the processor 200, the communication interface 203 and the memory 201 are connected via the bus 202; the memory 201 stores a computer program that can be run on the processor 200, and when the processor 200 runs the computer program, it executes the control method for collecting virtual rights and interests provided in any of the aforementioned embodiments of the present application.

[0084] The memory 201 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 203 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0085] The bus 202 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 201 is used to store programs, and the processor 200 executes the program after receiving the execution instruction. The control method for claiming virtual rights disclosed in any implementation of the embodiment of the present application may be applied to the processor 200, or implemented by the processor 200.

[0086] The processor 200 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 200. The above processor 200 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201 and completes the steps of the above method in combination with its hardware.

[0087] The electronic device provided in the embodiment of the present application and the control method for receiving virtual rights and interests provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.

[0088] The embodiments of the present application also provide a computer-readable storage medium corresponding to the control method for collecting virtual rights and interests provided in the aforementioned embodiments, on which a computer program (i.e., a program product) is stored. When the computer program is executed by a processor, it will execute the control method for collecting virtual rights and interests provided in any of the aforementioned embodiments.

[0089] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0090] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the control method for receiving virtual rights and interests provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application.

Claims

1. A control method for receiving virtual rights, characterized in that: include: Receive a claim request for a target virtual equity sent by a client, wherein the claim request carries an identity token, a qualification token, and an equity primary key of the target virtual equity of the client; Verifying the validity of the identity token and qualification token; If the verification is successful, the inventory balance of the target virtual equity is obtained according to the equity primary key. If the balance is sufficient, a secondary balance verification and an atomic operation of inventory deduction are performed. After the inventory deduction is successful, the user equity claim record is cached, and a prompt message indicating that the equity claim is successful is returned to the client; If the verification fails, a prompt message indicating that the rights collection failed will be returned to the client.

2. The method according to claim 1, characterized in that Before receiving the request for receiving the target virtual rights and interests sent by the client, the method further includes: Receive an identity authentication request sent by a client, the identity authentication request carrying a network address IP and a mobile phone number; Generate and cache a unique and time-limited identity token based on the IP and mobile phone number, and return the identity token to the client; Receive a qualification authentication request sent by a client, wherein the qualification authentication request carries an identity token, an IP address, a mobile phone number address, and user permissions; If the identity token, IP location, mobile phone number location and user permissions all meet the requirements, a unique and time-limited qualification token is generated and cached, and the qualification token is returned to the client.

3. The method according to claim 1, characterized in that Before receiving the request for receiving the target virtual rights and interests sent by the client, the method further includes: Receive an update request for the target virtual equity inventory, wherein the update request carries the equity primary key of the target virtual equity and its corresponding equity quantity and update method; The inventory of the target virtual equity is updated according to the update request.

4. The method according to claim 3, characterized in that: The updating method is increasing or decreasing.

5. A control device for receiving virtual rights, characterized in that: include: A receiving module, used to receive a claim request for a target virtual equity sent by a client, wherein the claim request carries an identity token, a qualification token and an equity primary key of the target virtual equity of the client; A verification module, used to verify the validity of the identity token and the qualification token; An operation module is used to obtain the inventory balance of the target virtual equity according to the equity primary key if the verification is passed, and to perform a secondary balance verification and an atomic operation of inventory deduction if the balance is sufficient. After the inventory deduction is successful, the user equity claim record is cached, and a prompt message of successful equity claim is returned to the client; If the verification fails, a prompt message indicating that the rights collection failed will be returned to the client.

6. The device according to claim 5, characterized in that The receiving module is further used for: Before receiving the request for claiming the target virtual rights and interests sent by the client, receiving the identity authentication request sent by the client, wherein the identity authentication request carries the network address IP and the mobile phone number; Generate and cache a unique and time-limited identity token based on the IP and mobile phone number, and return the identity token to the client; Receive a qualification authentication request sent by a client, wherein the qualification authentication request carries an identity token, an IP address, a mobile phone number address, and user permissions; If the identity token, IP location, mobile phone number location and user permissions all meet the requirements, a unique and time-limited qualification token is generated and cached, and the qualification token is returned to the client.

7. The device according to claim 5, characterized in that The receiving module is further used for: Before receiving the request for claiming the target virtual equity sent by the client, receiving an update request for the target virtual equity inventory, wherein the update request carries the equity primary key of the target virtual equity and its corresponding equity quantity and update method; The inventory of the target virtual equity is updated according to the update request.

8. The device according to claim 7, characterized in that The updating method is increasing or decreasing.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 4 when executing the computer program.

10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Order processing method, device and system based on financial business and storage medium

    CN110415069A

  • Data query method and device, server and computer readable medium

    CN110442576A

  • Identity authentication method and device, authority authentication method and device and user management system

    CN110545272A

  • Commodity seckilling method and device, computer equipment and storage medium

    CN112132662A

  • Secure cross-domain login method, system and server

    CN112333198A