CN108764866B - Method and equipment for allocating resources and drawing resources - Google Patents

Method and equipment for allocating resources and drawing resources Download PDF

Info

Publication number
CN108764866B
CN108764866B CN201810505558.3A CN201810505558A CN108764866B CN 108764866 B CN108764866 B CN 108764866B CN 201810505558 A CN201810505558 A CN 201810505558A CN 108764866 B CN108764866 B CN 108764866B
Authority
CN
China
Prior art keywords
resource
user
resources
group
resource allocation
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.)
Active
Application number
CN201810505558.3A
Other languages
Chinese (zh)
Other versions
CN108764866A (en
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.)
Shanghai Zhangmen Science and Technology Co Ltd
Original Assignee
Shanghai Zhangmen Science and Technology 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 Shanghai Zhangmen Science and Technology Co Ltd filed Critical Shanghai Zhangmen Science and Technology Co Ltd
Priority to CN201810505558.3A priority Critical patent/CN108764866B/en
Publication of CN108764866A publication Critical patent/CN108764866A/en
Application granted granted Critical
Publication of CN108764866B publication Critical patent/CN108764866B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash

Abstract

The embodiment of the application discloses a method and equipment for allocating resources and drawing resources. One embodiment of a method for allocating resources comprises: receiving a resource getting request sent by terminal equipment, wherein the resource getting request is used for requesting to get group resources distributed in a group chat for a user belonging to the group chat; if the group resources have the resources which are not picked up, generating resource allocation parameters for the users; and if the resource distribution parameters meet preset conditions, distributing at least part of the amount of the resources in the un-picked resources to the user, and sending a first picking notification message to the user, wherein the first picking notification message is used for notifying the user that the resource picking is successful and the amount of the resources picked by the user. The implementation mode provides a new resource allocation mode, and the resource allocation mode is richer and more diversified. Moreover, the resource allocation mode realizes the randomness of resource allocation.

Description

Method and equipment for allocating resources and drawing resources
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and equipment for allocating resources and getting resources.
Background
Instant Messaging (IM) is the most popular communication method on the internet at present, and can realize Instant Message sending and receiving. With the rapid development of the internet, various instant messaging applications are emerging. Most instant messaging applications integrate resource class (e.g., red packet class) programs to enable publishing resources (e.g., red packets) in the instant messaging application. In general, the resources published in an instant messaging application may include both individual resources (e.g., individual red packs) and group resources (e.g., spelling of a handful of red packs).
Currently, if a group resource is released in a group chat of an instant messaging application, a user belonging to the group chat may request to retrieve the resource in the group resource. The existing resource allocation method usually allocates resources to users in sequence according to the order in which the users initiate requests until all the group resources are allocated.
Disclosure of Invention
The embodiment of the application provides a method and equipment for allocating resources and drawing resources.
In a first aspect, some embodiments of the present application provide a method for allocating resources, which is applied to a network device, and includes: receiving a resource getting request sent by terminal equipment, wherein the resource getting request is used for requesting to get group resources distributed in a group chat for a user belonging to the group chat; if the group resources have the resources which are not picked up, generating resource allocation parameters for the users; and if the resource allocation parameters meet the preset conditions, allocating at least part of amount of resources in the un-extracted resources to the user, and sending a first extraction notification message to the user, wherein the first extraction notification message is used for notifying the user that the current resource is successfully extracted and the amount of the resources extracted by the user.
In a second aspect, some embodiments of the present application provide a method for obtaining resources, which is applied to a terminal device, and includes: if the fact that a user belonging to the group chat executes a pickup operation on the group resources issued in the group chat is detected, sending a resource pickup request to the network equipment, wherein the resource pickup request is used for requesting the group resources to be picked up for the user; and if a first getting notification message sent by the network equipment is received, updating the resource value in the resource storage account of the user, wherein the first getting notification message is used for notifying the user that the resource getting is successful and the amount of the resource got by the user.
In a third aspect, some embodiments of the present application provide an apparatus for allocating resources, which is disposed in a network device, and includes: a receiving unit, configured to receive a resource getting request sent by a terminal device, wherein the resource getting request is used for requesting to get a group resource issued in a group chat for a user belonging to the group chat; the generating unit is configured to generate a resource allocation parameter for the user if the group of resources has the un-acquired resource; the allocation unit is configured to allocate at least part of the amount of the resources which are not received to the user if the resource allocation parameters meet preset conditions, and send a first receiving notification message to the user, wherein the first receiving notification message is used for notifying the user that the resource is received successfully and the amount of the resources received by the user.
In a fourth aspect, some embodiments of the present application provide an apparatus for obtaining resources, which is disposed in a terminal device, and includes: the device comprises a sending unit and a receiving unit, wherein the sending unit is configured to send a resource getting request to a network device if detecting that a user belonging to the group chat performs getting operation on a group resource issued in the group chat, and the resource getting request is used for getting the group resource for the user request; and the updating unit is configured to update the resource value in the resource storage account of the user if a first getting notification message sent by the network device is received, wherein the first getting notification message is used for notifying the user that the resource getting is successful and the amount of the resource got by the user.
In a fifth aspect, some embodiments of the present application provide a network device, including: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation of the first aspect.
In a sixth aspect, some embodiments of the present application provide a terminal device, including: one or more processors; a storage device on which one or more programs are stored; when executed by one or more processors, cause the one or more processors to implement a method as described in any implementation of the second aspect.
In a seventh aspect, some embodiments of the present application provide a computer-readable medium on which a computer program is stored, which computer program, when executed by a processor, implements the method as described in any of the implementations of the first aspect or implements the method as described in any of the implementations of the second aspect.
According to the method and the device for allocating and acquiring resources provided by the embodiment of the application, under the condition that the resource acquisition request sent by the terminal device is received, the network device can determine whether the group resources have unaccepted resources. And generating resource allocation parameters for the user under the condition that the resources are not acquired. And then, under the condition that the resource allocation parameters meet preset conditions, allocating at least part of the amount of the resources which are not received to the user. A new resource allocation mode is provided, so that the resource allocation mode is richer and more diverse. Moreover, the resource allocation mode realizes the randomness of resource allocation.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram to which some embodiments of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for allocating resources according to the present application;
FIG. 3 is a flow diagram of yet another embodiment of a method for allocating resources according to the present application;
FIG. 4 is a flow diagram of another embodiment of a method for allocating resources according to the present application;
FIG. 5 is a schematic diagram of an application scenario of the method for allocating resources provided by FIG. 4;
FIG. 6 is a flow diagram of one embodiment of a method for drawing resources in accordance with the present application;
FIG. 7 is a flow diagram of yet another embodiment of a method for drawing resources in accordance with the present application;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a network device or a terminal device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which the methods for allocating resources, drawing resources of the present application may be applied.
As shown in fig. 1, system architecture 100 may include a terminal device 101, a network 102, and a network device 103. Network 102 is the medium used to provide communication links between terminal device 101 and network device 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal device 101 to interact with network device 103 through network 102 to receive or send messages and the like. Various client applications, such as an instant messaging application, may be installed on the terminal device 101.
The terminal apparatus 101 may be hardware or software. When the terminal device 101 is hardware, it may be various electronic devices supporting an instant messaging function, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like. When the terminal apparatus 101 is software, it can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules, or as a single piece of software or software module. And is not particularly limited herein.
Network device 103 may be a network device that provides various services, for example, network device 103 may be a background server for an instant messaging application; the background server may be integrated or distributed. The background server of the instant messaging application may analyze and process data such as a resource retrieval request acquired from the terminal device 101, and determine whether to allocate resources to the user according to a processing result.
It should be noted that the network device 103 may be hardware or software. When the network device 103 is hardware, it may be implemented as a distributed network device group formed by a plurality of network devices, or may be implemented as a single network device. When the network device 103 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for allocating resources provided by some embodiments of the present application may be performed by the network device 103, and the method for drawing resources may be performed by the terminal device 101.
It should be understood that the number of terminal devices, networks, and network devices in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and network devices, as desired for an implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for allocating resources in accordance with the present application is shown. The method for allocating resources is applied to network equipment and comprises the following steps:
step 201, receiving a resource getting request sent by a terminal device.
In this embodiment, a network device (e.g., the network device 103 shown in fig. 1) on which the method for allocating resources operates may receive, from a terminal device (e.g., the terminal device 101 shown in fig. 1), a resource pickup request sent by a user belonging to a group chat. The resource getting request can be used for getting the group resource issued in the group chat for a user request belonging to the group chat.
In practice, a user of an instant messaging application may establish a chat session with one or more other users. A chat session established by a user of an instant messaging application with one other user may be referred to as a personal chat session. A chat session established by a user of an instant messaging application with a plurality of other users may be referred to as a group chat session, or simply a group chat. The instant messaging application may integrate resource class (e.g., red-envelope class) programs to enable a user of the instant messaging application to publish resources (e.g., red-envelopes) in a personal chat session or group chat.
Here, the user of the instant messaging application may issue a group resource (e.g., a spelling message or a general red packet) to a plurality of users belonging to the group chat, such as some or all of the users, and any user belonging to the group chat may request to retrieve the resource in the group resource. When the user opens the instant messaging application installed on the terminal device, a chat session list of a currently logged-in user of the instant messaging application can be displayed on a screen of the terminal device. Subsequently, when the user clicks a group chat in the chat session list, a chat session page of the group chat may be displayed on the screen of the terminal device. If a user of the group chat publishes the group resource to a plurality of users belonging to the group chat, the group resource message can be displayed on the chat session page displayed on the screen of the terminal equipment of the plurality of users belonging to the group chat. When the user clicks the group resource message, the pickup operation is executed on the group resource. At this time, the terminal device may be triggered to send a resource getting request to the network device, where the user requests to get the group of resources.
Step 202, if the group resource has the resource which is not picked up, generating a resource allocation parameter for the user.
In this embodiment, after receiving a resource pickup request sent by a user belonging to a group chat, a network device may determine whether an un-picked resource still exists in a group resource. In the event that there are un-picked resources in the group resources, the network device may generate a resource allocation parameter for the user. If there is no unavailable resource in the group resource, the flow ends. Wherein the resource allocation parameter may be used to determine whether to allocate resources for the user. The network device may generate the resource allocation parameter in various ways. For example, each time a resource pick-up request sent by a user belonging to a group chat is received, the network device may generate a random number as a resource allocation parameter for the user.
In some embodiments, resource allocation parameters are generated for a user requesting to acquire a resource if there are any uncommitted resources in the group of resources and the user has not successfully acquired resources in the group of resources.
Step 203, if the resource allocation parameters meet the preset conditions, allocating at least part of the amount of the resources which are not picked up to the user, and sending a first picking-up notification message to the user.
In this embodiment, the network device may analyze the resource allocation parameter to determine whether the resource allocation parameter meets a preset condition. Under the condition that the resource allocation parameters meet preset conditions, the network equipment can allocate at least part of the amount of the resources which are not received to the user and send a first receiving notification message to the user. The first getting notification message may be used to notify the user that the resource getting is successful this time and the amount of the resource got by the user. The preset condition may be various conditions set in advance. For example, the preset condition may be greater than a preset value. At this time, the network device may compare the resource allocation parameter with a preset value. If the resource allocation parameter is larger than the preset value, the resource allocation parameter meets the preset condition, and the resource allocation parameter meeting the preset condition comprises the resource allocation parameter larger than the preset value. Otherwise, the preset condition is not met, and the resource allocation parameters which do not meet the preset condition comprise resource allocation parameters which are not more than a preset numerical value.
In some embodiments, the network device may further send a second pickup notification message to other users belonging to the group chat in case the resource allocation parameter satisfies a preset condition. The second pickup notification message may be used to notify other users that the resource pickup of the user is successful.
In some embodiments, the network device may further send a third pickup notification message to the user requesting to pickup the resource, in case the resource allocation parameter does not satisfy the preset condition. The third getting notification message may be used to notify the user that the resource getting is not successful this time.
In some embodiments, the network device may further send a fourth get notification message to other users belonging to the group chat in case the resource allocation parameter does not satisfy the preset condition. The fourth getting notification message may be used to notify other users that the user requesting to get resources does not successfully get resources this time.
In some embodiments, whether the user belonging to the group chat successfully picks up the resource this time, the user is allowed to request to pick up the group resource again. When the user clicks the group resource message again, the terminal device may be triggered to send a resource pickup request to the network device again. If the network device receives the resource getting request from the terminal device again and the cluster resource has the un-got resource, a new resource allocation parameter can be generated for the user. If the new resource allocation parameters meet the preset conditions, at least part of the amount of the resources in the un-picked resources can be allocated to the user, and a first picking notification message is sent to the user to notify the user that the current resource picking is successful. Of course, if the new resource allocation parameter does not satisfy the preset condition, a third pickup notification message may be sent to the user to notify the user that the resource pickup is not successful this time. In some embodiments, a user belonging to a group chat is allowed to attempt to pick up a resource in the group resource again only if the user has not successfully picked up the resource.
It should be appreciated that in some embodiments, whenever a user belonging to a group chat requests to retrieve a group resource published in the group chat, the network device may generate a resource retrieval allocation parameter for the user to determine whether to allocate the resource for the user, thereby achieving randomness in resource allocation. In some embodiments, whenever a user belonging to a group chat requests to retrieve a group resource published in the group chat and the user has not successfully retrieved a resource in the group resource, the network device may generate a resource-retrieving allocation parameter for the user to determine whether to allocate the resource for the user.
It should be noted that, each time an arbitrary user belonging to the group chat performs the pickup operation for the group resource, the resource pickup request is sent to the network device once, so that the network device performs the above step 201 and step 203 once each time the network device receives one resource pickup request.
In the method for allocating resources provided in the foregoing embodiment of the present application, when receiving a resource pickup request sent by a terminal device, a network device may determine whether an unaccepted resource exists in a group resource. And generating resource allocation parameters for the user under the condition that the resources are not acquired. And then, under the condition that the resource allocation parameters meet preset conditions, allocating at least part of the amount of the resources which are not received to the user. A new resource allocation mode is provided, so that the resource allocation mode is richer and more diversified. Moreover, the resource allocation mode realizes the randomness of resource allocation.
With further reference to fig. 3, a flow 300 of yet another embodiment of a method for allocating resources according to the present application is shown. The method for allocating resources is applied to network equipment and comprises the following steps:
step 301, receiving a resource getting request sent by a terminal device.
In this embodiment, the specific operation of step 301 is substantially the same as the operation of step 201 in the embodiment shown in fig. 2, and is not repeated herein.
Step 302, if there are not-taken resources in the group of resources, a take sequence number is allocated to the user.
In this embodiment, when receiving a resource pickup request sent by a user belonging to a group chat, a network device (e.g., the network device 103 shown in fig. 1) may determine whether an un-picked resource still exists in the group resource. In the case where there are resources in the group that are not picked up, the network device may assign a pickup sequence number to the user. The pickup sequence number may be used to indicate an order in which the network device receives resource pickup requests sent by users belonging to the group chat. For example, the network device allocates a getting sequence number 1 to a user corresponding to the first resource getting request received by the network device, allocates a getting sequence number 2 to a user corresponding to the second resource getting request received by the network device, and so on, allocates a getting sequence number N to a user corresponding to the nth (N is a positive integer) resource getting request.
Step 303, obtain the resource value of the un-acquired resource.
In this embodiment, the network device may obtain a resource value of the unsolicited resource.
And 304, generating a resource allocation parameter based on the acquiring sequence number and the resource value of the un-acquired resource.
In this embodiment, the network device may generate the resource allocation parameter based on the drawing sequence number and the resource value of the un-drawn resource. For example, the network device may use a sum of the drawing sequence number and an integer part of the resource value of the un-drawn resource as the resource allocation parameter.
In some embodiments, the network device may calculate a sum of the pickup sequence number and a first predetermined digit (e.g., a last digit) of the resource value of the un-picked resource, and use the resultant sum as the resource allocation parameter.
Step 305, if the resource allocation parameters meet the preset conditions, allocating at least part of the amount of the resources which are not picked up to the user, and sending a first picking-up notification message to the user.
In this embodiment, the network device may analyze the resource allocation parameter to determine whether the resource allocation parameter meets a preset condition. Under the condition that the resource allocation parameters meet preset conditions, the network equipment can allocate at least part of the amount of the resources which are not received to the user and send a first receiving notification message to the user. The first getting notification message may be used to notify the user that the resource getting is successful this time and the amount of the resource got by the user. The preset condition may be various conditions set in advance. For example, the network device may divide the resource allocation parameter by a preset value (e.g., 2). If the resource allocation parameter can be evenly divided by the preset value, the resource allocation parameter satisfies the preset condition, and the resource allocation parameter satisfying the preset condition may include the resource allocation parameter evenly divided by the preset value. Otherwise, the preset condition is not satisfied, and the resource allocation parameter that does not satisfy the preset condition may include a resource allocation parameter that cannot be evenly divided by a preset value.
As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the flow 300 of the method for allocating resources in the present embodiment highlights the step of generating the resource allocation parameters. Thus, in the solution described in this embodiment, the resource allocation parameter is generated based on the resource value of the resource not yet received and the received sequence number. A way of generating resource allocation parameters quickly is provided.
With further reference to fig. 4, a flow 400 of another embodiment of a method for allocating resources according to the present application is shown. The method for allocating resources is applied to network equipment and comprises the following steps:
step 401, receiving a resource getting request sent by a terminal device.
Step 402, if the group resource has the resource which is not picked up, generating a resource allocation parameter for the user.
In this embodiment, the specific operations of steps 401 and 402 are substantially the same as the operations of steps 201 and 202 in the embodiment shown in fig. 2, and are not described herein again.
And step 403, if the resource allocation parameter does not meet the preset condition, sending a third getting notification message to the user.
In this embodiment, a network device (e.g., the network device 103 shown in fig. 1) may analyze the resource allocation parameter to determine whether the resource allocation parameter satisfies a preset condition. The network device may send a third getting notification message to the user when the resource allocation parameter does not satisfy the preset condition. The third getting notification message may be used to notify the user that the resource getting is not successful.
In some embodiments, the network device may further send a fourth get notification message to other users belonging to the group chat in case the resource allocation parameter does not satisfy the preset condition. The fourth getting notification message may be used to notify other users that the resource getting of the user is not successful.
Step 404, if a resource getting request from the terminal device is received again and the group resource has un-got resource, a new resource allocation parameter is generated for the user.
In this embodiment, when a user belonging to a group chat has initiated a resource pickup request to a network device but has not successfully picked up a resource, the user is allowed to request to pickup the group resource again. When the user clicks the group resource message again, the terminal device (e.g., the terminal device 101 shown in fig. 1) may be triggered to send a resource pickup request to the network device again. If the network device receives the resource getting request from the terminal device again and the cluster resource has the un-got resource, a new resource allocation parameter can be generated for the user.
Step 405, if the new resource allocation parameters meet the preset conditions, allocating at least part of amount of resources in the un-picked resources to the user, and sending a first picking notification message to the user.
In this embodiment, the network device may analyze the new resource allocation parameter to determine whether the new resource allocation parameter meets a preset condition. When the new resource allocation parameter satisfies a preset condition, the network device may allocate at least a part of the amount of the resources in the un-picked resources to the user, and send a first pickup notification message to the user. The first getting notification message may be used to notify the user that the resource getting is successful this time and the amount of the resource got by the user.
In some embodiments, the network device may further send a fourth get notification message to other users belonging to the group chat in case the new resource allocation parameter does not satisfy the preset condition. The fourth getting notification message may be used to notify other users that the resource getting of the user is unsuccessful. At this point, the user may be allowed to request the pickup of the group resource again.
With continued reference to fig. 5, fig. 5 is a schematic diagram of an application scenario of the method for allocating resources provided by fig. 4. In the application scenario of fig. 5, the terminal device of the user a in the group chat 1 issues a completed-by-hand red envelope with a red envelope number of 3 and a total amount of 12 yuan to all the users in the group chat 1. At this time, the terminal devices of all the users in the group chat 1 may display the handful red packet message on the chat session page of the group chat 1. And then, the user B in the group chat 1 clicks the hand-sharing gas red packet message for the first time to trigger the terminal equipment of the user B to send a resource obtaining request to the network equipment. At this time, the network device may allocate a pickup serial number 1 to the user B, obtain the remaining fund value 12 in the pieced together qi hong bao, calculate the sum of the pickup serial number 1 and the last digit 2 of the remaining fund value 12, and use the obtained sum 3 as the resource allocation parameter. Since the resource allocation parameter 3 cannot be evenly divided by 2, the network device may send information indicating that the user B did not successfully receive the red packet to the terminal device of the user B. This information may then be displayed on the screen of user B's terminal device. Where the information may be as shown at 501. And then, the user B clicks the hand-spelling message for the second time to trigger the terminal equipment of the user B to send a resource getting request to the network equipment again. At this time, the network device may allocate a new pickup serial number 2 to the user B, obtain the remaining fund value 12 in the pieced together qi hong bao, calculate the sum of the new pickup serial number 2 and the last digit 2 of the remaining fund value 12, and use the obtained sum 4 as a new resource allocation parameter. Since the new resource allocation parameter 4 can be divided by 2, the network device allocates the red packet with the amount of 3 yuan in the spelling gas red packet to the user B, and sends information indicating that the user B successfully receives the red packet to the terminal device of the user B. This information may then be displayed on the screen of user B's terminal device. Where this information may be as shown at 502.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for allocating resources in this embodiment adds a step of requesting to acquire resources again by a user who does not successfully acquire resources. Therefore, in the scheme described in this embodiment, a user who does not successfully acquire resources may request to acquire resources for multiple times, thereby increasing the interest of the resource acquisition process.
With continued reference to FIG. 6, a flow 600 of one embodiment of a method for drawing resources in accordance with the present application is shown. The method for obtaining the resources is applied to the terminal equipment and comprises the following steps:
step 601, if it is detected that the user belonging to the group chat executes the pickup operation on the group resource issued in the group chat, sending a resource pickup request to the network device.
In this embodiment, a terminal device (for example, the terminal device 101 shown in fig. 1) on which the method for getting resources operates may detect a getting operation performed by a user belonging to a group chat on a group resource issued in the group chat. In case it is detected that a user belonging to the group chat performs a pickup operation on a group resource published in the group chat, the terminal device may send a resource pickup request to a network device (e.g. the network device 103 shown in fig. 1). Wherein the resource pickup request is used for picking up the group resource for the user request.
In practice, a user of an instant messaging application may establish a chat session with one or more other users. A chat session established by a user of an instant messaging application with one other user may be referred to as a personal chat session. A chat session established by a user of an instant messaging application with a plurality of other users may be referred to as a group chat session, or simply a group chat. The instant messaging application may integrate resource class (e.g., red-envelope class) programs to enable a user of the instant messaging application to publish resources (e.g., red-envelopes) in a personal chat session or group chat.
Here, the user of the instant messaging application may issue a group resource (e.g., a spelling message and a general red packet) to all users belonging to the group chat, and any user belonging to the group chat may request to retrieve the resource in the group resource. When the user opens the instant messaging application installed on the terminal device, a chat session list of a currently logged-in user of the instant messaging application can be displayed on a screen of the terminal device. Subsequently, when the user clicks a group chat in the chat session list, a chat session page of the group chat may be displayed on the screen of the terminal device. If one user of the group chat issues the group resource to all users belonging to the group chat, the group resource message can be displayed on the chat session page displayed on the screen of the terminal equipment of the plurality of users belonging to the group chat. When the user clicks the group resource message, the pickup operation is executed on the group resource. At this time, the terminal device may be triggered to send a resource getting request to the network device, where the user requests to get the group of resources.
Step 602, if a first getting notification message sent by the network device is received, updating the resource value in the resource storage account of the user.
In this embodiment, in the case of receiving the first pickup notification message sent by the network device, the terminal device may update the resource value in the resource storage account of the user. The first getting notification message may be used to notify the user that the resource getting is successful this time and the amount of the resource got by the user. For example, the terminal device may calculate the sum of the resource value in the user's resource storage account and the amount of the resource that the user has earned as a new resource value in the user's resource storage account.
In some embodiments, after updating the resource value in the user's resource storage account, the terminal device may also display information on a group chat session page of the group chat indicating that the user successfully picked up the group resource. For example, the information indicating that the user successfully received the group resource may be displayed in a pop-up window on the chat session page, or may be directly overlaid on the chat session page and integrated with the chat session page. Here, the terminal device may display information indicating that the user successfully acquires the group resource in at least one of the following areas: a predetermined area of the chat session page (e.g., a lower right corner area of the chat session page), an area of the chat session page where the group resource message is located, a vicinity area of the chat session page where the group resource message is located (e.g., a lower area of the area where the group resource message is located), and so on.
In some embodiments, upon receiving the third pickup notification message sent by the network device, the terminal device may display information indicating that the user did not successfully pickup the group resource on a group chat session page of the group chat. The third pickup notification message may be used to notify the user that the resource pickup is not successful this time. For example, the information indicating that the user has not successfully received the group resource may be displayed in a pop-up window on the chat session page, or may be directly overlaid on the chat session page and integrated with the chat session page. Here, the terminal device may display information indicating that the user has not successfully acquired the group resource in at least one of the following areas: a predetermined area of the chat session page (e.g., a lower right corner area of the chat session page), an area of the chat session page where the group resource message is located, a vicinity area of the chat session page where the group resource message is located (e.g., a lower area of the area where the group resource message is located), and so on.
In some embodiments, whether the user belonging to the group chat successfully picks up the resource this time, the user is allowed to request to pick up the group resource again. When the user clicks the group resource message again, the terminal device may be triggered to send a resource pickup request to the network device again. If the network device receives the resource getting request from the terminal device again and the group resource has un-got resource, it can determine whether to allocate resource for the user again. If the resource allocation is determined to be the user, a first getting notification message may be sent to the user to notify the user that the resource getting is successful. If it is determined that the resource is not allocated to the user, a third pickup notification message may be sent to the user to notify the user that the resource pickup is not successful this time.
It should be noted that, in some embodiments, the step 601 and the step 602 are executed once each time the user belonging to the group chat performs the pickup operation for the group resource.
In the method for getting resources provided in the foregoing embodiment of the present application, when it is detected that a user belonging to a group chat performs a getting operation on a group resource issued in the group chat, a terminal device of the user may send a resource getting request to a network device. In the case of receiving the first getting notification message sent by the network device, the terminal device may update the resource value in the resource storage account of the user. A new resource getting mode is provided, and the resource getting mode is richer and more diversified. Moreover, the resource acquisition mode realizes the randomness of resource acquisition.
With further reference to FIG. 7, illustrated is a flow 700 of yet another embodiment of a method for drawing resources in accordance with the present application. The method for getting resources is applied to terminal equipment and comprises the following steps:
step 701, if it is detected that a user belonging to the group chat executes a pickup operation on a group resource issued in the group chat, a resource pickup request is sent to the network device.
In this embodiment, the specific operation of step 701 is substantially the same as the operation of step 601 in the embodiment shown in fig. 6, and is not described herein again.
Step 702, if receiving a third getting notification message sent by the network device, displaying information indicating that the user did not successfully get the group resource on a group chat session page of the group chat.
In this embodiment, upon receiving the third pickup notification message sent by the network device (e.g., the network device 103 shown in fig. 1), the terminal device (e.g., the terminal device 101 shown in fig. 1) may display information indicating that the user did not successfully pick up the group resource on the group chat session page of the group chat. The third getting notification message may be used to notify the user that the resource getting is not successful. For example, the information indicating that the user has not successfully received the group resource may be displayed in a pop-up window on the chat session page, or may be directly overlaid on the chat session page and integrated with the chat session page. Here, the terminal device may display information indicating that the user has not successfully acquired the group resource in at least one of the following areas: a predetermined area of the chat session page (e.g., a lower right corner area of the chat session page), an area of the chat session page where the group resource message is located, a vicinity area of the chat session page where the group resource message is located (e.g., a lower area of the area where the group resource message is located), and so on.
Step 703, sending the resource getting request to the network device again if the getting operation of the user for the group resource is detected again.
In this embodiment, when a user belonging to a group chat has initiated a resource pickup request to a network device but has not successfully picked up a resource, the user is allowed to request to pickup the group resource again. When the user clicks the group resource message again, the terminal device may be triggered to send a resource pickup request to the network device again. If the network device receives the resource getting request from the terminal device again and the group resource has the un-got resource, it can determine whether to allocate the resource for the user again. If the resource allocation is determined to be the user, a first getting notification message may be sent to the user to notify the user that the resource getting is successful. If it is determined that the resource is not allocated to the user, a third pickup notification message may be sent to the user to notify the user that the resource pickup is not successful this time.
As can be seen from fig. 7, compared with the embodiment corresponding to fig. 6, the flow 700 of the method for drawing resources in this embodiment adds a step of sending a resource drawing request to the network device again. Therefore, in the scheme described in this embodiment, a user who does not successfully acquire resources may request to acquire resources for multiple times, thereby increasing the interest of the resource acquisition process.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use in implementing a network device (e.g., network device 103 shown in FIG. 1) or a terminal device (e.g., terminal device 101 shown in FIG. 1) of an embodiment of the present application. The network device or the terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the use range of the embodiments of the present application.
As shown in fig. 8, a computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with 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. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and 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. A drive 810 is also connected to the I/O interface 805 as necessary. 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 necessary, so that the computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program performs the above-described functions defined in the method of the present application when executed by the Central Processing Unit (CPU) 801. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable medium or any combination of the two. A computer readable medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable medium may include, but are not limited to: an electrical connection having one or more wires, 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), an optical fiber, 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 present application, a computer readable 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. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart 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 application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, a generating unit, and an assigning unit. The names of these units do not in some cases constitute a limitation on the unit itself, and for example, a receiving unit may also be described as a "unit that receives a resource retrieval request transmitted by a terminal device". As another example, it can also be described as: a processor includes a sending unit and an updating unit. Here, names of these units do not limit the unit itself in some cases, and for example, the sending unit may be described as "a unit that sends a resource pickup request to the network device when it is detected that a user belonging to the group chat performs a pickup operation on the group resource issued in the group chat".
As another aspect, the present application also provides a computer-readable medium, which may be included in the network device or the terminal device described in the above embodiments; or may exist separately without being assembled into the network device or the terminal device. The computer readable medium carries one or more programs which, when executed by the network device or terminal device, cause the network device to: receiving a resource getting request sent by terminal equipment, wherein the resource getting request is used for requesting to get group resources distributed in a group chat for a user belonging to the group chat; if the group resources have the resources which are not picked up, generating resource allocation parameters for the users; and if the resource allocation parameters meet the preset conditions, allocating at least part of amount of resources in the un-extracted resources to the user, and sending a first extraction notification message to the user, wherein the first extraction notification message is used for notifying the user that the current resource is successfully extracted and the amount of the resources extracted by the user. Or cause the terminal device to: if the fact that a user belonging to the group chat executes a pickup operation on the group resources issued in the group chat is detected, sending a resource pickup request to the network equipment, wherein the resource pickup request is used for requesting the group resources to be picked up for the user; and if a first getting notification message sent by the network equipment is received, updating the resource value in the resource storage account of the user, wherein the first getting notification message is used for notifying the user that the resource is successfully got this time and the amount of the resource got by the user.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A method for allocating resources is applied to a network device and comprises the following steps:
receiving a resource getting request sent by terminal equipment, wherein the resource getting request is used for requesting to get group resources distributed in a group chat for a user belonging to the group chat;
if the group resources have the resources which are not picked up, generating resource allocation parameters for the users;
if the resource allocation parameter meets a preset condition, allocating at least part of amount of resources in the un-acquired resources to the user, and sending a first acquisition notification message to the user, wherein the first acquisition notification message is used for notifying the user that the current resource acquisition is successful and the amount of the resources acquired by the user, and the preset condition is that the resource allocation parameter can be divided by a preset value, or the resource allocation parameter is larger than the preset value;
if a resource getting request from the terminal equipment is received again and the group resources have un-got resources, generating new resource allocation parameters for the user;
and if the new resource allocation parameters meet preset conditions, allocating at least part of the amount of the resources in the un-picked resources to the user, and sending a first picking notification message to the user.
2. The method of claim 1, wherein, after said allocating at least some amount of the un-picked resources to the user, further comprising:
and sending a second getting notification message to other users belonging to the group chat, wherein the second getting notification message is used for notifying the other users that the user successfully gets the resource.
3. The method of claim 1, wherein the method further comprises:
and if the resource allocation parameter does not meet the preset condition, sending a third getting notification message to the user, wherein the third getting notification message is used for notifying the user that the current resource getting is unsuccessful.
4. The method of claim 1, wherein the generating resource allocation parameters for the user comprises:
allocating a picking sequence number for the user;
acquiring a resource value of the un-acquired resource;
and generating the resource allocation parameter based on the acquiring sequence number and the resource value of the non-acquiring resource.
5. The method of claim 4, wherein the generating the resource allocation parameter based on the picked sequence number and the resource value of the uncocked resource comprises:
and calculating the sum of the receiving serial number and the first preset digit of the resource value of the un-received resource, and taking the obtained sum as the resource allocation parameter.
6. The method of claim 5, wherein after the generating source allocation parameters for the user, further comprising:
dividing the resource allocation parameter by a preset value;
wherein the resource allocation parameters meeting the preset conditions include: a resource allocation parameter that is divided exactly by a preset value; the resource allocation parameters which do not meet the preset condition comprise: a resource allocation parameter that is not divisible by the preset value.
7. A method for getting resources is applied to a terminal device and comprises the following steps:
if the fact that a user belonging to the group chat executes a pickup operation on the group resources issued in the group chat is detected, sending a resource pickup request to network equipment, so that if the network equipment receives the resource pickup request and the group resources have non-pickup resources, resource allocation parameters are generated for the user; if the resource allocation parameter meets a preset condition, allocating at least part of amount of resources in the un-acquired resources to the user, and sending a first acquisition notification message to the user, wherein the resource acquisition request is used for acquiring the group resources for the user request, and the preset condition is that the resource allocation parameter can be divided by a preset numerical value, or the resource allocation parameter is greater than the preset numerical value;
if a first getting notification message sent by the network equipment is received, updating a resource value in a resource storage account of the user, wherein the first getting notification message is used for notifying the user that the resource getting is successful and the amount of the resource got by the user;
if the user's operation of getting the group resource is detected again, sending the resource getting request to the network device again, so that if the network device receives the resource getting request from the terminal device again and the group resource has un-got resource, generating a new resource allocation parameter for the user; and if the new resource allocation parameters meet preset conditions, allocating at least part of the amount of the resources in the un-picked resources to the user, and sending a first picking notification message to the user.
8. The method of claim 7, wherein after the updating the resource value in the user's resource storage account, further comprising:
and displaying information used for indicating that the user successfully draws the group resources on a group chat session page of the group chat.
9. The method of claim 7, wherein the method further comprises:
and if a third getting notification message sent by the network equipment is received, displaying information for indicating that the user does not successfully get the group resources on a group chat session page of the group chat, wherein the third getting notification message is used for notifying the user that the resource getting is not successful.
10. A network device, comprising:
one or more processors;
a storage device on which one or more programs are stored;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
11. A terminal device, comprising:
one or more processors;
a storage device on which one or more programs are stored;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 7-9.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 6 or carries out the method of any one of claims 7 to 9.
CN201810505558.3A 2018-05-24 2018-05-24 Method and equipment for allocating resources and drawing resources Active CN108764866B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810505558.3A CN108764866B (en) 2018-05-24 2018-05-24 Method and equipment for allocating resources and drawing resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810505558.3A CN108764866B (en) 2018-05-24 2018-05-24 Method and equipment for allocating resources and drawing resources

Publications (2)

Publication Number Publication Date
CN108764866A CN108764866A (en) 2018-11-06
CN108764866B true CN108764866B (en) 2022-09-23

Family

ID=64005235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810505558.3A Active CN108764866B (en) 2018-05-24 2018-05-24 Method and equipment for allocating resources and drawing resources

Country Status (1)

Country Link
CN (1) CN108764866B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109847340B (en) * 2018-12-21 2023-02-10 腾讯科技(深圳)有限公司 Information processing method, device, equipment and medium
CN110061907B (en) * 2019-04-28 2022-03-11 上海掌门科技有限公司 Method and equipment for drawing resources and distributing resources
CN112866084A (en) * 2020-12-31 2021-05-28 上海掌门科技有限公司 Virtual resource processing method, equipment and computer readable medium for chat group

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104837123A (en) * 2015-05-20 2015-08-12 努比亚技术有限公司 Virtual item transmitting method and virtual item transmitting device
CN105389117A (en) * 2015-12-07 2016-03-09 腾讯科技(深圳)有限公司 Resource acquiring method and apparatus and resource processing method, apparatus and system
CN105610695A (en) * 2015-12-21 2016-05-25 阿里巴巴集团控股有限公司 Service implementation method and device
CN106096924A (en) * 2016-06-21 2016-11-09 阿里巴巴集团控股有限公司 object distribution method and device
CN106251124A (en) * 2016-07-18 2016-12-21 浙江翼信科技有限公司 A kind of e-sourcing distribution method and equipment
CN107302488A (en) * 2016-04-14 2017-10-27 阿里巴巴集团控股有限公司 Distribution method, system and the server of virtual objects

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104837123A (en) * 2015-05-20 2015-08-12 努比亚技术有限公司 Virtual item transmitting method and virtual item transmitting device
CN105389117A (en) * 2015-12-07 2016-03-09 腾讯科技(深圳)有限公司 Resource acquiring method and apparatus and resource processing method, apparatus and system
CN105610695A (en) * 2015-12-21 2016-05-25 阿里巴巴集团控股有限公司 Service implementation method and device
CN107302488A (en) * 2016-04-14 2017-10-27 阿里巴巴集团控股有限公司 Distribution method, system and the server of virtual objects
CN106096924A (en) * 2016-06-21 2016-11-09 阿里巴巴集团控股有限公司 object distribution method and device
CN106251124A (en) * 2016-07-18 2016-12-21 浙江翼信科技有限公司 A kind of e-sourcing distribution method and equipment

Also Published As

Publication number Publication date
CN108764866A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN108965098B (en) Message pushing method, device, medium and electronic equipment based on online live broadcast
CN109388626B (en) Method and apparatus for assigning numbers to services
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN108764866B (en) Method and equipment for allocating resources and drawing resources
CN111478781B (en) Message broadcasting method and device
CN112311656B (en) Message aggregation and display method and device, electronic equipment and computer readable medium
CN108011949B (en) Method and apparatus for acquiring data
CN108924036B (en) Method and equipment for allocating resources and drawing resources
CN111062572A (en) Task allocation method and device
CN112118352B (en) Method and device for processing notification trigger message, electronic equipment and computer readable medium
CN108011936B (en) Method and device for pushing information
CN112948138A (en) Method and device for processing message
CN109214846B (en) Information storage method and device
CN110061907B (en) Method and equipment for drawing resources and distributing resources
CN113127561B (en) Method and device for generating service single number, electronic equipment and storage medium
CN111125503A (en) Method and apparatus for generating information
CN108768830B (en) Method and equipment for pushing information and displaying information
CN108494982B (en) Method and apparatus for generating information
CN108683608B (en) Method and device for distributing flow
CN112926822A (en) Resource allocation method and device
CN109087097B (en) Method and device for updating same identifier of chain code
CN111767447A (en) Method and device for determining user traffic path
CN113114612B (en) Determination method and device for distributed system call chain
CN113766437B (en) Short message sending method and device
CN117312761B (en) Method and device for calculating data fragment processing time

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
GR01 Patent grant
GR01 Patent grant