Task processing method, device, electronic device and medium
By obtaining the total resources when the task is generated, the resources when the task is compensated, and the accumulated resources of the processed subtasks, it is determined whether the task meets the compensation conditions. If the conditions are no longer met, some resources are transferred. This solves the problem of waste of compensation resources and poor experience when the target account withdraws the operation event, and realizes efficient utilization of resources.
Patent Information
- Application Number
- CN202111602029.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2041-12-24
AI Technical Summary
In network task processing, when a target account withdraws an operation event, existing technologies suffer from waste of compensation resources and poor experience for the target account.
By obtaining the total resources when the task is generated, the resources when the task is compensated, and the accumulated resources of the processed subtasks, it is determined whether the task meets the compensation conditions. If the conditions are no longer met, some resources are transferred to improve resource utilization.
Without affecting the target account experience, resource utilization is improved and waste of compensation resources is avoided.
Smart Images

Figure CN114331347B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and more specifically, to a task processing method, device, electronic device, and medium. Background Art
[0002] With the increasing maturity and rapid development of internet technology, scenarios involving online task processing are becoming increasingly common, such as online transactions and online service experiences. Currently, in these scenarios, platforms can provide compensation resources to target accounts that perform targeted operations to increase platform activity. However, if a target account stops or withdraws the target operation, this wastes compensation resources, impacting the platform's efficient use of these resources. Summary of the Invention
[0003] The present disclosure provides a task processing method, device, electronic device, and medium to at least solve the problems in the above-mentioned related technologies.
[0004] According to a first aspect of an embodiment of the present disclosure, a task processing method is provided, comprising: in response to a request to process at least one subtask in a task, obtaining a first resource, a second resource, and a third resource, wherein the first resource is the total resource corresponding to the task when the task is generated, the second resource is the resource corresponding to the task when task compensation is triggered, and the third resource is the cumulative resource corresponding to the processed subtasks in the task and the at least one subtask; judging whether the task continues to meet the triggering condition of the task compensation based on the first resource, the second resource, and the third resource; obtaining the resource transfer amount corresponding to the at least one subtask when it is determined that the task no longer meets the triggering condition of the task compensation; and processing the at least one subtask based on the resource corresponding to the at least one subtask and the resource transfer amount.
[0005] Optionally, the method further includes: processing the at least one subtask according to resources corresponding to the at least one subtask when it is determined that the task continues to satisfy the triggering condition for the task compensation.
[0006] Optionally, judging whether the task continues to meet the triggering condition for task compensation based on the first resource, the second resource and the third resource includes: determining the upper limit processing resource of the task based on the first resource and the second resource; when the accumulated resources are greater than the upper limit processing resource, determining that the task no longer meets the triggering condition for task compensation.
[0007] Optionally, the task compensation is to transfer preset resources from the total resources corresponding to the task.
[0008] Optionally, obtaining the resource transfer amount corresponding to the at least one subtask includes: obtaining the resource transfer amount corresponding to the at least one subtask through the first resource, the second resource, the third resource and the preset resource.
[0009] Optionally, the resource transfer amount corresponding to the at least one subtask is obtained through the first resource, the second resource, the third resource and the preset resource, including: obtaining a first difference between the first resource and the third resource, and obtaining a second difference between the second resource and the first difference; taking the quotient of the second difference and the second resource, and taking the product of the quotient result and the preset resource to obtain the total resource transfer amount corresponding to the task; taking the difference between the total resource transfer amount and the historical resource transfer amount corresponding to the subtasks that have been processed in the task to obtain the resource transfer amount corresponding to the at least one subtask.
[0010] Optionally, processing the at least one subtask according to the resource corresponding to the at least one subtask and the resource transfer amount includes: transferring the resource transfer amount from the resource corresponding to the at least one subtask to process the at least one subtask.
[0011] According to a second aspect of an embodiment of the present disclosure, a task processing device is provided, including: a first acquisition unit, configured to: in response to a request to process at least one subtask in a task, acquire a first resource, a second resource and a third resource, wherein the first resource is the total resource corresponding to the task when the task is generated, the second resource is the resource corresponding to the task when task compensation is triggered, and the third resource is the cumulative resource corresponding to the processed subtasks in the task and the at least one subtask; a condition judgment unit, configured to: judge whether the task continues to meet the triggering condition of the task compensation based on the first resource, the second resource and the third resource; the second acquisition unit, configured to: when it is determined that the task no longer meets the triggering condition of the task compensation, acquire the resource transfer amount corresponding to the at least one subtask; the first processing unit, configured to: process the at least one subtask based on the resource corresponding to the at least one subtask and the resource transfer amount.
[0012] Optionally, the task processing device further includes a second processing unit, which is configured to: process the at least one subtask according to the resources corresponding to the at least one subtask when it is determined that the task continues to meet the triggering condition of the task compensation.
[0013] Optionally, the condition judgment unit is configured to: determine the upper limit processing resource of the task based on the first resource and the second resource; when the accumulated resource is greater than the upper limit processing resource, determine that the task no longer meets the triggering condition of the task compensation.
[0014] Optionally, the task compensation is to transfer preset resources from the total resources corresponding to the task.
[0015] Optionally, the second acquisition unit is configured to: acquire the resource transfer amount corresponding to the at least one subtask through the first resource, the second resource, the third resource and the preset resource.
[0016] Optionally, the second acquisition unit is configured to: obtain a first difference between the first resource and the third resource, and obtain a second difference between the second resource and the first difference; quotient the second difference and the second resource, and product the quotient result and the preset resource to obtain the total resource transfer amount corresponding to the task; subtract the total resource transfer amount from the historical resource transfer amount corresponding to the processed subtasks in the task to obtain the resource transfer amount corresponding to the at least one subtask.
[0017] Optionally, the first processing unit is configured to: transfer the resource transfer amount from the resources corresponding to the at least one subtask to process the at least one subtask.
[0018] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: at least one processor; and at least one memory storing computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, prompt the at least one processor to execute a task processing method according to the present disclosure.
[0019] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium storing instructions is provided, characterized in that when the instructions are executed by at least one processor, the at least one processor is prompted to execute the task processing method according to the present disclosure.
[0020] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, wherein instructions in the computer program product can be executed by a processor of a computer device to complete the task processing method according to the present disclosure.
[0021] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:
[0022] According to the task processing method, device, electronic device and medium disclosed in the present invention, when a target account requests to process at least one subtask in a task, it is first determined whether the task continues to meet the triggering conditions for task compensation. If the triggering conditions for task compensation are continued to be met, the resources corresponding to the at least one subtask are transferred to the target account; if the triggering conditions for task compensation are no longer met, part of the resources corresponding to the at least one subtask are transferred, and the remaining resources are transferred to the target account. This can improve resource utilization without affecting the experience of the object corresponding to the target account.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0025] Figure 1 1 is an exemplary system architecture 100 illustrating in which exemplary embodiments of the present disclosure may be applied.
[0026] Figure 2 is a flowchart illustrating a task processing method according to an exemplary embodiment of the present disclosure.
[0027] Figure 3 is a schematic diagram illustrating an order 300 according to an exemplary embodiment of the present disclosure.
[0028] Figure 4 is a block diagram illustrating a task processing apparatus according to an exemplary embodiment of the present disclosure.
[0029] Figure 5 is a block diagram illustrating an electronic device 500 according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0031] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation methods described in the following examples do not represent all implementation methods consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0032] It should be noted that the phrase "at least one of the items" in this disclosure includes three types of parallel situations: "any one of the items", "a combination of any multiple items of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. For another example, "performing at least one of step 1 and step 2" includes the following three parallel situations: (1) performing step 1; (2) performing step 2; and (3) performing steps 1 and 2.
[0033] In related technologies, when a target account withdraws a target operation event (for example, applying to return a product in an online transaction), either the compensation resources provided to the target account are not transferred, in which case the compensation resources will be wasted; or the compensation resources are transferred proportionally based on the specific circumstances of the target account withdrawing the target operation event, but this will result in a poor experience for the object corresponding to the target account.
[0034] In order to avoid wasting resources while taking into account the user experience of the object, the present disclosure proposes a task processing method, device, electronic device and medium. Specifically, when a target account requests to process at least one subtask in a task, it is first determined whether the task continues to meet the preset compensation conditions. If the preset compensation conditions are met, the resources corresponding to the at least one subtask are transferred to the target account; if the preset compensation conditions are no longer met, part of the resources corresponding to the at least one subtask are transferred, and the remaining resources are transferred to the target account. This can improve the utilization of resources without affecting the user experience of the object corresponding to the target account. Figures 1 to 5 The task processing method, apparatus, electronic device, and medium according to exemplary embodiments of the present disclosure are described in detail.
[0035] It should be noted that the data involved in this disclosure are all authorized by users or fully authorized by all parties.
[0036] Figure 1 1 is an exemplary system architecture 100 illustrating in which exemplary embodiments of the present disclosure may be applied.
[0037] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium used to provide a communication link between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables. Users can use terminal devices 101, 102, 103 to interact with server 105 via network 104 to receive or send messages (e.g., to send task processing requests or receive task processing information). Terminal devices 101, 102, 103 may be installed with various applications related to resource processing, such as game apps, shopping apps, or live streaming apps. Terminal devices 101, 102, 103 may be hardware or software. When terminal devices 101, 102, 103 are hardware, they may be various electronic devices with display screens and capable of resource processing, including but not limited to smartphones, tablet computers, laptop computers, and desktop computers. When the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above, and can be implemented as multiple software or software modules (for example, to provide distributed services) or as a single software or software module. No specific limitation is given here.
[0038] The server 105 may be a server that provides various services, such as a background server that provides support for multimedia applications installed on the terminal devices 101, 102, and 103. The background server may parse, store, and process received task processing requests and other data.
[0039] It should be noted that the server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules (for example, to provide distributed services), or as a single software program or software module. No specific limitations are given here.
[0040] Figure 2 is a flowchart illustrating a task processing method according to an exemplary embodiment of the present disclosure.
[0041] Reference Figure 2In step 201, in response to a request to process at least one subtask in a task, a first resource, a second resource, and a third resource are obtained, wherein the first resource is the total resource corresponding to the task when it is generated, the second resource is the resource corresponding to the task when task compensation is triggered, and the third resource is the cumulative resource corresponding to the processed subtasks of the task and the at least one subtask.
[0042] Here, a task is a target operation event (e.g., purchasing game props, video resources, traffic, goods, etc.) generated by a target account on a platform (e.g., a game platform, a video platform, a shopping platform, etc.). Task processing is the target account stopping or revoking the target operation event (e.g., initiating a prop return application, a video resource return application, a product return application, etc.). The task includes at least one subtask. Resources can be virtual resources that exist in the form of data on the network. Task compensation is the transfer of preset resources from the total resources corresponding to the task.
[0043] In some embodiments, the task may be an order, and the task processing may be returning resources for the order. Figure 3 is a schematic diagram illustrating an order 300 according to an exemplary embodiment of the present disclosure, referring to Figure 3 , when the task is an order, taking into account the convenience of payment, the order 300 may include multiple sub-orders 301, and a product return request may be initiated for one or more sub-orders 301 at a time. When a product return request is received in response to the receipt of the product return request, the total order amount of order 300 (i.e., the first resource), the order amount of the returned sub-orders and the order amount of the sub-order currently to be returned (i.e., the third resource), and the threshold amount that the order 300 set by the platform must reach when triggering resource compensation (i.e., the second resource) can be obtained. In the transaction scenario, the platform usually provides virtual resources or resource vouchers with a certain denomination. When the order amount of order 300 reaches the threshold amount, the virtual resources or resource vouchers can be selected in the operation interface to offset part of the order amount. Of course, when the total order amount reaches the threshold amount, part of the amount can also be directly deducted from the total order amount to avoid forgetting to use virtual resources or resource vouchers and causing losses to the target account.
[0044] In step 202 , it is determined whether the task continuously meets the triggering condition for resource compensation based on the first resource, the second resource, and the third resource.
[0045] According to an exemplary embodiment of the present disclosure, the upper limit processing resource of the task can be determined based on the first resource and the second resource. When the cumulative resources corresponding to the processed subtasks and at least one subtask currently to be processed are greater than the upper limit resources, it is determined that the task no longer meets the triggering conditions for resource compensation. For example, in the scenario of returning goods for order 300, the upper limit return amount (i.e., upper limit resources) can be obtained by subtracting the total order amount from the threshold amount. When the cumulative return amount is less than or equal to the upper limit return amount, the total order amount of the remaining sub-orders can still reach the threshold amount. At this time, it is determined that order 300 still meets the triggering conditions for resource compensation. Otherwise, it is determined that order 300 no longer meets the triggering conditions for resource compensation. Here, when the cumulative return amount is less than or equal to the upper limit return amount, the order amount of at least one sub-order to be returned this time can be returned to the target account, that is, when it is determined that the task continues to meet the triggering conditions for task compensation, at least one subtask is processed according to the resources corresponding to at least one subtask to take care of the experience of the object corresponding to the target account to a certain extent.
[0046] In step 203, when it is determined that the task no longer meets the triggering condition for resource compensation, the resource transfer amount corresponding to the at least one subtask is obtained.
[0047] According to an exemplary embodiment of the present disclosure, when a task no longer meets the triggering conditions for resource compensation, if the task is still processed according to the resources corresponding to the subtask, the compensation resources may be lost. At this time, the resource transfer amount corresponding to the at least one subtask can be obtained through the first resource, the second resource, the third resource and the preset resource. Specifically, the first difference between the first resource and the third resource can be obtained first, and the second difference between the second resource and the first difference can be obtained; then, the second difference is divided by the second resource, and the product of the divided result and the preset resource is obtained to obtain the total resource transfer amount corresponding to the task. Finally, the total resource transfer amount is subtracted from the historical resource transfer amount corresponding to the subtasks that have been processed in the task to obtain the resource transfer amount corresponding to the at least one subtask. For example, in the scenario of returning order 300, when order 300 no longer meets the triggering conditions for resource compensation, if the order amount of the sub-order is continued to be returned to the target account, the platform will be unable to transfer the compensation resources provided to order 300, resulting in resource waste. At this time, you can first obtain the first difference between the total order amount of order 300 and the cumulative total return amount, and obtain the second difference between the threshold amount and the first difference; then, you can take the quotient of the second difference and the threshold amount, and multiply the quotient result and the amount corresponding to the compensation resource to obtain the total transfer amount for order 300. Subtract the total transfer amount from the transferred amount corresponding to the returned sub-order to obtain the transfer amount corresponding to the sub-order to be returned (that is, the resource transfer amount corresponding to the at least one subtask).
[0048] In step 204, the at least one subtask is processed based on the resources corresponding to the at least one subtask and the resource transfer amount. Specifically, the resource transfer amount may be transferred from the resources corresponding to the at least one subtask, and the remaining resources may be delivered to the target account. For example, in the scenario of returning goods for order 300, after obtaining the transfer amount of the sub-order to be returned, the amount after deducting the transfer amount from the order amount of the sub-order to be returned is returned to the target account.
[0049] In order to more clearly demonstrate the solution shown in the present disclosure, the solution shown in the present disclosure is described below with reference to specific implementation scenario examples.
[0050] In a transaction scenario, the first resource is the total order amount, the second resource is the threshold amount that must be reached for the order to trigger resource compensation, and the third resource is the cumulative amount of the order amount of the returned sub-orders and the order amount of the sub-order currently to be returned. The default resource is the credit coupon provided by the platform. The platform sets the threshold amount to 1000 and the credit coupon to 100. Currently, the total order amount is 1200. This order has four sub-orders, A, B, C, and D. Each sub-order can include multiple items. The order amount of each sub-order is 300. Therefore, the upper limit of the return amount (i.e., the upper limit of processing resources) for this order is 1200-1000 = 200.
[0051] First, a return request is initiated for sub-order A. The return amount is 200, which is equal to the upper limit of the return amount. Therefore, the triggering conditions for resource compensation are still met, and 200 is directly returned to the target account.
[0052] If a return request is initiated for order A with a return amount of 100, the cumulative return amount will be 300, which is greater than the upper limit and no longer meets the triggering conditions for resource compensation. At this time, the total transfer amount of the order to be returned is (1000-(1200-300))*100 / 1000=10, and the current amount returned to the target account is 100-10=90;
[0053] When a return request is initiated for order B again with a return amount of 300, the cumulative return amount is 600, which does not meet the triggering conditions for resource compensation. At this time, the total transfer amount of the order to be returned can be calculated using the above formula as (1000-(1200-600))*100 / 1000=40, so the current transfer amount is 40-10=30, and the current amount returned to the target account is 300-30=270;
[0054] Similarly, when a return request is initiated for order C and order D again, the amount refunded to the target account for both order C and order D is 270. While ensuring the experience of the object corresponding to the target account, the provided credit coupons can also be transferred. The transferred credit coupons can be provided for other orders for a second time, improving the transfer efficiency and utilization rate of the credit coupons.
[0055] In another task processing scenario, a pending task includes multiple subtasks, each of which corresponds to a certain number of virtual resources. In this case, the first resource is the total number of virtual resources for the task, the second resource is the number of virtual resources required to trigger resource compensation, and the third resource is the cumulative number of virtual resources for the processed subtasks and the number of virtual resources for the current pending subtasks. The preset resource is the number of deducted virtual resources configured by the platform for the target account. The total number of virtual resources for the task is 150. The trigger condition for resource compensation set by the platform is that the total number of virtual resources for the task reaches 100, and the number of deducted virtual resources is 10. This task includes 5 subtasks, and the number of virtual resources for each subtask is 30. The upper limit of the virtual resource delivery for the task is 150-100=50.
[0056] When processing the first subtask, it still meets the trigger conditions for resource compensation, and the number of virtual resources transferred to the target account is 30. However, when processing the second subtask, the cumulative number of virtual resources to be transferred is 60, which no longer meets the trigger conditions for resource compensation. Therefore, the number of virtual resources to be transferred this time is (100-(150-60))*10 / 100=1, and the number of virtual resources delivered to the target account is 30-1=29. Similarly, for each subsequent subtask, the number of virtual resources that can be transferred is 3, and the number of virtual resources delivered to the target account is 27. While maintaining the experience of the corresponding object in the target account, the configured deduction virtual resources can also be transferred, improving the transfer efficiency and utilization of virtual resources.
[0057] Figure 4 is a block diagram illustrating a task processing apparatus according to an exemplary embodiment of the present disclosure.
[0058] Reference Figure 4 According to an exemplary embodiment of the present disclosure, a task processing device 400 may include a first acquiring unit 401 , a condition judging unit 402 , a second acquiring unit 403 , and a first processing unit 404 .
[0059] The first acquisition unit 401 can acquire a first resource, a second resource, and a third resource in response to a request to process at least one subtask in a task, wherein the first resource is the total resource corresponding to when the task is generated, the second resource is the resource corresponding to the task when resource compensation is triggered, and the third resource is the cumulative resource corresponding to the processed subtask in the task and the at least one subtask.
[0060] The condition determination unit 402 may determine whether the task continuously satisfies the triggering condition for task compensation according to the first resource, the second resource, and the third resource.
[0061] According to an exemplary embodiment of the present disclosure, the condition judgment unit 402 can determine the upper limit processing resources of the task based on the first resource and the second resource. When the cumulative resources corresponding to the processed subtasks and the at least one subtask are greater than the upper limit processing resources, it is determined that the task no longer meets the triggering conditions for task compensation.
[0062] According to an exemplary embodiment of the present disclosure, task compensation is to transfer preset resources from the total resources corresponding to the task.
[0063] The second obtaining unit 403 may obtain the resource transfer amount corresponding to at least one subtask when it is determined that the task no longer meets the triggering condition for task compensation.
[0064] According to an exemplary embodiment of the present disclosure, the second acquisition unit 403 can obtain the resource transfer amount corresponding to the at least one subtask through the first resource, the second resource, the third resource and the preset resource. Specifically, it can first obtain the first difference between the first resource and the third resource, and obtain the second difference between the second resource and the first difference, and then find the quotient of the second difference and the second resource, and find the product of the quotient result and the preset resource to obtain the resource transfer amount corresponding to the at least one subtask.
[0065] The first processing unit 404 may process the at least one subtask according to the resources corresponding to the at least one subtask and the resource transfer amount.
[0066] According to an exemplary embodiment of the present disclosure, the first processing unit 404 may transfer the resource transfer amount from the resources corresponding to the at least one subtask to process the at least one subtask. In addition, the task processing device 400 may also include a second processing unit 405, which may process the at least one subtask according to the resources corresponding to the at least one subtask when it is determined that the task continues to meet the triggering conditions for task compensation.
[0067] Figure 5 is a block diagram of an electronic device 500 according to an exemplary embodiment of the present disclosure.
[0068] Reference Figure 5 The electronic device 500 includes at least one memory 501 and at least one processor 502, wherein the at least one memory 501 stores a set of computer-executable instructions. When the computer-executable instruction set is executed by the at least one processor 502, the task processing method according to the exemplary embodiment of the present disclosure is executed.
[0069] As an example, the electronic device 500 may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above-mentioned instruction set. Here, the electronic device 500 is not necessarily a single electronic device, but may also be any device or circuit that can execute the above-mentioned instructions (or instruction set) individually or in combination. The electronic device 500 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that is interconnected with a local or remote (e.g., via wireless transmission) interface.
[0070] In electronic device 500, processor 502 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, the processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0071] The processor 502 can execute instructions or codes stored in the memory 501, wherein the memory 501 can also store data. Instructions and data can also be sent and received over a network via a network interface device, wherein the network interface device can use any known transmission protocol.
[0072] The memory 501 may be integrated with the processor 502, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. Furthermore, the memory 501 may comprise a separate device, such as an external disk drive, a storage array, or any other storage device usable by a database system. The memory 501 and the processor 502 may be operatively coupled or may communicate with each other, for example, via an I / O port, a network connection, or the like, such that the processor 502 can access files stored in the memory.
[0073] In addition, the electronic device 500 may further include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the electronic device 500 may be connected to each other via a bus and / or a network.
[0074] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to perform the task processing method according to the present disclosure. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or ultra-fast digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device configured to store the computer program and any associated data, data files and data structures in a non-transitory manner and provide the computer program and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0075] According to an exemplary embodiment of the present disclosure, a computer program product may also be provided. Instructions in the computer program product may be executed by a processor of a computer device to implement the task processing method according to the exemplary embodiment of the present disclosure.
[0076] According to the task processing method, device, electronic device and medium disclosed in the present invention, when a target account requests to process at least one subtask in a task, it is first determined whether the task continues to meet the triggering conditions for task compensation. If the triggering conditions for task compensation are continued to be met, the resources corresponding to the at least one subtask are transferred to the target account; if the triggering conditions for task compensation are no longer met, part of the resources corresponding to the at least one subtask are transferred, and the remaining resources are transferred to the target account. This can improve resource utilization without affecting the experience of the object corresponding to the target account.
[0077] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0078] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A task processing method, characterized in that: include: In response to a request to process at least one subtask in a task, a first resource, a second resource, and a third resource are obtained, wherein the first resource is the total resource corresponding to the task when it is generated, the second resource is the resource corresponding to the task when task compensation is triggered, and the third resource is the cumulative resource corresponding to the processed subtasks in the task and the at least one subtask currently to be processed, and the task compensation is a transfer of a preset resource from the total resource corresponding to the task; determining that the task no longer satisfies the triggering condition for task compensation when the third resource is greater than an upper limit processing resource, wherein the upper limit processing resource is determined based on the first resource and the second resource; When it is determined that the task no longer satisfies the triggering condition for task compensation, obtaining a resource transfer amount corresponding to the at least one subtask by using the first resource, the second resource, the third resource, and the preset resource; The at least one subtask is processed according to the resources corresponding to the at least one subtask and the resource transfer amount.
2. The task processing method according to claim 1, wherein: Also includes: In a case where it is determined that the task continues to satisfy the triggering condition for task compensation, the at least one subtask is processed according to the resources corresponding to the at least one subtask.
3. The task processing method according to claim 1, wherein: The acquiring, by using the first resource, the second resource, the third resource, and the preset resource, a resource transfer amount corresponding to the at least one subtask includes: Obtain a first difference between the first resource and the third resource, and obtain a second difference between the second resource and the first difference; Taking the quotient of the second difference and the second resource, and taking the product of the quotient result and the preset resource to obtain a total resource transfer amount corresponding to the task; The resource transfer amount corresponding to the at least one subtask is obtained by subtracting the total resource transfer amount from the historical resource transfer amounts corresponding to the processed subtasks in the task.
4. The task processing method according to any one of claims 1 to 3, characterized in that: The processing of the at least one subtask according to the resource corresponding to the at least one subtask and the resource transfer amount includes: The resource transfer amount is transferred from the resources corresponding to the at least one subtask to process the at least one subtask.
5. A task processing device, characterized in that: include: A first acquisition unit is configured to: in response to a request to process at least one subtask in a task, acquire a first resource, a second resource, and a third resource, wherein the first resource is a total resource corresponding to when the task is generated, the second resource is a resource corresponding when the task triggers a pre-task compensation, and the third resource is a cumulative resource corresponding to the processed subtasks in the task and the at least one subtask currently to be processed, and the task compensation is a transfer of a preset resource from the total resource corresponding to the task; a condition judgment unit configured to: determine that the task no longer meets the triggering condition for task compensation if the third resource is greater than an upper limit processing resource, wherein the upper limit processing resource is determined based on the first resource and the second resource; A second acquiring unit is configured to: when it is determined that the task no longer satisfies the triggering condition for task compensation, acquire the resource transfer amount corresponding to the at least one subtask through the first resource, the second resource, the third resource, and the preset resource; The first processing unit is configured to process the at least one subtask according to the resources corresponding to the at least one subtask and the resource transfer amount.
6. The task processing device according to claim 5, wherein: Also included is a second processing unit, wherein the second processing unit is configured to: In a case where it is determined that the task continues to satisfy the triggering condition for task compensation, the at least one subtask is processed according to the resources corresponding to the at least one subtask.
7. The task processing device according to claim 5, wherein: The second acquiring unit is configured to: Obtain a first difference between the first resource and the third resource, and obtain a second difference between the second resource and the first difference; Taking the quotient of the second difference and the second resource, and taking the product of the quotient result and the preset resource to obtain a total resource transfer amount corresponding to the task; The resource transfer amount corresponding to the at least one subtask is obtained by subtracting the total resource transfer amount from the historical resource transfer amounts corresponding to the processed subtasks in the task.
8. The task processing device according to any one of claims 5 to 7, characterized in that: The first processing unit is configured to: The resource transfer amount is transferred from the resources corresponding to the at least one subtask to process the at least one subtask.
9. An electronic device, characterized in that: include: at least one processor; at least one memory storing computer-executable instructions, When the computer-executable instructions are executed by the at least one processor, the computer-executable instructions cause the at least one processor to execute the task processing method according to any one of claims 1 to 4.
10. A computer-readable storage medium storing instructions, characterized in that: When the instructions are executed by at least one processor, the at least one processor is prompted to perform the task processing method according to any one of claims 1 to 4.
11. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by at least one processor, the task processing method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Resource processing method and device, electronic equipment and medium
CN114327887A