Resource distribution method, device, computer equipment and computer-readable storage medium
By matching the user store account on the user side in the mini program and generating resource distribution events, the resource forgetting problem is solved, the public domain transparency of resources is realized, and the utilization rate and online service intelligence process is improved.
Patent Information
- Application Number
- CN202210535682.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-17
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-05-17
AI Technical Summary
In the prior art, resources distributed by mini programs are easily forgotten by users, resulting in low resource utilization and affecting the process of intelligent online services.
By responding to the resource distribution request from the user side, the merchant side determines the resources to be distributed and the target store, matches the user store account on the user side, distributes the resources to the account, and generates resource distribution events to transmit them to the target platform, so that the platform matches the user platform account to issue related resources, and realizes the public domain of resources.
Ensure that users can view the resources they receive in their public domain platform accounts, no longer need to log in to private domain stores, improve resource utilization, and promote the intelligence of online services.
Smart Images

Figure CN114862467B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a resource distribution method, device, computer equipment and computer-readable storage medium. Background Art
[0002] In recent years, Internet technology has developed rapidly, and people's traditional shopping methods have been constantly changing, generating new demands. The way of online shopping has completely changed people's lifestyles. When shopping, people do not have to actually go to the store, but can choose the items they want to order on the online shopping platform. In order to provide users with online ordering services, many merchants will create online stores in the form of mini-programs on the platform, display items in the mini-programs for users to place orders, or create some full-amount coupons, birthday gifts and other resources in the mini-programs, and distribute the resources to users to achieve interaction with users.
[0003] In related technologies, merchants will provide a resource collection entrance in the mini program. Users log in to their own accounts in the mini program and trigger the resource collection entrance in the mini program to obtain the resources issued by the merchant based on the resource collection entrance and use the resources for subsequent consumption.
[0004] In the process of implementing this application, the applicant found that the related technology has at least the following problems:
[0005] Mini Programs provide users with a personal center on the user-facing front end. The resources issued by merchants based on Mini Programs require users to successfully log in to the Mini Program before they can view them. This can easily lead to the issued resources being forgotten by users, and the issued resources are difficult to actually use. The resource utilization rate is low, which affects the process of promoting the intelligence of online services. Summary of the invention
[0006] In view of this, the present application provides a resource distribution method, apparatus, computer equipment and computer-readable storage medium, the main purpose of which is to solve the current problem that the distributed resources are easily forgotten by users, the distributed resources are difficult to actually use, the resource utilization rate is low, and the process of promoting the intelligentization of online services is affected.
[0007] According to the first aspect of the present application, a resource distribution method is provided, which is applied to a merchant side and includes:
[0008] In response to a resource distribution request from a user terminal, determining a first resource to be distributed and a target store, wherein the target store is the store where the user terminal is located when initiating the resource distribution request;
[0009] Matching the user store account of the user terminal in the target store, and issuing the first resource to be issued to the user store account;
[0010] Generate a first resource distribution event based on the first resource identifier of the first resource to be distributed and the user store account, and transmit the first resource distribution event to the target platform, so that the target platform matches the user platform account of the user terminal on the target platform and distributes a second resource to be distributed associated with the first resource to be distributed to the user platform account. The target platform is a third-party platform where the target store is located or a third-party payment platform with payment functions associated with the user store account.
[0011] Optionally, before determining the first resource to be distributed and the target store in response to the resource distribution request of the user terminal, the method further includes:
[0012] In response to the resource creation request, based on the merchant identifier, transmit the resource creation request to the target platform, so that the target platform uses the merchant identifier to verify whether the merchant terminal meets the conditions for setting platform resources on the target platform;
[0013] When receiving the verification success feedback from the target platform, obtain the store resources created based on the resource creation request, set the collection entry of the store resources in the target store, extract the resource parameters of the store resources, and transmit the resource parameters to the target platform, so that the target platform performs parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources and associate the store resources with the platform resources;
[0014] When receiving the verification failure feedback from the target platform, set the collection entry of the store resources in the target store.
[0015] Optionally, the method further includes:
[0016] In response to the write-off instruction for the first resource to be distributed, under the user store account, update the resource status of the first resource to be distributed with the store written-off identifier;
[0017] Use the store written-off identifier to mark the first resource identifier, and transmit the marked first resource identifier to the target platform, so that the target platform verifies the first resource identifier, and when the verification passes, update the resource status of the second resource to be distributed with the platform written-off identifier under the user platform account.
[0018] Optionally, the method further includes:
[0019] When receiving the resource identifier to be written off sent by the target platform, determine the resource indicated by the resource identifier to be written off as the resource to be written off under the user store account;
[0020] Under the user store account, update the resource status of the to-be-verified resource with the store-verified flag.
[0021] Optionally, the method further includes:
[0022] Obtain the target resource parameters of the first to-be-issued resource, extract the expiration time point from the target resource parameters, and continuously detect whether the current time point reaches the expiration time point;
[0023] When it is detected that the current time point reaches the expiration time point, under the user store account, update the resource status of the first to-be-issued resource with the store-expired flag.
[0024] Mark the first resource identifier with the store-expired flag, and transmit the marked first resource identifier to the target platform, so that the target platform updates the resource status of the second to-be-issued resource with the platform-expired flag under the user platform account.
[0025] According to a second aspect of the present application, a resource issuance method is provided. The method is applied to a target platform and includes:
[0026] Receive a first resource issuance event sent by the merchant side. The first resource issuance event is generated based on the first resource identifier of the first to-be-issued resource and the user store account after the merchant side issues the first to-be-issued resource to the user store account of the user side at the target store;
[0027] Query a second to-be-issued resource associated with the first to-be-issued resource according to the first resource identifier;
[0028] Match the user platform account corresponding to the user store account on the target platform, and issue the second to-be-issued resource to the user platform account.
[0029] Optionally, before receiving the first resource issuance event sent by the merchant side, the method further includes:
[0030] Receive a resource creation request transmitted by the merchant side, obtain the merchant identifier marked in the resource creation request, and use the merchant identifier to verify whether the merchant side meets the conditions for setting platform resources on the target platform;
[0031] When it is determined that the merchant side meets the conditions for setting platform resources on the target platform, generate a verification success feedback, transmit the verification success feedback to the merchant side, receive the resource parameters transmitted by the merchant side, perform parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources and associate the platform resources with the store resources, where the resource parameters are transmitted by the merchant side after receiving the verification success feedback;
[0032] When it is determined that the merchant side does not meet the conditions for setting platform resources on the target platform, generate a verification failure feedback and transmit the verification failure feedback to the merchant side.
[0033] Optionally, the step of using the merchant identifier to verify whether the merchant side meets the conditions for setting platform resources on the target platform includes:
[0034] Determine the target brand bound by the merchant identifier and obtain the brand white list;
[0035] If the brand name of the target brand is included in the brand white list, query the store status corresponding to the merchant identifier on the target platform;
[0036] When the queried store status indicates that there is a store program corresponding to the merchant identifier on the target platform, query the program level of the store program, and when it is determined that the program level reaches the level threshold, determine that the merchant side meets the conditions for setting platform resources on the target platform.
[0037] Optionally, the method further includes:
[0038] If the brand name of the target brand is not included in the brand white list, determine that the merchant side does not meet the conditions for setting platform resources on the target platform; or,
[0039] When the queried store status indicates that there is no store program corresponding to the merchant identifier on the target platform, determine that the merchant side does not meet the conditions for setting platform resources on the target platform; or,
[0040] When it is determined that the program level does not reach the level threshold, determine that the merchant side does not meet the conditions for setting platform resources on the target platform.
[0041] Optionally, the step of performing parameter verification on the resource parameters includes:
[0042] Determine the historical time point when the merchant side last sent a resource creation request, count the time interval between the current time point and the historical time point, and identify whether the resource parameters include abnormal characters;
[0043] When it is determined that the time interval is greater than the interval threshold and the resource parameter does not include abnormal characters, it is determined that the verification of the resource parameter is successful;
[0044] When it is determined that the time interval is less than or equal to the interval threshold or the resource parameter includes abnormal characters, it is determined that the verification of the resource parameter fails.
[0045] Optionally, the creating of the platform resource includes:
[0046] Determine the store program corresponding to the merchant side on the target platform, and obtain the program identifier of the store program;
[0047] Obtain a resource creation template, assemble the characters included in the resource parameter according to the resource creation template, create the platform resource, and set a platform resource identifier for the platform resource;
[0048] Mark the platform resource with the program identifier and the platform resource identifier, store the marked platform resource, and complete the creation of the platform resource.
[0049] Optionally, the associating of the platform resource and the store resource includes:
[0050] Query the store activity to which the store resource belongs in the store program corresponding to the merchant side on the target platform, obtain the activity identifier of the store activity, and determine the idempotency identifier of the platform resource;
[0051] Combine the activity identifier and the idempotency identifier to obtain a resource lock, and perform a locking process on the platform resource with the resource lock;
[0052] Obtain the platform resource identifier of the platform resource, and query whether the resource association table and the resource expiration table include the platform resource identifier;
[0053] If the resource association table and the resource expiration table do not include the platform resource identifier, obtain the store resource identifier of the store resource, associate the store resource identifier with the platform resource identifier after the locking process, and store the associated store resource identifier and platform resource identifier in the resource association table;
[0054] Extract the resource effective time point and the resource expiration time point from the resource parameter, and use the time interval between the resource effective time point and the resource expiration time point as the resource effective duration;
[0055] Establish an association relationship among the platform resource identifier, the resource expiration time point, and the resource valid duration, and store the associated platform resource identifier, resource expiration time point, and resource valid duration in the resource expiration table.
[0056] Optionally, the method further includes:
[0057] When obtaining the idempotency identifier or the activity identifier fails, generate and display an exception reminder; or;
[0058] If the platform resource identifier is included in the resource association table and the resource expiration table, determine that the association between the platform resource and the store resource is completed, and generate and display an association success reminder.
[0059] Optionally, the querying for the second to-be-issued resource associated with the first to-be-issued resource according to the first resource identifier includes:
[0060] Perform an idempotency query based on the first resource identifier to determine the idempotency identifier of the first to-be-issued resource, and obtain the activity identifier bound to the first resource identifier;
[0061] Combine the idempotency identifier and the activity identifier to obtain a resource lock;
[0062] Obtain the resource association table, and query for the platform resource identifier associated with the first resource identifier in the resource association table as the second resource identifier;
[0063] Generate a second resource issuance event based on the second resource identifier and the user platform account;
[0064] Query whether there is an event whose included resource identifier and user platform account are consistent with the second resource issuance event;
[0065] When it is determined that there is no event consistent with the second resource issuance event, store the first resource issuance event and the second resource issuance event in an associated manner;
[0066] Release the second resource identifier using the resource lock, and use the platform resource indicated by the released second resource identifier as the second to-be-issued resource.
[0067] Optionally, the method further includes:
[0068] When receiving the first resource identifier marked with a store verification passed identifier transmitted from the merchant side, determine the first resource issuance event corresponding to the first resource identifier, and query the second resource issuance event associated with the first resource issuance event;
[0069] Match the write-off records related to the first resource identifier in the user platform account, and extract the write-off path from the write-off records;
[0070] Read the second resource identifier included in the second resource distribution event. Under the user platform account, use the write-off path to label the second to-be-distributed resource indicated by the second resource identifier, and update the resource status of the second to-be-distributed resource with the platform-written-off identifier;
[0071] Update the event status of the second resource distribution event with the platform-written-off identifier.
[0072] Optionally, the method further includes:
[0073] In response to a payment request from the user terminal, match the target platform account that sends the payment request, and push the available resources under the target platform account;
[0074] When receiving the payment success response from the user terminal, determine the written-off available resources indicated in the payment success response of the user terminal, and obtain the target resource identifier of the written-off available resources;
[0075] Under the target platform account, label the written-off available resources with the path identifier corresponding to the target platform, and update the resource status of the written-off available resources with the platform-written-off identifier;
[0076] Query the third resource distribution event including the target resource identifier, where the third resource distribution event is generated by the target platform;
[0077] Update the event status of the third resource distribution event with the platform-written-off identifier, and determine the fourth resource distribution event associated with the third resource distribution event, where the fourth resource distribution event is generated by the merchant terminal and transmitted to the target platform;
[0078] Extract the resource identifier included in the fourth resource distribution event as the to-be-written-off resource identifier, and transmit the to-be-written-off resource identifier to the merchant terminal, so that the merchant terminal updates the resource status of the resource indicated by the to-be-written-off resource identifier under the user store account.
[0079] Optionally, the method further includes:
[0080] When receiving the first resource identifier marked with the store-expired identifier transmitted by the merchant terminal, determine the first resource distribution event corresponding to the first resource identifier, and query the second resource distribution event associated with the first resource distribution event;
[0081] Read the second resource identifier included in the second resource distribution event, and under the user platform account, update the resource status of the second resource to be distributed with the platform invalidation identifier;
[0082] Update the event status of the second resource distribution event with the platform invalidation identifier.
[0083] According to the third aspect of the present application, a resource distribution device is provided. The device is applied to the merchant side and includes:
[0084] A determination module, configured to respond to a resource distribution request from the user side, determine a first resource to be distributed and a target store, where the target store is the store where the user side initiates the resource distribution request;
[0085] A distribution module, configured to match the user store account of the user side in the target store, and distribute the first resource to be distributed to the user store account;
[0086] A transmission module, configured to generate a first resource distribution event based on the first resource identifier of the first resource to be distributed and the user store account, and transmit the first resource distribution event to the target platform, so that the target platform matches the user platform account of the user side in the target platform, and distributes a second resource to be distributed associated with the first resource to be distributed to the user platform account. The target platform is the third-party platform where the target store is located or a third-party payment platform with a payment function associated with the user store account.
[0087] Optionally, the transmission module is further configured to respond to a resource creation request, and based on the merchant identifier, transmit the resource creation request to the target platform, so that the target platform uses the merchant identifier to verify whether the merchant side meets the conditions for setting platform resources in the target platform; when receiving a successful verification feedback from the target platform, obtain the store resources created based on the resource creation request, set a receiving entry for the store resources in the target store, extract the resource parameters of the store resources, and transmit the resource parameters to the target platform, so that the target platform performs parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources and associate the store resources with the platform resources; when receiving a failed verification feedback from the target platform, set a receiving entry for the store resources in the target store.
[0088] Optionally, the device further includes:
[0089] A first update module, configured to respond to a write-off instruction for the first resource to be distributed, and under the user store account, update the resource status of the first resource to be distributed with the store written-off identifier;
[0090] The transmission module is further configured to label the first resource identifier with the store-verified identifier, and transmit the labeled first resource identifier to the target platform, so that the target platform verifies the first resource identifier, and when the verification passes, update the resource status of the second resource to be distributed with the platform-verified identifier under the user platform account.
[0091] Optionally, when receiving the resource identifier to be verified sent by the target platform, the determination module is further configured to determine the resource indicated by the resource identifier to be verified as the resource to be verified under the user store account; under the user store account, update the resource status of the resource to be verified with the store-verified identifier.
[0092] Optionally, the device further includes:
[0093] An extraction module, configured to obtain the target resource parameters of the first resource to be distributed, extract the expiration time point from the target resource parameters, and continuously detect whether the current time point reaches the expiration time point;
[0094] A second update module, configured to, when it is detected that the current time point reaches the expiration time point, update the resource status of the first resource to be distributed with the store-expired identifier under the user store account;
[0095] The transmission module is further configured to label the first resource identifier with the store-expired identifier, and transmit the labeled first resource identifier to the target platform, so that the target platform updates the resource status of the second resource to be distributed with the platform-expired identifier under the user platform account.
[0096] According to a fourth aspect of the present application, a resource distribution device is provided. The device is applied to a target platform and includes:
[0097] A receiving module, configured to receive a first resource distribution event sent by a merchant side, where the first resource distribution event is generated based on a first resource identifier of the first resource to be distributed and the user store account after the merchant side distributes the first resource to be distributed to a user store account of a user at a target store;
[0098] A query module, configured to query a second resource to be distributed that has an association relationship with the first resource to be distributed according to the first resource identifier;
[0099] A distribution module, configured to match the user platform account corresponding to the user store account on the target platform, and distribute the second resource to be distributed to the user platform account.
[0100] Optionally, the device further includes:
[0101] An acquisition module, configured to receive a resource creation request transmitted by the merchant terminal, acquire a merchant identifier marked in the resource creation request, and use the merchant identifier to verify whether the merchant terminal meets the condition for setting platform resources on the target platform;
[0102] A transmission module, configured to generate a verification success feedback when it is determined that the merchant terminal meets the condition for setting platform resources on the target platform, transmit the verification success feedback to the merchant terminal, receive resource parameters transmitted by the merchant terminal, perform parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources and associate the platform resources with the store resources, where the resource parameters are transmitted by the merchant terminal after receiving the verification success feedback;
[0103] The transmission module is further configured to generate a verification failure feedback when it is determined that the merchant terminal does not meet the condition for setting platform resources on the target platform, and transmit the verification failure feedback to the merchant terminal.
[0104] Optionally, the acquisition module is configured to determine a target brand bound to the merchant identifier and acquire a brand white list; if the brand name of the target brand is included in the brand white list, query the store status corresponding to the merchant identifier on the target platform; when the queried store status indicates that there is a store program for the merchant identifier on the target platform, query the program level of the store program, and when it is determined that the program level reaches a level threshold, determine that the merchant terminal meets the condition for setting platform resources on the target platform.
[0105] Optionally, the acquisition module is further configured to determine that the merchant terminal does not meet the condition for setting platform resources on the target platform if the brand name of the target brand is not included in the brand white list; or, determine that the merchant terminal does not meet the condition for setting platform resources on the target platform when the queried store status indicates that there is no store program for the merchant identifier on the target platform; or, determine that the merchant terminal does not meet the condition for setting platform resources on the target platform when it is determined that the program level does not reach the level threshold.
[0106] Optionally, the transmission module is configured to determine the historical time point when the merchant terminal last sent a resource creation request, calculate the time interval between the current time point and the historical time point, and identify whether the resource parameters include abnormal characters; when it is determined that the time interval is greater than the interval threshold and the resource parameters do not include abnormal characters, it is determined that the verification of the resource parameters is successful; when it is determined that the time interval is less than or equal to the interval threshold or the resource parameters include abnormal characters, it is determined that the verification of the resource parameters fails.
[0107] Optionally, the transmission module is configured to determine the store program corresponding to the merchant terminal on the target platform, obtain the program identifier of the store program; obtain a resource creation template, assemble the characters included in the resource parameters according to the resource creation template, create the platform resource, and set a platform resource identifier for the platform resource; mark the platform resource with the program identifier and the platform resource identifier, and store the marked platform resource to complete the creation of the platform resource.
[0108] Optionally, the transmission module is configured to query the store activity to which the store resource belongs in the store program corresponding to the merchant terminal on the target platform, obtain the activity identifier of the store activity, and determine the idempotency identifier of the platform resource; combine the activity identifier and the idempotency identifier to obtain a resource lock, and perform a locking process on the platform resource with the resource lock; obtain the platform resource identifier of the platform resource, and query whether the resource association table and the resource expiration table include the platform resource identifier; if the resource association table and the resource expiration table do not include the platform resource identifier, obtain the store resource identifier of the store resource, associate the store resource identifier and the platform resource identifier after the locking process, and store the associated store resource identifier and the platform resource identifier to the resource association table; extract the resource effective time point and the resource expiration time point from the resource parameters, and use the time interval between the resource effective time point and the resource expiration time point as the resource effective duration; establish an association relationship between the platform resource identifier, the resource expiration time point, and the resource effective duration, and store the associated platform resource identifier, the resource expiration time point, and the resource effective duration to the resource expiration table.
[0109] Optionally, the transmission module is further configured to generate and display an exception reminder when the idempotency identifier or the activity identifier fails to be obtained; or, if the resource association table and the resource expiration table include the platform resource identifier, it is determined that the association between the platform resource and the store resource is completed, and a successful association reminder is generated and displayed.
[0110] Optionally, the query module is configured to perform an idempotent query based on the first resource identifier to determine the idempotent identifier of the first resource to be issued, and obtain the activity identifier bound to the first resource identifier; combine the idempotent identifier and the activity identifier to obtain a resource lock; obtain a resource association table, query in the resource association table for the platform resource identifier associated with the first resource identifier as the second resource identifier; generate a second resource issuance event based on the second resource identifier and the user platform account; query whether there is an event including a resource identifier and a user platform account that is the same as the second resource issuance event; when it is determined that there is no event that is the same as the second resource issuance event, store the first resource issuance event and the second resource issuance event in an associated manner; release the second resource identifier using the resource lock, and use the platform resource indicated by the released second resource identifier as the second resource to be issued.
[0111] Optionally, the apparatus further includes:
[0112] The receiving module is further configured to, when receiving the first resource identifier marked with a store verification passed identifier transmitted by the merchant side, determine the first resource issuance event corresponding to the first resource identifier, and query the second resource issuance event associated with the first resource issuance event;
[0113] The extraction module is configured to match the verification record related to the first resource identifier in the user platform account, and extract the verification path from the verification record;
[0114] The first update module is configured to read the second resource identifier included in the second resource issuance event, and under the user platform account, mark the second resource to be issued indicated by the second resource identifier using the verification path, and update the resource status of the second resource to be issued using a platform verification passed identifier;
[0115] The first update module is further configured to update the event status of the second resource issuance event using the platform verification passed identifier.
[0116] Optionally, the apparatus further includes:
[0117] The push module is configured to, in response to a payment request from the user side, match the target platform account that sends the payment request from the user side, and push the available resources under the target platform account;
[0118] The determination module is configured to, when receiving a payment success response from the user side, determine the verified available resources indicated in the payment success response from the user side, and obtain the target resource identifier of the verified available resources;
[0119] A second update module, configured to label the verified available resources with the path identifier corresponding to the target platform under the target platform account, and update the resource status of the verified available resources with the platform verified identifier;
[0120] The query module is further configured to query a third resource distribution event including the target resource identifier, where the third resource distribution event is generated by the target platform;
[0121] The second update module is further configured to update the event status of the third resource distribution event with the platform verified identifier, and determine a fourth resource distribution event associated with the third resource distribution event, where the fourth resource distribution event is generated by the merchant side and transmitted to the target platform;
[0122] The second update module is further configured to extract the resource identifier included in the fourth resource distribution event as the resource identifier to be verified, and transmit the resource identifier to be verified to the merchant side, so that the merchant side updates the resource status of the resource indicated by the resource identifier to be verified under the user store account.
[0123] Optionally, the apparatus further includes:
[0124] The receiving module is further configured to, when receiving the first resource identifier labeled with the store invalid identifier transmitted by the merchant side, determine the first resource distribution event corresponding to the first resource identifier, and query the second resource distribution event associated with the first resource distribution event;
[0125] A third update module, configured to read the second resource identifier included in the second resource distribution event, and update the resource status of the second resource to be distributed with the platform invalid identifier under the user platform account;
[0126] The third update module is further configured to update the event status of the second resource distribution event with the platform invalid identifier.
[0127] According to a fifth aspect of the present application, there is provided a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the method according to any one of the first aspect and the second aspect are implemented.
[0128] According to a sixth aspect of the present application, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method according to any one of the first aspect and the second aspect are implemented.
[0129] By means of the above technical scheme, the present application provides a resource issuance method, device, computer equipment and computer-readable storage medium. In response to the resource issuance request of the user end, the merchant end determines the first resource to be issued and the target store where the user end is located when the resource issuance request is initiated, matches the user store account of the user end in the target store, and issues the first resource to be issued to the user store account, and generates a first resource issuance event based on the first resource identifier of the first resource to be issued and the user store account, and transmits the first resource issuance event to the target platform so that the target platform matches the user platform account of the user end in the target platform, and issues the second resource to be issued associated with the first resource to be issued to the user platform account, that is, after the merchant end completes the issuance of resources, it notifies the platform in the form of an event to issue the same resource to the user platform account, ensuring that the user can directly view the resources received this time in the public domain user platform account without having to log in to the private domain target store to view, thereby realizing the public domain exposure of private domain resources, avoiding the issued resources from being forgotten by users, making the issued resources truly used, improving resource utilization, and promoting the intelligent process of online services.
[0130] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0131] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0132] Figure 1 A schematic diagram of a resource distribution method provided in an embodiment of the present application is shown;
[0133] Figure 2 A schematic diagram of a resource distribution method provided in an embodiment of the present application is shown;
[0134] Figure 3 An interactive schematic diagram of a merchant verification method provided by an embodiment of the present application is shown;
[0135] Figure 4 An interactive schematic diagram of a resource creation method provided in an embodiment of the present application is shown;
[0136] Figure 5 An interactive schematic diagram of a resource distribution method provided in an embodiment of the present application is shown;
[0137] Figure 6 Shows an interaction schematic diagram of a resource write-off method provided by an embodiment of the present application;
[0138] Figure 7 Shows an interaction schematic diagram of a resource invalidation marking method provided by an embodiment of the present application;
[0139] Figure 8 Shows a structural schematic diagram of a resource distribution device provided by an embodiment of the present application;
[0140] Figure 9 Shows a structural schematic diagram of a resource distribution device provided by an embodiment of the present application;
[0141] Figure 10 Shows a device structure schematic diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0142] Hereinafter, exemplary embodiments of the present application will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be fully conveyed to those skilled in the art.
[0143] An embodiment of the present application provides a resource distribution method, as Figure 1 shown, this method is applied to the merchant side and includes:
[0144] 101. In response to a resource distribution request from the user side, determine the first resource to be distributed and the target store.
[0145] Among them, the merchant side is a platform that serves merchants and is a platform for merchants. On this platform, merchants can process data such as goods, coupons, points, etc. in stores, such as the CRM (Customer Relationship Management) system provided by the enterprise, that is, the merchant side described in this application. In daily store operations, merchants will create some resources such as coupons, points, redemption coupons, recharge rebates, etc. based on the merchant side, and provide resource collection entrances in the stores they operate. When the user triggers the collection entrance, the merchant side will receive the resource distribution request from the user side. Considering that merchants will actually open multiple stores on different third-party platforms or different mini-programs, the store where the user requests to obtain resources is actually the store where the user has registered and frequently used. The resources that the user wants to obtain need to be issued to the user's account in the store to meet the user's daily usage needs. Therefore, in response to the resource issuance request, the merchant side will not only determine which type of resource the user wants to obtain based on the resource issuance request (that is, the first resource to be issued), but also determine the store where the user side initiated the resource issuance request (that is, the target store), so as to issue resources to the user's account according to the target store, avoiding issuing resources to platforms or mini-programs where other users are not registered, resulting in waste of resources.
[0146] It should be noted that the target store in this application can come from a third-party platform that is connected to the target platform, or it can also come from a store applet in the target platform, and this application does not specifically limit this. In addition, in the embodiment of this application, the first resource to be issued is a merchant supply resource such as coupons, discount coupons, and red envelopes provided by the store to the user. For example, it is explained. In the actual application process, the first resource to be issued can also be the virtual currency that the user recharges to the target store, such as the consumption amount and recharge fee that the user recharges to the target store recharge card. In this way, after the user completes the recharge, all the contents of the user's recharge can be used as the first resource to be issued. Using the technical solution in this application, the user's recharge amount on the store side is displayed on the platform side, which is convenient for the user to directly understand the balance in his recharge card on the platform side without having to log in to the store to check.
[0147] 102. Match the user store account of the user terminal in the target store, and distribute the first resource to be distributed to the user store account.
[0148] Among them, after determining the first resource to be distributed and the target store, the merchant side will match the user store account of the user side in the target store and distribute the resource to be distributed to the user store account. For example, assuming that the target store operates through a mini-program in Alipay and the user requests to receive an 80% discount coupon in the mini-program, the merchant side can determine that the 80% discount coupon is the first resource to be distributed and the target store is the mini-program. In this way, the account logged in by the user in the mini-program is matched as the user store account, and the 80% discount coupon is distributed to the account logged in by the user in the mini-program. Subsequently, after the user logs in to the mini-program, the 80% discount coupon can be viewed in the resource storage areas such as the wallet and card package of the mini-program.
[0149] 103. Based on the first resource identifier of the first resource to be distributed and the user store account, generate a first resource distribution event, and transmit the first resource distribution event to the target platform, so that the target platform matches the user platform account of the user side in the target platform and distributes a second resource to be distributed associated with the first resource to be distributed to the user platform account.
[0150] Since the user store account can actually only be logged in at the merchant's store, the resources received by the user can only be seen after logging in to the account at the merchant's store, which belong to the private domain resources created by the merchant. Taking the store mini-program in Alipay as the target store as an example, the resources received by the user can only be seen in the store mini-program after successfully logging in, and the user cannot see the resources in the card package function provided by Alipay. The resources cannot be disclosed in the public domain, which easily leads to the user forgetting the distributed resources, the distributed resources are difficult to be truly used, the resource utilization rate is low, and it affects the process of promoting the intelligence of online services. Therefore, in the embodiment of the present application, after distributing the first resource to be distributed to the user store account, the merchant side will generate a first resource distribution event based on the first resource identifier of the first resource to be distributed and the user store account, and transmit the first resource distribution event to the target platform, so that the target platform matches the user platform account of the user side in the target platform and distributes a second resource to be distributed associated with the first resource to be distributed to the user platform account. That is to say, after the merchant side completes the distribution of the resources, it will notify the target platform in the form of an event to distribute the same resources to the user platform account, so that the user can directly view the resources received this time in the public domain user platform account without having to log in to the target store to view, realizing the public domain disclosure of private domain resources and improving the resource utilization rate.
[0151] Among them, the target platform is the third-party platform where the target store is located or the third-party payment platform with payment function associated with the user store account. The target platform can be selected by the merchant. For example, some merchants set up store mini-programs in certain shopping, payment, or brand APPs (Application). They hope that after users receive private domain resources in their store mini-programs, they can display these private domain resources in the APP. In this case, the third-party platform where their store is located can be used as the target platform. Another example is that some merchants set up store mini-programs in an APP. Considering that users need to use the payment platform function when making payments, and users may want to see the private domain resources received in the store mini-program when calling the payment platform for payment, the merchant may match the account of the payment platform that the user has associated with, and use this payment platform as the target platform to display the private domain resources on the third-party payment platform with payment function, so as to realize the public domain display of private domain resources, avoid users forgetting the resources that have been distributed, make the distributed resources be truly used, improve the resource utilization rate, and promote the intelligent process of online services.
[0152] In the method provided by the embodiment of the present application, in response to a resource distribution request from the user side, the merchant side will determine the first resource to be distributed and the target store where the user side initiates the resource distribution request, match the user store account of the user side in the target store, distribute the first resource to be distributed to the user store account, and generate a first resource distribution event based on the first resource identifier of the first resource to be distributed and the user store account, and transmit the first resource distribution event to the target platform, so that the target platform matches the user platform account of the user side on the target platform and distributes the second resource to be distributed associated with the first resource to be distributed to the user platform account. That is, after the merchant side completes the resource distribution, it notifies the platform in the form of an event to distribute the same resources to the user platform account, ensuring that users can directly view the resources received this time in the public domain user platform account without having to log in to the private domain target store to view, realizing the public domain display of private domain resources, avoiding users forgetting the resources that have been distributed, making the distributed resources be truly used, improving the resource utilization rate, and promoting the intelligent process of online services.
[0153] The embodiment of the present application provides a resource distribution method, as Figure 2 shown, this method is applied to the target platform and includes:
[0154] 201. Receive the first resource distribution event sent by the merchant side.
[0155] Among them, the first resource distribution event is generated and distributed by the merchant side after distributing the first resource to be distributed to the user store account of the user side in the target store, based on the first resource identifier of the first resource to be distributed and the user store account.
[0156] 202. Query the second resource to be distributed that has an associated relationship with the first resource to be distributed according to the first resource identifier.
[0157] Among them, the purpose of the merchant side sending the first resource distribution event is to notify the target platform to distribute the same resources to the user. Therefore, the target platform will query the second resource to be distributed that has an associated relationship with the first resource to be distributed according to the first resource identifier included in the first resource distribution event, so as to distribute the second resource to be distributed to the user. It should be noted that the second resource to be distributed is the same resource created by the target platform as the first resource to be distributed. The second resource to be distributed is created when the first resource to be distributed is created by the merchant side, and the associated relationship is also established when the two resources are created. Therefore, when requesting resource distribution, the target platform can directly determine the second resource to be distributed according to the associated relationship.
[0158] 203. Match the user store account on the target platform with the corresponding user platform account, and distribute the second resource to be distributed to the user platform account.
[0159] Among them, since this application is to expose resources in the public domain, after determining the second resource to be distributed, the target platform needs to match the user store account on the target platform with the corresponding user platform account, and distribute the second resource to be distributed to the user platform account. For example, if the user receives an 80% discount coupon in the store mini-program of Alipay, after Alipay receives the event generated by the merchant side for this receipt, it will determine the 80% discount coupon that has an associated relationship with this 80% discount coupon in Alipay, and distribute the determined 80% discount coupon to the Alipay account logged in by this user in Alipay, so that the user can view this 80% discount coupon in the Alipay card package without having to log in to the store mini-program to view it.
[0160] In the method provided by the embodiment of this application, the target platform receives the first resource distribution event sent by the merchant side, queries the second resource to be distributed that has an associated relationship with the first resource to be distributed that has been distributed by the merchant side according to the first resource identifier included in the first resource distribution event, and matches the user store account on the target platform with the corresponding user platform account, and distributes the second resource to be distributed to the user platform account. That is, after the merchant side completes the resource distribution, it notifies the target platform in the form of an event to distribute the same resources to the user platform account, ensuring that the user can directly view the resources received this time in the user platform account in the public domain, without having to log in to the target store in the private domain to view, realizing the public domain exposure of private domain resources, avoiding the resources that have been distributed being forgotten by the user, enabling the distributed resources to be truly used, improving the resource utilization rate, and promoting the intelligent process of online services.
[0161] Furthermore, considering that only merchants operating private domain stores actually have the need to expose private domain resources in the public domain, it is necessary to pre-verify the merchants based on the merchant side to determine whether the merchants meet the conditions for setting platform resources on the target platform. As a refinement and extension of the specific implementation manner of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, the embodiment of the present application provides a method for verifying merchants, as Figure 3 shown. This method involves the interaction between the merchant side and the target platform, including:
[0162] 301. In response to a resource creation request, the merchant side transmits the resource creation request to the target platform based on the merchant identifier.
[0163] In the embodiment of the present application, the merchant side can provide an entry for resource creation to the merchant. When it detects that the entry is triggered, it determines that a resource creation request is received. In response to the resource creation request, the merchant side transmits the resource creation request to the target platform based on the merchant identifier, so that the target platform uses the merchant identifier to verify whether the merchant side meets the conditions for setting platform resources on the target platform. Among them, the target platform is the third-party platform where the target store is located or the third-party payment platform with payment functions associated with the user store account. The target platform can be selected by the merchant itself. For example, some merchants set up store mini-programs in certain shopping, payment, or brand APPs (Applications). They hope that after users receive private domain resources in their store mini-programs, they can expose the private domain resources in the APP. Then, they can use the third-party platform where their stores are located as the target platform. Another example is that some merchants set up store mini-programs in the APP. Considering that users need to use the functions of the payment platform when making payments, and users may want to see the private domain resources received in the store mini-program when calling the payment platform for payment. Therefore, the merchant may match which payment platform account the user has associated with and use the payment platform as the target platform to expose the private domain resources on the third-party payment platform with payment functions. The merchant identifier can be the merchant account used by the merchant to initiate the resource creation request, the merchant ID (Identity document), etc. In the actual application process, the merchant side can start transmitting the resource creation request to the target platform based on the merchant identifier after detecting that the merchant has successfully logged in to the merchant side, so that the target platform can perform the verification, that is, perform the verification of whether the conditions are met in advance to avoid excessive waiting time for the merchant when the merchant requests to create resources. The present application does not specifically limit the timing for verifying whether the merchant side meets the conditions for setting platform resources on the target platform.
[0164] 302. The target platform receives the resource creation request transmitted by the merchant side, obtains the merchant identifier marked in the resource creation request, determines the target brand bound to the merchant identifier, and obtains the brand white list. If the brand name of the target brand is included in the brand white list, the target platform executes step 303 below. If the brand name of the target brand is not included in the brand white list, the target platform executes steps 305 to 306 below.
[0165] In the embodiment of the present application, the target platform receives the resource creation request transmitted by the merchant side, obtains the merchant identifier marked in the resource creation request, and starts to verify whether the merchant side meets the conditions for setting platform resources on the target platform using the merchant identifier. Among them, during the verification, it is first necessary to verify the brand to which the merchant belongs, and determine whether the merchants under this brand are allowed to create resources on the target platform, that is, determine the target brand bound to the merchant identifier, obtain the brand white list, and query whether the target brand bound to the merchant identifier is included in the brand white list.
[0166] Correspondingly, if the brand name of the target brand is included in the brand white list, it means that the merchants under this target brand are allowed to create corresponding resources on the target platform. Therefore, the target platform executes step 303 below. On the contrary, if the brand name of the target brand is not included in the brand white list, it means that the merchants under this target brand are not allowed to create corresponding resources on the target platform. Therefore, the target platform executes steps 305 to 306 below.
[0167] 303. If the brand name of the target brand is included in the brand white list, the target platform queries the store status corresponding to the merchant identifier on the target platform. When the queried store status indicates that there is a store program for the merchant identifier on the target platform, the target platform executes step 304 below. When the queried store status indicates that there is no store program for the merchant identifier on the target platform, the target platform executes steps 305 to 306 below.
[0168] In the embodiment of the present application, if the brand name of the target brand is included in the brand white list, it means that the merchants under this target brand are allowed to create corresponding resources on the target platform. And since only merchants operating private domain stores have the need for private domain resources to be disclosed in the public domain, the target platform will continue to verify the merchant, query the store status corresponding to the merchant identifier on the target platform, and determine whether the merchant operates a private domain store.
[0169] Accordingly, when the queried store status indicates that there is a store program for the merchant identifier on the target platform, it means that there is a corresponding store program (i.e., store mini-program) for the merchant identifier on the target platform. The merchant operates a private domain store, and it can be considered that the merchant has the need to expose private domain resources in the public domain. Therefore, step 304 below is executed to further verify the store program. On the contrary, when the queried store status indicates that there is no store program for the merchant identifier on the target platform, it means that in fact the merchant does not operate a private domain store and will not have the need to expose private domain resources in the public domain, and does not meet the conditions for creating corresponding resources on the target platform. Therefore, steps 305 to 306 below are executed.
[0170] 304. When the queried store status indicates that there is a store program for the merchant identifier on the target platform, the target platform queries the program level of the store program, and when it is determined that the program level reaches the level threshold, it is determined that the merchant side meets the conditions for setting platform resources on the target platform.
[0171] In the embodiment of the present application, when the queried store status indicates that there is a store program for the merchant identifier on the target platform, it means that there is a corresponding store program (i.e., store mini-program) for the merchant identifier on the target platform. The merchant operates a private domain store, and it can be considered that the merchant has the need to expose private domain resources in the public domain. Therefore, the target platform will continue to query the program level of the store program, and when it is determined that the program level reaches the level threshold, it is determined that the merchant side meets the conditions for setting platform resources on the target platform.
[0172] It should be noted that the level threshold can be set by platform staff, and different level thresholds can be set for different types of stores. For example, for directly connected stores (i.e., stores directly connected to the target platform and using all functions of the target platform), the level threshold M1 can be set. In this way, as long as the store is a directly connected store, it meets the conditions for setting platform resources on the target platform; while for indirectly connected stores (i.e., stores connected to the target platform based on the merchant platform and only using some functions of the target platform), the level threshold M4 can be set. In this way, only when the level of the store reaches M4 does it meet the conditions for setting platform resources on the target platform, and if it does not reach M4, it does not meet the conditions. The specific setting content of the level threshold in the present application is not limited.
[0173] 305. The target platform determines that the merchant side does not meet the conditions for setting platform resources on the target platform, generates a verification failure feedback, and transmits the verification failure feedback to the merchant side.
[0174] In the embodiments of the present application, there are three situations that may cause the merchant side not to meet the conditions for setting platform resources on the target platform: First, the brand name of the target brand is not included in the brand whitelist; second, the queried store status indicates that there is no store program for the merchant identifier on the target platform; third, the determined program level does not reach the level threshold. When the target platform determines that the merchant side does not meet the conditions for setting platform resources on the target platform, it will generate a verification failure feedback and transmit the verification failure feedback to the merchant side, thereby informing the merchant on the merchant side that they cannot set the corresponding platform resources on the target platform.
[0175] 306. The merchant side receives the verification failure feedback from the target platform.
[0176] In the embodiments of the present application, the merchant side will receive the verification failure feedback sent by the target platform. Since it is described in step 301 that the merchant side can request to verify whether the conditions are met when the merchant requests to create resources or log in, therefore, if the merchant side requests the verification when the merchant requests to create resources, then after receiving the verification failure feedback, the merchant side can directly set the resource collection entry in the target store, enabling users to collect the private domain resources set by the merchant based on this collection entry, and no longer execute the subsequent process of the private domain resources being exposed in the public domain. If the merchant side requests the verification when the merchant logs in, then the merchant side can push the verification failure feedback to the merchant in the form of an email, in-app notification, or short message, so that the merchant can be aware in advance of the situation that they do not meet the conditions for setting platform resources on the target platform, facilitating the merchant to rectify and improve the running stores subsequently and enabling the stores to meet the conditions as soon as possible.
[0177] The method provided in the embodiments of the present application, in response to a resource creation request, the merchant side transmits the resource creation request to the target platform based on the merchant identifier. The target platform receives the resource creation request transmitted by the merchant side, obtains the merchant identifier marked in the resource creation request, determines the target brand bound to the merchant identifier, obtains the brand whitelist, and when the brand name of the target brand is included in the brand whitelist, the target platform queries the store status corresponding to the merchant identifier on the target platform. When the queried store status indicates that there is a store program for the merchant identifier on the target platform, the target platform queries the program level of the store program, and when it is determined that the program level reaches the level threshold, it is determined that the merchant side meets the conditions for setting platform resources on the target platform, realizing the verification of whether the merchant can set platform resources on the target platform. So that after the merchant side completes the resource distribution subsequently, it notifies the platform in the form of an event to distribute the same resources to the user platform account, ensuring that users can directly view the resources received this time in the public domain user platform account without having to log in to the target store in the private domain to view, realizing the public domain exposure of private domain resources, avoiding the resources that have been distributed being forgotten by users, enabling the distributed resources to be truly used, improving the resource utilization rate, and promoting the intelligent process of online services.
[0178] Further, after the verification of the merchant is completed, since the merchant needs to create resources based on the merchant side in advance, notify the target platform to create the same resources and associate the two resources, so as to realize the resource distribution synchronization in this application. Therefore, as a refinement and extension of the specific implementation manner of the above embodiment, in order to completely illustrate the specific implementation process of this embodiment, the embodiment of this application provides a resource creation method, as Figure 4 shown, this method involves the interaction between the merchant side and the target platform, including:
[0179] 401. When it is determined that the merchant side meets the conditions for setting platform resources on the target platform, the target platform generates a verification success feedback and transmits the verification success feedback to the merchant side.
[0180] In the embodiment of this application, since the verification of whether the conditions are met is only carried out when the merchant requests to create resources, when it is determined that the merchant side meets the conditions for setting platform resources on the target platform, the target platform generates a verification success feedback and transmits the verification success feedback to the merchant side, so that after the merchant side receives the verification success feedback, it provides the parameters required to create platform resources to the target platform.
[0181] 402. The merchant side receives the verification success feedback from the target platform, obtains the store resources created based on the resource creation request, sets the collection entrance of the store resources in the target store, extracts the resource parameters of the store resources, and transmits the resource parameters to the target platform.
[0182] In the embodiment of this application, the merchant side receives the verification success feedback from the target platform and starts to create resources. Among them, the resources requested by the merchant side to create first need to be directly collectible in the target store. Therefore, the merchant side obtains the store resources created based on the resource creation request and sets the collection entrance of the store resources in the target store. Then, since the resources collected by the user need to be displayed on the target platform after the user successfully collects the resources in the store, resources with the same parameters also need to be created on the target platform. Therefore, after the creation of the collection entrance is completed, the merchant side will extract the resource parameters of the store resources and transmit the resource parameters to the target platform, so that the target platform verifies the resource parameters, and after the parameter verification is successful, creates the same platform resources according to the resource parameters on it, and associates the store resources and the platform resources.
[0183] Among them, the resource parameters are the basic information of the store resources, which is used to assist the target platform in constructing platform resources identical to the store resources. For example, name, amount, applicable population, effective time point, expiration time point, etc. can all be used as resource parameters.
[0184] 403. The target platform receives the resource parameters transmitted by the merchant side and verifies the resource parameters.
[0185] In the embodiment of the present application, after the target platform receives the resource parameters transmitted by the merchant side, it is necessary to perform parameter verification on the resource parameters to determine whether there are problems such as garbled characters, abnormal amounts, abnormal times, etc. in the resource parameters, and to determine whether the relative time for the merchant to request the creation of resources meets the requirements. The specific process of parameter verification is as follows:
[0186] First, determine the historical time point when the merchant side sent the resource creation request last time, count the time interval between the current time point and the historical time point, and identify whether the resource parameters include abnormal characters. Then, when it is determined that the time interval is greater than the interval threshold and the resource parameters do not include abnormal characters, it is determined that the verification of the resource parameters is successful; on the contrary, when it is determined that the time interval is less than or equal to the interval threshold or the resource parameters include abnormal characters, it is determined that the verification of the resource parameters fails.
[0187] It should be noted that verifying whether the time interval is greater than the interval threshold is a new verification process in the embodiment of the present application. In order to prevent merchants from frequently creating the same resources, in the actual application process, this verification process can also be omitted, and directly verify whether the resource parameters include abnormal characters, so as to improve the verification efficiency of the resource parameters; or it is also possible not to perform parameter verification and directly start creating platform resources. The present application does not specifically limit the verification content of the resource parameters and whether to perform parameter verification.
[0188] 404. After the parameter verification is successful, the target platform determines the store program corresponding to the merchant side on the target platform, obtains the program identifier of the store program, obtains the resource creation template, assembles the characters included in the resource parameters according to the resource creation template, creates the platform resource, sets the platform resource identifier for the platform resource, marks the platform resource with the program identifier and the platform resource identifier, and stores the marked platform resource to complete the creation of the platform resource.
[0189] In the embodiment of the present application, after the parameter verification is successful, the target platform starts to create the platform resource. Since the created platform resource needs to be associated with the store, the target platform will determine the store program corresponding to the merchant side on the target platform and obtain the program identifier of the store program. Then, since the resources in the target platform have a unified standard and form and are specified based on the template, the target platform obtains the resource creation template, assembles the characters included in the resource parameters according to the resource creation template, creates the platform resource, and sets the platform resource identifier for the platform resource. Among them, the platform resource identifier can be a resource number, a resource ID, a resource name, etc. After determining the platform resource identifier, the target platform marks the platform resource with the program identifier and the platform resource identifier, and stores the marked platform resource to complete the creation of the platform resource.
[0190] It should be noted that in the actual application process, in order to ensure the consistency of the created platform resources, before creating the platform resources, the target platform can perform an idempotent query based on the resource creation request, and when it is determined that no duplicate call has occurred, then create the platform resources. In addition, after performing the idempotent query, the idempotent identifier (i.e., the idempotent ID) of the platform resources can be retained and used for the subsequent locking process. This application does not specifically limit whether to perform the idempotent query.
[0191] 405. The target platform queries the store activities to which the store resources belong in the store program corresponding to the merchant side on the target platform, obtains the activity identifier of the store activity, determines the idempotent identifier of the platform resources, combines the activity identifier and the idempotent identifier to obtain a resource lock, and uses the resource lock to perform a locking process on the platform resources.
[0192] In the embodiment of the present application, after the creation of the platform resources is completed, in fact, the platform resources on the target platform side need to be associated with the store resources on the target store side, so that when the subsequent user retrieves the store resources on the store side, the target platform side can also find the same resources to be issued to the user's account on the target platform side. Therefore, in order to accurately associate the store resources with the platform resources, the target platform needs to obtain the activity identifier of the store activity, determine the idempotent identifier of the platform resources, combine the activity identifier and the idempotent identifier to obtain a resource lock, and use the resource lock to perform a locking process on the platform resources, so as to subsequently establish an association relationship between the platform resources already bound with the activity identifier and the store resources.
[0193] It should be noted that in the above process, when the acquisition of the idempotent identifier or the activity identifier fails, an exception reminder is generated and displayed, and an exception is thrown to the staff, so as to promptly perform exception troubleshooting.
[0194] 406. The target platform obtains the platform resource identifier of the platform resources, and queries whether the resource association table and the resource expiration table include the platform resource identifier. If the resource association table and the resource expiration table do not include the platform resource identifier, the target platform performs the following steps 407 to 408; if the resource association table and the resource expiration table include the platform resource identifier, the target platform performs the following step 409.
[0195] In the embodiment of the present application, considering that the network signal fluctuates, in order to avoid repeatedly establishing the association relationship of the platform resources and ensure the uniqueness and consistency of the data, the target platform will first obtain the platform resource identifier of the platform resources, and query whether the resource association table and the resource expiration table include the platform resource identifier, so as to determine whether the platform resources have been associated before, and avoid repeatedly establishing the association relationship.
[0196] Accordingly, if the platform resource identifier is not included in the resource association table and the resource expiration table, it means that there is no content related to the platform resource identifier in the resource association table and the resource expiration table. Currently, it is the first time to create an association relationship for the platform resource, and the creation process can be normally executed. Therefore, steps 407 to 408 below are executed; if the platform resource identifier is included in the resource association table and the resource expiration table, it means that an association relationship has been created for the platform resource identifier, and creating an association relationship again can only be a useless duplicate creation. Therefore, the target platform executes step 409 below.
[0197] 407. If the platform resource identifier is not included in the resource association table and the resource expiration table, the target platform obtains the store resource identifier of the store resource, associates the store resource identifier with the platform resource identifier after lock processing, and stores the associated store resource identifier and platform resource identifier in the resource association table.
[0198] In the embodiment of the present application, if the platform resource identifier is not included in the resource association table and the resource expiration table, it means that there is no content related to the platform resource identifier in the resource association table and the resource expiration table. Currently, it is the first time to create an association relationship for the platform resource, and the creation process can be normally executed. Therefore, the target platform obtains the store resource identifier of the store resource, associates the store resource identifier with the platform resource identifier after lock processing, and stores the associated store resource identifier and platform resource identifier in the resource association table, records the association relationship between the store resource and the platform resource in the resource association table, and completes the creation of the association relationship.
[0199] 408. The target platform extracts the resource effective time point and the resource expiration time point from the resource parameters, uses the time interval between the resource effective time point and the resource expiration time point as the resource effective duration, establishes an association relationship between the platform resource identifier, the resource expiration time point, and the resource effective duration, and stores the associated platform resource identifier, resource expiration time point, and resource effective duration in the resource expiration table.
[0200] In the embodiments of the present application, whether it is platform resources or store resources, in fact, both correspond to a life cycle. The life cycle is the duration between the resource effective time point and the resource expiration time point. When the time point reaches the resource expiration time point, the resource becomes invalid, and there is no need to record it anymore. It is necessary to mark in time that the resource has expired. Therefore, after the resource association table is updated in the embodiments of the present application, the target platform extracts the resource effective time point and the resource expiration time point from the resource parameters, takes the time interval between the resource effective time point and the resource expiration time point as the resource effective duration, establishes the association relationship between the platform resource identifier, the resource expiration time point, and the resource effective duration, and stores the associated platform resource identifier, resource expiration time point, and resource effective duration in the resource term table, records the effective duration of the platform resources in the resource term table, so as to perceive the expiration of the resources in time.
[0201] 409. If the platform resource identifier is included in the resource association table and the resource term table, the target platform determines that the association of the platform resources and the store resources is completed, and generates and displays a successful association reminder.
[0202] In the embodiments of the present application, if the platform resource identifier is included in the resource association table and the resource term table, it means that the association relationship has been created for the platform resource identifier. Creating an association relationship again can only be a useless duplicate creation. Therefore, the target platform can directly determine that the association of the platform resources and the store resources has been completed, and generates and displays a successful association reminder.
[0203] In the method provided by the embodiments of the present application, when a merchant creates a resource in a store, the target platform will synchronously create the same platform resource on it, so that after the merchant side completes the distribution of the resource, the platform is notified in the form of an event to distribute the same resource to the user platform account, ensuring that the user can directly view the resource received this time in the public domain user platform account, without having to log in to the private domain target store to view, realizing the public domain disclosure of private domain resources, avoiding the resources that have been distributed being forgotten by the user, making the distributed resources truly used, improving the resource utilization rate, and promoting the intelligent process of online services.
[0204] Further, after the creation and association of the resources are completed, the merchant side and the target platform can start to execute the synchronous distribution of the resources. As a refinement and extension of the specific implementation manner of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, the embodiments of the present application provide another resource distribution method, as Figure 5 shown. This method involves the interaction between the merchant side and the target platform, including:
[0205] 501. In response to the resource distribution request of the user side, the merchant side determines the first resource to be distributed and the target store, matches the user store account of the user side in the target store, and distributes the first resource to the user store account.
[0206] In the embodiment of the present application, the store resources created by the merchant side are actually for users to pick up. Therefore, when the user triggers the resource collection entrance in the target store, the merchant side will receive the resource distribution request from the user side. In response to the resource distribution request from the user side, the merchant side will determine the first resource to be distributed and the target store where the user side is located when initiating the resource distribution request, match the user store account of the user side in the target store, and distribute the first resource to be distributed to the user store account. In other words, the merchant side needs to determine which store the user picks up which resource, and distribute the resource to the user's account logged in at the target store in a timely manner.
[0207] 502. The merchant generates a first resource issuance event based on the first resource identifier of the first resource to be issued and the user store account, and transmits the first resource issuance event to the target platform.
[0208] In an embodiment of the present application, after the merchant side completes the issuance of resources, it is necessary to notify the target platform to perform synchronous issuance. Therefore, the merchant side generates a first resource issuance event based on the first resource identifier of the first resource to be issued and the user store account, transmits the first resource issuance event to the target platform, and uses the first resource identifier and the user store account to inform the target platform which resource has been issued to which user, so that the target platform can issue the same resource to the same user on the platform side.
[0209] 503. The target platform receives the first resource issuance event sent by the merchant end, performs an idempotent query based on the first resource identifier, determines the idempotent identifier of the first resource to be issued, obtains the activity identifier bound to the first resource identifier, combines the idempotent identifier and the activity identifier, and obtains a resource lock.
[0210] In the embodiment of the present application, the target platform receives the first resource release event sent by the merchant end, performs an idempotent query based on the first resource identifier, and determines the idempotent identifier of the first resource to be released. Since the platform identifier in the resource association table described in the above step 407 is locked, the target platform will obtain the activity identifier bound to the first resource identifier, combine the idempotent identifier and the activity identifier, and obtain a resource lock, so that the resource lock can be used to release the resource later.
[0211] 504. The target platform obtains a resource association table, searches the resource association table for a platform resource identifier that is associated with the first resource identifier as a second resource identifier, generates a second resource issuance event based on the second resource identifier and the user platform account, and queries whether there is an event including a resource identifier and a user platform account that are consistent with the second resource issuance event.
[0212] In an embodiment of the present application, after obtaining the resource lock, the target platform obtains the resource association table, and searches the resource association table for the platform resource identifier that has an association relationship with the first resource identifier as the second resource identifier. In order to record the resource release event this time and establish the same association relationship between events, the target platform generates a second resource release event based on the second resource identifier and the user platform account. Subsequently, also taking into account the fluctuation of the network signal, in order to ensure the uniqueness of the generated second resource release event, the target platform queries whether there is an event including the resource identifier and the user platform account that are consistent with the second resource release event to avoid event duplication.
[0213] 505. When it is determined that there is no event consistent with the second resource issuance event, the target platform associates and stores the first resource issuance event with the second resource issuance event, uses a resource lock to release the second resource identifier, and uses the platform resource indicated by the released second resource identifier as the second resource to be issued.
[0214] In an embodiment of the present application, when it is determined that there is no event consistent with the second resource issuance event, it means that the second resource issuance event is unique and there is no repeated event generation. Therefore, the target platform stores the first resource issuance event and the second resource issuance event in association with each other, uses a resource lock to release the second resource identifier, and uses the platform resource indicated by the released second resource identifier as the second resource to be issued.
[0215] It should be noted that if it is determined that there is an event consistent with the second resource release event, it means that the second resource release event is created repeatedly. An event has been created for this resource release and no event needs to be created again. Therefore, the current process can be ended.
[0216] 506. The target platform matches the user store account with the user platform account corresponding to the target platform, and distributes the second resource to be distributed to the user platform account.
[0217] In an embodiment of the present application, after determining the second resource to be issued, the target platform matches the user platform account corresponding to the user store account on the target platform, and issues the second resource to be issued to the user platform account. At this point, the store side and the platform side have achieved simultaneous issuance of resources, and also achieved the exposure of the store's private domain resources to the platform's public domain. Users can directly view the private domain resources received in the store this time in the wallet, card wallet and other functions provided by the target platform, without having to log in to the store to view them.
[0218] The method provided in the embodiment of the present application, in response to the resource issuance request of the user end, the merchant end will determine the first resource to be issued and the target store where the user end is located when initiating the resource issuance request, match the user store account of the user end in the target store, issue the first resource to be issued to the user store account, and generate a first resource issuance event based on the first resource identifier of the first resource to be issued and the user store account, transmit the first resource issuance event to the target platform, so that the target platform matches the user platform account of the user end in the target platform, and issue the second resource to be issued associated with the first resource to be issued to the user platform account, that is, after the merchant end completes the issuance of resources, it notifies the platform in the form of an event to issue the same resource to the user platform account, ensures that the user can directly view the resources received this time in the public domain user platform account, and no longer needs to log in to the private domain target store to view, so as to realize the public domain transmission of private domain resources, avoid the issued resources being forgotten by the user, make the issued resources truly used, improve the resource utilization rate, and promote the intelligent process of online services.
[0219] Furthermore, after resources are issued to users, users may request to cancel the issued resources in subsequent operations. Therefore, as a refinement and extension of the specific implementation methods of the above-mentioned embodiments, in order to fully illustrate the specific implementation process of this embodiment, the embodiment of the present application provides a resource cancellation method, such as Figure 6 As shown, the method involves the interaction between the merchant end and the target platform, including:
[0220] 601. In response to a cancellation instruction for a first resource to be issued, the merchant end updates the resource status of the first resource to be issued under the user store account using a store cancellation flag.
[0221] In the embodiment of the present application, the resources received by the user in the previous process can actually be used in the subsequent payment process. During the payment process, the user can request to verify the resources. For example, if the resource received is a 20% discount coupon, the user can request to verify the coupon during the subsequent payment, thereby enjoying the 20% discount. Taking the user's request to verify the first resource to be issued as an example, when the user requests to verify the first resource to be issued, the merchant side will receive a verification instruction for the first resource to be issued. In response to the verification instruction, the merchant side will update the resource status of the first resource to be issued under the user's store account with the store's verified mark, that is, the verification of the first resource to be issued is realized on the store side.
[0222] 602. The merchant uses the store's written-off mark to mark the first resource identifier, and transmits the marked first resource identifier to the target platform.
[0223] In the embodiment of the present application, since the resources on the store side and the platform side are synchronized, after the resources are verified and written off on the store side, it is necessary to notify the platform side of the target platform to also verify and write off the resources to ensure data consistency. Therefore, the merchant side will mark the first resource identifier with the store-verified identifier, and transmit the marked first resource identifier to the target platform, so that the target platform can verify the first resource identifier, and when the verification passes, update the resource status of the second resource to be issued with the platform-verified identifier under the user platform account.
[0224] 603. The target platform receives the first resource identifier marked with the store-verified identifier transmitted by the merchant side, determines the first resource issuance event corresponding to the first resource identifier, and queries the second resource issuance event associated with the first resource issuance event.
[0225] In the embodiment of the present application, the target platform receives the first resource identifier marked with the store-verified identifier transmitted by the merchant side. Since a corresponding resource issuance event is established when each resource is issued, when verifying and writing off the resources, not only the resources need to be verified and written off, but the issuance event also needs to be verified and written off. Therefore, the target platform will determine the first resource issuance event corresponding to the first resource identifier and query the second resource issuance event associated with the first resource issuance event to synchronously verify and write off the event.
[0226] 604. The target platform matches the verification record related to the first resource identifier in the user platform account, extracts the verification path from the verification record, reads the second resource identifier included in the second resource issuance event, marks the second resource to be issued indicated by the second resource identifier with the verification path under the user platform account, updates the resource status of the second resource to be issued with the platform-verified identifier, and updates the event status of the second resource issuance event with the platform-verified identifier.
[0227] In the embodiment of the present application, since there can be multiple programs or third-party platforms where the target is located, in order to clarify through which path the user verifies and writes off the resources, the target platform matches the verification record related to the first resource identifier in the user platform account, extracts the verification path from the verification record, reads the second resource identifier included in the second resource issuance event, marks the second resource to be issued indicated by the second resource identifier with the verification path under the user platform account, updates the resource status of the second resource to be issued with the platform-verified identifier, and updates the event status of the second resource issuance event with the platform-verified identifier to achieve the verification and write-off of the issuance event on the platform side. In the actual application process, the verification path of the user can be queried in the user's transaction record on the target platform side.
[0228] It should be noted that in the above-described resource write-off process, the merchant side first perceives the user's write-off of resources. After the resources are successfully written off on the store side, the target platform is notified to perform the write-off on the platform side. However, in the actual application process, since the resources have been disclosed on the target platform side, therefore, when the user makes a payment based on the target platform, the user may directly request to write off the resources disclosed on the target platform side, that is, the target platform first perceives the user's write-off of resources. In this case, the target platform needs to notify the store side to perform synchronous resource write-off. The specific process is as follows:
[0229] In response to the payment request from the user side, the target platform matches the target platform account from which the user side sends the payment request, and pushes the available resources under the target platform account. That is, when the target platform detects that the user wants to make a payment, it displays the resources that can be written off currently to the user for the user to select which resources to write off this time. Then, when receiving the payment success response from the user side, the target platform determines the written-off available resources indicated in the payment success response of the user side, obtains the target resource identifier of the written-off available resources, under the target platform account, marks the written-off available resources with the corresponding path identifier of the target platform, and updates the resource status of the written-off available resources with the platform written-off identifier. Subsequently, the target platform queries the third resource distribution event generated by the target platform that includes the target resource identifier, and updates the event status of the third resource distribution event with the platform written-off identifier, that is, first writes off the distribution event generated by the target platform on the platform side. After completing the event write-off on the platform side, the target platform determines the fourth resource distribution event that has an associated relationship with the third resource distribution event. The fourth resource distribution event is generated by the merchant side and transmitted to the target platform, and extracts the resource identifier included in the fourth resource distribution event as the resource identifier to be written off, and transmits the resource identifier to be written off to the merchant side, so that the merchant side updates the resource status of the resources indicated by the resource identifier to be written off under the user store account. That is, the target platform extracts the resource identifier of the store resources from the distribution event generated by the store and notifies the store, so that the store side receives the resource identifier to be written off sent by the target platform, determines the resources indicated by the resource identifier to be written off as the resources to be written off under the user store account, and under the user store account, updates the resource status of the resources to be written off with the store written-off identifier to complete the synchronous write-off of the resources.
[0230] In the method provided by the embodiment of the present application, after the merchant side completes the distribution of resources, it notifies the platform in the form of an event to distribute the same resources to the user platform account, ensuring that the user can directly view the resources received this time in the public domain user platform account, without having to log in to the target store in the private domain to view, realizing the public domain disclosure of private domain resources, avoiding the resources that have been distributed being forgotten by the user, and when the resources are written off, realizing the synchronous resource write-off on the store side and the platform side, providing the user with the function of writing off private domain resources on the platform, enabling the distributed resources to be truly used, improving the resource utilization rate, and promoting the intelligent process of online services.
[0231] Further, after the resources are distributed to the user, since each resource corresponds to an expiration time point, if the user has not written off the resources before reaching the expiration time point, the resources need to be invalidated. Therefore, as a refinement and extension of the specific implementation manner of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, the embodiment of the present application provides a method for marking resource expiration, as Figure 7 shown. This method involves the interaction between the merchant side and the target platform, including:
[0232] 701. The merchant side obtains the target resource parameters of the first resource to be distributed, extracts the expiration time point from the target resource parameters, and continuously detects whether the current time point reaches the expiration time point.
[0233] In the embodiment of the present application, taking the first resource to be distributed as an example, the merchant side will obtain the target resource parameters of the first resource to be distributed, extract the expiration time point from the target resource parameters, and continuously detect whether the current time point reaches the expiration time point. In the actual application process, for each resource created by the merchant, the merchant side will continuously detect whether the resource has expired, so as to timely remind the user and avoid resource waste.
[0234] 702. When it is detected that the current time point reaches the expiration time point, the merchant side updates the resource status of the first resource to be distributed with the store expired flag under the user store account, marks the first resource identifier with the store expired flag, and transmits the marked first resource identifier to the target platform.
[0235] In the embodiment of the present application, when it is detected that the current time point reaches the expiration time point, it indicates that the first resource to be distributed has expired and can no longer be used continuously. It is necessary to perform an expiration process on the first resource to be distributed. Therefore, on the merchant side under the user store account, the resource status of the first resource to be distributed is updated with the store expired flag. Since the resources on the store side and the platform side are synchronized, after the store side performs the resource expiration process, it is necessary to notify the platform side to also perform the resource expiration process. Therefore, the merchant side marks the first resource identifier with the store expired flag and transmits the marked first resource identifier to the target platform, so that the target platform updates the resource status of the second resource to be distributed with the platform expired flag under the user platform account.
[0236] 703. The target platform receives the first resource identifier marked with the store expired flag transmitted by the merchant side, determines the first resource distribution event corresponding to the first resource identifier, and queries the second resource distribution event associated with the first resource distribution event.
[0237] In the embodiment of the present application, the target platform receives the first resource identifier marked with the store expired flag transmitted by the merchant side. Since the distribution events of the resources in the target platform are also associated, when the resources expire, it is also necessary to ensure that the distribution events corresponding to the resources also expire. Therefore, the target platform determines the first resource distribution event corresponding to the first resource identifier and queries the second resource distribution event associated with the first resource distribution event for subsequent expiration processing of the events.
[0238] 704. The target platform reads the second resource identifier included in the second resource distribution event, and under the user platform account, updates the resource status of the second resource to be distributed with the platform expired flag. The event status of the second resource distribution event is updated with the platform expired flag.
[0239] In the embodiment of the present application, the target platform reads the second resource identifier included in the second resource distribution event, and under the user platform account, updates the resource status of the second resource to be distributed with the platform expired flag. The event status of the second resource distribution event is updated with the platform expired flag to complete the synchronous expiration processing of the resources and the distribution events.
[0240] In this way, through the processes described in the above multiple embodiments, the resources on the store side are synchronized to the platform side, and the entire life cycle of the resources from creation to distribution to verification to expiration is completed, improving the user experience.
[0241] In the method provided by the embodiment of the present application, after the merchant side completes the distribution of resources, it notifies the platform in the form of an event to distribute the same resources to the user's platform account, ensuring that the user can directly view the resources received this time in the public domain user platform account, without having to log in to the target store in the private domain to view, realizing the public domain disclosure of private domain resources, avoiding the resources that have been distributed being forgotten by the user, and when the resources expire, realizing the synchronous expiration of resources on the store side and the platform side, promoting the intelligent process of online services.
[0242] Further, as Figure 1 a specific implementation of the method, the embodiment of the present application provides a resource distribution device, as Figure 8 shown, the device includes: a determination module 801, a distribution module 802, and a transmission module 803.
[0243] The determination module 801 is configured to determine a first resource to be distributed and a target store in response to a resource distribution request from the user side, and the target store is the store where the user side initiates the resource distribution request;
[0244] The distribution module 802 is configured to match the user store account of the user side in the target store and distribute the first resource to be distributed to the user store account;
[0245] The transmission module 803 is configured to generate a first resource distribution event based on the first resource identifier of the first resource to be distributed and the user store account, and transmit the first resource distribution event to the target platform, so that the target platform matches the user platform account of the user side in the target platform and distributes a second resource to be distributed associated with the first resource to be distributed to the user platform account, and the target platform is the third-party platform where the target store is located or the third-party payment platform with payment function associated with the user store account.
[0246] In a specific application scenario, the transmission module 803 is further configured to, in response to a resource creation request, transmit the resource creation request to the target platform based on the merchant identifier, so that the target platform uses the merchant identifier to verify whether the merchant side meets the conditions for setting platform resources in the target platform; when receiving a successful verification feedback from the target platform, obtain the store resources created based on the resource creation request, set a receiving entry for the store resources in the target store, extract the resource parameters of the store resources, and transmit the resource parameters to the target platform, so that the target platform performs parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources and associate the store resources with the platform resources; when receiving a failed verification feedback from the target platform, set a receiving entry for the store resources in the target store.
[0247] In a specific application scenario, the device further includes:
[0248] A first update module, configured to respond to a verification instruction for the first resource to be distributed, and update the resource status of the first resource to be distributed with a store-verified identifier under the user store account;
[0249] The transmission module 803 is further configured to label the first resource identifier with the store-verified identifier, and transmit the labeled first resource identifier to the target platform, so that the target platform verifies the first resource identifier, and when the verification is passed, update the resource status of the second resource to be distributed with a platform-verified identifier under the user platform account.
[0250] In a specific application scenario, the determination module 801 is further configured to, when receiving a resource identifier to be verified sent by the target platform, determine the resource indicated by the resource identifier to be verified as the resource to be verified under the user store account; and update the resource status of the resource to be verified with a store-verified identifier under the user store account.
[0251] In a specific application scenario, the device further includes:
[0252] An extraction module, configured to obtain the target resource parameters of the first resource to be distributed, extract the expiration time point from the target resource parameters, and continuously detect whether the current time point reaches the expiration time point;
[0253] A second update module, configured to, when detecting that the current time point reaches the expiration time point, update the resource status of the first resource to be distributed with a store-expired identifier under the user store account;
[0254] The transmission module 804 is further configured to label the first resource identifier with the store-expired identifier, and transmit the labeled first resource identifier to the target platform, so that the target platform updates the resource status of the second resource to be distributed with a platform-expired identifier under the user platform account.
[0255] The device provided in the embodiment of the present application, in response to the resource issuance request of the user end, the merchant end will determine the first resource to be issued and the target store where the user end is located when initiating the resource issuance request, match the user store account of the user end in the target store, issue the first resource to be issued to the user store account, and generate a first resource issuance event based on the first resource identifier of the first resource to be issued and the user store account, transmit the first resource issuance event to the target platform, so that the target platform matches the user platform account of the user end in the target platform, and issues the second resource to be issued associated with the first resource to be issued to the user platform account, that is, after the merchant end completes the issuance of resources, it notifies the target platform in the form of an event to issue the same resource to the user platform account, ensures that the user can directly view the resources received this time in the public domain user platform account, and no longer needs to log in to the private domain target store to view, thereby realizing the public domain exposure of private domain resources, avoiding the issued resources being forgotten by users, making the issued resources truly used, improving resource utilization, and promoting the intelligent process of online services.
[0256] Further, as Figure 2 In a specific implementation of the method, the present application provides a resource distribution device, such as Figure 9 As shown, the device is applied to a target platform, and includes: a receiving module 901 , a query module 902 and a issuing module 903 .
[0257] The receiving module 901 is used to receive a first resource issuance event sent by the merchant end, where the first resource issuance event is generated after the merchant end issues a first resource to be issued to a user store account of the user end at a target store, based on a first resource identifier of the first resource to be issued and the user store account;
[0258] The query module 902 is used to query the second resource to be issued that is associated with the first resource to be issued according to the first resource identifier;
[0259] The issuing module 903 is used to match the user platform account corresponding to the user store account on the target platform, and issue the second resource to be issued to the user platform account.
[0260] In a specific application scenario, the device also includes:
[0261] An acquisition module, configured to receive a resource creation request transmitted by the merchant end, acquire a merchant identifier marked in the resource creation request, and use the merchant identifier to verify whether the merchant end meets the conditions for setting platform resources on the target platform;
[0262] A transmission module, which is used to generate a verification success feedback when it is determined that the merchant side meets the conditions for setting platform resources on the target platform, transmit the verification success feedback to the merchant side, receive the resource parameters transmitted by the merchant side, perform parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources and associate the platform resources with the store resources, where the resource parameters are transmitted by the merchant side after receiving the verification success feedback;
[0263] The transmission module is further used to generate a verification failure feedback when it is determined that the merchant side does not meet the conditions for setting platform resources on the target platform, and transmit the verification failure feedback to the merchant side.
[0264] In a specific application scenario, the acquisition module is used to determine the target brand bound by the merchant identifier and obtain the brand white list; if the brand name of the target brand is included in the brand white list, query the store status corresponding to the merchant identifier on the target platform; when the queried store status indicates that there is a store program for the merchant identifier on the target platform, query the program level of the store program, and when it is determined that the program level reaches the level threshold, determine that the merchant side meets the conditions for setting platform resources on the target platform.
[0265] In a specific application scenario, the acquisition module is further used to determine that the merchant side does not meet the conditions for setting platform resources on the target platform if the brand name of the target brand is not included in the brand white list; or, when the queried store status indicates that there is no store program for the merchant identifier on the target platform, determine that the merchant side does not meet the conditions for setting platform resources on the target platform; or, when it is determined that the program level does not reach the level threshold, determine that the merchant side does not meet the conditions for setting platform resources on the target platform.
[0266] In a specific application scenario, the transmission module is used to determine the historical time point when the merchant side last sent a resource creation request, calculate the time interval between the current time point and the historical time point, and identify whether the resource parameters include abnormal characters; when it is determined that the time interval is greater than the interval threshold and the resource parameters do not include abnormal characters, determine that the verification of the resource parameters is successful; when it is determined that the time interval is less than or equal to the interval threshold or the resource parameters include abnormal characters, determine that the verification of the resource parameters fails.
[0267] In a specific application scenario, the transmission module is used to determine the store program corresponding to the merchant side on the target platform, and obtain the program identifier of the store program; obtain a resource creation template, assemble the characters included in the resource parameters according to the resource creation template to create the platform resource, and set a platform resource identifier for the platform resource; mark the platform resource with the program identifier and the platform resource identifier, and store the marked platform resource to complete the creation of the platform resource.
[0268] In a specific application scenario, the transmission module is used to query the store activity to which the store resource belongs in the store program corresponding to the merchant side on the target platform, obtain the activity identifier of the store activity, and determine the idempotency identifier of the platform resource; combine the activity identifier and the idempotency identifier to obtain a resource lock, and perform a locking process on the platform resource with the resource lock; obtain the platform resource identifier of the platform resource, and query whether the resource association table and the resource expiration table include the platform resource identifier; if the resource association table and the resource expiration table do not include the platform resource identifier, obtain the store resource identifier of the store resource, associate the store resource identifier and the platform resource identifier after the locking process, and store the associated store resource identifier and the platform resource identifier to the resource association table; extract the resource effective time point and the resource expiration time point from the resource parameters, and use the time interval between the resource effective time point and the resource expiration time point as the resource effective duration; establish an association relationship between the platform resource identifier, the resource expiration time point, and the resource effective duration, and store the associated platform resource identifier, the resource expiration time point, and the resource effective duration to the resource expiration table.
[0269] In a specific application scenario, the transmission module is further used to generate and display an exception reminder when the acquisition of the idempotency identifier or the activity identifier fails; or; if the resource association table and the resource expiration table include the platform resource identifier, it is determined that the association between the platform resource and the store resource is completed, and an association success reminder is generated and displayed.
[0270] In a specific application scenario, the query module 902 is configured to perform an idempotent query based on the first resource identifier to determine the idempotent identifier of the first resource to be distributed, and obtain the activity identifier bound to the first resource identifier; combine the idempotent identifier and the activity identifier to obtain a resource lock; obtain a resource association table, and query in the resource association table for a platform resource identifier associated with the first resource identifier as the second resource identifier; generate a second resource distribution event based on the second resource identifier and the user platform account; query whether there is an event including a resource identifier and a user platform account that is consistent with the second resource distribution event; when it is determined that there is no event consistent with the second resource distribution event, store the first resource distribution event and the second resource distribution event in an associated manner; release the second resource identifier using the resource lock, and use the platform resource indicated by the released second resource identifier as the second resource to be distributed.
[0271] In a specific application scenario, the device further includes:
[0272] The receiving module 901 is further configured to, when receiving the first resource identifier marked with a store verification passed identifier transmitted from the merchant side, determine the first resource distribution event corresponding to the first resource identifier, and query the second resource distribution event associated with the first resource distribution event;
[0273] The extraction module is configured to match the verification record related to the first resource identifier in the user platform account, and extract the verification path from the verification record;
[0274] The first update module is configured to read the second resource identifier included in the second resource distribution event, and under the user platform account, mark the second resource to be distributed indicated by the second resource identifier using the verification path, and update the resource status of the second resource to be distributed using a platform verification passed identifier;
[0275] The first update module is further configured to update the event status of the second resource distribution event using the platform verification passed identifier.
[0276] In a specific application scenario, the device further includes:
[0277] The push module is configured to, in response to a payment request from the user side, match the target platform account that sends the payment request from the user side, and push the available resources under the target platform account;
[0278] The determination module is configured to, when receiving a payment success response from the user side, determine the verified available resources indicated in the payment success response from the user side, and obtain the target resource identifier of the verified available resources;
[0279] A second update module, configured to label the verified available resources with the path identifier corresponding to the target platform under the target platform account, and update the resource status of the verified available resources with a platform verified identifier;
[0280] The query module 902 is further configured to query a third resource distribution event including the target resource identifier, where the third resource distribution event is generated by the target platform;
[0281] The second update module is further configured to update the event status of the third resource distribution event with the platform verified identifier, and determine a fourth resource distribution event associated with the third resource distribution event, where the fourth resource distribution event is generated by the merchant side and transmitted to the target platform;
[0282] The second update module is further configured to extract the resource identifier included in the fourth resource distribution event as a resource identifier to be verified, and transmit the resource identifier to be verified to the merchant side, so that the merchant side updates the resource status of the resources indicated by the resource identifier to be verified under the user store account.
[0283] In a specific application scenario, the apparatus further includes:
[0284] The receiving module 901 is further configured to, when receiving the first resource identifier labeled with a store invalidation identifier transmitted by the merchant side, determine a first resource distribution event corresponding to the first resource identifier, and query a second resource distribution event associated with the first resource distribution event;
[0285] A third update module, configured to read the second resource identifier included in the second resource distribution event, and update the resource status of the second resource to be distributed with a platform invalidation identifier under the user platform account;
[0286] The third update module is further configured to update the event status of the second resource distribution event with the platform invalidation identifier.
[0287] In the device provided by the embodiment of the present application, the target platform receives a first resource distribution event sent by the merchant side. According to the first resource identifier included in the first resource distribution event, it queries a second to-be-distributed resource that has an association relationship with the first to-be-distributed resource already distributed by the merchant side, and matches the user platform account corresponding to the user store account on the target platform, and distributes the second to-be-distributed resource to the user platform account. That is, after the merchant side completes the resource distribution, it notifies the platform in the form of an event to distribute the same resources to the user platform account, ensuring that the user can directly view the resources received this time in the public domain user platform account without having to log in to the private domain target store to view, realizing the public domain disclosure of private domain resources, avoiding the resources already distributed being forgotten by the user, enabling the distributed resources to be truly used, improving the resource utilization rate, and promoting the intelligent process of online services.
[0288] It should be noted that for other corresponding descriptions of each functional unit involved in the resource distribution device provided by the embodiment of the present application, reference can be made to Figure 1 and Figure 2 the corresponding descriptions therein, which will not be elaborated here.
[0289] In an exemplary embodiment, referring to Figure 10 , a computer device is further provided. The computer device includes a bus, a processor, a memory, and a communication interface, and may further include an input / output interface and a display device. Among them, each functional unit can complete mutual communication through the bus. The memory stores a computer program, and the processor is used to execute the program stored on the memory to execute the resource distribution method in the above embodiment.
[0290] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the resource distribution method are implemented.
[0291] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented through hardware or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation scenarios of the present application.
[0292] Those skilled in the art can understand that the drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the drawings are not necessarily essential for implementing the present application.
[0293] Those skilled in the art can understand that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the description of the implementation scenario, or can be correspondingly changed and located in one or more devices different from this implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0294] The above serial numbers of the present application are only for description and do not represent the advantages or disadvantages of the implementation scenario.
[0295] The above discloses only several specific implementation scenarios of the present application. However, the present application is not limited thereto, and any changes that can be thought of by those skilled in the art should fall within the protection scope of the present application.
Claims
1. A resource distribution method, characterized in that, The method is applied to the merchant side and includes: In response to a resource creation request, transmitting the resource creation request to a target platform, and when the target platform indicates that the merchant side meets the conditions for setting platform resources on the target platform, transmitting the resource parameters of the store resources created by the resource creation request to the target platform, and after the target platform successfully verifies the resource parameters, creating platform resources and associating the store resources with the platform resources; In response to a resource distribution request from the user side, determining a first resource to be distributed and a target store, where the target store is the store where the user side initiates the resource distribution request; Matching the user store account of the user side in the target store and distributing the first resource to be distributed to the user store account; Based on the first resource identifier of the first resource to be distributed and the user store account, generating a first resource distribution event and transmitting the first resource distribution event to the target platform, so that the target platform matches the user platform account of the user side on the target platform and distributes a second resource to be distributed associated with the first resource to be distributed to the user platform account, where the target platform is the third-party platform where the target store is located or the third-party payment platform with payment function associated with the user store account.
2. The method according to claim 1, wherein Before the step of determining the first resource to be distributed and the target store in response to the resource distribution request from the user side, the method further includes: In response to a resource creation request, based on the merchant identifier, transmitting the resource creation request to the target platform, so that the target platform uses the merchant identifier to verify whether the merchant side meets the conditions for setting platform resources on the target platform; When receiving the verification success feedback from the target platform, obtaining the store resources created based on the resource creation request, setting a receiving entry for the store resources in the target store, extracting the resource parameters of the store resources, and transmitting the resource parameters to the target platform, so that the target platform verifies the resource parameters, and after the parameter verification is successful, creating platform resources and associating the store resources with the platform resources; When receiving the verification failure feedback from the target platform, setting a receiving entry for the store resources in the target store; Among them, the associating the platform resources with the store resources includes: Querying the store activity to which the store resources belong in the store program corresponding to the merchant side on the target platform, obtaining the activity identifier of the store activity, and determining the idempotency identifier of the platform resources; Combining the activity identifier and the idempotency identifier to obtain a resource lock, and using the resource lock to perform a locking process on the platform resources; Obtaining the platform resource identifier of the platform resources and querying whether the resource association table and the resource expiration table include the platform resource identifier; If the platform resource identifier is not included in the resource association table and the resource expiration table, obtain the store resource identifier of the store resource, associate the store resource identifier with the locked platform resource identifier, and store the associated store resource identifier and platform resource identifier in the resource association table; Extract the resource effective time point and the resource expiration time point from the resource parameters, and use the time interval between the resource effective time point and the resource expiration time point as the resource valid duration; Establish an association relationship between the platform resource identifier, the resource expiration time point, and the resource valid duration, and store the associated platform resource identifier, resource expiration time point, and resource valid duration in the resource expiration table.
3. The method according to claim 1, wherein The method further includes: In response to a verification instruction for the first resource to be issued, under the user store account, update the resource status of the first resource to be issued with a store-verified identifier; Mark the first resource identifier with the store-verified identifier, and transmit the marked first resource identifier to the target platform, so that the target platform verifies the first resource identifier, and when the verification passes, update the resource status of the second resource to be issued with a platform-verified identifier under the user platform account.
4. The method according to claim 1, wherein The method further includes: When receiving the resource identifier to be verified sent by the target platform, determine the resource indicated by the resource identifier to be verified as the resource to be verified under the user store account; Under the user store account, update the resource status of the resource to be verified with a store-verified identifier.
5. The method according to claim 1, wherein The method further includes: Obtain the target resource parameters of the first resource to be issued, extract the expiration time point from the target resource parameters, and continuously detect whether the current time point reaches the expiration time point; When it is detected that the current time point reaches the expiration time point, under the user store account, update the resource status of the first resource to be issued with a store-expired identifier; Mark the first resource identifier with the store-expired identifier, and transmit the marked first resource identifier to the target platform, so that the target platform updates the resource status of the second resource to be issued with a platform-expired identifier under the user platform account.
6. A resource distribution method, characterized in that, The method is applied to a target platform and includes: Receive a resource creation request transmitted by the merchant side. When it is determined that the merchant side meets the conditions for setting platform resources on the target platform, receive the resource parameters transmitted by the merchant side, perform parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources and associate the platform resources with the store resources indicated by the resource parameters; Receive a first resource issuance event sent by the merchant side. The first resource issuance event is generated based on the first resource identifier of the first resource to be issued and the user store account after the merchant side issues the first resource to be issued to the user store account of the target store. Query a second resource to be distributed that has an associated relationship with the first resource to be distributed according to the first resource identifier; Match the user store account with the corresponding user platform account on the target platform, and distribute the second resource to be distributed to the user platform account.
7. The method according to claim 6, characterized in that Before receiving the first resource distribution event sent by the merchant side, the method further includes: Receive a resource creation request transmitted by the merchant side, obtain the merchant identifier marked in the resource creation request, and use the merchant identifier to verify whether the merchant side meets the conditions for setting platform resources on the target platform; When it is determined that the merchant side meets the conditions for setting platform resources on the target platform, generate a verification success feedback, transmit the verification success feedback to the merchant side, receive the resource parameters transmitted by the merchant side, perform parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources, associate the platform resources with the store resources, where the resource parameters are transmitted by the merchant side after receiving the verification success feedback; When it is determined that the merchant side does not meet the conditions for setting platform resources on the target platform, generate a verification failure feedback, and transmit the verification failure feedback to the merchant side; Among them, the associating the platform resources with the store resources includes: Query the store activity to which the store resources belong in the store program corresponding to the merchant side on the target platform, obtain the activity identifier of the store activity, and determine the idempotency identifier of the platform resources; Combine the activity identifier and the idempotency identifier to obtain a resource lock, and use the resource lock to perform a locking process on the platform resources; Obtain the platform resource identifier of the platform resources, and query whether the resource association table and the resource term table include the platform resource identifier; If the platform resource identifier is not included in the resource association table and the resource term table, obtain the store resource identifier of the store resources, associate the store resource identifier with the platform resource identifier after the locking process, and store the associated store resource identifier and platform resource identifier in the resource association table; Extract the resource effective time point and the resource expiration time point from the resource parameters, and use the time interval between the resource effective time point and the resource expiration time point as the resource effective duration; Establish an association relationship between the platform resource identifier, the resource expiration time point, and the resource effective duration, and store the associated platform resource identifier, resource expiration time point, and resource effective duration in the resource term table.
8. The method according to claim 7, characterized in that The using the merchant identifier to verify whether the merchant side meets the conditions for setting platform resources on the target platform includes: Determine the target brand bound by the merchant identifier, and obtain the brand white list; If the brand name of the target brand is included in the brand white list, query the store status corresponding to the merchant identifier on the target platform; When the store status queried indicates that there is a store program of the merchant identifier on the target platform, query the program level of the store program, and when it is determined that the program level reaches the level threshold, determine that the merchant side meets the conditions for setting platform resources on the target platform.
9. The method according to claim 8, wherein The method further includes: If the brand name of the target brand is not included in the brand whitelist, determine that the merchant side does not meet the conditions for setting platform resources on the target platform; or, When the store status queried indicates that there is no store program of the merchant identifier on the target platform, determine that the merchant side does not meet the conditions for setting platform resources on the target platform; or, When it is determined that the program level does not reach the level threshold, determine that the merchant side does not meet the conditions for setting platform resources on the target platform.
10. The method according to claim 7, characterized in that, The parameter verification of the resource parameters includes: Determine the historical time point when the merchant side last sent a resource creation request, count the time interval between the current time point and the historical time point, and identify whether the resource parameters include abnormal characters; When it is determined that the time interval is greater than the interval threshold and the resource parameters do not include abnormal characters, determine that the verification of the resource parameters is successful; When it is determined that the time interval is less than or equal to the interval threshold or the resource parameters include abnormal characters, determine that the verification of the resource parameters fails.
11. The method according to claim 7, wherein The creation of platform resources includes: Determine the store program corresponding to the merchant side on the target platform, and obtain the program identifier of the store program; Obtain a resource creation template, assemble the characters included in the resource parameters according to the resource creation template, create the platform resource, and set a platform resource identifier for the platform resource; Mark the platform resource with the program identifier and the platform resource identifier, and store the marked platform resource to complete the creation of the platform resource.
12. The method according to claim 7, wherein The method further includes: When the idempotency identifier or the activity identifier is obtained fails, generate and display an exception reminder; or; If the platform resource identifier is included in the resource association table and the resource term table, determine that the association between the platform resource and the store resource is completed, and generate and display an association success reminder.
13. The method according to claim 6, wherein The querying of the second to-be-issued resource associated with the first to-be-issued resource according to the first resource identifier includes: Perform an idempotency query based on the first resource identifier, determine the idempotency identifier of the first to-be-issued resource, and obtain the activity identifier bound to the first resource identifier; Combine the idempotency identifier and the activity identifier to obtain a resource lock; Obtain a resource association table, and query in the resource association table for the platform resource identifier associated with the first resource identifier as the second resource identifier; Generate a second resource issuance event based on the second resource identifier and the user platform account; Query whether there is an event whose included resource identifier and user platform account are consistent with the second resource issuance event; When it is determined that there is no event consistent with the second resource distribution event, the first resource distribution event and the second resource distribution event are stored in an associated manner; The resource lock is used to release the second resource identifier, and the platform resource indicated by the released second resource identifier is used as the second resource to be distributed.
14. The method according to claim 6, characterized in that, The method further includes: When the first resource identifier marked with the store verified identifier transmitted by the merchant side is received, determine the first resource distribution event corresponding to the first resource identifier, and query the second resource distribution event associated with the first resource distribution event; Match the verification record related to the first resource identifier in the user platform account, and extract the verification path from the verification record; Read the second resource identifier included in the second resource distribution event, and under the user platform account, use the verification path to mark the second resource to be distributed indicated by the second resource identifier, and update the resource status of the second resource to be distributed with the platform verified identifier; Update the event status of the second resource distribution event with the platform verified identifier.
15. The method according to claim 6, wherein The method further includes: In response to a payment request from the user side, match the target platform account that sends the payment request from the user side, and push the available resources under the target platform account; When the payment success response from the user side is received, determine the verified available resources indicated in the payment success response from the user side, and obtain the target resource identifier of the verified available resources; Under the target platform account, mark the verified available resources with the path identifier corresponding to the target platform, and update the resource status of the verified available resources with the platform verified identifier; Query the third resource distribution event including the target resource identifier, where the third resource distribution event is generated by the target platform; Update the event status of the third resource distribution event with the platform verified identifier, and determine the fourth resource distribution event having an association relationship with the third resource distribution event, where the fourth resource distribution event is generated by the merchant side and transmitted to the target platform; Extract the resource identifier included in the fourth resource distribution event as the resource identifier to be verified, and transmit the resource identifier to be verified to the merchant side, so that the merchant side updates the resource status of the resource indicated by the resource identifier to be verified under the user store account.
16. The method according to claim 6, wherein The method further includes: When the first resource identifier marked with the store invalid identifier transmitted by the merchant side is received, determine the first resource distribution event corresponding to the first resource identifier, and query the second resource distribution event associated with the first resource distribution event; Read the second resource identifier included in the second resource distribution event, and under the user platform account, update the resource status of the second resource to be distributed with the platform invalid identifier; Update the event status of the second resource distribution event with the platform invalid identifier.
17. A resource distribution device, characterized in that, The device is applied to the merchant side and includes: A transmission module, which is configured to, in response to a resource creation request, transmit the resource creation request to a target platform, and when the target platform indicates that the merchant side meets the conditions for setting platform resources on the target platform, transmit the resource parameters of the store resources created by the resource creation request to the target platform, and after the target platform successfully validates the resource parameters, create platform resources and associate the store resources with the platform resources; A determination module, which is configured to, in response to a resource distribution request from a user side, determine a first resource to be distributed and a target store, where the target store is the store where the user side initiates the resource distribution request; A distribution module, which is configured to match the user store account of the user side in the target store and distribute the first resource to be distributed to the user store account; A transmission module, which is configured to generate a first resource distribution event based on the first resource identifier of the first resource to be distributed and the user store account, and transmit the first resource distribution event to a target platform, so that the target platform matches the user platform account of the user side on the target platform and distributes a second resource to be distributed associated with the first resource to be distributed to the user platform account, where the target platform is a third-party platform where the target store is located or a third-party payment platform with payment functions associated with the user store account.
18. The device according to claim 17, wherein The transmission module is further configured to, in response to a resource creation request, based on a merchant identifier, transmit the resource creation request to the target platform, so that the target platform uses the merchant identifier to verify whether the merchant side meets the conditions for setting platform resources on the target platform; When receiving a successful verification feedback from the target platform, obtain the store resources created based on the resource creation request, set a collection entrance for the store resources in the target store, extract the resource parameters of the store resources, transmit the resource parameters to the target platform, so that the target platform validates the resource parameters, and after the parameter validation is successful, create platform resources and associate the store resources with the platform resources; When receiving a failed verification feedback from the target platform, set a collection entrance for the store resources in the target store; Wherein, the association of the platform resources with the store resources includes: Query the store activity to which the store resources belong in the store program corresponding to the merchant side on the target platform, obtain the activity identifier of the store activity, and determine the idempotency identifier of the platform resources; Combine the activity identifier and the idempotency identifier to obtain a resource lock, and use the resource lock to perform a locking process on the platform resources; Obtain the platform resource identifier of the platform resources, and query whether the resource association table and the resource expiration table include the platform resource identifier; If the platform resource identifier is not included in the resource association table and the resource expiration table, obtain the store resource identifier of the store resource, associate the store resource identifier with the locked platform resource identifier, and store the associated store resource identifier and platform resource identifier in the resource association table; Extract the resource effective time point and the resource expiration time point from the resource parameters, and use the time interval between the resource effective time point and the resource expiration time point as the resource valid duration; Establish an association relationship between the platform resource identifier, the resource expiration time point, and the resource valid duration, and store the associated platform resource identifier, resource expiration time point, and resource valid duration in the resource expiration table.
19. The device according to claim 17, characterized in that, The device further includes: A first update module, configured to, in response to a verification instruction for the first resource to be issued, update the resource status of the first resource to be issued with a store-verified identifier under the user store account; The transmission module is further configured to label the first resource identifier with the store-verified identifier, and transmit the labeled first resource identifier to the target platform, so that the target platform verifies the first resource identifier, and when the verification is passed, update the resource status of the second resource to be issued with a platform-verified identifier under the user platform account.
20. The device according to claim 17, characterized in that, The determination module is further configured to, when receiving the resource identifier to be verified sent by the target platform, determine the resource indicated by the resource identifier to be verified as the resource to be verified under the user store account; and update the resource status of the resource to be verified with a store-verified identifier under the user store account.
21. The device according to claim 17, characterized in that, The device further includes: An extraction module, configured to obtain the target resource parameters of the first resource to be issued, extract the expiration time point from the target resource parameters, and continuously detect whether the current time point reaches the expiration time point; A second update module, configured to, when it is detected that the current time point reaches the expiration time point, update the resource status of the first resource to be issued with a store-expired identifier under the user store account; The transmission module is further configured to label the first resource identifier with the store-expired identifier, and transmit the labeled first resource identifier to the target platform, so that the target platform updates the resource status of the second resource to be issued with a platform-expired identifier under the user platform account.
22. A resource distribution device, characterized in that, The device is applied to a target platform and includes: An acquisition module, configured to receive a resource creation request transmitted by a merchant terminal; A transmission module, configured to, when it is determined that the merchant terminal meets the conditions for setting platform resources on the target platform, receive the resource parameters transmitted by the merchant terminal, perform parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources and associate the platform resources with the store resources indicated by the resource parameters; A receiving module, configured to receive a first resource distribution event sent by a merchant terminal, where the first resource distribution event is generated based on a first resource identifier of the first to-be-distributed resource and the user store account after the merchant terminal distributes the first to-be-distributed resource to the user store account of the user terminal at a target store; A query module, configured to query a second to-be-distributed resource associated with the first to-be-distributed resource according to the first resource identifier; A distribution module, configured to match the user store account with the corresponding user platform account on the target platform, and distribute the second to-be-distributed resource to the user platform account.
23. The device according to claim 22, characterized in that, The device further includes: An obtaining module, configured to receive a resource creation request transmitted by the merchant terminal, obtain a merchant identifier marked in the resource creation request, and use the merchant identifier to verify whether the merchant terminal meets the condition for setting platform resources on the target platform; A transmission module, configured to generate a verification success feedback and transmit the verification success feedback to the merchant terminal when it is determined that the merchant terminal meets the condition for setting platform resources on the target platform, receive resource parameters transmitted by the merchant terminal, perform parameter verification on the resource parameters, and after the parameter verification is successful, create platform resources, associate the platform resources with the store resources, where the resource parameters are transmitted by the merchant terminal after receiving the verification success feedback; The transmission module is further configured to generate a verification failure feedback and transmit the verification failure feedback to the merchant terminal when it is determined that the merchant terminal does not meet the condition for setting platform resources on the target platform; Wherein, the transmission module is configured to query, in the store program corresponding to the merchant terminal on the target platform, the store activity to which the store resources belong, obtain the activity identifier of the store activity, and determine the idempotency identifier of the platform resources; combine the activity identifier and the idempotency identifier to obtain a resource lock, and perform a locking process on the platform resources using the resource lock; obtain the platform resource identifier of the platform resources, and query whether the resource association table and the resource expiration table include the platform resource identifier; if the resource association table and the resource expiration table do not include the platform resource identifier, obtain the store resource identifier of the store resources, associate the store resource identifier with the platform resource identifier after the locking process, and store the associated store resource identifier and the platform resource identifier in the resource association table; extract a resource effective time point and a resource expiration time point from the resource parameters, and use the time interval between the resource effective time point and the resource expiration time point as the resource effective duration; establish an association relationship between the platform resource identifier, the resource expiration time point, and the resource effective duration, and store the associated platform resource identifier, the resource expiration time point, and the resource effective duration in the resource expiration table.
24. The device according to claim 23, wherein The obtaining module is used to determine the target brand bound to the merchant identifier and obtain the brand whitelist; if the brand name of the target brand is included in the brand whitelist, query the store status corresponding to the merchant identifier on the target platform; When the queried store status indicates that there is a store program of the merchant identifier on the target platform, query the program level of the store program, and when it is determined that the program level reaches the level threshold, determine that the merchant side meets the conditions for setting platform resources on the target platform.
25. The device according to claim 24, characterized in that, The obtaining module is further used to determine that the merchant side does not meet the conditions for setting platform resources on the target platform if the brand name of the target brand is not included in the brand whitelist; or, when the queried store status indicates that there is no store program of the merchant identifier on the target platform, determine that the merchant side does not meet the conditions for setting platform resources on the target platform; or, when it is determined that the program level does not reach the level threshold, determine that the merchant side does not meet the conditions for setting platform resources on the target platform.
26. The device according to claim 23, wherein, The transmission module is used to determine the historical time point when the merchant side last sent a resource creation request, count the time interval between the current time point and the historical time point, and identify whether the resource parameter includes abnormal characters; when it is determined that the time interval is greater than the interval threshold and the resource parameter does not include abnormal characters, determine that the verification of the resource parameter is successful; when it is determined that the time interval is less than or equal to the interval threshold or the resource parameter includes abnormal characters, determine that the verification of the resource parameter fails.
27. The device according to claim 23, characterized in that The transmission module is used to determine the store program corresponding to the merchant side on the target platform, obtain the program identifier of the store program; obtain a resource creation template, assemble the characters included in the resource parameter according to the resource creation template, create the platform resource, and set a platform resource identifier for the platform resource; Mark the platform resource with the program identifier and the platform resource identifier, store the marked platform resource, and complete the creation of the platform resource.
28. The device according to claim 23, wherein, The transmission module is further used to generate and display an exception reminder when the idempotency identifier or the activity identifier is obtained fails; or; if the platform resource identifier is included in the resource association table and the resource expiration table, determine that the association between the platform resource and the store resource is completed, and generate and display an association success reminder.
29. The device according to claim 22, wherein The query module is used to perform an idempotency query based on the first resource identifier, determine the idempotency identifier of the first resource to be distributed, and obtain the activity identifier bound to the first resource identifier; combine the idempotency identifier and the activity identifier to obtain a resource lock; Obtain a resource association table, and query in the resource association table for a platform resource identifier associated with the first resource identifier as the second resource identifier; Generate a second resource distribution event based on the second resource identifier and the user platform account; Query whether there is an event including a resource identifier and a user platform account that are consistent with the second resource issuance event; when it is determined that there is no event consistent with the second resource issuance event, associate and store the first resource issuance event and the second resource issuance event; use the resource lock to release the second resource identifier, and use the platform resource indicated by the released second resource identifier as the second resource to be issued.
30. The device according to claim 22, wherein The device also includes: The receiving module is further configured to determine a first resource issuance event corresponding to the first resource identifier and query a second resource issuance event associated with the first resource issuance event when receiving the first resource identifier marked with a store cancellation identifier transmitted by the merchant end; An extraction module, configured to match a write-off record related to the first resource identifier in the user platform account, and extract a write-off path from the write-off record; A first updating module is configured to read a second resource identifier included in the second resource issuance event, mark the second resource to be issued indicated by the second resource identifier under the user platform account by adopting the verification path, and update the resource status of the second resource to be issued by adopting a platform verification mark; The first updating module is further configured to update the event status of the second resource issuance event by using the platform verification mark.
31. The device according to claim 22, wherein The device also includes: A push module, used to respond to a payment request from a user terminal, match a target platform account from which the user terminal sends the payment request, and push available resources under the target platform account; A determination module, configured to determine the written-off available resources indicated in the payment success response of the user terminal when receiving the payment success response of the user terminal, and obtain the target resource identifier of the written-off available resources; A second updating module is used to mark the written-off available resources with the path identifier corresponding to the target platform under the target platform account, and to update the resource status of the written-off available resources with the platform written-off identifier; The query module is further used to query a third resource release event including the target resource identifier, wherein the third resource release event is generated by the target platform; The second updating module is further used to update the event status of the third resource issuance event using the platform's cancelled flag, and to determine a fourth resource issuance event associated with the third resource issuance event, wherein the fourth resource issuance event is generated by the merchant end and transmitted to the target platform; The second update module is also used to extract the resource identifier included in the fourth resource issuance event as the resource identifier to be written off, and transmit the resource identifier to be written off to the merchant end, so that the merchant end updates the resource status of the resource indicated by the resource identifier to be written off under the user's store account.
32. The device according to claim 22, wherein, The device also includes: The receiving module is further configured to, when receiving the first resource identifier marked with a store invalidation identifier transmitted by the merchant side, determine a first resource distribution event corresponding to the first resource identifier, and query a second resource distribution event associated with the first resource distribution event; A third update module is configured to read a second resource identifier included in the second resource distribution event, and update the resource status of the second resource to be distributed with a platform invalidation identifier under the user platform account; The third update module is further configured to update the event status of the second resource distribution event with the platform invalidation identifier.
33. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 16 are implemented.
34. A 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 according to any one of claims 1 to 16 are implemented.
Citation Information
Patent Citations
Electronic coupon cancel-after-verification method and device
CN112016946A
Discount resource processing method and device
CN114119109A