CN112508641A - Method and device for distributing articles, computer equipment and storage medium - Google Patents

Method and device for distributing articles, computer equipment and storage medium Download PDF

Info

Publication number
CN112508641A
CN112508641A CN202011388308.XA CN202011388308A CN112508641A CN 112508641 A CN112508641 A CN 112508641A CN 202011388308 A CN202011388308 A CN 202011388308A CN 112508641 A CN112508641 A CN 112508641A
Authority
CN
China
Prior art keywords
target
users
user
random number
article
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
CN202011388308.XA
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.)
Digital Guangdong Network Construction Co Ltd
Original Assignee
Digital Guangdong Network Construction Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Digital Guangdong Network Construction Co Ltd filed Critical Digital Guangdong Network Construction Co Ltd
Priority to CN202011388308.XA priority Critical patent/CN112508641A/en
Publication of CN112508641A publication Critical patent/CN112508641A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2468Fuzzy queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/02Reservations, e.g. for tickets, services or events
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C15/00Generating random numbers; Lottery apparatus

Abstract

The invention discloses a method and a device for distributing articles, computer equipment and a storage medium, wherein the method comprises the following steps: determining first target users in all users according to first random numbers distributed to users requesting to distribute target articles, wherein the number of the first target users is larger than or equal to the number of distributed users of the target articles; determining second target users matched with the number of the distributed users in all the first target users according to the second random numbers distributed to all the first target users; and distributing each target item to each second target user. The technical scheme of the embodiment of the invention can improve the performance of the article distribution platform and ensure the fairness of the article distribution result.

Description

Method and device for distributing articles, computer equipment and storage medium
Technical Field
The embodiments of the present invention relate to data processing technologies, and in particular, to a method and an apparatus for distributing articles, a computer device, and a storage medium.
Background
In recent years, with the rapid development of the mobile internet industry, more and more merchants can establish stores on an online shopping platform to enable buyers and sellers to conduct various commerce activities without conspiracy, thereby realizing online shopping for users, online transactions between merchants, online electronic payments, various commerce activities, and the like.
For material products which are not in supply and are not in demand, the existing distribution method of the articles generally adopts a time-limited rush-purchase mode, namely when the articles for emergency are online in a shopping platform, a plurality of users carry out the rush-purchase on the products through the shopping platform at the same time, if the users succeed in the rush-purchase, the articles are distributed to the users, and a payment platform is opened to the users so that the users complete the payment.
However, the conventional article distribution method has the following drawbacks: when a plurality of users access the shopping platform simultaneously, due to the fact that the access amount is high, the performance of the platform is easy to reduce, the inventory data of the articles are not updated timely, and further the situation that part of users who successfully finish the shopping cannot receive the articles due to the fact that the actual distribution quantity of the articles is larger than the inventory quantity occurs, and the user experience is poor; secondly, for users in the environment with insufficient network bandwidth or unfamiliar with online shopping, the existing item distribution method lacks fairness.
Disclosure of Invention
The embodiment of the invention provides an article distribution method, an article distribution device, computer equipment and a storage medium, which can improve the performance of an article distribution platform and ensure the fairness of article distribution results.
In a first aspect, an embodiment of the present invention provides a method for distributing an article, where the method includes:
determining first target users in all users according to first random numbers distributed to users requesting to distribute target items, wherein the number of the first target users is larger than or equal to the number of distributed users of the target items;
determining second target users matched with the number of the distributed users in all the first target users according to the second random numbers distributed to the first target users;
assigning each of the target items to each of the second target users.
In a second aspect, an embodiment of the present invention further provides an article dispensing device, including:
the first target user determining module is used for determining a first target user in all users according to a first random number distributed to each user requesting to distribute the target object, and the number of the first target users is greater than or equal to the number of distributed users of the target object;
a second target user determining module, configured to determine, according to a second random number allocated to each of the first target users, second target users whose number matches the number of allocated users from among all the first target users;
and the article distribution module is used for distributing each target article to each second target user.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method for dispensing items as provided by any of the embodiments of the invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the method for distributing an article according to any embodiment of the present invention.
The technical scheme of the embodiment of the invention determines the first target user in all users according to the first random number distributed to each user requesting to distribute the target object, then determines the second target user in all the first target users according to the second random number distributed to each first target user, and finally distributes each target object to each second target user. The technical scheme of the embodiment of the invention can improve the performance of the article distribution platform and ensure the fairness of the article distribution result.
Drawings
FIG. 1 is a flow chart of a method of dispensing items according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a method of dispensing items according to a second embodiment of the present invention;
FIG. 3a is a flow chart of a method of dispensing items according to a third embodiment of the present invention;
FIG. 3b is a flow chart of a method of dispensing items according to a third embodiment of the present invention;
FIG. 4 is a block diagram of an article dispensing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device in the fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of an article distribution method according to an embodiment of the present invention, where this embodiment is applicable to a case of distributing an article, and the method may be executed by an article distribution apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a computer and all intelligent devices (e.g., a terminal device or a server) including a program running function, and specifically include the following steps:
step 110, a first target user is determined among all users according to the first random number allocated to each user requesting allocation of the target item.
Optionally, before the item is distributed, the user may send an item distribution request through the item distribution platform, where the item distribution request may include target item information that the user desires to distribute, where the target item information may include store information (e.g., a store name or a store identifier, etc.) to which the target item belongs and parameter information (e.g., a type to which the target item belongs and a model of the target item, etc.) of the target item. Optionally, the item distribution platform may be an Application (APP) installed in the smart device and used for a merchant to perform a transaction with a user.
In a specific embodiment, assuming that a user desires to distribute a certain protective product, taking a mask as an example, the user may send a distribution request for the mask through the distribution platform before the distribution platform distributes the mask, and the distribution request may include information of a pharmacy to which the mask belongs, information of specification parameters of the mask, and the like.
In this step, if the server corresponding to the item allocation platform receives an item allocation request sent by a user, a first random number may be allocated to the user, where the first random number is randomly generated according to a preset value interval. The numerical value interval may be set to [0, 1023], and the specific numerical value is preset by the number of the actual users, which is not limited in this embodiment.
In this embodiment, when the item distribution platform is ready to distribute the target items, first target users may be screened out from all users according to a preset value, where a first random number distributed by each first target user is equal to the preset value, and the number of the first target users is greater than or equal to the number of distributed users of the target items.
Wherein the distribution user number is a ratio of the inventory number of the target item to the unit distribution number of the target item, and the unit distribution number is a minimum distribution number of the target item to a single user.
And step 120, determining second target users matched with the number of the distributed users in all the first target users according to the second random numbers distributed to the first target users.
In this embodiment, after the first target users are determined among all users, since the number of the first target users is usually greater than the number of the users who distribute the target items, users who finally distribute the target items need to be screened out from the first target users.
In this step, optionally, a second random number may be assigned to each first target user, and then a second target user (i.e. a user to which the target item is finally assigned) is screened out from the first target users according to a preset value, where the second random number assigned to each second target user is equal to the preset value, and the number of the second target users is equal to the number of the assigned users of the target item.
Step 130, assigning each target item to each second target user.
In this embodiment, optionally, after the item distribution platform distributes each target item to each second target user, a payment platform may be opened to each second target user, so that each second target user completes payment for the target item.
In this embodiment, each user only needs to send an allocation request before the allocation platform allocates the target item, and does not need to send an allocation request when the allocation platform allocates the target item, so that multiple users can be prevented from accessing the allocation platform at the same time, platform resources occupied by the allocation process of the target item are reduced, and the performance of the platform is improved; secondly, the user to which the target object is finally allocated is determined by allocating the first random number and the second random number to the user, not depending on the network environment where the user is located and the proficiency degree of the user on the operation of the allocation platform, so that the fairness of the allocation result of the target object can be ensured.
The technical scheme of the embodiment of the invention determines the first target user in all users according to the first random number distributed to each user requesting to distribute the target object, then determines the second target user in all the first target users according to the second random number distributed to each first target user, and finally distributes each target object to each second target user. The technical scheme of the embodiment of the invention can improve the performance of the article distribution platform and ensure the fairness of the article distribution result.
Example two
This embodiment is a further refinement of the first embodiment, and the same or corresponding terms as those in the first embodiment are explained, and this embodiment is not repeated. Fig. 2 is a flowchart of an article distribution method provided in a second embodiment of the present invention, in this embodiment, the technical solution of this embodiment may be combined with one or more methods in the solutions of the foregoing embodiments, and in this embodiment, as shown in fig. 2, the method provided in the second embodiment of the present invention may further include:
step 210, in the preset appointed distribution time interval, if a user sends an article distribution request aiming at a target article, a first random number of a target value interval is distributed for the user.
In this embodiment, before the item distribution platform distributes the target item, the user may send an item distribution request through the distribution platform within a reserved distribution time interval, where optionally, the reserved distribution time interval may be several days or several hours before the distribution platform distributes the target item, and the specific numerical value is preset according to an actual situation, which is not limited in this embodiment.
Each user only needs to send an item distribution request within a specified time, and does not need to send the distribution request when the distribution platform distributes the target items, so that the technical difficulty of the user in operating the distribution platform can be reduced, and the experience of the user is improved.
In this step, if the server corresponding to the item allocation platform receives an item allocation request sent by a user, a first random number may be allocated to the user, where the first random number is randomly generated according to a preset value interval.
And step 220, determining a target random number in the target value interval when the target article distribution condition is met.
In this step, optionally, when it is detected that the target item is on line in the distribution platform, that is, when the distribution platform is ready to distribute the target item, it may be determined that the target item distribution condition is satisfied, and the target random number is determined in the target value interval. Optionally, the target value interval is equal to the preset value interval.
And step 230, determining a first target user in all the users according to the quantity value of the alternative users of which the allocated first random number is the same as the target random number.
In this step, after the target random number is determined, first, candidate users are screened out from all users according to the target random number, and users except the candidate users in all users are used as remaining users. And the first random number distributed by each alternative user is equal to the target random number.
In an implementation manner of the embodiment of the present invention, determining a first target user among all users according to a quantity value of alternative users whose assigned first random number is the same as a target random number includes: and if the number value of the alternative users is larger than the number of the distributed users, all the alternative users are determined as the first target user.
If the number value of the alternative users is larger than the number of the distribution users, the target item can be distributed to only a part of the alternative users, and all the alternative users are determined as the first target user, so that users finally distributed by the target item are further screened out from all the alternative users.
And if the number value of the alternative users is equal to the number of the distribution users, all the alternative users are determined as the users to which the target item is finally distributed, and the target item is distributed to each alternative user.
In another implementation manner of the embodiment of the present invention, determining a first target user among all users according to a quantity value of alternative users whose assigned first random number is the same as the target random number, further includes:
231, if the quantity value of the alternative user is smaller than the quantity value of the distributed user, taking a truncated random number obtained by truncating the target random number as a new target random number;
in this embodiment, if the number value of the candidate users is smaller than the number value of the distribution users, it indicates that the inventory of the target item is still remained after the target item is distributed to the candidate users, and therefore it is necessary to filter out some of the remaining users again so that the total number of the candidate users is greater than or equal to the number of the distribution users.
In this step, optionally, a preset bit in the target random number may be truncated to obtain a truncated random number, and the truncated random number is used as a new target random number, where the preset bit may be a first bit, a middle bit, or a last bit of the target random number, and a specific truncation manner is preset in an actual situation, which is not limited in this embodiment.
In a specific embodiment, assuming that the target random number is 00123, the first three bits of the target random number may be truncated to obtain 001% of the truncated random number, or the first four bits of the target random number may be truncated to obtain 0012% of the truncated random number.
Step 232, fuzzy matching is carried out on the truncated random number and the first random number of each user, fuzzy matching users with the distributed first random numbers identical to the target random number are obtained, the fuzzy matching users are added into the existing alternative users, and the number value of the current alternative users is updated;
in this step, fuzzy matching may be performed on the truncated random number and the first random number of the remaining users to obtain a fuzzy matching user in which the first random number is the same as the target random number (i.e., the truncated random number). The truncated random number may be compared with the value of the corresponding digit on the first random number, and if the truncated random number is equal to the value of the corresponding digit on the first random number, the truncated random number may be confirmed to be the same as the first random number, and the user corresponding to the first random number may be taken as the fuzzy matching user.
In one embodiment, assuming that the truncated random number is 0012%, and the first random number of one of the remaining users is 00125, the truncated random number is compared with the values of the first four digits of the first random number, so as to confirm that the truncated random number is the same as the first random number, and the user corresponding to the first random number is taken as the fuzzy matching user.
In this step, after the fuzzy matching user is determined, the fuzzy matching user is added to the existing alternative user, and the quantity value of the current alternative user is updated. And the updated quantity value of the current alternative user is the sum of the quantity value of the fuzzy matching user and the quantity value of the current alternative user.
After updating the number value of the current candidate user, the step 231 is executed again until the number value of the candidate user is greater than or equal to the number of the allocation users. If the number value of the alternative users is smaller than the number value of the distributed users, the truncated random number obtained by removing at least one bit of data in the target random number is used as a new target random number until the number value of the alternative users is larger than or equal to the number of the distributed users.
Therefore, the truncated random number is subjected to fuzzy matching with the first random number of each user, the alternative users meeting the preset number condition can be quickly obtained, and the distribution efficiency of the target object is improved.
And step 233, all the alternative users are determined as the first target user.
In this embodiment, the number of first target users is greater than or equal to the number of allocated users for the target item.
And 240, arranging all the first target users according to the second random number allocated to each first target user.
In this step, optionally, the second random number is randomly generated according to a preset value interval. All the first target users can be arranged from small to large or from large to small according to the second random numbers allocated to the first target users.
And step 250, selecting the first target users with the number equal to the number of the distributed users as second target users according to the arrangement sequence from the arranged first target users.
Step 260, assigning each target item to each second target user.
The technical scheme of the embodiment of the invention determines the target random number in the target value interval by allocating the first random number to each user requesting to allocate the target object in the preset reservation allocation time interval and determining the target random number in the target value interval when the allocation condition of the target object is met, then determines the first target user in all users according to the number value of the alternative users with the allocated first random number being the same as the target random number, arranges all the first target users according to the size of the second random number according to the second random number allocated to each first target user, and finally allocates each target object to each second target user. The technical scheme of the embodiment of the invention can reduce the technical difficulty of the user in operating the distribution platform, improve the performance of the article distribution platform and ensure the fairness of the article distribution result.
EXAMPLE III
This embodiment is a further refinement of the second embodiment, and the same or corresponding terms as those in the first embodiment are explained, and this embodiment is not repeated. Fig. 3a is a flowchart of an article distribution method provided in a third embodiment of the present invention, in this embodiment, the technical solution of this embodiment may be combined with one or more methods in the solutions of the foregoing embodiments, and in this embodiment, as shown in fig. 3a, the method provided in the third embodiment of the present invention may further include:
step 301, in the preset appointed distribution time interval, if a user sends an article distribution request for a target article, a first random number of a target value interval is distributed for the user.
Step 302, obtaining the target item dispensing information confirmed by the user for the target item, and storing the user, the target item and the target item dispensing information confirmed by the user into the reservation data table.
In this embodiment, before the item distribution platform distributes the target item, the user may send an item distribution request and target item dispensing information through the item distribution platform. The target article dispensing information comprises compliance dispensing information and non-compliance dispensing information.
Wherein, the compliance dispensing information is used for indicating that if the target item is not distributed, the user can accept other items which are distributed by the distribution platform and have the same type as the target item; conversely, non-compliance information is used to indicate that the user may only accept target items that are dispensed by the dispensing platform.
And step 303, when the target article distribution condition is met, determining a target random number in the target value interval.
And step 304, determining a first target user in all the users according to the quantity value of the alternative users of which the distributed first random number is the same as the target random number.
And 305, determining second target users matched with the number of the distributed users in all the first target users according to the second random numbers distributed to the first target users.
Step 306, assigning each target item to each second target user.
Step 307, removing the second target user from the users requesting to distribute the target item, and obtaining the unassigned user.
Wherein the unassigned user is a user who requests to assign a target item, but is not assigned to the target item.
And step 308, inquiring the target item dispensing information in the reservation data table, and determining the dispensing-compliant user from all the unallocated users.
In one implementation manner of the embodiment of the present invention, querying the target item dispensing information in the reservation data table to determine a dispensing-compliant user among all unallocated users includes: inquiring target article dispensing information corresponding to the unallocated user in the reservation data table; and if the target article dispensing information is dispensing compliance information, determining the unassigned user as a dispensing compliance user.
In this step, if the target item dispensing information corresponding to the unassigned user is compliance dispensing information, it is confirmed that the unassigned user can accept the assignment of other items of the same type as the target item by the assignment platform.
Step 309, obtaining dispensing articles to be distributed corresponding to each dispensing-compliant user in an article data table, wherein different types of articles are stored in the article data table in advance.
In the present embodiment, before the reservation allocation time zone is set, an item data table including items included in each store, item types of each item, specification parameters of each item, and the like is constructed in advance based on item information included in each store.
After the dispensing-compliant user is determined through the steps, the items which are the same as the target items in type and are not distributed are obtained in the item data table, and the items are used as dispensing items corresponding to the dispensing-compliant user.
Step 310, updating each dispensing-compliant user to a user requesting to dispense a dispensing item.
Therefore, the dispensing articles corresponding to the dispensing-compliant users are obtained, the dispensing-compliant users are updated to the users requesting to distribute the dispensing articles, the same type of articles can be distributed to the dispensing-compliant users as much as possible, and the experience of the users is improved.
According to the technical scheme of the embodiment of the invention, in the preset reservation allocation time interval, the first random number is allocated to each user requesting to allocate the target object, the first target user is determined in all users according to the first random number and the target random number, the second target user is determined in all the first target users according to the second random number, each target object is allocated to each second target user, finally, the unallocated user is obtained in each user requesting to allocate the target object, the dispensing-compliant user is determined in all the unallocated users, the dispensing object to be allocated corresponding to each dispensing-compliant user is obtained, and each dispensing-compliant user is updated to the user requesting to allocate the dispensing object. The technical scheme of the embodiment of the invention can improve the performance of the article distribution platform and ensure the fairness of the article distribution result.
For better describing the technical solution provided by the embodiment of the present invention, the embodiment of the present invention may refer to the following implementation manner, as shown in fig. 3 b:
step 1: registering a shaking number; and in the set reserved distribution time interval, if an item distribution request sent by a user for a target item is received, distributing a first random number for the user.
Step 2: filling in a registration form; and filling the registration information (namely the first random number, the target item requested to be distributed by the user and the target item scheduling information) corresponding to the user in the registration table.
And step 3: generating a register buffer queue; and generating a registration buffer queue according to the registration information corresponding to each user in the registration table.
And 4, step 4: generating a registration table for warehousing; converting the first random number corresponding to each user in a quaternary form to obtain a random character string corresponding to each user, wherein the length of the random character string is 5; and then generating a warehousing registration table according to the random character strings corresponding to the users, the target articles requested to be allocated and the target article scheduling information.
Step 5, shaking numbers at regular time; determining a target random number in a target value interval at set time, and determining a first target user in all users according to the target random number and a first random number corresponding to each user; and then, according to the second random number distributed to each first target user, determining a second target user in all the first target users.
Step 6: generating a user middle signing result table; and writing the second target user into a user signing result table, and marking the corresponding user in the login table according to the user information in the user signing result table so as to prevent the user from repeatedly shaking the number.
And 7: generating a buffer queue of the shaking result; and storing the second target user determined in the step into a shaking result cache queue.
And 8: front-end mid-label query; the user queries the mid-label information through the front-end page of the item distribution platform.
After the generating of the warehousing registration table, the method further comprises the following steps:
and step 9: and deleting the invalid warehousing registration table before the preset number of days at regular time.
After determining the second target user in step 5, the method further includes:
step 10: the remaining number of allocated users for the target item is updated.
The method provided by the embodiment of the invention can improve the performance of the article distribution platform and ensure the fairness of the article distribution result.
Example four
Fig. 4 is a block diagram of an article dispensing apparatus according to a fourth embodiment of the present invention, the apparatus including: a first targeted user determination module 410, a second targeted user determination module 420, and an item allocation module 430.
The first target user determining module 410 is configured to determine, according to a first random number allocated to each user requesting allocation of a target item, a first target user among all users, where the number of the first target users is greater than or equal to the number of allocated users of the target item; a second target user determining module 420, configured to determine, according to the second random number allocated to each of the first target users, second target users that are matched with the number of allocated users from among all the first target users; an item allocation module 430, configured to allocate each of the target items to each of the second target users.
The technical scheme of the embodiment of the invention determines the first target user in all users according to the first random number distributed to each user requesting to distribute the target object, then determines the second target user in all the first target users according to the second random number distributed to each first target user, and finally distributes each target object to each second target user. The technical scheme of the embodiment of the invention can improve the performance of the article distribution platform and ensure the fairness of the article distribution result.
On the basis of the foregoing embodiments, the first target user determining module 410 may include:
a first random number allocation unit, configured to, within a preset allocation time interval, allocate a first random number in a target value interval to a user if an item allocation request sent by the user for a target item is received;
the target random number determining unit is used for determining a target random number in the target value interval when a target article distribution condition is met;
the first target user screening unit is used for determining a first target user in all users according to the quantity value of the alternative users of which the distributed first random number is the same as the target random number;
all alternative user processing units are used for determining all alternative users as the first target user when the number value of the alternative users is larger than the number of the distributed users;
the target random number shortening unit is used for shortening the target random number to obtain a shortened random number as a new target random number when the number value of the alternative users is smaller than the number value of the distributed users;
the fuzzy matching unit is used for carrying out fuzzy matching on the truncated random number and the first random number of each user to obtain fuzzy matching users of which the distributed first random numbers are the same as the target random number, adding the fuzzy matching users into the existing alternative users, and updating the quantity value of the current alternative users;
a target random number removing unit, configured to remove at least one bit of data in the target random number to obtain a truncated random number as a new target random number if the number value of the candidate user is smaller than the number value of the distributed users, until the number value of the candidate user is greater than or equal to the number of the distributed users;
a whole alternative user determination unit, configured to determine all alternative users as the first target user;
and the target article dispensing information acquisition unit is used for acquiring target article dispensing information confirmed by the user aiming at the target article, and storing the user, the target article and the target article dispensing information confirmed by the user into a reservation data table, wherein the target article dispensing information comprises compliance dispensing information and non-compliance dispensing information.
The second target user determination module 420 may include:
an arranging unit, configured to arrange all the first target users according to the size of the second random number according to the second random number allocated to each of the first target users;
and the second target user selection unit is used for selecting the first target users with the number equal to that of the distributed users as second target users in the arranged first target users according to the arrangement sequence.
The item dispensing module 430 may include:
an unallocated user acquiring unit configured to remove the second target user from among users requesting allocation of the target item, to obtain an unallocated user;
the dispensing-compliant user determining unit is used for inquiring the dispensing information of the target article in the reservation data table and determining dispensing-compliant users in all the unallocated users;
a dispensing article obtaining unit, configured to obtain dispensing articles to be distributed respectively corresponding to the dispensing-compliant users in an article data table, where different types of articles are stored in the article data table in advance;
and the dispensing-compliant user updating unit is used for updating each dispensing-compliant user into a user requesting to distribute the dispensing article.
The distribution device for the articles provided by the embodiment of the invention can execute the distribution method for the articles provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a computer apparatus according to a fifth embodiment of the present invention, as shown in fig. 5, the computer apparatus includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of the processors 510 in the computer device may be one or more, and one processor 510 is taken as an example in fig. 5; the processor 510, the memory 520, the input device 530 and the output device 540 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 5. Memory 520, which may be a computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to a method of dispensing an item (e.g., first targeted subscriber module 410, second targeted subscriber module 420, and item dispensing module 430 in a dispensing device for an item) in any embodiment of the present invention. The processor 510 implements the above-described method of distributing an article by executing software programs, instructions, and modules stored in the memory 520 to execute various functional applications and data processing of the computer device. That is, the program when executed by the processor implements:
determining first target users in all users according to first random numbers distributed to users requesting to distribute target items, wherein the number of the first target users is larger than or equal to the number of distributed users of the target items;
determining second target users matched with the number of the distributed users in all the first target users according to the second random numbers distributed to the first target users;
assigning each of the target items to each of the second target users.
The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 520 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 520 may further include memory located remotely from processor 510, which may be connected to a computer device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The input device 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus, and may include a keyboard and a mouse, etc. The output device 540 may include a display device such as a display screen.
EXAMPLE six
The sixth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method according to any embodiment of the present invention. Of course, the embodiments of the present invention provide a computer-readable storage medium, which can perform related operations in a distribution method of an item provided by any embodiments of the present invention. That is, the program when executed by the processor implements:
determining first target users in all users according to first random numbers distributed to users requesting to distribute target items, wherein the number of the first target users is larger than or equal to the number of distributed users of the target items;
determining second target users matched with the number of the distributed users in all the first target users according to the second random numbers distributed to the first target users;
assigning each of the target items to each of the second target users.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the above embodiment of the positioning apparatus for testing an exception, each unit and each module included in the positioning apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of dispensing an article, comprising:
determining first target users in all users according to first random numbers distributed to users requesting to distribute target items, wherein the number of the first target users is larger than or equal to the number of distributed users of the target items;
determining second target users matched with the number of the distributed users in all the first target users according to the second random numbers distributed to the first target users;
assigning each of the target items to each of the second target users.
2. The method of claim 1, wherein determining the first target user among all users based on the first random number assigned to each user requesting assignment of the target item comprises:
within a preset appointed distribution time interval, if a user sends an article distribution request aiming at a target article, distributing the first random number of a target value interval for the user;
when the target article distribution condition is met, determining a target random number in the target value interval;
and determining a first target user in all the users according to the quantity value of the alternative users of which the allocated first random number is the same as the target random number.
3. The method of claim 2, wherein determining the first target user among all the users according to the number value of the alternative users having the same assigned first random number as the target random number comprises:
and if the number value of the alternative users is larger than the number of the distributed users, all the alternative users are determined as the first target user.
4. The method of claim 3, wherein the first target user is determined among all users according to the number value of the alternative users having the same assigned first random number as the target random number, further comprising:
if the number value of the alternative user is smaller than the number value of the distributed users, the truncated random number obtained after the target random number is truncated is used as a new target random number;
carrying out fuzzy matching on the truncated random number and the first random number of each user to obtain fuzzy matching users of which the distributed first random numbers are the same as the target random number, adding the fuzzy matching users into the existing alternative users, and updating the quantity value of the current alternative users;
returning to execute the operation that if the number value of the alternative users is smaller than the number value of the distributed users, the truncated random number obtained after removing at least one bit of data in the target random number is used as a new target random number until the number value of the alternative users is larger than or equal to the number of the distributed users;
and all the alternative users are determined as the first target user.
5. The method according to any one of claims 1 to 4, wherein determining, among all the first target users, a second target user that matches the number of allocated users based on the second random number allocated to each of the first target users comprises:
arranging all the first target users according to the size of the second random number according to the second random number distributed to each first target user;
and selecting the first target users with the number equal to that of the distributed users as second target users according to the arrangement sequence from the arranged first target users.
6. The method of claim 2, further comprising, after receiving a user sending an item allocation request for a target item, allocating the first random number of a target value interval for the user, further comprising:
acquiring target article dispensing information confirmed by the user aiming at the target article, and storing the user, the target article and the target article dispensing information confirmed by the user into an appointment data table, wherein the target article dispensing information comprises compliance dispensing information and non-compliance dispensing information;
after each of the target items is assigned to each of the second target users, further comprising:
removing the second target user from all users requesting to distribute the target object to obtain unallocated users;
inquiring the target article dispatching information in the reservation data table, and determining a dispatching-compliant user from all unallocated users;
the method comprises the steps that dispensing articles to be distributed corresponding to dispensing-obeying users are obtained from an article data table, wherein different types of articles are stored in the article data table in advance;
updating each said dispensing-compliant user to a user requesting allocation of said dispensing item.
7. The method of claim 6, wherein querying the target item reconciliation information in the reservation data table to determine the reconciliation-compliant subscriber among all unassigned subscribers comprises:
inquiring target article dispensing information corresponding to the unassigned user in the reservation data table;
and if the target article dispensing information is dispensing compliance information, determining the unallocated user as a dispensing compliance user.
8. An article dispensing apparatus, comprising:
the first target user determining module is used for determining a first target user in all users according to a first random number distributed to each user requesting to distribute the target object, and the number of the first target users is greater than or equal to the number of distributed users of the target object;
a second target user determining module, configured to determine, according to a second random number allocated to each of the first target users, second target users whose number matches the number of allocated users from among all the first target users;
and the article distribution module is used for distributing each target article to each second target user.
9. A computing device, wherein the computing device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method of dispensing an article of manufacture as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of dispensing an article according to any one of claims 1 to 7.
CN202011388308.XA 2020-12-01 2020-12-01 Method and device for distributing articles, computer equipment and storage medium Pending CN112508641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011388308.XA CN112508641A (en) 2020-12-01 2020-12-01 Method and device for distributing articles, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011388308.XA CN112508641A (en) 2020-12-01 2020-12-01 Method and device for distributing articles, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112508641A true CN112508641A (en) 2021-03-16

Family

ID=74969224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011388308.XA Pending CN112508641A (en) 2020-12-01 2020-12-01 Method and device for distributing articles, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112508641A (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6179291B1 (en) * 1997-04-02 2001-01-30 Olaf Vancura Casino game method of play
JP2010211748A (en) * 2009-03-12 2010-09-24 Hiroshima Univ Resource distribution system
CN104462977A (en) * 2014-12-23 2015-03-25 北京京东尚科信息技术有限公司 Data processing method and system
US20170139549A1 (en) * 2015-11-16 2017-05-18 Hipmunk, Inc. Linking allocable region of graphical user interface
CN107808282A (en) * 2016-09-09 2018-03-16 腾讯科技(深圳)有限公司 Virtual objects packet transmission method and device
CN108564426A (en) * 2018-01-08 2018-09-21 上海陆家嘴国际金融资产交易市场股份有限公司 Finance product buys method, apparatus, equipment and computer readable storage medium at competitive price
JP2018191728A (en) * 2017-05-12 2018-12-06 株式会社ユニバーサルエンターテインメント Game machine
KR101928087B1 (en) * 2018-01-03 2019-02-26 한국조폐공사 Method for managing on-line lottery based on blockchain and server using the same
CN109472607A (en) * 2018-09-18 2019-03-15 深圳壹账通智能科技有限公司 Product purchase request processing method, device, computer equipment and storage medium
US20190102354A1 (en) * 2017-10-04 2019-04-04 Hipmunk,Inc. Allocation of shareable item via dynamic exponentiation
CN109711948A (en) * 2019-01-09 2019-05-03 广州视源电子科技股份有限公司 Item recommendation method, device, equipment and storage medium
CN110012001A (en) * 2019-03-29 2019-07-12 北京金山安全软件有限公司 Resource allocation method and device
CN110223435A (en) * 2019-06-04 2019-09-10 网易(杭州)网络有限公司 Object random distribution approach, device, computer storage medium and electronic equipment
CN111429186A (en) * 2020-04-08 2020-07-17 杭州左链科技有限公司 Fancy carp lottery incentive method, equipment and storage medium
CN111612520A (en) * 2020-04-17 2020-09-01 五八有限公司 Resource processing method, device, server and storage medium

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6179291B1 (en) * 1997-04-02 2001-01-30 Olaf Vancura Casino game method of play
JP2010211748A (en) * 2009-03-12 2010-09-24 Hiroshima Univ Resource distribution system
CN104462977A (en) * 2014-12-23 2015-03-25 北京京东尚科信息技术有限公司 Data processing method and system
WO2016101852A1 (en) * 2014-12-23 2016-06-30 北京京东尚科信息技术有限公司 Data processing method and system
US20170139549A1 (en) * 2015-11-16 2017-05-18 Hipmunk, Inc. Linking allocable region of graphical user interface
CN107808282A (en) * 2016-09-09 2018-03-16 腾讯科技(深圳)有限公司 Virtual objects packet transmission method and device
JP2018191728A (en) * 2017-05-12 2018-12-06 株式会社ユニバーサルエンターテインメント Game machine
US20190102354A1 (en) * 2017-10-04 2019-04-04 Hipmunk,Inc. Allocation of shareable item via dynamic exponentiation
KR101928087B1 (en) * 2018-01-03 2019-02-26 한국조폐공사 Method for managing on-line lottery based on blockchain and server using the same
CN108564426A (en) * 2018-01-08 2018-09-21 上海陆家嘴国际金融资产交易市场股份有限公司 Finance product buys method, apparatus, equipment and computer readable storage medium at competitive price
CN109472607A (en) * 2018-09-18 2019-03-15 深圳壹账通智能科技有限公司 Product purchase request processing method, device, computer equipment and storage medium
CN109711948A (en) * 2019-01-09 2019-05-03 广州视源电子科技股份有限公司 Item recommendation method, device, equipment and storage medium
CN110012001A (en) * 2019-03-29 2019-07-12 北京金山安全软件有限公司 Resource allocation method and device
CN110223435A (en) * 2019-06-04 2019-09-10 网易(杭州)网络有限公司 Object random distribution approach, device, computer storage medium and electronic equipment
CN111429186A (en) * 2020-04-08 2020-07-17 杭州左链科技有限公司 Fancy carp lottery incentive method, equipment and storage medium
CN111612520A (en) * 2020-04-17 2020-09-01 五八有限公司 Resource processing method, device, server and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
徐建, 李善平: "用户公平的活动队列管理", 电子学报, no. 03 *
潘伟;汪寿阳;华国伟;张金隆;: "基于模糊权重的多目标订单分配模型", 中国管理科学, no. 02 *
高远;刘莉;郑俊哲;: "火电厂负荷经济分配的遗传算法解法", 沈阳工程学院学报(自然科学版), no. 02 *

Similar Documents

Publication Publication Date Title
US11637889B2 (en) Configuration recommendation for a microservice architecture
CN110163474A (en) A kind of method and apparatus of task distribution
CN103853618B (en) Resource allocation method with minimized cloud system cost based on expiration date drive
US7716193B2 (en) Ensuring timely servicing of desired transactions in a database server
CN103810045B (en) Resource allocation methods, explorer, Resource Server and system
CN110458468A (en) A kind of task processing method, device, electronic equipment and storage medium
CN110597639B (en) CPU distribution control method, device, server and storage medium
CN106294233A (en) The transfer control method of a kind of direct memory access and device
CN108763389A (en) The integration method and device of data, storage medium, terminal
CN110058940A (en) Data processing method and device under a kind of multi-thread environment
CN109934427B (en) Method and device for generating item distribution scheme
CN109150757B (en) Advertisement resource processing method and device and electronic equipment
CN112148467A (en) Dynamic allocation of computing resources
CN111163186A (en) ID generation method, device, equipment and storage medium
WO2016127854A1 (en) Information processing method and device
CN114070847B (en) Method, device, equipment and storage medium for limiting current of server
CN112651739A (en) Resource transfer method, device, electronic equipment and storage medium
CN112508641A (en) Method and device for distributing articles, computer equipment and storage medium
CN110502474A (en) Order allocation method, device and storage medium based on distributed memory system
WO2016092604A1 (en) Data processing system and data access method
CN115729687A (en) Task scheduling method and device, computer equipment and storage medium
CN112837128B (en) Order assignment method, order assignment device, computer equipment and computer readable storage medium
WO2021068585A1 (en) Resource processing method and apparatus, electronic device, and medium
JP4061163B2 (en) Software license management apparatus, software license management program, software license management method, and software license management system
CN111382178A (en) Network task allocation method, system, 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