CN116737109A - Digital resource processing method and device, electronic equipment and storage medium - Google Patents

Digital resource processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116737109A
CN116737109A CN202310626563.0A CN202310626563A CN116737109A CN 116737109 A CN116737109 A CN 116737109A CN 202310626563 A CN202310626563 A CN 202310626563A CN 116737109 A CN116737109 A CN 116737109A
Authority
CN
China
Prior art keywords
digital resource
target
digital
resource
packets
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310626563.0A
Other languages
Chinese (zh)
Inventor
李炯
胡凯乐
柳青
何子南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310626563.0A priority Critical patent/CN116737109A/en
Publication of CN116737109A publication Critical patent/CN116737109A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Finance (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure provides a digital resource processing method, a device, equipment and a storage medium, which can be applied to the fields of data processing and financial science and technology. The method comprises the following steps: acquiring a total number of digital resource and a total number of digital resource packages; generating N digital resource groups according to the total number of the digital resource packets, wherein each digital resource group comprises M digital resource packets, N is more than or equal to 2, and M is more than or equal to 2; determining a target digital resource group from the N digital resource groups in response to a digital resource packet acquisition request from a target user; generating a random number within a preset range under the condition that the residual number of the digital resource packets in the target digital resource group is larger than 1, wherein the preset range is determined according to the total value of the digital resources, the total number of the digital resource packets and the number M of the digital resource packets in the digital resource group; and determining the random number as a resource value of a target digital resource package corresponding to the target user.

Description

Digital resource processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing and financial technology, and in particular, to a digital resource processing method, apparatus, device, medium, and program product.
Background
With the rapid development of communication technology, electronic devices are increasingly widely used and have more functions, so that the ever-increasing use demands of users are met.
In the related art, a user may perform a digital resource allocation service through an electronic device in addition to transmitting information through the electronic device. Currently, for digital resource allocation, a method of randomly generating a plurality of digital resource packets is generally adopted to realize the allocation.
In the process of implementing the inventive concept of the present disclosure, the inventor found that there are at least the following problems in the related art: the digital resource allocation is realized by randomly generating a plurality of digital resource packages, and when the number of the digital resource packages to be generated is large, more system resources are needed to be occupied, so that the operation efficiency of the electronic equipment is affected.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a digital resource processing method, apparatus, device, medium, and program product.
According to one aspect of the present disclosure, there is provided a digital resource processing method including:
acquiring a total number of digital resource and a total number of digital resource packages;
generating N digital resource groups according to the total number of the digital resource packets, wherein each digital resource group comprises M digital resource packets, N is more than or equal to 2, and M is more than or equal to 2;
Determining a target digital resource group from the N digital resource groups in response to a digital resource packet acquisition request from a target user;
generating a random number within a preset range under the condition that the residual number of the digital resource packets in the target digital resource group is larger than 1, wherein the preset range is determined according to the total value of the digital resources, the total number of the digital resource packets and the number M of the digital resource packets in the digital resource group; and
and determining the random number as a resource value of a target digital resource package corresponding to the target user.
According to an embodiment of the present disclosure, the above method further includes:
determining a digital resource sub-value of each digital resource group according to the digital resource total value and the N digital resource groups;
and determining the current digital resource sub-value of the target digital resource group as the resource value of the target digital resource packet under the condition that the residual number of the digital resource packets in the target digital resource group is equal to 1.
According to an embodiment of the present disclosure, each of the above-mentioned digital resource groups has a status identifier;
the determining the target digital resource group from the N digital resource groups includes:
Determining candidate digital resource groups from the N digital resource groups according to the state identification of the digital resource groups, wherein the state identification represents whether the digital resource groups are available or not;
and determining the target digital resource group from the candidate digital resource groups according to a preset determination mode.
According to an embodiment of the present disclosure, the above method further includes:
after the target digital resource group is determined from the N digital resource groups, locking the target digital resource group;
updating the residual resource value of the target digital resource group according to the target digital resource sub-value of the target digital resource group and the random number;
updating the remaining number of the digital resource packages in the target digital resource group;
unlocking the target digital resource group.
According to an embodiment of the present disclosure, the above method further includes:
before the Jie Suoshang target digital resource group, updating the state identifier of the target digital resource group according to the residual number of the digital resource packets in the target digital resource group.
According to an embodiment of the present disclosure, the updating the state identifier of the target resource group according to the remaining number of the digital resource packages in the target digital resource group includes:
Updating a state identifier of the target resource group to be a first identifier according to the residual number of the digital resource packets in the target digital resource group, and under the condition that the residual number of the digital resource packets in the target digital resource group is zero, wherein the first identifier represents that the target resource group is unavailable;
and updating the state identifier of the target resource group to be a second identifier according to the residual number of the digital resource packets in the target digital resource group, wherein the second identifier represents that the target resource group is available under the condition that the residual number of the digital resource packets in the target digital resource group is not zero.
According to an embodiment of the present disclosure, the upper limit value of the preset range is an upper limit resource value of the single digital resource packet, and the lower limit value of the preset range is a lower limit resource value of the single digital resource packet.
According to an embodiment of the present disclosure, the method for determining the lower limit resource value of the digital resource packet and the upper limit resource value of the digital resource packet includes:
determining an average resource value of a single digital resource packet according to the total digital resource value and the total digital resource packet number;
And determining the lower limit resource value of the digital resource packet and the upper limit resource value of the digital resource according to the average resource value and the number M of the digital resource packets in each digital resource group according to a preset formula.
According to an embodiment of the present disclosure, the above method further includes:
after the random number is determined to be the resource value of the target digital resource package corresponding to the target user, the target digital resource package is sent to the target user;
updating the total residual quantity of the digital resource package;
and determining that the issuing of the digital resource packet is completed when the total residual quantity of the digital resource packet is determined to be zero.
Another aspect of the present disclosure provides a digital resource processing apparatus, including:
the acquisition module is used for acquiring the total number of the digital resources and the total number of the digital resource packages;
the first generation module is used for generating N digital resource groups according to the total number of the digital resource packets, wherein each digital resource group comprises M digital resource packets, N is more than or equal to 2, and M is more than or equal to 2;
the first determining module is used for determining a target digital resource group from the N digital resource groups in response to a digital resource packet acquisition request from a target user;
A second generation module, configured to generate a random number in a preset range when it is determined that the remaining number of the digital resource packets in the target digital resource group is greater than 1, where the preset range is determined according to the total number of digital resources, the total number of digital resource packets, and the number M of digital resource packets in the digital resource group; and
and the second determining module is used for determining the random number as the resource value of the target digital resource packet corresponding to the target user.
Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the digital resource processing method described above.
Another aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described digital resource processing method.
Another aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described digital resource processing method.
According to the embodiment of the disclosure, N digital resource groups are generated according to the total amount of the digital resource packets, so that each digital resource group comprises M digital resource packets; then when receiving a digital resource package acquisition request of a target user, determining a target digital resource group from N digital resource groups; generating a random number in a preset range under the condition that the residual number of the digital resource packets in the target digital resource group is determined to be more than 1; and then the random number is used as a technical means of the resource value of the target digital resource package corresponding to the target user. The method and the device are used for processing the single digital resource group when the resource value of the target digital resource packet is randomly determined, so that the system burden is reduced, the technical problem that more system resources are required to be occupied when more digital resource packets are required to be generated in the related technology is at least partially solved, the operation efficiency of the electronic equipment is reduced, and the technical effect of randomly issuing the digital resource packets is achieved while the stability of the system performance is guaranteed.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a digital resource processing method, apparatus, device, medium and program product according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a digital resource processing method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a state identification schematic of a digital resource group according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a method of updating a set of target digital resources according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a flow chart of a digital resource processing method according to another embodiment of the present disclosure;
FIG. 6 schematically illustrates a block diagram of a digital resource processing device according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of a digital resource processing device according to an embodiment of the present disclosure; and
fig. 8 schematically illustrates a block diagram of an electronic device adapted to implement a digital resource processing method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
With the rapid development of communication technology, electronic devices are increasingly widely used and have more functions, so that the ever-increasing use demands of users are met.
In the related art, a user may perform a digital resource allocation service through an electronic device in addition to transmitting information through the electronic device. Currently, for digital resource allocation such as red pack issuing and consumption ticket issuing, the following method is generally adopted: firstly, a mode of evenly distributing digital resource distribution is adopted, for example, the resource value of each digital resource package is preset according to the total value of the digital resources and the total number of the digital resource packages, and then the digital resource packages are randomly distributed to users. The other is to randomly generate a numerical value as a resource value of the digital resource packet within the upper and lower limits of a preset single digital resource packet.
In the process of implementing the inventive concept of the present disclosure, the inventor found that there are at least the following problems in the related art: the above-mentioned mode of evenly distributing digital resource distribution cannot enable the resource value of a single digital resource packet to be randomly generated; the method of randomly generating the numerical value as the resource value of the digital resource package in the upper and lower limits of the preset single digital resource package often needs to occupy more system resources when the number of the digital resource packages to be generated is large, thereby affecting the operation efficiency of the electronic device.
In view of the above, the present disclosure aims at the above technical problems, dividing the total number of digital resources into a plurality of digital resource groups, such that the digital resource packet in each digital resource group is not less than 2; when a digital resource packet acquisition request of a user is received, a target digital resource group is determined from a plurality of digital resource groups, and a random number is generated in a preset range for the digital resource packet in the target digital resource group, so that the random number is the resource value of the target digital resource packet. According to the scheme, for a single acquisition request, a single digital resource group is processed, so that the stability of system performance is ensured; in addition, the preset range in the method is determined according to the total value of the digital resources, the total number of the digital resource packets and the number M of the digital resource packets in the digital resource group, so that the generation range of the random number can be ensured not to be unbalanced, and the aim of truly and randomly distributing the digital resource packets is fulfilled.
Specifically, an embodiment of the present disclosure provides a digital resource processing method, including: acquiring a total number of digital resource and a total number of digital resource packages; generating N digital resource groups according to the total number of the digital resource packets, wherein each digital resource group comprises M digital resource packets, N is more than or equal to 2, and M is more than or equal to 2; determining a target digital resource group from the N digital resource groups in response to a digital resource packet acquisition request from a target user; generating a random number within a preset range under the condition that the residual number of the digital resource packets in the target digital resource group is larger than 1, wherein the preset range is determined according to the total value of the digital resources, the total number of the digital resource packets and the number M of the digital resource packets in the digital resource group; and determining the random number as a resource value of a target digital resource package corresponding to the target user.
It should be noted that the digital resource processing method and device provided by the embodiment of the disclosure may be used in the fields of data processing and financial science and technology. The digital resource processing method and device provided by the embodiment of the disclosure can also be used in any field except the data processing field and the financial science and technology field. The application fields of the digital resource processing method and the device provided by the embodiment of the disclosure are not limited.
In the technical scheme of the disclosure, the authorization or consent of the user is obtained before the personal information of the user is obtained or acquired.
In the technical scheme of the disclosure, the processes of acquiring, collecting, storing, using, processing, transmitting, providing, disclosing, applying and the like of the data all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public order harmony is not violated.
Fig. 1 schematically illustrates an application scenario diagram of a digital resource processing method, apparatus, device, medium and program product according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a financial class application, a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the digital resource processing method provided in the embodiments of the present disclosure may be generally executed by the server 105. Accordingly, the digital resource processing device provided by the embodiments of the present disclosure may be generally disposed in the server 105. The digital resource processing method provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the digital resource processing apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Alternatively, the digital resource processing method provided by the embodiment of the present disclosure may be performed by the first terminal device 101, the second terminal device 102, and the third terminal device 103, or may be performed by other terminal devices different from the first terminal device 101, the second terminal device 102, and the third terminal device 103. Accordingly, the digital resource processing apparatus provided by the embodiments of the present disclosure may also be provided in the first terminal device 101, the second terminal device 102, the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102, and the third terminal device 103.
For example, the total number of digital resource and the total number of digital resource packets may be originally stored in any one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 (for example, but not limited to, the first terminal device 101), or stored on an external storage device and may be imported into the first terminal device 101. Then, the first terminal device 101 may locally perform the digital resource processing method provided by the embodiment of the present disclosure, or transmit the digital resource total value and the digital resource packet total number to other terminal devices, servers, or server clusters, and perform the digital resource processing method provided by the embodiment of the present disclosure by other terminal devices, servers, or server clusters that receive the digital resource total value and the digital resource packet total number.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The digital resource processing method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 5 based on the scenario described in fig. 1.
Fig. 2 schematically illustrates a flow chart of a digital resource processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the digital resource processing method of this embodiment includes operations S210 to S250, and the digital resource processing method may be performed by a server.
In operation S210, a total number of digital resources and a total number of digital resource packages are acquired.
According to the embodiment of the disclosure, the total digital resource value and the total digital resource package number may be the total digital resource value and the total digital resource package number obtained by receiving the operation information of the user at the digital resource processing interface according to the operation information. The total number of digital resources and the total number of digital resource packages may also be transmitted by the memory. The method for obtaining the total number of digital resources and the total number of digital resource packages in the embodiment of the disclosure is not limited.
In operation S220, N digital resource groups are generated according to the total number of the digital resource packets, where each digital resource group includes M digital resource packets, N is greater than or equal to 2, and M is greater than or equal to 2.
According to embodiments of the present disclosure, the number of digital resource packages in each digital resource group may be the same or different. For example, if the total number of the digital resource packets is 9, the number of the digital resource groups generated according to the total number of the digital resource packets may be 3, and the digital resource group a, the digital resource group B and the digital resource group C may be respectively. In some of these embodiments, the number of digital resource packages in each digital resource group may be the same, i.e., the number of digital resource packages in digital resource group a, digital resource group B, and digital resource group C are the same and all 3. In other embodiments, the number of digital resource packets in each digital resource group may be different, i.e., the number of digital resource packets in digital resource group a, digital resource group B, and digital resource group C may be different, e.g., 2 digital resource packets are included in digital resource group a, 3 digital resource packets are included in digital resource group B, and 4 digital resource packets are included in digital resource group C.
According to an embodiment of the present disclosure, where the number of digital resource packages in each digital resource group is the same, generating N digital resource groups according to the total number of digital resource packages may include: and dividing the total number of the digital resource packets by the number of the digital resource packets in each digital resource group to obtain the number of the digital resource groups. It should be noted that, when the total number of digital resource packets divided by the number of digital resource packets in each digital resource group is not an integer, the number of digital resource packets in one of the digital resource groups may be allowed to be smaller than the number of digital resource packets in the other digital resource groups. For example, if the total number of digital resource packets is 11 and the number of digital resource packets in each digital resource group is 3, then dividing the total number of digital resource packets by the number of digital resource packets in each digital resource group of 11 by the number of digital resource packets in each digital resource group of 3 yields more than 3, i.e. when generating 3 digital resource groups, 2 digital resource packets will remain. At this point, in some of these embodiments, the remaining 2 digital resource packages may be consolidated into any one of the 3 digital resource sets. In other embodiments, the remaining 2 digital resource packages are individually formed into one digital resource set, i.e., a total of 4 digital resource sets.
In operation S230, a target digital resource group is determined from the N digital resource groups in response to a digital resource packet acquisition request from the target user.
According to an embodiment of the present disclosure, determining the target digital resource group from the N digital resource groups may include randomly determining one digital resource group from the N digital resource groups as the target digital resource group; one digital resource group can be determined from the N digital resource groups according to a preset digital resource group acquisition sequence to serve as a target digital resource group; one digital resource group may also be determined as a target digital resource group according to the number of times each digital resource group is acquired.
In operation S240, if it is determined that the remaining number of the digital resource packages in the target digital resource group is greater than 1, a random number is generated within a preset range, wherein the preset range is determined according to the total number of the digital resource packages, and the number M of the digital resource packages in the digital resource group.
According to an embodiment of the present disclosure, the preset range may be an upper and lower limit range of random number generation set in advance.
According to an embodiment of the present disclosure, the upper limit value of the preset range is an upper limit resource value of the single digital resource packet, and the lower limit value of the preset range is a lower limit resource value of the single digital resource packet.
In operation S250, it is determined that the random number is a resource value of a target digital resource package corresponding to the target user.
According to the embodiment of the disclosure, because the generation of N digital resource groups according to the total digital resource packet amount is adopted, each digital resource group comprises M digital resource packets; then when receiving a digital resource package acquisition request of a target user, determining a target digital resource group from N digital resource groups; generating a random number in a preset range under the condition that the residual number of the digital resource packets in the target digital resource group is determined to be more than 1; and then the random number is used as a technical means of the resource value of the target digital resource package corresponding to the target user. The method and the device are used for processing the single digital resource group when the resource value of the target digital resource packet is randomly determined, so that the system burden is reduced, the technical problem that more system resources are required to be occupied when more digital resource packets are required to be generated in the related technology is at least partially solved, the operation efficiency of the electronic equipment is reduced, and the technical effect of randomly issuing the digital resource packets is achieved while the stability of the system performance is guaranteed.
According to an embodiment of the present disclosure, the above method further includes: determining a digital resource sub-value of each digital resource group according to the digital resource total value and the N digital resource groups; and determining the current digital resource sub-value of the target digital resource group as the resource value of the target digital resource packet under the condition that the residual number of the digital resource packets in the target digital resource group is equal to 1.
According to an embodiment of the present disclosure, determining the digital resource sub-value of each of the digital resource groups according to the total digital resource value and the N digital resource groups may include: and dividing the total value of the digital resources by the number N of the digital resource groups to obtain the digital resource sub-value of each digital resource group.
According to the embodiment of the disclosure, the number of the digital resource packets in the target digital resource group is judged, so that the resource values of the target digital resource packets are determined in different modes, each digital resource packet in the target digital resource group can be ensured to be allocated to the resource value, and meanwhile, the sum of the resource values which can be allocated by each digital resource packet is just the same as the resource sub-value of the target digital resource group.
According to an embodiment of the present disclosure, each of the above-mentioned digital resource groups has a status identifier; the determining the target digital resource group from the N digital resource groups includes: determining candidate digital resource groups from the N digital resource groups according to the state identification of the digital resource groups, wherein the state identification represents whether the digital resource groups are available or not; and determining the target digital resource group from the candidate digital resource groups according to a preset determination mode.
According to an embodiment of the present disclosure, the status identification characterizes whether the digital resource group is available. For example, the state identification may characterize a digital resource group as being in a locked state or an unlocked state, as being unavailable when the digital resource group is in the locked state, as being available when the digital resource group is in the unlocked state; for another example, the status identifier may also indicate whether a digital resource group has an available digital resource package, and indicate that the digital resource group is available when the digital resource group has an available digital resource package, and indicate that the digital resource group is unavailable when the digital resource group has no available digital resource package.
According to an embodiment of the present disclosure, determining a candidate digital resource group from the N digital resource groups according to the state identification of the digital resource group may include: and under the condition that the state identification of the digital resource group is determined to represent that the digital resource group is in an unlocking state and the number of the residual digital resource packets is not 0, determining that the digital resource group is a candidate digital resource group.
According to the embodiment of the disclosure, the preset determination manner may be, for example, a random determination manner, or may be determined according to the number of remaining digital resource packets in the candidate digital resource group.
Fig. 3 schematically illustrates a state identification schematic of a digital resource group according to an embodiment of the present disclosure.
As shown in fig. 3, the digital resource group pool in this embodiment includes a digital resource group 1, a digital resource group 2, a digital resource group 3, and a digital resource group 4. Wherein, the digital resource group 1 is in an unlocking state, and the number of the residual digital resource packets is 0; the digital resource group 2 is in an unlocking state, and the number of the residual digital resource packets is 2; the digital resource group 3 is in a locking state, and the number of the residual digital resource packets is 1; the digital resource group 4 is in an unlocked state, and the number of remaining digital resource packets is 2. According to the status identification of 4 digital resource groups as shown in fig. 4, since the number of the remaining digital resource packets in the digital resource group 1 is 0, the remaining digital resource packets cannot be used as candidate digital resource groups; digital resource group 3 is in a locked state and cannot be a candidate digital resource group, so digital resource group 2 and digital resource group 4 can be determined to be candidate digital resource groups.
Fig. 4 schematically illustrates a flow chart of a target digital resource group update method according to an embodiment of the present disclosure.
As shown in fig. 4, the updating method of the target digital resource group of this embodiment includes operations S401 to S405.
In operation S401, a target digital resource group is locked.
According to the embodiment of the disclosure, the target digital resource group is temporarily inaccessible by locking the target digital resource group, so that a plurality of acquisition requests can be prevented from accessing the same digital resource group at the same time.
In operation S402, the remaining resource values of the target digital resource group are updated according to the target digital resource sub-value of the target digital resource group and the random number.
According to an embodiment of the present disclosure, updating the remaining resource values of the target digital resource group according to the target digital resource sub-value of the target digital resource group and the random number may include, for example: and deducting the resource values of which the number corresponds to the random number from the target digital resource sub-value according to the random number to obtain the residual resource value of the target digital resource group. For example, if the target digital resource sub-value of the target digital resource group is a and the generated random number is a, the remaining resource values of the target digital resource group may be a-a, where a < a.
In operation S403, the remaining number of digital resource packages within the target digital resource group is updated.
According to an embodiment of the present disclosure, updating the remaining number of digital resource packages within the target digital resource group may include, for example, subtracting 1 from the current number of digital resource packages within the target digital resource group to obtain the remaining number. For example, if the current number of digital resource packets in the target digital resource group is 2, the remaining number of digital resource packets in the updated target digital resource group is 1.
In operation S404, the status identifier of the target resource group is updated according to the remaining number of digital resource packages within the target digital resource group.
According to an embodiment of the present disclosure, the updating the state identifier of the target resource group according to the remaining number of the digital resource packages in the target digital resource group includes: updating a state identifier of the target resource group to be a first identifier according to the residual number of the digital resource packets in the target digital resource group, and under the condition that the residual number of the digital resource packets in the target digital resource group is zero, wherein the first identifier represents that the target resource group is unavailable; and updating the state identifier of the target resource group to be a second identifier according to the residual number of the digital resource packets in the target digital resource group, wherein the second identifier represents that the target resource group is available under the condition that the residual number of the digital resource packets in the target digital resource group is not zero.
The target digital resource group is in operation S405, jie Suoshang.
According to an embodiment of the present disclosure, the method for determining the lower limit resource value of the digital resource packet and the upper limit resource value of the digital resource packet includes:
Determining an average resource value of a single digital resource packet according to the total digital resource value and the total digital resource packet number;
and determining the lower limit resource value of the digital resource packet and the upper limit resource value of the digital resource according to the average resource value and the number M of the digital resource packets in each digital resource group according to a preset formula.
According to an embodiment of the present disclosure, determining the average resource value of the individual digital resource packet according to the total value of the digital resource and the total number of the digital resource packets may include, for example: and dividing the total number of the digital resource packets by the total number of the digital resource packets to obtain the average resource value of the single digital resource packet.
In some embodiments, the total number of digital resource packets is P, the upper limit resource value of a single digital resource packet is H, and the lower limit resource value of a single digital resource packet is L. Determining an average resource value A of a single digital resource packet according to the total number P of the digital resource packets and the total number S of the digital resource packets; and then determining the lower limit resource value of the digital resource packet and the upper limit resource value of the digital resource according to a preset formula according to the average resource value A and the number M of the digital resource packets in each digital resource group, wherein the preset formula can adopt the following formula (1).
According to the embodiment of the disclosure, by limiting the upper limit resource value of the single digital resource packet to be H and the lower limit resource value of the single digital resource packet to be L by adopting the formula (1), it is possible to ensure that the generation range of the random number is not unbalanced.
According to an embodiment of the present disclosure, the above method further includes: after the random number is determined to be the resource value of the target digital resource package corresponding to the target user, the target digital resource package is sent to the target user; updating the total residual quantity of the digital resource package; and determining that the issuing of the digital resource packet is completed when the total residual quantity of the digital resource packet is determined to be zero.
It should be noted that each digital resource group may individually provide services to the outside. When the number of the digital resource packets in the digital resource group is greater than 0, a forward acquisition service can be provided to the outside, and specific information of the digital resource group, such as the number of the digital resource group and the number of the digital resource packets in the digital resource group, needs to be clarified by the backward flushing service.
Fig. 5 schematically illustrates a flow chart of a digital resource processing method according to another embodiment of the present disclosure.
According to an embodiment of the present disclosure, the processing method of the digital resource may be, for example, a processing method of a red packet as shown in fig. 5.
As shown in fig. 5, the processing method of the digital resource of this embodiment includes operations S501 to S510.
In operation S501, a total amount of red packets and a total amount of red packets are acquired.
In operation S502, N wallets are generated from the total number of red packets, resulting in a pool of wallets, where each wallet includes 2 red packets, each wallet having a status identification.
In operation S503, the sub-monetary amount of each wallet is determined according to the total amount of the red packet and the number of wallets N.
In operation S504, in response to the red packet acquisition request from the target user, candidate wallets are determined from the N wallets according to the status identification of the wallets.
In operation S505, a target wallet is determined from among the candidate wallets in a preset determination manner.
In operation S506, it is determined whether the number of red packets in the target wallet is greater than 1. In the case that it is determined that the number of red packets in the target wallet is greater than 1, operations S507 to S508 are performed; in the case where it is determined that the number of red packets in the target wallet is equal to 1, operation S509 is performed.
In operation S507, a random number is generated within a preset range, wherein the preset range is determined according to the total amount of the red packets, and the number of the red packets in each wallet.
In operation S508, the random number is determined as the amount of the target red envelope corresponding to the target user.
In operation S509, it is determined that the current amount of the target wallet is the amount of the target red-envelope.
In operation S510, a target wallet is transmitted to a target user.
According to an embodiment of the present disclosure, a plurality of wallets are generated according to the total number of the red packets such that the number of the red packets in each wallet is 2; and then generating random numbers in a preset range for a plurality of wallets of each wallet, so that the generation range of the random numbers can be ensured not to be unbalanced, namely the problem that the total amount of the red packets is left, but the total amount of the red packets is distributed, or the total amount of the red packets is not left, but the total amount of the red packets is not distributed is solved. In addition, the scheme aims at processing a single wallet, ensures the stability of system performance, and achieves the aim of truly and randomly issuing red packets.
It should be noted that, unless there is an execution sequence between different operations or an execution sequence between different operations in technical implementation, the execution sequence between multiple operations may be different, and multiple operations may also be executed simultaneously in the embodiment of the disclosure.
Based on the digital resource processing method, the disclosure also provides a digital resource processing device. The device will be described in detail below in connection with fig. 6.
Fig. 6 schematically illustrates a block diagram of a digital resource processing device according to an embodiment of the present disclosure.
As shown in fig. 6, the digital resource processing apparatus 600 of this embodiment includes an acquisition module 610, a first generation module 620, a first determination module 630, a second generation module 640, and a second determination module 650.
The obtaining module 610 is configured to obtain a total number of digital resources and a total number of digital resource packages. In an embodiment, the obtaining module 610 may be configured to perform the operation S210 described above, which is not described herein.
The first generation module 620 is configured to generate N digital resource groups according to the total number of digital resource packets, where each digital resource group includes M digital resource packets, N is greater than or equal to 2, and M is greater than or equal to 2. In an embodiment, the first generating module 620 may be used to perform the operation S220 described above, which is not described herein.
The first determining module 630 is configured to determine a target digital resource group from the N digital resource groups in response to a digital resource package acquisition request from a target user. In an embodiment, the first determining module 630 may be configured to perform the operation S230 described above, which is not described herein.
The second generating module 640 is configured to generate a random number in a preset range when it is determined that the remaining number of the digital resource packages in the target digital resource group is greater than 1, where the preset range is determined according to the total number of digital resource packages, and the number M of digital resource packages in the digital resource group. In an embodiment, the second generating module 640 may be configured to perform the operation S240 described above, which is not described herein.
The second determining module 650 is configured to determine the random number as a resource value of a target digital resource package corresponding to the target user. In an embodiment, the second determining module 650 may be configured to perform the operation S250 described above, which is not described herein.
According to an embodiment of the present disclosure, the above digital resource processing apparatus further includes: the third determination module and the fourth determination module.
And a third determining module, configured to determine a digital resource sub-value of each of the digital resource groups according to the total digital resource value and the N digital resource groups.
And a fourth determining module, configured to determine, when it is determined that the remaining number of the digital resource packages in the target digital resource group is equal to 1, that the current digital resource sub-value of the target digital resource group is the resource value of the target digital resource package.
According to an embodiment of the present disclosure, each of the above-described digital resource groups has a status identification.
According to an embodiment of the present disclosure, the first determining module includes: a first determination unit and a second determination unit.
And the first determining unit is used for determining candidate digital resource groups from the N digital resource groups according to the state identification of the digital resource groups, wherein the state identification represents whether the digital resource groups are available or not.
And the second determining unit is used for determining the target digital resource group from the candidate digital resource groups according to a preset determining mode.
According to an embodiment of the present disclosure, the above digital resource processing apparatus further includes: the device comprises a locking module, a first updating module, a second updating module and an unlocking module.
And the locking module is used for locking the target digital resource group after the target digital resource group is determined from the N digital resource groups.
And the first updating module is used for updating the residual resource value of the target digital resource group according to the target digital resource sub value of the target digital resource group and the random number.
And the second updating module is used for updating the residual quantity of the digital resource packages in the target digital resource group.
And the unlocking module is used for unlocking the target digital resource group.
According to an embodiment of the present disclosure, the above digital resource processing apparatus further includes: and a third updating module.
And a third updating module, configured to update, before the target digital resource group according to Jie Suoshang, a status identifier of the target digital resource group according to a remaining number of the digital resource packets in the target digital resource group.
According to an embodiment of the present disclosure, the third update module includes: a first updating unit and a second updating unit.
And the first updating unit is used for updating the state identifier of the target resource group into a first identifier according to the residual quantity of the digital resource packets in the target digital resource group, and under the condition that the residual quantity of the digital resource packets in the target digital resource group is zero, wherein the first identifier represents that the target resource group is unavailable.
And a second updating unit, configured to update, according to the remaining number of the digital resource packets in the target digital resource group, a status identifier of the target resource group to a second identifier when it is determined that the remaining number of the digital resource packets in the target digital resource group is not zero, where the second identifier indicates that the target resource group is available.
According to an embodiment of the present disclosure, the upper limit value of the preset range is an upper limit resource value of the single digital resource packet, and the lower limit value of the preset range is a lower limit resource value of the single digital resource packet.
According to an embodiment of the present disclosure, the digital resource processing device further includes a fifth determining module and a sixth determining module.
And a fifth determining module, configured to determine an average resource value of the single digital resource packet according to the total digital resource value and the total digital resource packet number.
And a sixth determining module, configured to determine, according to a preset formula, a lower limit resource value of the digital resource packet and an upper limit resource value of the digital resource according to the average resource value and the number M of the digital resource packets in each digital resource group.
According to an embodiment of the present disclosure, the above digital resource processing apparatus further includes: a transmitting module, a fourth updating module and a seventh determining module.
And a transmitting module configured to transmit the target digital resource packet to the target user after determining that the random number is the resource value of the target digital resource packet corresponding to the target user.
And a fourth updating module, configured to update the total remaining number of the digital resource packages.
And a seventh determining module, configured to determine that the issuing of the digital resource packet is completed when determining that the total remaining number of the digital resource packets is zero.
Fig. 7 schematically illustrates a block diagram of a digital resource processing device according to an embodiment of the present disclosure.
As shown in fig. 7, the digital resource processing device 600' of this embodiment includes a service information input module 710, a digital resource processing module 720, a random number generation module 730, and a digital resource package issuing module 740. It should be noted that the modules included in the digital resource processing device 600' may be included in the digital resource processing device 800 in fig. 6. In another embodiment, the modules included in the digital resource processing device 600' may be integrated into any of the modules of fig. 6.
The service information input module 710 is configured to input information such as a total value of the digital resource and a total number of the digital resource packages, and push the input information to the digital resource processing module 720.
The digital resource processing module 720 is associated with the acquisition module 610 in fig. 6 as a backbone of the digital resource processing device 600', and is configured to acquire information pushed by the service information input module 710 and transmit the information to the random number generating module 730.
The random number generation module 730 is associated with the first generation module 620, the first determination module 630, the second generation module 640, and the second determination module 650 in fig. 6, and is configured to generate a resource value of the target digital resource package.
The digital resource packet issuing module 740 is associated with the above-mentioned transmitting module, and is configured to transmit the target digital resource packet to the target user.
Any number of the modules, units, or at least some of the functionality of any number of the modules, units, or units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware in any other reasonable manner of integrating or packaging the circuits, or in any one of or in any suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, units according to embodiments of the disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
Any of the acquisition module 610, the first generation module 620, the first determination module 630, the second generation module 640, and the second determination module 650 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules, according to embodiments of the present disclosure. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the acquisition module 610, the first generation module 620, the first determination module 630, the second generation module 640, and the second determination module 650 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or as hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or as any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the acquisition module 610, the first generation module 620, the first determination module 630, the second generation module 640, and the second determination module 650 may be at least partially implemented as computer program modules that, when executed, perform the respective functions.
It should be noted that, in the embodiment of the present disclosure, the digital resource processing device portion corresponds to the digital resource processing method portion in the embodiment of the present disclosure, and the description of the digital resource processing device portion refers to the digital resource processing method portion specifically, and is not described herein again.
Fig. 8 schematically illustrates a block diagram of an electronic device adapted to implement a digital resource processing method according to an embodiment of the disclosure.
As shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 801 may also include on-board memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM802, and the RAM803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM802 and/or the RAM 803. Note that the program may be stored in one or more memories other than the ROM802 and the RAM 803. The processor 801 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 800 may also include an input/output (I/O) interface 805, the input/output (I/O) interface 805 also being connected to the bus 804. The electronic device 800 may also include one or more of the following components connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM802 and/or RAM803 and/or one or more memories other than ROM802 and RAM803 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement the digital resource processing methods provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or from a removable medium 811 via a communication portion 809. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
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 or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (13)

1. A digital resource processing method, comprising:
acquiring a total number of digital resource and a total number of digital resource packages;
generating N digital resource groups according to the total number of the digital resource packets, wherein each digital resource group comprises M digital resource packets, N is more than or equal to 2, and M is more than or equal to 2;
Determining a target digital resource group from the N digital resource groups in response to a digital resource package acquisition request from a target user;
generating a random number in a preset range under the condition that the residual number of the digital resource packets in the target digital resource group is larger than 1, wherein the preset range is determined according to the total value of the digital resources, the total number of the digital resource packets and the number M of the digital resource packets in the digital resource group; and
and determining the random number as a resource value of a target digital resource package corresponding to the target user.
2. The method of claim 1, wherein each of the digital resource groups has a status identification;
the determining a target digital resource group from the N digital resource groups includes:
determining candidate digital resource groups from the N digital resource groups according to the state identification of the digital resource groups, wherein the state identification represents whether the digital resource groups are available or not;
and determining the target digital resource group from the candidate digital resource group according to a preset determination mode.
3. The method of claim 2, further comprising:
determining a digital resource sub-value of each digital resource group according to the digital resource total value and the N digital resource groups;
And under the condition that the residual number of the digital resource packets in the target digital resource group is equal to 1, determining the current digital resource sub-value of the target digital resource group as the resource value of the target digital resource packet.
4. A method according to claim 3, further comprising:
after the target digital resource group is determined from the N digital resource groups, locking the target digital resource group;
updating the residual resource value of the target digital resource group according to the target digital resource sub-value of the target digital resource group and the random number;
updating the remaining number of the digital resource packages in the target digital resource group;
and unlocking the target digital resource group.
5. The method of claim 4, further comprising:
and before the target digital resource group is unlocked, updating the state identification of the target digital resource group according to the residual quantity of the digital resource packages in the target digital resource group.
6. The method of claim 5, wherein the updating the status identification of the target set of digital resources based on the remaining number of digital resource packages within the target set of digital resources comprises:
updating a state identifier of the target resource group to be a first identifier under the condition that the residual number of the digital resource packets in the target digital resource group is zero according to the residual number of the digital resource packets in the target digital resource group, wherein the first identifier represents that the target resource group is unavailable;
And updating a state identifier of the target resource group to be a second identifier under the condition that the residual number of the digital resource packets in the target digital resource group is not zero according to the residual number of the digital resource packets in the target digital resource group, wherein the second identifier represents that the target resource group is available.
7. The method of claim 1, wherein an upper limit of the preset range is an upper limit resource value of a single digital resource package and a lower limit of the preset range is a lower limit resource value of a single digital resource package.
8. The method of claim 7, wherein the determining the lower resource value of the digital resource package and the upper resource value of the digital resource package comprises:
determining an average resource value of a single digital resource packet according to the total digital resource value and the total digital resource packet number;
and determining a lower limit resource value of the digital resource packet and an upper limit resource value of the digital resource according to the average resource value and the number M of the digital resource packets in each digital resource group according to a preset formula.
9. The method of claim 1, further comprising:
After the random number is determined to be the resource value of the target digital resource packet corresponding to the target user, sending the target digital resource packet to the target user;
updating the total remaining number of the digital resource packages;
and determining that the distribution of the digital resource packet is completed under the condition that the total residual quantity of the digital resource packet is determined to be zero.
10. A digital resource processing apparatus, comprising:
the acquisition module is used for acquiring the total number of the digital resources and the total number of the digital resource packages;
the first generation module is used for generating N digital resource groups according to the total number of the digital resource packets, wherein each digital resource group comprises M digital resource packets, N is more than or equal to 2, and M is more than or equal to 2;
the first determining module is used for determining a target digital resource group from the N digital resource groups in response to a digital resource packet acquisition request from a target user;
the second generation module is used for generating a random number in a preset range under the condition that the residual number of the digital resource packets in the target digital resource group is larger than 1, wherein the preset range is determined according to the total digital resource value, the total digital resource packets and the number M of the digital resource packets in the digital resource group; and
And the second determining module is used for determining the random number as the resource value of the target digital resource packet corresponding to the target user.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-9.
12. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1 to 9.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 9.
CN202310626563.0A 2023-05-30 2023-05-30 Digital resource processing method and device, electronic equipment and storage medium Pending CN116737109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310626563.0A CN116737109A (en) 2023-05-30 2023-05-30 Digital resource processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310626563.0A CN116737109A (en) 2023-05-30 2023-05-30 Digital resource processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116737109A true CN116737109A (en) 2023-09-12

Family

ID=87916084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310626563.0A Pending CN116737109A (en) 2023-05-30 2023-05-30 Digital resource processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116737109A (en)

Similar Documents

Publication Publication Date Title
CN113765820A (en) Token bucket-based current limiting method, token bucket-based current limiting device, token bucket-based computing equipment and token bucket-based current limiting medium
CN110580305A (en) Method, apparatus, system, and medium for generating identifier
CN115965474A (en) Service processing method, device, equipment and storage medium
CN115237589A (en) SR-IOV-based virtualization method, device and equipment
CN111258988A (en) Asset management method, device, electronic device, and medium
CN113132400B (en) Business processing method, device, computer system and storage medium
CN110928594A (en) Service development method and platform
CN107045452B (en) Virtual machine scheduling method and device
CN112182400B (en) Message processing method, message processing device, electronic equipment and storage medium
CN116737109A (en) Digital resource processing method and device, electronic equipment and storage medium
CN110851483B (en) Method, apparatus, electronic device, and medium for screening objects
CN108683608B (en) Method and device for distributing flow
CN114363172B (en) Decoupling management method, device, equipment and medium for container group
CN113760483A (en) Method and device for executing task
CN114721882B (en) Data backup method and device, electronic equipment and storage medium
CN114338697A (en) Method and device for providing shared cloud service, electronic equipment and storage medium
CN115174588B (en) Bandwidth control method, device, apparatus, storage medium and program product
CN115333871B (en) Firewall operation and maintenance method and device, electronic equipment and readable storage medium
CN114844810B (en) Heartbeat data processing method, device, equipment and medium
CN114268558B (en) Method, device, equipment and medium for generating monitoring graph
CN116582604A (en) Message processing method, device, electronic equipment and storage medium
CN109302377B (en) Application function implementation method, device, equipment and storage medium
CN114201302A (en) Application resource allocation method and device
CN116664209A (en) Evaluation network generation method and device, electronic equipment and storage medium
CN116049026A (en) Recommended resource reading method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination