Order processing method and apparatus, electronic device, and storage medium
By asynchronously reviewing service contracts and service orders after they are generated, and then deducting virtual resources first, the problem of deduction failure caused by delays in virtual resource review is solved, thereby improving the activation rate and utilization rate of service orders.
Patent Information
- Application Number
- CN202210753961.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-06-29
AI Technical Summary
In existing technologies, delays in the review of virtual resources can lead to failures in deducting virtual resources, affecting the activation and utilization rates of service orders.
After generating the service contract and service order, the review is carried out asynchronously. The virtual resources are deducted first, and the usage permission is granted after the review is approved.
This improved the service order activation and utilization rates, reduced deduction failures due to insufficient virtual resources, and enhanced the user experience.
Smart Images

Figure CN115131098B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer application, and in particular to an order processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the rapid development of computer technology and Internet technology, more and more virtual goods, such as recharge cards, member packages, virtual props, etc., are gradually increasing, and users can purchase virtual goods according to their needs.
[0003] At present, as shown in the prior art, after generating a service contract according to the purchase demand of a user for a virtual good, freezing a specified virtual resource, and generating a service order, the service contract and the service order need to be audited first, and only after the audit is passed, the specified virtual resource deduction, service order opening and other operations will be further performed, and then the user has the use permission of the service order. Figure 1 The audit node of the service contract and the service order is in the main process of order processing, and only after the audit of the service contract and the service order is passed, the subsequent operations such as deduction of the specified virtual resource and opening of the service order will be performed. The audit of the service contract and the service order may be delayed, and the specified virtual resource may have been used by other service orders after the audit is passed. It is easy to cause the deduction to fail due to insufficient virtual resources, thereby causing the service order to be unable to open and use, and reducing the service order opening rate and use rate.
[0004] SUMMARY
[0005] The embodiments of the present application provide an order processing method, device, electronic equipment and storage medium to improve the order opening rate and use rate.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] In a first aspect, an order processing method is provided, comprising:
[0008] According to a service request of a user account, a service contract is generated, and a specified virtual resource in the user account is frozen according to the service contract, wherein the specified virtual resource is determined according to the service contract;
[0009] Based on the service contract, a service order is generated, and the specified virtual resource is deducted from the user account;
[0010] If the service contract and the service order are both audited, the use permission of the service order by the user account is opened to make the service order effective, if the service order triggering condition is reached.
[0011] The service contract is audited at any time point after the service contract is generated and before the service order takes effect, and the service order is audited at any time point after the service order is generated and before the service order takes effect.
[0012] In an embodiment of the present application, the taking-effect trigger condition comprises a taking-effect time condition, the service contract is audited at any time point after the service contract is generated and before a target time node, the service order is audited at any time point after the service order is generated and before the target time node, and the target time node is a time node corresponding to the taking-effect time condition.
[0013] In an embodiment of the present application, the service contract is audited by the following steps:
[0014] The service contract is audited according to a preset contract specification.
[0015] And / or,
[0016] The service order is audited by the following steps:
[0017] The service order is audited according to a preset order specification.
[0018] In an embodiment of the present application, before the service order is audited according to the preset order specification, the following steps are further included:
[0019] The auditing result of the service contract is obtained.
[0020] If the auditing result of the service contract is auditing failure, the auditing result of the service order is determined as auditing failure.
[0021] If the auditing result of the service contract is not obtained, the step of obtaining the auditing result of the service contract is repeatedly executed when a set time length is reached.
[0022] The service order is audited according to the preset order specification, including:
[0023] The service order is audited according to the preset order specification when the auditing result of the service contract is auditing success.
[0024] In an embodiment of the present application, the following steps are further included:
[0025] If the service contract fails the audit, the step of auditing the service contract according to the preset contract specification is repeated until the number of repetitions reaches a preset first number threshold, and the audit result of the service contract is determined as audit failure.
[0026] and / or,
[0027] If the service order fails the audit, the step of auditing the service order according to the preset order specification is repeated until the number of repetitions reaches a preset second number threshold, and the audit result of the service order is determined as audit failure.
[0028] In one embodiment of the present application, the method further comprises:
[0029] In the case where the audit result of the service contract is audit failure, the reason for the audit failure of the service contract is recorded;
[0030] and / or,
[0031] In the case where the audit result of the service order is audit failure, the reason for the audit failure of the service order is recorded.
[0032] In one embodiment of the present application, the audit result of the service order is determined by the following steps:
[0033] In the case where the service order meets the order specification and the consistency check of the service order and the service contract information is passed, the audit result of the service order is determined as audit pass;
[0034] In the case where the service order does not meet the order specification or the consistency check of the service order and the service contract information is failed, the audit result of the service order is determined as audit failure.
[0035] In one embodiment of the present application, the service order contains contract audit state information and order audit state information, and the order processing method further comprises:
[0036] The contract audit state information is updated according to the audit result of the service contract, so that the audit result of the service contract is determined based on the contract audit state information;
[0037] The order audit state information is updated according to the audit result of the service order, so that the audit result of the service order is determined based on the order audit state information.
[0038] In one embodiment of the present application, the audit results of the service contract and the service order are obtained by an audit system.
[0039] In one specific implementation of the present application, in the case where the service order activation trigger condition is reached, further comprising:
[0040] If the service contract or the service order audit result is audit failure, the specified virtual resource is returned to the user account.
[0041] In a second aspect, an order processing apparatus is provided, comprising:
[0042] A freezing unit is configured to generate a service contract according to a service request of a user account, and freeze a specified virtual resource in the user account according to the service contract, the specified virtual resource being determined according to the service contract;
[0043] A deduction unit is configured to generate a service order based on the service contract, and deduct the specified virtual resource from the user account;
[0044] An opening unit is configured to, in the case where the service order activation trigger condition is reached, if the service contract and the service order are both audit passed, open the use permission of the user account to the service order, so as to activate the service order.
[0045] Wherein, the service contract audit is asynchronously performed at any time point after the service contract is generated and before the service order is activated, and the service order audit is asynchronously performed at any time point after the service order is generated and before the service order is activated.
[0046] In a third aspect, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, the computer program being executed by the processor to implement the steps of the order processing method of the first aspect.
[0047] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the order processing method of the first aspect.
[0048] In a fifth aspect, a computer program product is provided, the computer program product comprising computer instructions stored in a computer readable storage medium and adapted to be read and executed by a processor, so that an electronic device having the processor executes the steps of the order processing method of the first aspect.
[0049] By using the technical solution provided by the embodiment of the present application, the auditing of the service contract is asynchronously performed at any time point after the service contract is generated and before the service order takes effect, and the auditing of the service order is asynchronously performed at any time point after the service order is generated and before the service order takes effect, that is, after the service order is generated, the auditing results of the service contract and the service order do not need to be waited for, and the deduction operation of the specified virtual resource is continued, and the auditing nodes of the service contract and the service order are separated from the main process of order processing, so that even if the auditing of the service contract and the service order is delayed, the deduction operation of the specified virtual resource will not be affected, and the occurrence of the situation that the deduction of the specified virtual resource fails due to insufficient virtual resources is reduced. Because the specified virtual resource has been successfully deducted before, when the service order reaches the triggering condition of taking effect, the use permission of the service order of the user account can be quickly opened after it is determined that the service contract and the service order are both audited, and the opening rate and the use rate of the service order are improved.
[0050] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present application. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 is a schematic diagram of an order processing specific process in the related art;
[0052] Figure 2 is an implementation flowchart of an order processing method in an embodiment of the present application;
[0053] Figure 3 is a schematic diagram of an order processing specific process in an embodiment of the present application;
[0054] Figure 4 is a structural schematic diagram of an order processing device in an embodiment of the present application;
[0055] Figure 5 is a structural schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0057] The core of the present application is to provide an order processing method, which can be applied to the scenario of order processing of an order system. For example, a user account of a virtual commodity platform wants to purchase a member package A, and the order system of the virtual commodity platform can generate a service contract according to the service request of the user account, then freeze the specified virtual resources of the user account according to the service contract, generate a service order based on the service contract, continue to deduct the specified virtual resources from the user account, and in the case that the service order triggering condition is reached, determine whether the service contract and the service order are passed, if both are passed, open the use permission of the user account to the service order, so that the service order takes effect, and after the service order takes effect, the user account can enjoy the member package A.
[0058] The audit of the service contract is asynchronous at any time point after the generation of the service contract and before the service order takes effect, and the audit of the service order is asynchronous at any time point after the generation of the service order and before the service order takes effect, that is, after the generation of the service order, the deduction operation of the specified virtual resources is continued without waiting for the audit results of the service contract and the service order, and the audit nodes of the service contract and the service order are separated from the main process of order processing, so that even if the audit of the service contract and the service order is delayed, it will not affect the deduction operation of the specified virtual resources, and the occurrence of the case that the deduction of the specified virtual resources fails due to insufficient virtual resources is reduced, because the specified virtual resources have been successfully deducted before, so when the service order triggering condition is reached, the use permission of the user account to the service order can be quickly opened after it is determined that the service contract and the service order are both passed, thereby improving the opening rate and the use rate of the service order.
[0059] Referring to Figure 2 The method can include the following steps:
[0060] S210: generating a service contract according to the service request of the user account, and freezing the specified virtual resources in the user account according to the service contract.
[0061] The specified virtual resources are determined according to the service contract.
[0062] The user account can be an account used by a user to log in to a virtual commodity platform. After the user logs in to the virtual commodity platform using the user account, if there is a demand to purchase virtual commodities, the user can issue a corresponding service request through the user account.
[0063] According to the service request of the user account, a service contract can be generated, and a contractual relationship is generated with the user account. The service contract can include the use limitation range, use period, specified virtual resource, and use precautions of the virtual goods targeted by the service request. The specified virtual resource refers to the corresponding virtual resource that the user account needs to pay when purchasing the virtual goods.
[0064] According to the service request of the user account, after the service contract is generated, the specified virtual resource in the user account can be further frozen according to the service contract. Freezing the specified virtual resource in the user account according to the service contract can improve the success rate of subsequent deduction operations.
[0065] The total virtual resource frozen in the user account is the maximum value of the virtual resources frozen according to different service contracts of the user account. After the specified virtual resource is frozen, the total virtual resource frozen is greater than or equal to the specified virtual resource. For example, initially, the total virtual resource frozen in the user account is zero, after the service contract X of the user account is generated, the virtual resource corresponding to the service contract X is x, and the virtual resource x in the user account is frozen according to the service contract X, so that the total virtual resource frozen in the user account changes from zero to x. When the total virtual resource frozen is x, if the service contract Y of the user account is generated, the virtual resource corresponding to the service contract Y is y, then x and y can be compared, if y≤x, then y in the total virtual resource frozen x is considered as the virtual resource corresponding to the service contract Y frozen, and no additional virtual resource y is frozen, if y>x, then the virtual resource y-x of the user account is frozen, and is added to the total virtual resource frozen in the user account, so that the total virtual resource frozen in the user account is y.
[0066] S220: generating a service order based on the service contract, and deducting the specified virtual resource from the user account.
[0067] According to the service request of the user account, a service contract can be generated, and a contractual relationship is generated with the user account. The service contract can include the use limitation range, use period, specified virtual resource, and use precautions of the virtual goods targeted by the service request. The specified virtual resource refers to the corresponding virtual resource that the user account needs to pay when purchasing the virtual goods.
[0068] After the service order is generated based on the service contract, the deduction operation of the specified virtual resource on the service order is continued, that is, the specified virtual resource is deducted from the user account. Specifically, the frozen specified virtual resource can be unfrozen, and then the deduction operation of the specified virtual resource is performed.
[0069] As described previously, the total virtual resources frozen in the user account is the maximum value of the virtual resources frozen according to different service contracts of the user account, and the total virtual resources frozen is greater than or equal to the specified virtual resources after the specified virtual resources are frozen. In the related art, because the audit nodes of the service contract and the service order are in the main process of order processing, only after the service contract and the service order are audited and passed, the subsequent operations such as deduction of the specified virtual resources and opening of the service order are performed, and the audit of the service contract and the service order may be delayed, and the deduction of the specified virtual resources is performed after the audit is passed, and the specified virtual resources frozen before may have been used by other service orders, so that the deduction fails due to insufficient virtual resources.
[0070] In the embodiment of the present application, the specified virtual resources are deducted from the user account after the service order is generated, and are not affected by the audit delay of the service contract and the service order, so that the specified virtual resources can be effectively avoided from being used by other service orders, and the success rate of virtual resource deduction operation can be improved.
[0071] S230: If the service contract and the service order are both audited and passed, the use permission of the user account to the service order is opened to make the service order effective.
[0072] The audit of the service contract is performed asynchronously at any time point after the service contract is generated and before the service order is effective, and the audit of the service order is performed asynchronously at any time point after the service order is generated and before the service order is effective.
[0073] In the embodiment of the present application, the effective trigger condition of the service order can be determined according to the specific content of the service order. For example, if the service order contains the content of immediate effectiveness, the effective trigger condition of the service order is the time point of deducting the specified virtual resources from the user account, if the service order contains the content of specified date effectiveness, the effective trigger condition of the service order is the specified date, and if the service order contains the content of user indication effectiveness, the effective trigger condition of the service order is the indication of the user.
[0074] In the case where the effective trigger condition of the service order is reached, it is determined whether the service contract and the service order are audited and passed, and if both are audited and passed, the use permission of the user account to the service order is opened to make the service order effective.
[0075] The audit of the service contract is performed asynchronously at any time point after the service contract is generated and before the service order is effective, and the audit of the service order is performed asynchronously at any time point after the service order is generated and before the service order is effective.
[0076] The execution state of each flow node of the order processing can be saved by using a relational database management system mysql, and the execution state is used to determine whether the freezing and deduction operation on the specified resource is successful, whether the service contract and service order are passed in the audit, and the like.
[0077] After the use permission of the service order of the user account is opened, further operations such as giving promotion resources and issuing promotion goods can be performed. The freezing, deduction, promotion resource giving, and promotion good issuing operations on the specified virtual resource can be performed according to a preset operation flow, and the operation flow can be set according to the flow arrangement framework.
[0078] According to the method provided in the embodiment of the application, the audit of the service contract is performed asynchronously at any time point after the service contract is generated and before the service order is effective, and the audit of the service order is performed asynchronously at any time point after the service order is generated and before the service order is effective, that is, after the service order is generated, the audit results of the service contract and the service order do not need to be waited for, and the deduction operation of the specified virtual resource is continued, and the audit nodes of the service contract and the service order are separated from the main flow of the order processing. Therefore, even if the audit of the service contract and the service order is delayed, the deduction operation of the specified virtual resource is not affected, and the occurrence of the situation that the deduction of the specified virtual resource fails due to the lack of virtual resources is reduced. Because the specified virtual resource has been successfully deducted before, when the effective trigger condition of the service order is reached, the use permission of the service order of the user account can be quickly opened after it is determined that the service contract and the service order are both passed in the audit, and the opening rate and the use rate of the service order are improved.
[0079] In an embodiment of the application, the effective trigger condition includes an effective time condition, the audit of the service contract is performed asynchronously at any time point after the service contract is generated and before a target time node, the audit of the service order is performed asynchronously at any time point after the service order is generated and before the target time node, and the target time node is a time node corresponding to the effective time condition.
[0080] In the embodiment of the application, the effective trigger condition can include an effective time condition, and a time node corresponding to the effective time condition can be referred to as a target time node.
[0081] The effective time condition can be immediate effect, and the target time node is the time node of deducting the specified virtual resource from the user account. The effective time condition can also be a specified date, and the target time node is the time node of reaching the specified date. For example, a service order is generated based on the service contract on April 20, X, and the service order needs to take effect on May 1, X, and the target time node is May 1, X. The effective time condition can also be the expiration of the same service order before the service order, for example, an order is generated based on the service contract on May 2, X, and the same service order before the service order will expire on June 30, X, and the service order needs to take effect on July 1, X, and the target time node is July 1, X.
[0082] The audit of the service contract is performed asynchronously at any time node after the generation of the service contract and before the target time node, and the audit of the service order is performed asynchronously at any time node after the generation of the service order and before the target time node. The audit provides a basis for whether to open the use permission of the service order for the user account.
[0083] In an embodiment of the present application, the service contract can be audited by the following steps:
[0084] According to the preset contract specification, the service contract is audited;
[0085] And / or, according to the preset order specification, the service order is audited.
[0086] In an embodiment of the present application, the audit of the service contract and the service order can be performed respectively or sequentially. The service contract can be audited according to the preset contract specification to check whether the service contract meets the pre-set contract specification. Similarly, the service order can be audited according to the preset order specification to check whether the service order meets the pre-set order specification, such as whether there is a name in the service order that does not meet the regulation.
[0087] The contract specification and the order specification can be set and adjusted according to actual conditions.
[0088] According to the contract specification, the service contract is audited, and according to the order specification, the order is audited, so that the audit has a basis and the effectiveness of the audit is guaranteed.
[0089] In an embodiment of the present application, before the service order is audited according to the preset order specification, the method can further include the following steps:
[0090] Obtaining the audit result of the service contract;
[0091] If the audit result of the service contract is audit failure, it is determined that the audit result of the service order is audit failure;
[0092] If the audit result of the service contract is not obtained, the step of obtaining the audit result of the service contract is repeatedly performed when a set time length is reached.
[0093] The service order is audited according to the preset order specification, which can include the following steps:
[0094] In the case that the audit result of the service contract is passed, the service order is audited according to the preset order specification.
[0095] It can be understood that the service order is generated based on the service contract, and the audit result of the service contract has a certain constraint effect on the audit of the service order.
[0096] Therefore, before auditing the service order, the audit result of the service contract can be obtained first. If the audit result of the service contract is obtained, but the audit result of the service contract is failed, the audit result of the service order can be directly determined as failed, and the operation of auditing the service order according to the preset order specification is no longer performed.
[0097] If the audit result of the service contract is not obtained, it can be considered that the audit operation of the service contract has not been completed at present, and the step of obtaining the audit result of the service contract can be repeatedly performed when a set time length is reached. The time length can be set in advance, which is 5 minutes.
[0098] In the case that the audit result of the service contract is obtained and the audit result of the service contract is passed, the service order can be audited according to the preset order specification.
[0099] Based on the audit result of the service contract, it is determined whether to continue to audit the service order, and in the case that the audit result of the service contract is failed, the audit result of the service order is directly determined as failed, and in the case that the audit result of the service contract is passed, the service order is continued to be audited, which can improve the auditing efficiency.
[0100] In an embodiment of the present application, the method can further include the following steps:
[0101] If the service contract is not passed, the step of auditing the service contract according to the preset contract specification is repeatedly performed until the repeated execution times reach a preset first number threshold, and the audit result of the service contract is determined as failed.
[0102] In the embodiment of the present application, the auditing of the service contract is mainly automatically performed according to the preset contract specification, and there may be a determination deviation. If the auditing of the service contract fails, the step of auditing the service contract can be repeatedly performed. If the number of repeated execution reaches a preset first number threshold, it can be determined that the auditing of the service contract fails. The first number threshold can be set and adjusted according to actual conditions, such as being set to 3.
[0103] When the auditing of the service contract fails, the service contract can be re-audited for multiple times, which can effectively avoid inaccurate auditing results caused by determination deviation.
[0104] When the auditing result of the service contract is auditing failure, the reason for the auditing failure of the service contract can be recorded, such as being recorded through an auditing log. The recorded reason for the auditing failure of the service contract can be output to the user, so that the user learns the failure reason and facilitates problem troubleshooting.
[0105] In an embodiment of the present application, the method can further include the following steps:
[0106] If the auditing of the service order fails, the step of auditing the service order according to the preset order specification is repeatedly performed until the number of repeated execution reaches a preset second number threshold, and it is determined that the auditing result of the service order is auditing failure.
[0107] In the embodiment of the present application, the auditing of the service order is mainly automatically performed according to the preset order specification, and there may be a determination deviation. If the auditing of the service order fails, the step of auditing the service order can be repeatedly performed. If the number of repeated execution reaches a preset second number threshold, it can be determined that the auditing of the service order fails. The second number threshold can be set and adjusted according to actual conditions, such as being set to 3.
[0108] When the auditing of the service order fails, the service order can be re-audited for multiple times, which can effectively avoid inaccurate auditing results caused by determination deviation.
[0109] When the auditing result of the service order is auditing failure, the reason for the auditing failure of the service order can be recorded, such as being recorded through an auditing log. The recorded reason for the auditing failure of the service order can be output to the user, so that the user learns the failure reason and facilitates problem troubleshooting.
[0110] In an embodiment of the present application, the auditing result of the service order can be determined through the following steps:
[0111] When the service order meets the order specification and the consistency check of the service order and the service contract information passes, it is determined that the auditing result of the service order is auditing pass.
[0112] In the case that the service order does not conform to the order specification or the service order and the service contract information consistency check fails, it is determined that the audit result of the service order is audit failure.
[0113] In the embodiment of the application, according to the preset order specification, the service order is audited, which can include two aspects of operation: one is to judge whether the service order conforms to the order specification, and the other is to perform information consistency check on the service order and the service contract. The two aspects of operation can be sequentially performed or simultaneously performed. The information consistency check on the service order and the service contract can compare the key information in the service order and the service contract, such as user account identification information, service period information, specified virtual resource information, etc., to determine whether the information is consistent, and obtain the information consistency check result.
[0114] In the case that the service order conforms to the order specification and the service order and the service contract information consistency check passes, it can be determined that the audit result of the service order is audit pass.
[0115] In the case that the service order does not conform to the order specification or the service order and the service contract information consistency check fails, it can be considered that the current service order has a problem, and it can be determined that the audit result of the service order is audit failure.
[0116] Based on the double authentication of the order specification and the consistency check result, the accuracy of the determination of the audit result of the service order can be ensured.
[0117] In an embodiment of the application, the service order contains contract audit state information and order audit state information, and the order processing method can further include the following steps:
[0118] updating the contract audit state information according to the audit result of the service contract, so as to determine the audit result of the service contract based on the contract audit state information;
[0119] updating the order audit state information according to the audit result of the service order, so as to determine the audit result of the service order based on the order audit state information.
[0120] In the embodiment of the application, when the service order is generated based on the service contract, the contract audit state information and the order audit state information can be added in the service order, and the corresponding audit state information can be updated according to the service contract audit result and the service order audit result.
[0121] That is, the contract audit state information can be updated according to the audit result of the service contract, so that the audit result of the service contract can be determined based on the contract audit state information by checking the service order. Similarly, the order audit state information can be updated according to the audit result of the service order, so that the audit result of the service order can be determined based on the order audit state information by checking the service order.
[0122] The contract audit state information and the order audit state information are contained in the service order, so that the audit results of the service contract and the service order can be quickly determined through the service order, and then it can be quickly determined whether to open the use permission of the service order of the user account according to the audit results of the service contract and the service order.
[0123] In an embodiment of the present application, the audit results of the service contract and the service order can be obtained by querying the audit system.
[0124] In the embodiment of the present application, the service contract and the service order can be audited in the audit system. In the case where the service order reaches the effective trigger condition, the audit system can be queried to obtain the accurate audit results of the service contract and the service order.
[0125] In an embodiment of the present application, in the case where the service order reaches the effective trigger condition, the method can further include the following steps:
[0126] If the audit result of the service contract or the service order is audit failure, the specified virtual resource is returned to the user account.
[0127] In the embodiment of the present application, in the case where the service order reaches the effective trigger condition, the audit results of the service contract and the service order are determined, and if the audit result of the service contract or the service order is audit failure, it indicates that there is a problem in the service contract or the service order, and the use permission of the service order of the user account cannot be opened, so as to ensure that the service order is used legally.
[0128] When the audit result of the service contract or the service order is audit failure, the specified virtual resource can be returned to the user account, which can be used when the user account reinitiates the service request or initiates other service requests.
[0129] The technical solution provided by the embodiment of the present application separates the audit nodes of the service contract and the service order from the main process of order processing, which can effectively avoid the occurrence of the situation that the specified virtual resource deduction fails due to audit delay.
[0130] In addition, for a virtual commodity with a user service duration, according to an order processing procedure in the prior art, after a service order is generated, the service contract and the service order are audited, and after the audit is passed, the user service duration delayed due to the audit needs to be recalculated, and when the specified virtual resource is deducted, the user service duration also needs to be recalculated, so that the user service duration is repeatedly calculated, and the calculation logic is complex. In the embodiment of the present application, after the service order is generated, the deduction of the specified virtual resource is continued, and the user service duration does not need to be recalculated, and when the effective trigger condition of the service order is reached, the audit results of the service contract and the service order are determined, and if both are passed, the user service duration delayed due to the audit is recalculated once, the number of repeated calculations is less, and the calculation logic is simple.
[0131] For the convenience of understanding, the order processing procedure shown in Figure 3 will be taken as an example to further illustrate the embodiment of the present application.
[0132] After the service contract is generated according to the service request of the user account, the specified virtual resource in the user account is frozen according to the service contract, the service order is generated based on the service contract, and then the specified virtual resource is deducted from the user account. If the service contract and the service order are both passed, the service order is opened, that is, the use permission of the user account to the service order is opened, so that the service order takes effect. The audit nodes of the service contract and the service order are separated from the main process of order processing. After the service contract is generated, the audit of the service contract can be performed, and when the audit of the service contract is not passed, the audit operation of the service contract can be repeated. After the service order is generated and the audit of the service contract is passed, the audit of the service order is performed.
[0133] The audit nodes of the service contract and the service order are separated from the main process of order processing, and whether the service order takes effect is limited through the audit nodes. In this way, the situation that the deduction of the specified virtual resource fails due to audit delay and the service order cannot take effect can be effectively avoided, and the user experience can be improved.
[0134] Corresponding to the above method embodiment, the embodiment of the present application also provides an order processing device. The order processing device described below can be mutually referred to the order processing method described above.
[0135] Referring to Figure 4 , the order processing device 400 can include the following units:
[0136] The freezing unit 410 is configured to generate a service contract according to a service request of a user account, and freeze a specified virtual resource in the user account according to the service contract, and the specified virtual resource is determined according to the service contract;
[0137] Deduction unit 420 is used to generate a service order based on the service contract and deduct specified virtual resources from the user account;
[0138] Unit 430 is used to enable a user account to use the service order if both the service contract and the service order are approved, in order to make the service order effective.
[0139] The review of service contracts can be conducted asynchronously at any point in time after the service contract is generated and before the service order takes effect, and the review of service orders can be conducted asynchronously at any point in time after the service order is generated and before the service order takes effect.
[0140] Using the apparatus provided in this embodiment of the invention, the review of the service contract is performed asynchronously at any point in time after the service contract is generated and before the service order takes effect. Similarly, the review of the service order is performed asynchronously at any point in time after the service order is generated and before it takes effect. That is, after a service order is generated, there is no need to wait for the review results of the service contract and the service order; instead, the deduction of specified virtual resources continues. This removes the review nodes of the service contract and the service order from the main order processing flow. Thus, even if there is a delay in the review of the service contract and the service order, it will not affect the deduction of specified virtual resources, reducing the occurrence of deduction failures due to insufficient virtual resources. Because the specified virtual resources have already been successfully deducted, when the triggering condition for the service order to take effect is met, and after confirming that both the service contract and the service order have been approved, the user account's access to the service order can be quickly activated, improving the activation rate and usage rate of service orders.
[0141] In one embodiment of the present invention, the effective triggering condition includes an effective time condition. The review of the service contract is carried out asynchronously at any time point after the service contract is generated and before the target time point. The review of the service order is carried out asynchronously at any time point after the service order is generated and before the target time point. The target time point is the time point corresponding to the effective time condition.
[0142] In one embodiment of the present invention, the order processing device 400 may further include a first review unit and / or a second review unit;
[0143] The first review unit is used to review the service contract through the following steps:
[0144] The service contract is reviewed according to the pre-set contract specifications.
[0145] The second review unit is used to review service orders through the following steps:
[0146] According to the preset order specification, the service order is audited.
[0147] In an embodiment of the present application, the second auditing unit is further configured to:
[0148] Before auditing the service order according to the preset order specification, the auditing result of the service contract is obtained;
[0149] If the auditing result of the service contract is auditing failure, the auditing result of the service order is determined as auditing failure;
[0150] If the auditing result of the service contract is not obtained, when the set time length is reached, the step of obtaining the auditing result of the service contract is repeatedly executed;
[0151] In the case that the auditing result of the service contract is auditing pass, the service order is audited according to the preset order specification.
[0152] In an embodiment of the present application, the order processing device 400 can further comprise a repeated execution unit configured to:
[0153] In the case that the service contract fails the auditing, the step of auditing the service contract according to the preset contract specification is repeatedly executed until the repeated execution times reach a preset first number threshold, and the auditing result of the service contract is determined as auditing failure;
[0154] and / or,
[0155] In the case that the service order fails the auditing, the step of auditing the service order according to the preset order specification is repeatedly executed until the repeated execution times reach a preset second number threshold, and the auditing result of the service order is determined as auditing failure.
[0156] In an embodiment of the present application, the order processing device 400 can further comprise a recording unit configured to:
[0157] In the case that the auditing result of the service contract is auditing failure, the reason for the auditing failure of the service contract is recorded;
[0158] and / or,
[0159] In the case that the auditing result of the service order is auditing failure, the reason for the auditing failure of the service order is recorded.
[0160] In an embodiment of the present application, the order processing device 400 can further comprise a determination unit configured to determine the auditing result of the service order by the following steps:
[0161] In the case that the service order meets the order specification and the consistency check of the service order and the service contract information is passed, the auditing result of the service order is determined as auditing pass.
[0162] If a service order does not meet the order specifications, or if the consistency verification of the service order and service contract information fails, the service order will be deemed to have failed the review.
[0163] In one embodiment of the present invention, the service order includes contract review status information and order review status information, and the order processing device 400 may further include an update unit for:
[0164] Update the contract review status information based on the review results of the service contract, so as to determine the review result of the service contract based on the contract review status information;
[0165] Update the order review status information based on the review results of the service order, so as to determine the review result of the service order based on the order review status information.
[0166] In one embodiment of the present invention, the review results of service contracts and service orders are obtained by querying the review system.
[0167] In one embodiment of the present invention, a return unit is further included, for:
[0168] If the service contract or service order fails to pass the review, the specified virtual resources will be returned to the user account if the service order fails to pass the review.
[0169] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0170] Corresponding to the above method embodiments, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above order processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0171] like Figure 5 The diagram shows a possible structure of an electronic device, which may include a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, memory 11, and communication interface 12 all communicate with each other through the communication bus 13.
[0172] In this embodiment of the invention, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.
[0173] The processor 10 can invoke a computer program stored in the memory 11, and specifically, the processor 10 can perform operations in the embodiments of the order processing method.
[0174] The memory 11 stores one or more programs, which can include program codes including computer operation instructions. In the embodiments of the present application, the memory 11 at least stores programs for implementing the following functions:
[0175] According to the service request of the user account, a service contract is generated, and a specified virtual resource in the user account is frozen according to the service contract, and the specified virtual resource is determined according to the service contract;
[0176] Based on the service contract, a service order is generated, and the specified virtual resource is deducted from the user account;
[0177] If the service contract and the service order are both approved, the use permission of the user account to the service order is opened to make the service order effective when the effective trigger condition of the service order is reached;
[0178] Among them, the audit of the service contract is carried out asynchronously at any time point after the generation of the service contract and before the service order takes effect, and the audit of the service order is carried out asynchronously at any time point after the generation of the service order and before the service order takes effect.
[0179] In a possible implementation, the memory 11 can include a storage program area and a storage data area, wherein the storage program area can store an operating system and application programs required by at least one function (such as a request receiving function, an order generating function) and the like; the storage data area can store data created during use, such as contract data, order data and the like.
[0180] In addition, the memory 11 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device or other volatile solid state storage device.
[0181] The communication interface 12 can be an interface of a communication module, used for connecting with other devices or systems.
[0182] Of course, it needs to be explained that, Figure 5 The structure shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual application, the electronic device can include more or fewer components than those shown, or combine certain components. Figure 5 The structure shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual application, the electronic device can include more or fewer components than those shown, or combine certain components.
[0183] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to realize each process of the order processing method embodiment and achieve the same technical effects. To avoid repetition, details are not described herein. The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, and the like.
[0184] In addition, the embodiment of the present application further provides a computer program product or a computer program. The computer program product or the computer program can include computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium. The processor can execute the computer instructions to enable the electronic device to perform the description of the order processing method in the foregoing embodiment. Therefore, details are not described herein. In addition, the beneficial effects of the same method are not described. For technical details not disclosed in the computer program product or the computer program embodiment of the present application, refer to the description of the method embodiment of the present application.
[0185] It should be noted that in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0186] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on this understanding, the technical solutions of the present application or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the method described in each embodiment of the present application.
[0187] The embodiments of the present application are described above with reference to the accompanying drawings, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are merely illustrative, but not restrictive, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection of the present application.
[0188] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed in the embodiments of the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software mode depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0189] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0190] In the embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented by other ways. For example, the device embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0191] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected to achieve the purpose of the embodiment according to actual needs.
[0192] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.
[0193] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes various storage media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk.
[0194] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An order processing method, characterized in that, include: Based on the service request from the user account, a service contract is generated, a contractual relationship is established with the user account, and a specified virtual resource in the user account is frozen according to the service contract. The specified virtual resource is determined according to the service contract. A service order is generated based on the service contract, and the specified virtual resources are deducted from the user account, wherein the deduction operation is performed before the review of the service contract and the service order is completed; If the service contract and the service order are both approved when the activation triggering conditions of the service order are met, the user account's access to the service order will be granted so that the service order becomes effective. The activation triggering conditions include at least one of the following: the preset activation time of the service order is reached or an activation instruction is received from the user. Specifically, the review of the service contract is conducted asynchronously at any point in time after the service contract is generated and before the service order takes effect. The review of the service order is also conducted asynchronously at any point in time after the service order is generated and before the service order takes effect. The review of the service contract and the service order are conducted asynchronously through an independent review system, which is decoupled from the resource management system that performs the deduction operation.
2. The order processing method according to claim 1, characterized in that, The effective triggering conditions include effective time conditions. The review of the service contract is carried out asynchronously at any time point after the service contract is generated and before the target time point. The review of the service order is carried out asynchronously at any time point after the service order is generated and before the target time point. The target time point is the time point corresponding to the effective time conditions.
3. The order processing method according to claim 1, characterized in that, The service contract will be reviewed using the following steps: The service contract is reviewed according to the preset contract specifications. And / or, The service order will be reviewed through the following steps: The service orders are reviewed according to the preset order specifications.
4. The order processing method according to claim 3, characterized in that, Before reviewing the service order according to the preset order specifications, the process also includes: Obtain the review result of the service contract; If the review result of the service contract is "review failed", then the review result of the service order is determined to be "review failed". If the review result of the service contract is not obtained, the step of obtaining the review result of the service contract will be repeated after the set time period is reached. The step of reviewing the service order according to the preset order specifications includes: If the service contract is approved, the service order is reviewed according to the preset order specifications.
5. The order processing method according to claim 3, characterized in that, Also includes: If the service contract fails the review, the steps of reviewing the service contract according to the preset contract specifications are repeated until the number of repetitions reaches a preset first threshold, at which point the review result of the service contract is determined to be a failure. And / or, If the service order fails the review, the steps of reviewing the service order according to the preset order specifications are repeated until the number of repetitions reaches the preset second threshold, at which point the review result of the service order is determined to be a failure.
6. The order processing method according to claim 3, characterized in that, Also includes: If the review result of the service contract is "review failed", record the reason for the service contract review failure; And / or, If the review result of the service order is "review failed", record the reason for the service order review failure.
7. The order processing method according to claim 3, characterized in that, The review result of the service order is determined by the following steps: If the service order conforms to the order specifications and the consistency verification between the service order and the service contract information passes, the review result of the service order is determined to be approved. If the service order does not conform to the order specifications, or if the consistency verification between the service order and the service contract information fails, the review result of the service order is determined to be a failure.
8. The order processing method according to claim 1, characterized in that, The service order includes contract review status information and order review status information; the order processing method further includes: The service contract review status information is updated based on the review result of the service contract, so as to determine the review result of the service contract based on the review status information; The order review status information is updated based on the review result of the service order, so as to determine the review result of the service order based on the order review status information.
9. The order processing method according to claim 1, characterized in that, The review results of the service contract and the service order are obtained through the review system.
10. The order processing method according to any one of claims 1 to 9, characterized in that, In addition to the conditions for triggering the service order to take effect, the following are also included: If the review result of the service contract or the service order is that the review fails, the designated virtual resource will be returned to the user account.
11. An order processing device, characterized in that, include: The freezing unit is used to generate a service contract based on the service request of the user account, establish a contractual relationship with the user account, and freeze a specified virtual resource in the user account according to the service contract. The specified virtual resource is determined according to the service contract. The deduction unit is used to generate a service order based on the service contract and deduct the specified virtual resources from the user account, wherein the deduction operation is performed before the review of the service contract and the service order is completed; The activation unit is used to activate the user account's access to the service order when the service order's activation triggering conditions are met, provided that both the service contract and the service order have been approved, so that the service order becomes effective. The activation triggering conditions include at least one of the following: the preset activation time of the service order has arrived or an activation instruction issued by the user has been received. Specifically, the review of the service contract is conducted asynchronously at any point in time after the service contract is generated and before the service order takes effect. The review of the service order is also conducted asynchronously at any point in time after the service order is generated and before the service order takes effect. The review of the service contract and the service order are conducted asynchronously through an independent review system, which is decoupled from the resource management system that performs the deduction operation.
12. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the order processing method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the order processing method as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Method capable of guaranteeing network transaction security of buyer and seller
CN104574045A
Resource data processing method and device, and equipment
CN111415146A
Audit failure order processing method and device, computer equipment and storage medium
CN111667334A