Detailed Description
In order that those skilled in the art will better understand the present disclosure, a technical solution in exemplary embodiments of the present disclosure will be clearly and completely described in the following with reference to the accompanying drawings in exemplary embodiments of the present disclosure.
In some of the flows described in the specification and claims of this disclosure and in the foregoing figures, a number of operations are included that occur in a particular order, but it should be understood that the operations may be performed in other than the order in which they occur or in parallel, that the order of operations such as 101, 102, etc. is merely for distinguishing between the various operations, and that the order of execution does not itself represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
Technical solutions in exemplary embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in exemplary embodiments of the present disclosure, and it is apparent that the described exemplary embodiments are only some embodiments of the present disclosure, not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of the disclosure. .
Fig. 1 illustrates a flowchart of a resource provisioning method according to an embodiment of the present disclosure. The method may include steps S101, S102 and S103.
In step S101, in response to a resource retrieval operation by the user, the number of resource copies to be retrieved in a resource package from which the user is to retrieve a resource is checked.
In step S102, in response to the checking result that the number of resources to be acquired in the resource package is less than or equal to the preset threshold, resources are issued to the user according to the first resource issuing mode.
In step S103, in response to the checking result that the number of resources to be acquired in the resource package is greater than the preset threshold, resources are issued to the user in the second resource issuing manner.
In one embodiment of the present disclosure, a resource may refer to a variety of resources such as memory space, computing power, tokens, passwords, credits, red packets, and the like, accessible through a computer or computer network.
In one embodiment of the present disclosure, a user may refer to software such as a computer, a device such as a mobile terminal, a client program, or a person.
In one embodiment of the present disclosure, the resource retrieving operation refers to an operation of retrieving a resource from a resource package having the resource by a user. It will be appreciated by those skilled in the art that the resource packet should have the same resource, the resource may be divided into multiple parts in advance, and the amount of each part of resource may be the same or different.
In one embodiment of the present disclosure, a resource is issued to a user in one of a first resource issuing manner and a second resource issuing manner according to a size relationship between a number of resources to be acquired in a resource package and a preset threshold. The security of the resource release and the queuing and waiting time of the user are different for different resource release modes.
In the embodiment of the disclosure, checking the number of to-be-acquired resource parts in a resource package from which a user acquires resources by responding to a resource acquisition operation of the user; responding to the checking result that the number of to-be-obtained resources in the resource package is less than or equal to a preset threshold value, and distributing resources to the user according to a first resource distribution mode; and responding to the checking result that the number of the to-be-obtained resources in the resource package is larger than the preset threshold value, distributing the resources to the user according to the second resource distribution mode, and controlling whether to distribute the resources to the user in the first resource distribution mode or the second resource distribution mode according to the number of the to-be-obtained resources in the resource package. Therefore, under the condition that the number of the to-be-acquired resources is small, the first resource issuing mode can ensure the safety of resource issuing, and under the condition that the number of the to-be-acquired resources is large, the second resource issuing mode can ensure the reduction of queuing and waiting time of users, so that user experience is improved.
The case where the number of resources to be acquired in the resource packet is less than or equal to the preset threshold will be further described below with reference to fig. 2.
Fig. 2 shows a flowchart of an example of step S102 of the resource issuing method according to an embodiment of the present disclosure. As shown in fig. 2, step S102 includes steps S201, S202, S203, and S204.
In step S201, in response to the checking result that the number of resources to be acquired in the resource package is less than or equal to the preset threshold, the account where the resource package is located is locked.
In step S202, the resource to be issued to the user is subtracted from the resource package and issued to the user.
In step S203, the account in which the locked resource package is located is unlocked.
In step S204, the user is notified that the resource release was successful.
In one embodiment of the present disclosure, the preset threshold may be any number, e.g., 10, 20, 50, 100, etc.
In one embodiment of the present disclosure, the first resource issuing manner may refer to locking an account where a resource package is located, then performing resource issuing and unlocking, and notifying the user that the resource issuing is successful (or notifying, by the account management system, that the user of the resource issuing system is successful in picking up the resource). The first resource distribution mode is beneficial to ensuring the safety of resource distribution. However, since account locking is performed every time a resource is issued, this may cause a resource issuer to which the account belongs to not use the account during the resource issuing. Therefore, if the number of resources to be acquired in the resource package is too large, the resource issuing time is centralized, so that the resource issuer cannot use the account for a long time, the normal operation of the resource issuer is prevented from being influenced, and the user experience is seriously influenced. Therefore, setting of the preset threshold is very necessary.
In one embodiment of the present disclosure, when the number of resources to be acquired in the resource package is less than or equal to a preset threshold, even if account locking is performed for each resource issuance, the resource issuer to which the account belongs cannot use the account during the resource issuance, but because the number of resources to be acquired is less, the resource issuer cannot use the account for a long time, and the influence on the normal operation of the resource issuer is small, so that the security of resource issuance can be ensured and the user experience can be ensured.
The case where the number of resources to be acquired in the resource packet is greater than the preset threshold will be further described with reference to fig. 2.
Fig. 3 shows a flowchart of an example of step S103 of the resource issuing method according to an embodiment of the present disclosure. As shown in fig. 3, step S103 includes steps S301, S302, and S303.
In step S301, in response to a result of checking that the number of resources to be acquired in the resource package is greater than a preset threshold, a resource to be issued from the resource package to the user is recorded.
In step S302, the user is notified that the resource release is successful.
In step S303, the resources to be issued to the user are subtracted from the resource package and issued to the user according to the recorded resources to be issued to the user from the resource package.
Similar to the embodiment described with reference to fig. 2, the preset threshold may be any number, e.g., 10, 20, 50, 100, etc.
In one embodiment of the present disclosure, when the number of resources to be acquired in the resource package is large, for example, greater than a preset threshold, if account locking is performed for each resource release, the resource issuer to which the account belongs may not use the account during the resource release. However, the resource issuing details are recorded first and then the resource issuing is performed asynchronously, so that the situation that the resource issuer cannot use the account for a long time is avoided.
In one embodiment of the present disclosure, the second resource issuing manner may refer to recording the resources to be issued from the resource package to the user, and then notifying the user that the resource is successfully issued (or notifying the user of the resource issuing system by the account management system that the user is successful in picking up the resource), and then performing the resource deduction and issue. The second resource release mode is beneficial to improving the efficiency of resource release and reducing the influence on the normal operation of a resource release person. Therefore, even when the number of resources to be acquired in the resource package is large, the deduction and the release time of the resources can be executed asynchronously with the operation of notifying the user that the resource release is successful, and the resource release person can normally use the account, so that the user experience is ensured.
In one embodiment of the present disclosure, step S303 includes: and simultaneously or after notifying the user that the resource is successfully issued, subtracting the resource to be issued to the user from the resource package according to the recorded resource to be issued to the user, and issuing the resource to the user.
In one embodiment of the present disclosure, when a resource retrieving operation of a user is received, if the resource retrieving operation of the user does not occur simultaneously with the resource retrieving operation of other users or occurs simultaneously with only a small amount of the resource retrieving operations of other users, the resource to be issued to the user may be subtracted from the resource package and issued to the user according to the recorded resource to be issued to the user from the resource package while notifying the user that the resource issue is successful. Therefore, when only one or a small number of users initiate resource acquisition at the same time, the users can be informed of successful resource release, and simultaneously, the resource deduction is carried out according to the records and the resource release is carried out to the users, so that the operation efficiency of the account of the resource release party is not reduced.
In one embodiment of the present disclosure, when a resource retrieving operation of a user is received, if the resource retrieving operation of the user occurs simultaneously with resource retrieving operations of other multiple users, the resource to be issued to the user may be subtracted from the resource package according to the recorded resource to be issued to the user and issued to the user in a sequential order, while or after notifying the user that the resource is issued successfully. That is, when a large number of users initiate resource acquisition at the same time, the users can be informed of successful resource release, and simultaneously or later, the resource deduction is carried out according to the record and the resource release is carried out to the users according to the sequence, so that the operation efficiency of the account of the resource release party is not reduced. In embodiments of the present disclosure, the order of the priority may be determined according to various factors such as the occurrence time of the user resource retrieving operation, the priority of the user, and the like, which embodiments of the present disclosure do not limit.
Fig. 5 illustrates a schematic diagram of an application scenario example of a resource provisioning method according to an embodiment of the present disclosure.
As shown in fig. 5, an application scenario of the resource issuing method according to an embodiment of the present disclosure is a scenario in which a user gets a red package, which may be referred to as a red package issuing scenario. In the scenario shown in fig. 5, a user getting a red packet initiates an operation 1 of robbing the red packet to the red packet system. After receiving operation 1 of robbing the red packets, the red packet system checks the size relationship between the number of red packets to be robbed and the specific number.
In one example, when the number of red packets is less than or equal to a specific number, the red packet system initiates a red packet pickup operation 1.1 to an account to which the red packet to be robbed in the accounting system belongs. And responding to the red packet picking operation 1.1, executing the account locking operation 1.1.1 by the accounting system, then executing the operation 1.1.2 of thawing the account and deducting the corresponding red packet amount, and finally executing the account unlocking operation 1.1.3. After the account release lock operation 1.1.3, the accounting system issues a red envelope pickup success notification to the red envelope system 1.1.4. The above operations correspond to the aforementioned first resource allocation manner.
In another example, when the number of red packets is greater than a certain number, the red packet system initiates a red packet pickup operation 2 to an account in the accounting system to which the red packet to be robbed belongs. In response to the red envelope pickup operation 2, the accounting system performs a step 2.1 of dropping transaction details for the account to which the red envelope to be robbed belongs. After executing the step 2.1 of dropping the transaction details, the accounting system issues a notification 2.2 of the success of the red envelope pick-up to the red envelope system. And then, the accounting system executes an asynchronous deduction operation 2.3 on the account to which the red packet to be robbed belongs. The above operation corresponds to the aforementioned second resource allocation manner.
Fig. 4 is a block diagram illustrating a configuration of a resource issuing apparatus according to another embodiment of the present disclosure. The apparatus may include a checking module 401, a first resource issuing module 402, and a second resource issuing module 403.
The checking module 401 is configured to check, in response to a resource retrieval operation by a user, the number of copies of a resource to be retrieved in a resource package from which the user is to retrieve the resource.
The first resource issuing module 402 is configured to issue resources to the user according to a first resource issuing manner in response to a result of checking that the number of resources to be acquired in the resource package is less than or equal to a preset threshold.
The second resource issuing module 403 is configured to issue resources to the user in a second resource issuing manner in response to a result of checking that the number of to-be-obtained resources in the resource package is greater than the preset threshold.
The internal functions and structures of the text content identifying means are described above, and in one possible design, the structure of the text content identifying means may be implemented as a text content identifying device, as shown in fig. 6, the processing device 600 may include a processor 601 and a memory 602.
The memory 602 is configured to store a program for supporting the text content identification means to perform the text content identification method of any of the above embodiments, and the processor 601 is configured to execute the program stored in the memory 602.
The memory 602 is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 601 to perform the steps of:
responding to a resource acquisition operation of a user, and checking the number of resources to be acquired in a resource package from which the user acquires the resources;
responding to the checking result that the number of the resources to be acquired in the resource package is less than or equal to a preset threshold value, and distributing resources to a user according to a first resource distribution mode;
and responding to the checking result that the number of the resources to be acquired in the resource package is larger than the preset threshold value, and distributing resources to the user according to a second resource distribution mode.
In one embodiment of the present disclosure, the responding to the checking result that the number of to-be-obtained resources in the resource package is less than or equal to the preset threshold value, issuing resources to the user according to the first resource issuing mode includes:
responding to an inspection result that the number of to-be-obtained resources in the resource package is less than or equal to a preset threshold value, and locking an account where the resource package is located;
subtracting the resource to be issued to the user from the resource package and issuing to the user;
unlocking the account where the locked resource package is located;
and notifying the user that the resource release is successful.
In one embodiment of the present disclosure, the issuing, in response to the checking result that the number of to-be-obtained resources in the resource package is greater than the preset threshold, the resource to the user according to the second resource issuing mode includes:
responding to the checking result that the number of to-be-obtained resources in the resource package is larger than the preset threshold value, and recording the resources to be issued from the resource package to the user;
notifying the user that the resource release is successful;
and subtracting the resources to be issued to the user from the resource package according to the recorded resources to be issued to the user from the resource package, and issuing the resources to the user.
In one embodiment of the present disclosure, the subtracting, from the resource package, the resource to be issued to the user and issuing to the user according to the recorded resource to be issued to the user from the resource package includes:
and simultaneously or after notifying the user that the resource is successfully issued, subtracting the resource to be issued to the user from the resource package according to the recorded resource to be issued to the user, and issuing the resource to the user.
The processor 601 is configured to perform all or part of the steps of the methods described above.
The text content identification device can also comprise a communication interface in the structure for the text content identification device to communicate with other devices or communication networks.
The exemplary embodiments of the present disclosure also provide a computer storage medium for storing computer software instructions for use by the text content identification apparatus, which contains a program for executing the text content identification method according to any of the above embodiments.
Fig. 7 is a schematic diagram of a computer system suitable for use in implementing a text content identification method according to an embodiment of the present disclosure.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can execute various processes in the embodiment shown in fig. 1 described above in accordance with a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data required for the operation of the system 700 are also stored. The CPU701, ROM702, and RAM703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, the method described above with reference to fig. 1 may be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the data processing method of fig. 1. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, and/or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware. The units or modules described may also be provided in a processor, the names of which in some cases do not constitute a limitation of the unit or module itself.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus described in the above embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer-readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention referred to in this disclosure is not limited to the specific combination of features described above, but encompasses other embodiments in which any combination of features described above or their equivalents is contemplated without departing from the inventive concepts described. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).