Automatic refund method, device and equipment for digital rights and interests, medium and program product
Through the automated digital rights refund method, we obtain orders to be refunded regularly, calculate the refund amount and call the payment channel interface, solving the problem of high manpower investment caused by manual intervention and achieving efficient and flexible refund processing.
Patent Information
- Application Number
- CN202411390640.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-07
AI Technical Summary
The existing digital equity refund method requires manual intervention, resulting in large labor investment and cannot effectively solve the problem of automatic reissue and refund after the failure of rights issuance.
By obtaining the digital equity master order to be refunded regularly, calculate the total refund amount, and calculate the refund amount based on the priority of the payment channel, call the refund interface of each payment channel to perform the refund, and realize automatic refund.
No manual intervention is required, which improves refund efficiency and supports multiple refund channels for timed automatic refunds, achieving flexible refunds, increasing the freedom of refunds and the scalability of channels.
Smart Images

Figure CN119273361A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital information management, and in particular to a method, device, equipment, medium and program product for automatic refund of digital rights. Background Art
[0002] With the rapid development of the Internet industry, we have ushered in the digital age. In the digital age, digital marketing and digital transformation have attracted much attention. As a new thing in the digital age, digital rights and interests have also become the key to business model innovation. Digital rights and interests refer to various benefits such as discounts, gifts, points, membership cards, etc. presented in digital form. These digital rights and interests can help consumers better enjoy digital life and provide merchants with more marketing methods and channels.
[0003] Digital rights are different from ordinary physical goods. When consumers purchase ordinary physical goods, merchants need to deliver them by express delivery, and consumers must wait for a long time to receive the corresponding goods. However, digital rights are directly recharged to the selected account in a short period of time after the consumer purchases them, and users do not need to spend a lot of time waiting. This also leads to a problem. If the consumer purchases the rights and interests, and the rights and interests fail in the issuance stage, resulting in the user not receiving the purchased rights and interests, the user may file a customer complaint, which affects the popularity of the digital rights and interests platform. In order to solve this problem, it is necessary to be able to resend the rights and interests after the rights and interests fail to be issued, and to refund as a backup operation after multiple resending failures.
[0004] The existing method of refunding digital rights is through manual intervention when the issuance of digital rights fails, which will result in a large investment of manpower. Summary of the invention
[0005] The present invention provides a method, device, equipment, medium and program product for automatically refunding digital rights, which are used to solve the problem of large manpower investment in the method of manually intervening in the refund of digital rights in the prior art.
[0006] In a first aspect, the present invention provides a method for automatically refunding digital rights, comprising: Regularly obtain the main orders of digital rights to be refunded; Calculate the first total refund amount of the digital equity primary order; Based on the first total refund amount, calculate the refund amount to be refunded for each target payment channel according to the priority of each payment channel; Based on the refund amount of each target payment channel, call the refund interface of each target payment channel to execute the refund.
[0007] In one embodiment, after regularly acquiring the digital equity main order to be refunded and before calculating the first total refund amount of the digital equity main order, the method further includes: Determining multiple digital equity sub-orders associated with the digital equity main order; Filter out target sub-orders whose issuance fails from the multiple digital equity sub-orders.
[0008] In one embodiment, calculating the first total refund amount of the digital equity primary order includes: Determining a first total payment amount of the digital equity master order; Determine, based on a preset refund amount of the digital equity product under each digital equity sub-order, a second total refund amount of the target sub-order and a third total refund amount of the multiple digital equity sub-orders; Dividing the second total refund amount by the third total refund amount to obtain the refund ratio of the target sub-order; The first total payment amount is multiplied by the refund ratio to obtain a first total refund amount for the digital equity primary order.
[0009] In one embodiment, the calculating, based on the first total refund amount and according to the priority of each payment channel, the refund amount of each target payment channel includes: Determining multiple payment channels for paying the digital equity master order; According to the priority order of each payment channel, the refund amount of each payment channel is calculated one by one until the total refund amount of multiple target payment channels that have been calculated is equal to the first total refund amount. Stop calculating the refund amount of the payment channel and obtain the refund amount of each target payment channel.
[0010] In one embodiment, when calculating the refund amount of each target payment channel, the following steps are performed for each target payment channel: Determining a second total payment amount of the target payment channel; Calculate the total refund amount of multiple target payment channels that have been calculated; Subtract the first total refund amount from the total refundable amount to obtain a difference; If the difference is greater than the second total payment amount, the second total payment amount is determined as the refund amount to be refunded by the target payment channel; If the difference is less than or equal to the second total payment amount, the difference is determined as the refund amount of the target payment channel.
[0011] In one embodiment, after calling the refund interface of each target payment channel to execute the refund, the method further includes: Get the refund results fed back by the refund interface of each target payment channel; Determine the refund result of the digital rights master order based on the refund results fed back by each refund interface; Based on the refund result of the digital equity master order, the status of the digital equity master order is updated.
[0012] In one embodiment, after calling the refund interface of each target payment channel to execute the refund, the method further includes: Call the refund status query interface of each target payment channel to poll the refund results of each target payment channel; If the refund result of any target payment channel is refund in progress, the refund results of each target payment channel are polled again at a preset interval until the refund result of each target payment channel is not refund in progress, and the refund result of the digital rights master order is determined based on the refund results fed back by each refund interface; Based on the refund result of the digital equity master order, the status of the digital equity master order is updated.
[0013] In a second aspect, the present invention further provides a digital rights automatic refund device, comprising: The scheduled scanning module is used to obtain the main orders of digital rights to be refunded on a scheduled basis; A first refund amount calculation module, used to calculate the first total refund amount of the digital equity main order; A second refund amount calculation module, configured to calculate the refund amount to be refunded for each target payment channel according to the priority of each payment channel based on the first total refund amount; The refund execution module is used to call the refund interface of each target payment channel to execute the refund based on the refund amount of each target payment channel.
[0014] In a third aspect, the present invention provides a device, comprising an electronic device, wherein the electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for automatic refund of digital rights are implemented.
[0015] In a fourth aspect, the present invention further provides a medium, comprising a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods for automatic refund of digital rights are implemented.
[0016] In a fifth aspect, the present invention further provides a product, comprising a computer program product, wherein the computer program product comprises a computer program, wherein the computer program can be stored on a non-transitory computer-readable storage medium, and wherein when the computer program is executed by the processor, the steps of any of the above-mentioned methods for automatic refund of digital rights are implemented.
[0017] The digital rights automatic refund method, device, equipment, medium and program product provided by the present invention trigger a scheduled refund task, obtain the main order of the digital rights to be refunded, calculate the refund amount of each target payment channel according to the refund amount calculation rule and the channel priority rule, and execute the refund according to the corresponding refund amount by calling the refund interface of each target payment channel. When the digital rights fail to be issued, it can realize scheduled automatic refund without manual intervention, thereby improving the refund efficiency. At the same time, it supports multiple refund channels for scheduled automatic refund, realizes flexible refund, improves the freedom of refund, and increases the scalability of refund channels. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flow chart of the automatic refund method for digital rights provided by the present invention.
[0020] Figure 2 It is a schematic diagram of module interaction of the digital rights automatic refund device provided by the present invention.
[0021] Figure 3 It is a structural schematic diagram of the digital rights automatic refund device provided by the present invention.
[0022] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein.
[0025] Combine the following Figure 1-Figure 4 The present invention describes the method, device, equipment, medium and program product for automatically refunding digital rights.
[0026] Combination Figure 1 and Figure 2 , Figure 1 is a flowchart of the method for automatically refunding digital rights and interests provided by the present invention. Figure 2 It is a schematic diagram of module interaction of the digital rights automatic refund device provided by the present invention.
[0027] like Figure 1 As shown, the method includes the following: Step 101: Regularly obtain the main order of digital rights to be refunded; Step 102: Calculate the first total refund amount of the digital rights master order; Step 103: Based on the first total refund amount, calculate the refund amount of each target payment channel according to the priority of each payment channel; Step 104: Based on the refund amount of each target payment channel, call the refund interface of each target payment channel to execute the refund.
[0028] It should be noted that the digital rights automatic refund method provided in the embodiment of the present invention is implemented based on the digital rights automatic refund device. Figure 2 As shown, the digital rights automatic refund device includes a timing scanning module, a time verification module, a state verification module, a refund amount calculation module, a refund execution module, and a state change module. Among them, the timing scanning module is used to regularly obtain the digital rights main order whose status meets the conditions; the time verification module is used to obtain the digital rights main order that meets the refund time conditions according to the output data of the timing scanning module; the state verification module is used to obtain the target sub-order associated with the digital rights main order that failed to be issued according to the output data of the time verification module; the refund amount calculation module is used to calculate the total refund amount of the digital rights main order and the refund amount of each payment channel according to the output data of the state verification module; the refund execution module is used to perform the actual refund operation according to the output data of the refund amount calculation module; the state change module is used to update the status information of the digital rights main order and the target sub-order according to the refund status.
[0029] The embodiment of the present invention takes the digital rights automatic refund device as an example to describe the digital rights automatic refund method.
[0030] The order model used in the embodiment of the present invention is a main order + sub-order mode, that is, the main order created by the user placing an order is associated with one or more sub-orders, the main order records the user's order-related information, and the sub-order records the digital rights and interests related information to be issued.
[0031] Specifically, the scheduled scanning module is implemented based on the distributed task scheduling platform (XXL-JOB) framework. It uses the scheduled task function of the XXL-JOB framework to select the scheduled execution time and specify the automatic refund scheduled execution task. When the scheduled time is up, the module automatically executes the set logic and scans out the set of digital equity main orders with the status of failed issuance or failed refund, such as And send the scanned results to the time verification module.
[0032] Furthermore, the time verification module uses the output of the timing scanning module as input data, and determines whether the main orders in the digital rights main order set meet the refund time conditions one by one, and selects the digital rights main orders that meet the refund time conditions, and determines the digital rights main orders that meet the refund time conditions as the digital rights main orders to be refunded, and sends the digital rights main orders to be refunded to the status verification module. Among them, the refund time conditions can be formulated according to the needs of digital product operations.
[0033] It should be noted that the automatic refund of multiple digital rights master orders that fail to be issued or refunded and meet the refund time conditions can be executed simultaneously. For the convenience of description, the present invention is explained with one digital rights master order to be refunded.
[0034] Furthermore, the status verification module uses the output of the time verification module as input data to obtain the issuance status of multiple digital equity sub-orders associated with the digital equity main order, filters the multiple digital equity sub-orders, selects the target sub-orders that failed to be issued, and sends the screening results to the refund amount calculation module. For example, the digital equity sub-order can be represented as , the target sub-order can be expressed as .
[0035] Furthermore, the refund amount calculation module uses the output of the status verification module as input data, and calculates the first total refund amount of the digital equity main order according to the preset refund amount of the digital equity product under each digital equity sub-order.
[0036] Furthermore, the refund amount calculation module calculates the refund amount of the digital rights and interests main order in each target payment channel based on the first total refund amount of the digital rights and interests main order according to the priority of each payment channel, and sends the calculation result of the refund amount of each target payment channel to the refund execution module, and informs the state change module that the refund amount of each target payment channel has been calculated. Among them, the target payment channel refers to the payment channel that needs to be refunded among multiple payment channels, that is, according to the priority order of each payment channel, the refund amount is calculated from the payment channel with the highest priority first. If the refund amount calculated for the payment channel does not reach the first total refund amount of the digital rights and interests main order, it means that the refund amount needs to be calculated for the payment channel with the next priority, until the refund amount calculated by all payment channels that have completed the calculation reaches the first total refund amount of the digital rights and interests main order, it is no longer necessary to calculate the refund amount for the payment channel with the next priority, so as to realize flexible refund or partial refund through multiple channels, and can deal with the situation where only part of the rights and interests in a digital rights and interests main order fail to be issued.
[0037] Furthermore, the refund execution module uses the refund amount of each target payment channel obtained by the refund amount calculation module as input data, and based on the refund amount of each target payment channel, calls the refund interface provided by each target channel to execute the refund.
[0038] At the same time, after receiving the notification signal from the refund amount calculation module, the status change module updates the status of the digital equity main order to refunding and the status of the target sub-order to invalid, to prevent the problem of repeated refunds caused by the set timed execution interval being too short.
[0039] The digital rights automatic refund method provided by the present invention obtains the main order of the digital rights to be refunded by triggering the scheduled refund task, calculates the refund amount of each target payment channel according to the refund amount calculation rule and the channel priority rule, and executes the refund according to the corresponding refund amount by calling the refund interface of each target payment channel. When the digital rights fail to be issued, the scheduled automatic refund can be realized without manual intervention, thereby improving the refund efficiency. At the same time, multiple refund channels are supported for scheduled automatic refund, thereby realizing flexible refund, improving the freedom of refund, and increasing the scalability of refund channels.
[0040] In some embodiments, after regularly acquiring the digital equity main order to be refunded and before calculating the first total refund amount of the digital equity main order, the method further includes: Determining multiple digital equity sub-orders associated with the digital equity main order; Filter out target sub-orders whose issuance fails from the multiple digital equity sub-orders.
[0041] Specifically, the status verification module determines multiple digital equity sub-orders associated with the digital equity main order, and determines the issuance status of each digital equity sub-order.
[0042] Furthermore, the status verification module selects target sub-orders whose issuance has failed from multiple digital equity sub-orders according to the issuance status of each digital equity sub-order.
[0043] The embodiment of the present invention selects the target sub-orders whose issuance fails from the multiple digital equity sub-orders associated with the digital equity main order, so as to realize partial refund when only some sub-orders fail to be issued, without the need to fully refund the digital equity main order, so as to realize flexible refund and improve the freedom of refund.
[0044] In some embodiments, based on the calculation of the first total refund amount of the digital equity primary order described in step 102, the specific process includes the following steps: Determining a first total payment amount of the digital equity master order; Determine, based on a preset refund amount of the digital equity product under each digital equity sub-order, a second total refund amount of the target sub-order and a third total refund amount of the multiple digital equity sub-orders; Dividing the second total refund amount by the third total refund amount to obtain the refund ratio of the target sub-order; The first total payment amount is multiplied by the refund ratio to obtain a first total refund amount for the digital equity primary order.
[0045] Specifically, the refund amount calculation module determines the first total payment amount of the digital equity main order.
[0046] Furthermore, the refund amount calculation module determines the preset refund amount of the digital equity product under each digital equity sub-order. Generally speaking, each digital equity sub-order is associated with a digital equity product, so the preset refund amount of the digital equity product can also be considered as the preset refund amount of the digital equity sub-order to which it belongs.
[0047] Further, the refund amount calculation module determines the second total refund amount of the target sub-order and the third total refund amount of the multiple digital equity sub-orders based on the preset refund amount of the digital equity product under each digital equity sub-order, wherein the preset refund amount of the digital equity product under each digital equity sub-order is set according to the actual value of the digital equity product. For example, the preset refund amount of multiple digital equity sub-orders can be determined by the sub-order refund reference price set. To indicate that the preset refund amount of the target sub-order can be represented by the target refund reference price set To express.
[0048] Furthermore, the refund amount calculation module divides the second total refund amount by the third total refund amount to obtain a refund ratio of the target sub-order.
[0049] Furthermore, the refund amount calculation module multiplies the first total payment amount by the refund ratio to obtain a first total refund amount for the digital equity main order.
[0050] Therefore, the calculation formula for the first total refund amount of the digital equity master order is as follows:
[0051] Among them, r represents the first total refund amount of the digital equity main order; p represents the first total payment amount of the digital equity main order; The second total refund amount representing the target sub-order; Represents the third total refund amount of multiple digital equity sub-orders.
[0052] In the embodiment of the present invention, the refund ratio of the target sub-order is obtained by the ratio between the second total refund amount of the target sub-order and the third total refund amount of multiple digital equity sub-orders, and then the refund ratio is multiplied by the first total payment amount of the digital equity main order to obtain the first total refund amount of the digital equity main order. This can meet the requirement that when only some sub-orders fail to be issued, there is no need to fully refund the digital equity main order, and only a partial refund needs to be implemented based on the reasonably calculated total refund amount of the digital equity main order, so as to achieve flexible refund and improve the freedom of refund.
[0053] In some embodiments, based on the first total refund amount described in step 103, the refund amount of each target payment channel is calculated according to the priority of each payment channel. The specific process mainly includes the following steps: Determining multiple payment channels for paying the digital equity master order; According to the priority order of each payment channel, the refund amount of each payment channel is calculated one by one until the total refund amount of multiple target payment channels that have been calculated is equal to the first total refund amount. Stop calculating the refund amount of the payment channel and obtain the refund amount of each target payment channel.
[0054] Specifically, the refund amount calculation module determines multiple payment channels for paying the main digital rights order and defines the payment channel set as , the channel priority rule is , indicating that the priority of payment channels is from high to low. arrive .
[0055] Generally speaking, the first total payment amount of the digital rights master order is composed of payment amounts from multiple channels. Of course, it can also be composed of payment amounts from a single channel, but the present invention also supports multiple channels, so it is described in a multi-channel manner. Then, the first total payment amount of the digital rights master order can be expressed as ,in For payment channels The payment amount.
[0056] Therefore, the refund amount calculation module calculates the refund amount of each payment channel one by one according to the priority order of each payment channel, until the total refund amount of multiple target payment channels that have been calculated reaches or equals the first total payment amount of the digital equity main order, stops calculating the refund amount of the payment channel, and obtains the refund amount of each target payment channel.
[0057] The embodiment of the present invention calculates the refund amount of the target payment channels one by one according to the priority order of each payment channel, and stops calculating when the total refund amount reaches the first total payment amount of the digital rights and interests main order. In this way, the refund amount of each target payment channel can be accurately calculated when only some sub-orders fail to be issued, thereby realizing partial refunds. At the same time, it can support refunds through multiple channels according to channel priority rules, effectively improving the flexibility of refunds and improving overall customer satisfaction.
[0058] In the above content, when calculating the refund amount of each target payment channel, the following steps are performed for each target payment channel: Determining a second total payment amount of the target payment channel; Calculate the total refund amount of multiple target payment channels that have been calculated; Subtract the first total refund amount from the total refundable amount to obtain a difference; If the difference is greater than the second total payment amount, the second total payment amount is determined as the refund amount to be refunded by the target payment channel; If the difference is less than or equal to the second total payment amount, the difference is determined as the refund amount of the target payment channel.
[0059] Specifically, the refund amount calculation module determines the second total payment amount of the target payment channel, which is expressed as .
[0060] Furthermore, the refund amount calculation module calculates the total refund amount of the multiple target payment channels that have been calculated so far.
[0061] Furthermore, the refund amount calculation module subtracts the first total refund amount of the digital rights and interests main order from the total refund amount of the multiple target payment channels that have been calculated so far to obtain the difference.
[0062] In one case, if the difference is greater than the second total payment amount of the target payment channel, the refund amount calculation module determines the second total payment amount as the refund amount of the target payment channel.
[0063] In another case, if the difference is less than or equal to the second total payment amount of the target payment channel, the refund amount calculation module determines the difference as the refund amount of the target payment channel.
[0064] Therefore, the current target payment channel The calculation formula for the refund amount is as follows:
[0065] in, Characterize the current target payment channel The amount of refund that should be made; Characterize the current target payment channel The second total payment amount; r Represents the first total refund amount of the main digital equity order; Indicates the total refund amount of multiple target payment channels that have been calculated.
[0066] The embodiment of the present invention compares the difference between the first total payment amount of the digital rights and interests main order and the total refundable amounts of multiple target payment channels that have been calculated so far with the second total payment amount of the current target payment channel to determine the refundable amount of the current target payment channel. Ultimately, the refundable amounts of all target payment channels can be determined, thereby achieving a partial refund. Meanwhile, it supports refunds through multiple channels, which can effectively improve the flexibility of refunds.
[0067] In some embodiments, after calling the refund interface of each target payment channel to execute the refund, the method further includes: Get the refund results fed back by the refund interface of each target payment channel; Determine the refund result of the digital rights master order based on the refund results fed back by each refund interface; Based on the refund result of the digital equity master order, the status of the digital equity master order is updated.
[0068] It should be noted that if Figure 2 As shown, the automatic refund of digital rights also includes a result callback module. The result callback module is used to passively receive the refund results of each payment channel after the refund execution module executes the refund, so as to determine the refund result of the main digital rights order, and send the refund result of the main digital rights order to the state change module, and the state change module updates the state of the main digital rights order.
[0069] Specifically, the result callback module obtains the refund result fed back by the refund interface of each target payment channel. The refund result fed back by the refund interface includes three types, such as refund in progress, refund successful or refund failed.
[0070] After the result callback module receives the refund results fed back by each refund interface, if any of the refund results fed back by each refund interface is in the process of refunding, the callback refund result is sent to the status change module to inform the status change module that the digital equity main order is still in the process of refunding, so that the status change module maintains the status of the digital equity main order as in the process of refunding.
[0071] If the refund results fed back by each refund interface are not "refund in progress", it means that the refund of the main digital rights order has been completed. Further judgment is made as to whether the refund of the main digital rights order has been successful or failed. Specifically, if the refund results fed back by all refund interfaces are "refund successful", it means that the main digital rights order has been successfully refunded. If the refund result fed back by any refund interface is "refund failed", it means that the refund of the main digital rights order has failed.
[0072] Furthermore, after the result callback module determines that the refund of the digital equity main order has been successful or failed, the refund result of the successful or failed refund is sent to the status change module, so that the status change module updates the status of the digital equity main order to a successful refund or a failed refund.
[0073] After calling the refund interface of each target payment channel and executing the refund, the embodiment of the present invention determines the final refund status of the digital rights and interests main order according to the refund results of each target payment channel passively obtained. Through timely feedback and status update, the entire refund process is transparent and efficient, ensuring that the user can understand the refund progress in real time, further enhancing the reliability of the system and user experience.
[0074] In some embodiments, after calling the refund interface of each target payment channel to execute the refund, the method further includes: Call the refund status query interface of each target payment channel to poll the refund results of each target payment channel; If the refund result of any target payment channel is refund in progress, the refund results of each target payment channel are polled again at a preset interval until the refund result of each target payment channel is not refund in progress, and the refund result of the digital rights master order is determined based on the refund results fed back by each refund interface; Based on the refund result of the digital equity master order, the status of the digital equity master order is updated.
[0075] It should be noted that if Figure 2As shown, the automatic refund of digital rights also includes a status polling module. The status polling module is used to actively poll the refund results of each payment channel after the refund execution module executes the refund, so as to determine the refund result of the digital rights main order, and send the refund result of the digital rights main order to the status change module, and the status change module updates the status of the digital rights main order.
[0076] Specifically, the status polling module has an interactive relationship with the refund status query interface of each target payment channel. Therefore, the status polling module can call the refund status query interface of each target payment channel to poll the refund result of each target payment channel.
[0077] If the refund result of any target payment channel is refund in progress, the refund results of each target payment channel are polled again at a preset interval until the refund results of each target payment channel are not refund in progress, and the refund result of the digital equity main order is determined based on the refund results fed back by each refund interface. Specifically, if the refund results fed back by all refund interfaces are refund success, it means that the digital equity main order has been refunded successfully. If the refund result fed back by any refund interface is refund failure, it means that the digital equity main order has failed to be refunded.
[0078] Furthermore, after the status polling module determines that the refund of the digital equity main order has been successful or failed, the refund result of the digital equity main order is sent to the status change module, so that the status change module updates the status of the digital equity main order to a successful refund or a failed refund according to the refund result of the digital equity main order.
[0079] It should be noted that both the result callback module and the status polling module will send refund in progress, refund successful, and refund failed to the status change module. But the difference is that the result callback module passively receives the refund status information sent by the external channel, and the status polling module actively queries the refund status from the external channel. The purpose of this design is because there may be situations where the external channel itself does not call back the refund result due to abnormal reasons or the refund result is not received from the external channel due to network fluctuations. At this time, if there is no status polling module, the main digital equity order will be stuck in a refund state and cannot form a closed loop. Therefore, the status polling module is required to actively query the refund status from the external channel to ensure that the refund status of the order can be changed normally.
[0080] Since both the result callback module and the status polling module will send refund in progress, refund successful, and refund failed to the status change module, the status change module will update the status based on the refund result of the module from which it receives the refund result feedback first.
[0081] The embodiment of the present invention determines the final refund result of the main digital rights order by actively polling by calling the refund status query interface of each target payment channel, which can effectively avoid the situation where no feedback from the refund interface is received, ensure the timely acquisition of the refund result, and not only improve the transparency and reliability of the refund process, but also can timely update the status of the main digital rights order, thereby enhancing user trust and satisfaction.
[0082] The following is a description of the digital rights automatic refund device provided by the present invention. The digital rights automatic refund device described below and the digital rights automatic refund method described above can be referenced to each other.
[0083] Reference Figure 3 , Figure 3 It is a structural schematic diagram of the digital rights automatic refund device provided by the present invention.
[0084] The digital rights automatic refund device comprises: The scheduled scanning module 310 is used to regularly obtain the main order of digital rights to be refunded.
[0085] The first refund amount calculation module 320 is used to calculate the first total refund amount of the digital equity primary order.
[0086] The second refund amount calculation module 330 is used to calculate the refund amount of each target payment channel based on the first total refund amount and according to the priority of each payment channel.
[0087] The refund execution module 340 is used to call the refund interface of each target payment channel to execute the refund based on the refund amount of each target payment channel.
[0088] The digital rights automatic refund device provided by the present invention obtains the main order of the digital rights to be refunded by triggering the timed refund task, calculates the refund amount of each target payment channel according to the refund amount calculation rule and the channel priority rule, and executes the refund according to the corresponding refund amount by calling the refund interface of each target payment channel. When the digital rights fail to be issued, the timed automatic refund can be realized without manual intervention, thereby improving the refund efficiency. At the same time, it supports multiple refund channels for timed automatic refund, realizes flexible refund, improves the refund freedom, and increases the scalability of the refund channel.
[0089] Furthermore, the digital rights automatic refund device is also used for: Determining multiple digital equity sub-orders associated with the digital equity main order; Filter out target sub-orders whose issuance fails from the multiple digital equity sub-orders.
[0090] Furthermore, the first refund amount calculation module 320 is also used for: Determining a first total payment amount of the digital equity master order; Determine, based on a preset refund amount of the digital equity product under each digital equity sub-order, a second total refund amount of the target sub-order and a third total refund amount of the multiple digital equity sub-orders; Dividing the second total refund amount by the third total refund amount to obtain the refund ratio of the target sub-order; The first total payment amount is multiplied by the refund ratio to obtain a first total refund amount for the digital equity primary order.
[0091] Furthermore, the second refund amount calculation module 330 is also used for: Determining multiple payment channels for paying the digital equity master order; According to the priority order of each payment channel, the refund amount of each payment channel is calculated one by one until the total refund amount of multiple target payment channels that have been calculated is equal to the first total refund amount. Stop calculating the refund amount of the payment channel and obtain the refund amount of each target payment channel.
[0092] Furthermore, the second refund amount calculation module 330 is also used for: Determining a second total payment amount of the target payment channel; Calculate the total refund amount of multiple target payment channels that have been calculated; Subtract the first total refund amount from the total refundable amount to obtain a difference; If the difference is greater than the second total payment amount, the second total payment amount is determined as the refund amount to be refunded by the target payment channel; If the difference is less than or equal to the second total payment amount, the difference is determined as the refund amount of the target payment channel.
[0093] Furthermore, the digital rights automatic refund device is also used for: Get the refund results fed back by the refund interface of each target payment channel; Determine the refund result of the digital rights master order based on the refund results fed back by each refund interface; Based on the refund result of the digital equity master order, the status of the digital equity master order is updated.
[0094] Furthermore, the digital rights automatic refund device is also used for: Call the refund status query interface of each target payment channel to poll the refund results of each target payment channel; If the refund result of any target payment channel is refund in progress, the refund results of each target payment channel are polled again at a preset interval until the refund result of each target payment channel is not refund in progress, and the refund result of the digital rights master order is determined based on the refund results fed back by each refund interface; Based on the refund result of the digital equity master order, the status of the digital equity master order is updated.
[0095] It should be noted that the digital rights automatic refund device provided by the present invention can execute the digital rights automatic refund method described in any of the above embodiments during specific operation, which will not be described in detail in this embodiment.
[0096] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communications interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the digital rights automatic refund method, which includes: regularly obtaining the main order of the digital rights to be refunded; calculating the first total refund amount of the main order of the digital rights; based on the first total refund amount, calculating the refund amount of each target payment channel according to the priority of each payment channel; based on the refund amount of each target payment channel, calling the refund interface of each target payment channel to perform the refund.
[0097] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0098] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the digital rights automatic refund method provided in the above-mentioned embodiments, and the method includes: regularly obtaining a main order of digital rights to be refunded; calculating a first total refund amount of the main order of digital rights; based on the first total refund amount, calculating the refund amount of each target payment channel according to the priority of each payment channel; based on the refund amount of each target payment channel, calling the refund interface of each target payment channel to execute a refund.
[0099] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the automatic refund method for digital rights provided in the above-mentioned embodiments, the method comprising: regularly obtaining a main order of digital rights to be refunded; calculating a first total refund amount of the main order of digital rights; based on the first total refund amount, calculating the refund amount of each target payment channel according to the priority of each payment channel; based on the refund amount of each target payment channel, calling the refund interface of each target payment channel to execute a refund.
[0100] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.
[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for automatically refunding digital rights, characterized in that: include: Regularly obtain the main orders of digital rights to be refunded; Calculate the first total refund amount of the digital equity primary order; Based on the first total refund amount, calculate the refund amount to be refunded for each target payment channel according to the priority of each payment channel; Based on the refund amount of each target payment channel, call the refund interface of each target payment channel to execute the refund.
2. The method for automatic refund of digital rights according to claim 1, characterized in that: After regularly acquiring the main digital rights order to be refunded and before calculating the first total refund amount of the main digital rights order, the method further includes: Determining multiple digital equity sub-orders associated with the digital equity main order; Filter out target sub-orders whose issuance fails from the multiple digital equity sub-orders.
3. The method for automatic refund of digital rights according to claim 2, characterized in that: The calculating the first total refund amount of the digital equity primary order includes: Determining a first total payment amount of the digital equity master order; Determine, based on a preset refund amount of the digital equity product under each digital equity sub-order, a second total refund amount of the target sub-order and a third total refund amount of the multiple digital equity sub-orders; Dividing the second total refund amount by the third total refund amount to obtain the refund ratio of the target sub-order; The first total payment amount is multiplied by the refund ratio to obtain a first total refund amount for the digital equity primary order.
4. The method for automatically refunding digital rights according to claim 1, characterized in that: The calculating, based on the first total refund amount, the refund amount of each target payment channel according to the priority of each payment channel includes: Determining multiple payment channels for paying the digital equity master order; According to the priority order of each payment channel, the refund amount of each payment channel is calculated one by one until the total refund amount of multiple target payment channels that have been calculated is equal to the first total refund amount. Stop calculating the refund amount of the payment channel and obtain the refund amount of each target payment channel.
5. The method for automatically refunding digital rights according to claim 4, characterized in that: When calculating the refund amount for each target payment channel, perform the following steps for each target payment channel: Determining a second total payment amount of the target payment channel; Calculate the total refund amount of multiple target payment channels that have been calculated; Subtract the first total refund amount from the total refundable amount to obtain a difference; If the difference is greater than the second total payment amount, the second total payment amount is determined as the refund amount to be refunded by the target payment channel; If the difference is less than or equal to the second total payment amount, the difference is determined as the refund amount of the target payment channel.
6. The method for automatic refund of digital rights according to claim 1, characterized in that: After calling the refund interface of each target payment channel to execute the refund, it also includes: Get the refund results fed back by the refund interface of each target payment channel; Determine the refund result of the digital rights master order based on the refund results fed back by each refund interface; Based on the refund result of the digital equity master order, the status of the digital equity master order is updated.
7. The method for automatically refunding digital rights according to any one of claims 1 to 6, characterized in that: After calling the refund interface of each target payment channel to execute the refund, it also includes: Call the refund status query interface of each target payment channel to poll the refund results of each target payment channel; If the refund result of any target payment channel is refund in progress, the refund result of each target payment channel is polled again at a preset interval until the refund result of each target payment channel is not refund in progress, and the refund result of the digital rights master order is determined based on the refund results fed back by each refund interface; Based on the refund result of the digital equity master order, the status of the digital equity master order is updated.
8. A digital rights automatic refund device, characterized in that: include: The scheduled scanning module is used to obtain the main orders of digital rights to be refunded on a scheduled basis; A first refund amount calculation module, used to calculate the first total refund amount of the digital equity main order; A second refund amount calculation module, configured to calculate the refund amount to be refunded for each target payment channel according to the priority of each payment channel based on the first total refund amount; The refund execution module is used to call the refund interface of each target payment channel to execute the refund based on the refund amount of each target payment channel.
9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for automatic refund of digital rights and interests as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, the computer-readable storage medium comprising a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for automatic refund of digital rights and interests as claimed in any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for automatic refund of digital rights and interests as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Processing method and device for appointment transfer, electronic equipment and storage medium
CN120509891A