A voucher issuing method and device, electronic equipment and medium
By parsing and verifying the voucher combination information and user information in the form files uploaded by merchants, the problem of cumbersome voucher issuance processes has been solved, achieving simplified, safe and efficient voucher issuance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2023-01-19
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, when merchants issue multiple types of vouchers to users, operations staff need to handle them separately, making the issuance process cumbersome.
By receiving the form file uploaded by the merchant, parsing and verifying the voucher combination information and user information, and sending a distribution request to the distribution device after the verification is successful, multiple vouchers can be distributed to multiple users at once.
It simplifies the issuance process of various vouchers, improves the effectiveness and security of issuance, and reduces the number of operational steps and error rates for operators.
Smart Images

Figure CN116228311B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to the fields of data analysis and digital currency technology. Background Technology
[0002] Vouchers can be used to deduct part of the cost of goods when users purchase them, thereby reducing the actual amount paid by the user. Merchants often need to issue vouchers to users in scenarios such as product launches, participating in sales activities, or rewarding users. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, and medium for issuing vouchers.
[0004] A first aspect of this disclosure provides a method for issuing vouchers, including:
[0005] Receive a form file uploaded by the merchant, the form file including voucher combination information and user information of multiple users to be issued vouchers, the voucher combination information including information on multiple vouchers;
[0006] The voucher combination information and multiple user information are parsed and verified.
[0007] After the verification is confirmed to be successful, a distribution request is sent to the distribution device. The distribution request is used to request the distribution of the various types of vouchers to each user to be distributed, so that the distribution device distributes the various types of vouchers to each user to be distributed.
[0008] A second aspect of this disclosure provides a method for issuing vouchers, including:
[0009] The system receives a distribution request sent by the operating device. The distribution request is used to request the distribution of multiple vouchers to each user to be distributed. The user to be distributed is a user represented by user information parsed by the operating device from a table file uploaded by the merchant. The multiple vouchers are vouchers represented by a combination of vouchers parsed by the operating device from the table file.
[0010] The various vouchers are issued to each user to be eligible for the vouchers.
[0011] A third aspect of this disclosure provides a voucher dispensing device, comprising:
[0012] The receiving module is used to receive a table file uploaded by the merchant. The table file includes voucher combination information and user information of multiple users to be issued vouchers. The voucher combination information includes information on various vouchers.
[0013] The parsing module is used to parse and verify the voucher combination information and multiple user information.
[0014] The sending module is used to send a distribution request to the distribution device after confirming that the verification is successful. The distribution request is used to request the distribution of the various vouchers to each user to be distributed, so that the distribution device distributes the various vouchers to each user to be distributed.
[0015] A fourth aspect of this disclosure provides a voucher dispensing device, comprising:
[0016] The receiving module is used to receive a distribution request sent by the operating device. The distribution request is used to request the distribution of multiple vouchers to each user to be distributed. The user to be distributed is the user information represented by the user information parsed by the operating device from the table file uploaded by the merchant. The multiple vouchers are vouchers represented by the combination information of vouchers parsed by the operating device from the table file.
[0017] The distribution module is used to distribute the various vouchers to each user to be distributed.
[0018] A fifth aspect of this disclosure provides an electronic device, including:
[0019] At least one processor; and
[0020] A memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in either the first or second aspect.
[0022] A sixth aspect of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described in any one of the first or second aspects.
[0023] A seventh aspect of this disclosure provides a computer program product including a computer program that, when executed by a processor, implements the method according to any one of the first or second aspects.
[0024] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0025] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0026] Figure 1 This is a flowchart of a method for issuing vouchers provided in an embodiment of this disclosure;
[0027] Figure 2 This is an exemplary schematic diagram of a form file provided in an embodiment of this disclosure;
[0028] Figure 3 This is a flowchart of an information parsing and verification method provided in an embodiment of this disclosure;
[0029] Figure 4 This is an exemplary schematic diagram of a distribution interface provided in an embodiment of this disclosure;
[0030] Figure 5 This is a flowchart of another method for issuing vouchers provided in this embodiment of the disclosure;
[0031] Figure 6 This is an exemplary schematic diagram of a voucher package model provided in an embodiment of this disclosure;
[0032] Figure 7 This is an exemplary schematic diagram of a verification process provided in an embodiment of this disclosure;
[0033] Figure 8 This is an exemplary schematic diagram of a TITLE_MAP provided in an embodiment of this disclosure;
[0034] Figure 9 This is an exemplary schematic diagram of another verification process provided in an embodiment of this disclosure;
[0035] Figure 10 This is a flowchart of a method for issuing vouchers to users, provided by an embodiment of this disclosure;
[0036] Figure 11 This is a schematic diagram of the overall process of a method for issuing vouchers provided in an embodiment of this disclosure;
[0037] Figure 12 This is a schematic diagram of the structure of a voucher dispensing device provided in an embodiment of this disclosure;
[0038] Figure 13 This is a schematic diagram of another voucher dispensing device provided in an embodiment of this disclosure;
[0039] Figure 14 This is a block diagram of an electronic device used to implement the voucher distribution method of the present disclosure embodiments. Detailed Implementation
[0040] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0041] Currently, when merchants need to issue vouchers to users, their operations staff configure the voucher parameters for each type of voucher before issuing it. This means that if there are multiple types of vouchers to be issued, the operations staff must process each type separately, making the process cumbersome.
[0042] To simplify the voucher distribution process, this disclosure provides a voucher distribution method that can be applied to operating devices, such as desktop computers, laptops, or mobile phones. Figure 1 As shown, the method includes the following steps:
[0043] S101. Receive the form file uploaded by the merchant.
[0044] The table file includes information on voucher combinations and user information for multiple users to be issued vouchers. The voucher combination information includes details on various types of vouchers.
[0045] S102. Parse and verify the voucher combination information and multiple user information.
[0046] The system can parse voucher combination information and multiple user information from preset cells in a spreadsheet file, and then verify the voucher combination information and user information separately.
[0047] S103. After confirming that the verification is successful, send a distribution request to the distribution device.
[0048] The issuance request is used to request the issuance of multiple vouchers to each user to be issued, so that the issuance device can issue multiple vouchers to each user to be issued.
[0049] In this embodiment, merchants can fill in the voucher combination information for various types of vouchers to be issued, as well as the user information of the users to be issued, in a form file. After the merchant uploads the form file, the operating device can parse and verify this information and issue multiple vouchers to each user through the issuing device. Therefore, when there are multiple types of vouchers to be issued, the merchant only needs to fill in the form file once to issue multiple vouchers to multiple users at once, thus simplifying the process of issuing multiple vouchers.
[0050] The following details the method for issuing vouchers for operational equipment:
[0051] Before the S101 operating device receives the form file, the merchant's operations personnel can access the coupon issuance interface on the operating device, download the required form template from the interface, and then fill in the coupon combination information and user information of multiple users to be issued coupons in the corresponding positions of the form template. After completion, a form file is obtained. The operating device can then detect the form file uploaded by the operations personnel through the coupon issuance interface. For example, the form template and the form file obtained after filling in the template can be an Excel spreadsheet file.
[0052] Optionally, there may be one or more form templates, and the information items included in different form templates may not be exactly the same. For example, in form template 1, the user information item is the user's identity document (ID) item, while in form template 2, the user information item is the user's name item.
[0053] Furthermore, the positions of the information items can differ within different form templates. For example, in form template 1, the voucher combination information and the user information of the users to be distributed are both on the same page; in form template 2, the voucher combination information and the user information of the users to be distributed are on different pages.
[0054] In this embodiment of the disclosure, the voucher combination information includes common attribute information and configuration information for each type of voucher.
[0055] See Figure 2 , Figure 2 The table file shown includes four sections: A, B, C, and D. Section A contains common attribute information of the voucher combination information; section B contains configuration information for each voucher in the voucher combination information; section C contains user information for multiple users to be distributed to; and section D contains prompts for filling out the form template, such as the requirements for filling in each item of information. Figure 2 The use of four regions, A, B, C, and D, to distinguish different information is for ease of description. In actual applications, the region boundaries and the names of the four regions, “A”, “B”, “C”, and “D”, may not be displayed.
[0056] like Figure 2 As shown, the public attribute information includes: voucher package name, purpose, time range, applicant, and reason for application. The purpose can be single-level or multi-level. For example, a single-level purpose could be operational promotion, refund, or compensation; a second-level purpose could be: operational promotion - a certain summit, compensation - other reasons, or testing - internal testing, etc. The time range refers to the period during which the voucher can be used. The applicant is the name of the operations personnel who filled out the form.
[0057] like Figure 2 As shown, the configuration information for each type of voucher includes: voucher number, voucher type, usage scenario, applicable region, applicable product, rule ID, voucher quantity, voucher amount, discount, minimum spend requirement, and discount cap. The voucher type can be either a voucher or a discount coupon. Vouchers are used to deduct the equivalent amount from the product price, while discount coupons are used to discount the product price. Usage scenarios can be general, prepaid, or postpaid, where prepaid means paying in advance before using the product, postpaid means paying after using the product, and general means applicable to all scenarios. Applicable region indicates the region where the product for which the voucher can be used is located, such as global or a specific administrative region. Applicable product indicates the product for which the voucher can be used, such as common or a product abbreviation. The rule ID is 0 or -1, where 0 indicates the voucher is only applicable to a specific product, and -1 indicates the voucher is applicable to all products. The voucher quantity indicates the number of vouchers of this type issued to a single user. The voucher amount indicates the amount that can be deducted when the voucher is used. The minimum purchase amount requirement indicates the total amount of the products that must be spent to use the voucher. The maximum discount limit indicates the maximum difference between the original product price and the discounted price.
[0058] like Figure 2 As shown, user information includes an account ID. It should be noted that the specific information items included in the voucher combination information and the specific information items included in the user information in this embodiment are not limited to... Figure 2 As shown.
[0059] See Figure 3 The process of parsing and verifying the voucher combination information and multiple user information in the above S102 includes the following steps:
[0060] S301. Parse the voucher combination information and user information of multiple users to be issued vouchers from the table file.
[0061] During parsing, operational devices can use Apache POI technology to create sheet workbooks based on the byte stream of the spreadsheet file. Then, for each sheet, data rows are retrieved, and the cell content is extracted from these rows. A Java model is generated based on the retrieved content; that is, the retrieved information is converted into JavaScript Object Notation (JSON) format. Apache POI can provide read and write functionality for Excel files.
[0062] For example, see Figure 2 During parsing, common attribute information is obtained by parsing the cell content in area A; configuration information for each type of voucher is obtained by parsing the cell content in area B; and user information for multiple users to be issued vouchers is obtained by parsing the cell content in area C. Area D does not require parsing.
[0063] Optionally, after parsing the purpose information from the public attribute information, you can also look up the corresponding channel information. The channel information is used to generate coupons and to verify whether the products in the current order can use the coupon when it is applied.
[0064] For example, if a two-level usage name (i.e., first-level usage name - second-level usage name) is obtained from public attribute information, the corresponding usage ID can be found in the usage ID table, which is a Map.<String,Integer> PURPOSE_LIST = [Primary Purpose Name - Secondary Purpose Name, Purpose ID], where String indicates that the purpose name is in string format, and Integer indicates that the purpose ID is in integer format. Then, based on the preset correspondence between purpose ID and channel information, the channel information corresponding to the found purpose ID is determined.
[0065] S302. Verify whether multiple users awaiting voucher issuance are all permitted to receive vouchers.
[0066] The user information for users to be issued coupons includes the user's ID, which can be verified using Customer Relationship Management (CRM) methods. For example, it can check if the user's ID exists in a pre-defined blacklist, which includes the IDs of users who are not allowed to receive coupons. If none of the user's IDs are on the blacklist, then all users are deemed eligible to receive coupons. If any user's ID is on the blacklist, then some users are deemed not to be eligible to receive coupons.
[0067] In addition to the above, other methods can be used to verify whether a user is authorized to receive vouchers, and this embodiment does not specifically limit the methods used in this disclosure. For example, it can be verified whether the user account corresponding to the user's ID is invalid. If invalid, it is determined that the user is not authorized to receive vouchers; if not invalid, it is determined that the user is authorized to receive vouchers.
[0068] S303. If the verification result shows that multiple users to be issued vouchers are allowed to be issued vouchers, then send a verification request to the issuing device.
[0069] The verification request includes voucher combination information and user information of multiple users to be distributed, so that the distributing device can verify the voucher combination information and user information of multiple users to be distributed.
[0070] Optionally, if the verification result indicates that multiple users are permitted to receive vouchers, the operating device can also verify the voucher combination information and the user information of the multiple users. If the verification passes, it sends a verification request to the distributing device. The operating device verifies the voucher combination information and the user information of the multiple users using the same method as the distributing device, as described later. This dual verification of the voucher combination information and the user information of the multiple users by both the operating device and the distributing device improves the accuracy of the verification results, thereby ensuring the effectiveness and security of voucher distribution.
[0071] On the other hand, if among the multiple users awaiting voucher distribution there are those who are not permitted to receive vouchers, no verification request is sent to the distribution device, and a message indicating that the user verification failed is displayed. This informs the operations staff that the user information in the spreadsheet file has not been verified, allowing them to modify the user information in the spreadsheet file.
[0072] S304. Receive the verification result from the issuing device. The verification result includes whether the verification passed or failed.
[0073] Using the above method, this embodiment of the disclosure can parse the table file uploaded by the merchant to obtain voucher combination information and user information of multiple users to be issued vouchers, so as to subsequently issue vouchers based on the parsed information. Furthermore, this embodiment of the disclosure can also verify the parsed information; voucher issuance can only proceed after verification, thus improving the effectiveness and security of voucher issuance.
[0074] In this embodiment of the disclosure, before the operating device sends the issuance request to the issuing device in S103, it may further: display the parsing results of the voucher combination information and multiple user information, and then, after detecting the merchant's confirmation operation, execute the step of sending the issuance request to the issuing device in S103.
[0075] The displayed parsing results may include: voucher combination information parsed from the table file and the number of users to be issued vouchers. (Referencing...) Figure 2 The operating equipment can calculate the number of users to be distributed by subtracting the row number of the last non-empty cell below accountID.
[0076] For example, the parsing results can be displayed on the distribution interface. The distribution interface would look like this: Figure 4As shown, the parsed public attribute information can be displayed in the public items area of the distribution interface, and the configuration information for each type of voucher can be displayed in the voucher information area. The public attribute information includes: voucher package name, purpose, time limit, applicant, and application reason. The time limit is the time range mentioned above. The configuration information for each type of voucher includes: serial number, type, applicable region, applicable product, usage scenario, rule ID, voucher quantity, voucher amount, discount, minimum spend requirement, and discount cap. For example... Figure 4 As shown, the distribution interface can also display the number of users, i.e., the total number of users to be distributed. Figure 4 The number of users is 2100.
[0077] like Figure 4 As shown, the coupon issuance interface can also display a confirmation issuance button. When the operator triggers the confirmation issuance button, the above-mentioned step S103 is executed to send an issuance request to the issuance device.
[0078] Optionally, after detecting that an operations staff member has triggered the confirmation button, a prompt message can be displayed on the coupon distribution interface. For example, the prompt message could be: "Coupons are being distributed. The distribution results will be sent to your email address later. Please check the distribution results before proceeding with the next operation, thank you!" The duration of the prompt message can be preset, for example, displaying the prompt message within 5 seconds after detecting that an operations staff member has clicked the confirmation button.
[0079] like Figure 4 As shown, a cancellation button can also be displayed in the coupon issuance interface. When the operator triggers the cancellation button, the step of sending the issuance request to the issuance device in S103 will not continue. At this time, it may be that the form file is filled out incorrectly. You can wait for the operator to re-upload the form file later.
[0080] Using the above method, the operation equipment can display the parsing results of the form file to the merchant's operation personnel, so that the operation personnel can check whether the parsing results of the operation equipment are consistent with the results filled in by the operation personnel in the form template, reducing the situation of coupon issuance errors caused by parsing errors of the operation equipment; it also allows the operation personnel to further review and confirm the coupon issuance information, reducing the situation of coupon issuance errors caused by errors in the operation personnel's filling, and improving the accuracy of coupon issuance.
[0081] Based on the same inventive concept, this disclosure also provides a method for issuing vouchers. This method can be applied to issuing devices, such as servers or cloud platforms. Figure 5 As shown, the method includes the following steps:
[0082] S501, Receive the distribution request sent by the operating equipment.
[0083] The issuance request is used to request the issuance of multiple vouchers to each user to be issued. The user to be issued is the user information represented by the user information parsed by the operating device from the table file uploaded by the merchant, and the multiple vouchers are the voucher combination information represented by the voucher combination information parsed by the operating device from the table file.
[0084] The process of sending a distribution request for operational equipment can be referred to the above description, and will not be repeated here.
[0085] S502: Issue multiple vouchers to each user awaiting distribution.
[0086] In this embodiment, merchants can fill in the voucher combination information for the various vouchers to be issued, as well as the user information of the users to be issued, in a form file. After the merchant uploads the form file, the operating device can request the issuing device to issue multiple vouchers to each user. Therefore, when there are multiple types of vouchers to be issued, the merchant only needs to fill in the form file once to issue multiple vouchers to multiple users at once, thus simplifying the process of issuing multiple vouchers.
[0087] The following details the method for issuing vouchers using the voucher distribution equipment:
[0088] In this embodiment of the disclosure, before issuing coupons, the issuing device can also verify the information in the form file. That is, before the issuing device receives the issuance request sent by the operating device in S501, the issuing device can also perform the following steps:
[0089] Step 1: Receive the verification request sent by the operating equipment.
[0090] The verification request includes information on the voucher combination and user information for multiple users to be issued vouchers.
[0091] For example, see Figure 6 , Figure 6 It is a voucher package model obtained based on the parsing results of the operating equipment. The verification request can include various information in the voucher package model. For example... Figure 6 As shown, the information in the voucher package model includes: business number (applyBizId), voucher package name (packageName), purpose (purposeChName), purpose number (purposeId), effective time (beginTime), total voucher amount (couponTotalAmount), voucher information list (couponLists), user information (userIds), expiration time (endTime), total number of vouchers (couponTotalCount), applicant (operator), and invalid users (invalidAccounts).
[0092] The service number can be generated by the operating equipment, such as a randomly generated serial number, and this embodiment does not specifically limit this. The effective time is the start time of the time range in the aforementioned public attribute information, and the expiration time is the end time of the time range in the aforementioned public attribute information. The total voucher amount is the sum of the voucher amounts in the configuration information of various vouchers. The voucher information list contains the configuration information of various vouchers. User information refers to the user information of each user to be issued vouchers. The total number of vouchers is the number of voucher types. Invalid users are the user information of users who cannot be issued vouchers; the operating equipment can obtain the user information of invalid users from a designated database.
[0093] In this embodiment of the disclosure, the operating equipment parses the type and quantity of vouchers based on the configuration information of various vouchers. For example, combined with... Figure 2 In the spreadsheet file, the number of voucher types can be obtained by subtracting 1 from the column number of the last non-empty cell in the row containing the voucher type title (COUPON_TYPE_TITLE).
[0094] Similarly, for the row containing the title of the voucher amount, you can calculate the sum of the amounts in each cell of that row to get the total voucher amount.
[0095] Step 2: Verify the voucher combination information and the user information of multiple users to be issued vouchers.
[0096] The issuing device can verify the content and format of each piece of information in the voucher combination information and multiple user information. For specific verification methods, please refer to the following description.
[0097] Optionally, after successful verification, the issuing device can also determine the budget for this coupon issuance. The budget can be the product of the amount of each type of coupon and the number of coupons to be issued. This is to display the budget for this coupon issuance to product personnel and receive their review results. When the budget review result is approved, the budget for this coupon issuance is deducted from the merchant's total budget. This is to calculate the cumulative budget for each merchant's coupon issuance and serve as the basis for product personnel to review budgets each time.
[0098] Step 3: Send the verification result to the operating equipment. The verification result includes whether the verification passed or failed.
[0099] Optionally, the verification result may also include an application ID, which can be a serial number randomly generated by the issuing device. This embodiment of the application does not specifically limit this. The application ID is used to mark this coupon issuance task so that subsequent operating devices can include the application ID in the issuance request sent to the issuing device. This allows the issuing device to find the corresponding coupon combination information and the user information of each user to be issued coupons based on the application ID, and further issue coupons accordingly.
[0100] In this embodiment of the disclosure, the issuing device can verify the voucher information and the user information of the user to be issued before issuing the voucher to the user. Only after the verification is passed can the voucher be issued, thereby improving the effectiveness and security of voucher issuance.
[0101] In this embodiment of the disclosure, the above-mentioned voucher combination information includes public attribute information and configuration information for each type of voucher. The specific information included in the public attribute information and the configuration information for each type of voucher can be referred to the above description, and will not be repeated here.
[0102] Based on this, the method for issuing voucher combinations and user information of multiple users to be issued vouchers includes the following steps:
[0103] Step 1: Verify whether the content and format of the public attribute information meet the public attribute information specification. If they do, proceed to Step 2; otherwise, the verification fails.
[0104] For each piece of information in the public attribute information, based on the preset correspondence between cell position and content rules, the content rule corresponding to the cell position of that information can be determined, and the content of that information can be verified to conform to the content rule. Similarly, based on the preset correspondence between cell position and formatting rules, the formatting rule corresponding to the cell position of that information can be determined, and the format of that information can be verified to conform to the formatting rule.
[0105] When the content and format of each piece of information in the public attribute information conform to the corresponding rules, it is determined that the public attribute information specification is met; when the content or format of any piece of information in the public attribute information does not conform to the corresponding rules, it is determined that the public attribute information specification is not met.
[0106] Step 2: Verify the format and content of the configuration information for each type of voucher, and whether the types and quantities of vouchers conform to the voucher combination information specifications. If they conform, proceed to Step 3; otherwise, the verification fails.
[0107] It can verify whether the types and quantities of vouchers are within the preset range, and for each type of voucher, it verifies whether the format of each piece of information in the configuration information conforms to the format rules, and whether the content of each piece of information conforms to the content rules.
[0108] If the number of different types of vouchers falls within the preset range, and the content and format of all information in the configuration information of each voucher conform to the rules, then the voucher combination information is deemed to comply with the specifications. Otherwise, it is deemed not to comply with the specifications.
[0109] Step 3: Verify the number of users to be distributed, and whether the format and content of the user information for multiple users conform to the user information specifications. If they conform, the verification passes; if they do not conform, the verification fails.
[0110] It can verify whether the number of users to be distributed is within the preset range, and verify whether the format of each user's information conforms to the format rules, and whether the content of each user's information conforms to the content rules.
[0111] If the number of users to be issued information is within the preset range, and the content and format of each user's information comply with the rules, then the information is deemed to conform to the user information specifications. Otherwise, it is deemed to not conform to the user information specifications.
[0112] Using the above method, this embodiment of the disclosure can verify three aspects: the public attribute information of the voucher, the configuration information of each voucher, and the information of each user. Once all three aspects are verified successfully, the verification is considered successful. This achieves comprehensive verification of the information in the table files uploaded by merchants, improving the comprehensiveness and accuracy of the verification results.
[0113] See Figure 7 The verification process basically includes three aspects: the first aspect is used to verify public attribute information, the second aspect is used to verify the configuration information of each type of voucher, and the third aspect is used to verify user information.
[0114] See Figure 7 When verifying public attribute information, you can first verify the content and format of the purpose, then verify the content and format of the time range, and then verify other information in the public attribute information. For example, in the preset correspondence between the cell position and content rules mentioned above, the content rule of purpose can include: the purpose belongs to a preset purpose set, and the preset purpose set can include: Operation and promotion - a certain summit, compensation - service unavailable, compensation - other reasons, and testing - internal testing, etc.
[0115] The rules for the time range may include: both the start and end times are after the current time, the end time is after the start time, and the duration between the start and end times does not exceed a duration threshold.
[0116] The specific verification rules for each piece of information content can be set according to actual requirements, and the embodiments of the present disclosure do not make specific limitations in this regard.
[0117] When verifying the format, refer to Figure 8 , Figure 8 , which is a pre-constructed title map (TITLE_MAP), containing the preset correspondence between various cell positions and format rules. The form of TITLE_MAP can be: HashMap<String, CouponPackageTitle> TITLE_MAP = <Excel field name, <row coordinate--column coordinate--field content--input format rule>>, where HashMap indicates that TITLE_MAP records in the form of key-value pairs, the Excel field name is the key (key), and <row coordinate--column coordinate--field content--input format rule> is the value (value).
[0118] Among them, each Excel field corresponds to a title in the table template, so each Excel field name represents a title name. For example, Figure 8 the Excel field names include: voucher package name title (PACKAGE_NAME_TITLE), purpose title (PURPOSE_TITLE), validity date title (VALIDITY_DATE_TITLE), applicant title (APPLICANT_TITLE), etc.
[0119] The row coordinate and column coordinate corresponding to the Excel field name indicate: the cell position where a title is located. Figure 8 In, the row coordinates and column coordinates corresponding to each Excel field name are represented by "XX", and can be set according to the cell positions of each title in the table template in actual applications.
[0120] The field content corresponding to the Excel field name indicates: the specific content of a title. For example, Figure 8 the field content in includes: voucher package name, purpose, time range, applicant, etc.
[0121] The format rule corresponding to the Excel field name is: the format that the information in each cell under a title needs to meet. Figure 8 Each format rule shown includes two parts, respectively within two sets of double quotes. The meanings of these two parts are the same, but the forms are different. That is, for Figure 8 each format rule in, the left double quote uses the form of a regular expression to represent a format rule, and the right double quote uses the form of text to represent a format rule. For example, Figure 8The formats shown include: {"^\\S{1,30}$", "The field name cannot be empty and the length cannot be greater than 30"}, {"[0-9]|10", "The voucher number must be an integer between 1 and 10"}, and {"0|1", "The voucher type must be 0 or 1"}, etc.
[0122] like Figure 8 As shown, when validating the format of a piece of information, you can determine the position of the heading to which that information belongs based on its cell position, and then find the corresponding formatting rule based on that heading's position. For example, Figure 2 The cell with coordinates (13, B) contains "1". The title of this cell is "Voucher Number", and the voucher number's coordinates are (13, A). Assume that from... Figure 8 The rule for finding (13, A) in the table shown is: {"[0-9]|10","The voucher number must be an integer between 1 and 10"}. Since the cell content "1" in (13, B) is an integer between 1 and 10, the information is verified.
[0123] See Figure 7 When verifying the configuration information of each type of voucher, you can first verify the number of vouchers, and after the verification is successful, verify the format of each piece of information in the voucher configuration information, and after the verification is successful, verify the correlation of the information in the configuration information.
[0124] That is, step 2 above verifies the format and content of the configuration information for each type of voucher, and whether the number of voucher types conforms to the voucher combination information specification, including the following steps:
[0125] Step 21: Verify whether the number of voucher types is within the preset range. If it is, proceed to step 22; otherwise, it is determined that the voucher combination information does not conform to the specifications.
[0126] For example, the preset range for the number of categories can be 100.
[0127] Step 22: Based on the preset correspondence between cell position and formatting rules, determine the formatting rule corresponding to the cell position of each piece of information in the configuration information of each type of voucher, and verify whether the format of the information conforms to the formatting rule. If each piece of information conforms to its corresponding formatting rule, proceed to Step 23; if any piece of information does not conform to its corresponding formatting specification, it is determined that it does not conform to the voucher combination information specification.
[0128] Among them, it can be based on Figure 8 The TITLE_MAP shown is used to verify whether the format of each item in the voucher configuration information conforms to the format rules, following the format verification method described above.
[0129] Step 23: For each type of voucher, verify the content of related information items in the configuration information of that type of voucher to see if there is a relationship. If yes, it is determined that it conforms to the voucher combination information specification; if not, it is determined that it does not conform to the voucher combination information specification.
[0130] Each type of voucher configuration contains related information items, and the content of these related items must be correlated. For example, if the voucher type is related to the voucher amount, then when the voucher type is a discount voucher, the voucher amount must be 0 or empty. If the voucher type is related to the discount, then when the voucher type is a voucher, the discount must be 0 or empty. As another example, if the usage scenario is related to the voucher amount, then when the usage scenario is general or postpaid, the voucher amount must be 0 or empty.
[0131] For example, suppose that in the configuration information of a voucher, the voucher type is a discount voucher and the voucher amount is 0. Since "discount voucher" and "0" are related, the content verification of these two related information items passes.
[0132] Using the above method, this embodiment of the disclosure can verify the types and quantities of vouchers, the format of the configuration information of each voucher, and the content of the associated information. After all verifications are passed, it is determined that the voucher combination information conforms to the specifications, thereby achieving a more comprehensive verification of the voucher combination information and improving the effectiveness and accuracy of the issued coupons.
[0133] See Figure 7 When validating user information, you can first verify the number of users, then verify the format of the user information, and finally verify the duplication of the user information.
[0134] That is, step 3 above, which verifies the number of users to be distributed and whether the format and content of the user information of multiple users to be distributed conform to the user information specifications, includes the following steps:
[0135] Step 31: Verify whether the number of users to be distributed is within the preset user number range. If it is, proceed to step 32; otherwise, it is determined that the user information does not conform to the user information specifications.
[0136] For example, the preset user count range can be 10,000.
[0137] Currently, when operators need to distribute vouchers, they distribute them to a fixed number of 100 users each time. If the number exceeds 100, multiple distributions are required, making it impossible to customize the number of users per distribution. However, in this embodiment, the number of users can be set according to needs, thus enabling more flexible voucher distribution.
[0138] Step 32: Based on the preset correspondence between cell position and formatting rules, determine the formatting rule corresponding to the cell position of each user information, and verify whether the user information conforms to the formatting rule. If each user information conforms to its corresponding formatting rule, proceed to step S33; if any user information does not conform to its corresponding formatting rule, it is determined that it does not conform to the user information specification.
[0139] Among them, it can be based on Figure 8 The TITLE_MAP shown is used to verify whether the format of each user's information conforms to the format rules, following the format verification method described above.
[0140] Step 33: Verify that the user information of multiple users to be issued is unique. If it is unique, the information complies with the user information specifications; if duplicate user information exists, the information does not comply with the user information specifications.
[0141] Since each user's user ID is unique, different users generally will not reuse the same user ID. Therefore, when there is duplicate user information, it may be due to an error made by the operations staff. Thus, it is necessary to verify whether the content of the user information is unique.
[0142] Optionally, after confirming that user information is not duplicated, other verifications can be performed on the user information, and if the verifications pass, it can be determined that the information conforms to the user information specifications. For example, it can be verified whether the user ID included in each piece of user information is an invalid user ID; if neither is true, then it is determined that the information conforms to the user information specifications.
[0143] Using the above method, this embodiment of the disclosure can verify the number of users to be distributed, the format of user information, and whether the user information is unique. After all verifications are passed, it is determined that the information conforms to the user information specifications, thereby achieving a more comprehensive verification of user information and improving the accuracy of the distributed users.
[0144] As described above, the operating equipment can verify the voucher combination information and user information in the form file using the same verification method as the issuing equipment.
[0145] Furthermore, before verifying the voucher combination information and user information, please refer to [link / reference]. Figure 7 The operating equipment can also verify whether the specified title of the form file is a preset string. If so, it will continue to verify the voucher combination information and user information.
[0146] For example, see Figure 2 The operating equipment can verify whether the content of the first cell in the first row and first column of the spreadsheet file is "voucher package name". By verifying the title of the spreadsheet file, it can be confirmed whether the template on which the spreadsheet file uploaded by the operations personnel is based is the template provided by the operating equipment.
[0147] In this embodiment, the configuration information for each voucher includes type, applicable region, applicable product, applicable scenario, rule identifier, and minimum spending requirement. Based on this, before step 3 confirms successful verification, the issuing device can further perform the following steps:
[0148] Step (1): For each type of voucher, verify whether the applicable area for that type of voucher exists in the preset multiple areas. If it exists, proceed to step (2); if it does not exist, the verification fails.
[0149] Optional, see Figure 9 Before step (1), the issuing device can first determine whether the voucher type is a voucher or a discount coupon. Then, it verifies whether the applicable area of the voucher exists in the preset multiple areas. If the verification passes, it continues to verify the applicable product; if the verification fails, it determines the error reason as: the applicable area of voucher X is incorrect, where X represents the number of the voucher.
[0150] Step (2): Verify whether the applicable product of this type of voucher is within the applicable area of this type of voucher. If it is, proceed to step (3); otherwise, the verification fails.
[0151] The applicable products included in each applicable region can be preset, so that it can be checked later whether the applicable products included in the applicable region of a certain type of voucher are included.
[0152] See Figure 9 If the applicable product verification passes, continue to verify the applicable scenario; if the applicable product verification fails, determine the error reason as: the applicable product for voucher X is incorrect.
[0153] Step (3): If the type of voucher is a voucher, verify whether there is an applicable scenario for this type of voucher among the preset multiple scenarios, or if the type of voucher is a discount coupon, verify whether the applicable scenario for this type of voucher is a specified scenario. If any verification result is yes, then proceed to step (4); if none of the verification results are yes, then the verification is determined to have failed.
[0154] For example, the preset scenarios include: general, prepaid, and postpaid. Specifying a prepaid scenario means the discount coupon is only applicable to prepaid scenarios.
[0155] See Figure 9 If the applicable scenario verification passes, continue to verify the rule ID; if the applicable scenario verification fails, determine the error reason as: the applicable scenario for voucher X is incorrect.
[0156] Step (4): Verify whether the rule identifier for this type of voucher exists among the preset rule identifiers. If it exists, proceed to step (5); if it does not exist, the verification fails.
[0157] For example, preset rule identifiers, i.e. preset rule IDs, include: -1, 0, 1, 2, 3, etc.
[0158] See Figure 9 If the rule ID verification passes, continue to verify the voucher amount. If the rule ID verification fails, determine the error reason as: voucher X rule ID is incorrect.
[0159] Step (5): Verify whether the applicable scenario of the voucher matches the minimum spending requirement of the voucher. If they match, proceed to step (6); if they do not match, the verification fails.
[0160] If the applicable scenario is general or postpaid, verify whether the minimum spending requirement for discounts is 0 or empty; if so, confirm a match, meaning the minimum spending requirement for discounts has been verified. Otherwise, the minimum spending requirement for discounts has failed to be verified. In the case of prepaid scenarios, the minimum spending requirement for discounts can be any value.
[0161] See Figure 9 If the minimum amount for discount is verified, proceed to step (6); if the minimum amount for discount is not verified, determine the reason for the error as: the minimum amount for discount on voucher X is incorrect.
[0162] Step (6): Determine that the voucher has been verified. If multiple vouchers have been verified, execute step 3 above to determine that the verification has been passed.
[0163] Each type of voucher is verified through steps (1) to (6) above. After each type of voucher is verified, step 3 above is executed to confirm that the verification has passed.
[0164] Optionally, when verification fails, the issuing device may include the reason for the error in the verification result sent to the operating device, so that the operating device can show the reason for the error to the operating personnel, making it easier for the operating personnel to modify the form file more effectively.
[0165] Using the above method, this embodiment of the disclosure can perform individual and joint verification of the configuration information of each type of voucher, and determine that the verification is successful after all the configuration information of various vouchers has been verified, thereby improving the accuracy of various vouchers subsequently issued.
[0166] In this disclosure embodiment, see Figure 10 The issuing device distributes various vouchers to each user in the above S502 process, including the following steps:
[0167] S1001. For each type of voucher, if the configuration information of the voucher does not include any association with any user to be issued, determine that each user to be issued vouchers needs to be issued a specified number of such vouchers.
[0168] The specified quantity refers to the number of vouchers included in the configuration information for this type of voucher. For example, Figure 2 In the configuration information for each type of voucher shown, the quantity of vouchers is 1.
[0169] The operating equipment can parse the configuration information of each voucher and its association with the users to be issued from the spreadsheet file. For example, see... Figure 2 , Figure 2 The table file shown does not contain any relationship between vouchers and users. Therefore, when the operating equipment parses this table file, it determines that the configuration information for each type of voucher does not include any association with any user to be issued the voucher.
[0170] S1002. If the configuration information of this type of voucher includes the association with the target user to be issued the voucher, determine that the target user to be issued the voucher needs to be issued a specified number of this type of voucher.
[0171] Among them, the target users for each type of voucher are those users who are associated with that type of voucher among multiple users to be distributed.
[0172] For example, in one form template, the configuration information for each type of voucher and the user ID of the user to be issued the voucher are recorded on the same sheet, while different voucher configuration information is recorded on different sheets. When the operating equipment parses the table file obtained based on this template, it determines that the target user for each type of voucher is: the user whose user information and configuration information for that type of voucher are recorded on the same sheet. It also determines that the configuration information for each type of voucher includes its association with the target user.
[0173] S1003. For each voucher to be issued to each user, use a thread from the thread pool to generate the voucher for that user.
[0174] A task can be generated for each voucher to be issued, resulting in a task list. Each thread in the thread pool retrieves incomplete tasks from the task list and generates a voucher representing each task. The thread pool consists of multiple threads.
[0175] S1004. After all the vouchers to be issued to each user have been successfully generated, issue the vouchers generated for that user to each user.
[0176] If any voucher to be issued fails to generate successfully, stop generating vouchers and do not issue vouchers to any users who are waiting to receive them.
[0177] In this embodiment, the issuing device can call threads from a thread pool to issue vouchers to users. Each thread can work independently, thus improving the efficiency of voucher issuance. Moreover, vouchers are only issued after all vouchers to be issued have been successfully generated, ensuring the atomicity of voucher issuance.
[0178] In this embodiment of the disclosure, the issuing device can also send a notification after the coupons are issued. That is, after issuing multiple coupons to each user in S502, the issuing device can also count the coupons issued to each user and then send a coupon notification to that user. The coupon notification indicates the coupons issued to that user in this instance.
[0179] Voucher notifications can be sent via SMS, email, in-app messages, and / or instant messaging.
[0180] For example, the voucher notification might read: "Dear user X, your account has received a voucher package with a total value of X yuan (containing Y1 vouchers and Y2 discount coupons). Please log in to platform X (link) to use it. Thank you for your cooperation!"
[0181] In related technologies, a text message notification is sent to the user for each voucher issued. If a large number of vouchers are issued to the user, the user will receive a large number of text messages, causing excessive disturbance.
[0182] In this embodiment, the vouchers issued to each user are tallied, and a single voucher notification is sent to each user. This notification also reminds the user of the various vouchers issued to them. In other words, this embodiment achieves the goal of notifying users of the various vouchers issued while minimizing disruption.
[0183] Optionally, after issuing the vouchers, the issuing device can also send a notification message to the operations staff. This notification message can take the form of SMS, email, in-app messages, and / or instant messages.
[0184] For example, the notification message would read: "Dear user [user name], the voucher package you requested has been successfully issued! Thank you for using our service!"
[0185] See Figure 11 The following describes the overall process of the voucher issuance method provided in this embodiment, taking into account practical application scenarios:
[0186] The method for issuing vouchers in operational equipment is implemented by an application installed on the operational equipment. This application consists of two parts: a front end (FE) and a back end. Figure 11 The front-end is represented by FE, and the back-end is represented by osp-sale.
[0187] The method for issuing vouchers in the voucher issuing device is implemented by the application installed in the device. Figure 11 In this context, the application uses the term "sp-coupon".
[0188] like Figure 11 As shown, the FE provides an Excel template to the merchant's operations staff, who can then download and fill out the template to obtain an Excel file. The FE receives the Excel file uploaded by the operations staff and forwards it to osp-sale. osp-sale then parses the parameters in the Excel file and verifies whether each user eligible for the coupon is authorized to receive it. If so, osp-sale sends a verification request to sp-coupon, which includes the parameters from the coupon package model.
[0189] After receiving the verification request, sp-coupon records all parameters included in the request and verifies the coupon combination information and user information for multiple users to be distributed. Upon completion of verification, it sends the verification result to osp-sale, including whether the verification passed and the application ID. sp-coupon then determines and displays the budget for this coupon issuance and receives the review result from product personnel. If the budget review result is "approved," it sends a "budget review failed" message to osp-sale so that the FE (Front-End Personnel) can display the budget review failure to operations personnel.
[0190] After receiving the verification result, osp-sale sends the parsing result of the Excel file and the application ID to FE, where the parsing result is in JSON object format. FE then displays the parsing result and, upon detecting confirmation from the merchant's operations personnel, sends the application ID to osp-sale. osp-sale then sends a distribution request to sp-coupon, thereby applying for coupons from sp-coupon; the distribution request includes the application ID.
[0191] After receiving the issuance request, sp-coupon, provided that the budget for this issuance has been approved, deducts the budget for this issuance from the merchant's total budget, generates a coupon identifier (ticketID) based on the application ID, and returns the ticketID to osp-sale. osp-sale then transmits the ticketID to FE so that FE can record the ticketID.
[0192] The SP-coupon algorithm checks if the currently generated ticketID is duplicated with a historically generated ticketID. If they are not duplicated, the status corresponding to the currently generated ticketID is determined to be "pending issuance." Because SP-coupon may receive multiple identical issuance requests due to errors in OSP-Sale or network issues, resulting in the generation of the same ticketID and erroneously issuing coupons multiple times, this embodiment of the disclosure detects ticketID duplication to reduce the possibility of erroneously issuing coupons multiple times.
[0193] `sp-coupon` determines the number of vouchers to be issued to each user, updates the status of the `ticketID` to "issuing," and uses each thread in the thread pool to generate one voucher for each user at a time. That is, one thread generates one voucher for each user at a time; after successful generation, the same thread generates the next voucher. Once all required vouchers have been successfully generated, the generated vouchers are recorded in a designated database, thus enabling the vouchers to be issued to the corresponding users. `sp-coupon` then records the voucher issuance result, which includes voucher package information, user information, and the issuance result itself, indicating whether the issuance was successful or failed.
[0194] When an SP-coupon is successfully issued, it updates the status of the ticketID to "issued successfully," and when issuance fails, it updates the status of the ticketID to "issued failed." Upon successful issuance, SP-coupon sends a notification email to the operations team and, in turn, sends a coupon notification to each user to whom it has been issued coupons, indicating that a coupon was issued to that user in this instance.
[0195] When the FE receives a user's ticket issuance result query request, it sends a status query request to the sp-coupon via osp-sale to check the status of the ticketID. Upon receiving the status query request, the sp-coupon returns the current status of the ticketID to the FE via osp-sale.
[0196] Through the above methods, this disclosure embodiment can achieve multi-dimensional coupon issuance, including multiple scenarios, multiple users, multiple types of coupons, and applicability to multiple products, thus making it suitable for coupon issuance in various scenarios. Because this disclosure embodiment can achieve multi-dimensional coupon issuance, it can meet the personalized coupon issuance needs of merchants. Furthermore, this disclosure embodiment can parse and verify the table files uploaded by merchants, thereby ensuring the efficiency of the coupon issuance process and the accuracy of the coupon issuance results.
[0197] It should be noted that the collection, storage, use, processing, transmission, provision, and disclosure of voucher information and user information involved in the technical solution disclosed herein all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0198] Based on the same inventive concept, corresponding to the above method embodiments, this disclosure also provides a voucher dispensing device, applied to operating equipment, such as... Figure 12 As shown, the device includes: a receiving module 1201, a parsing module 1202, and a sending module 1203;
[0199] The receiving module 1201 is used to receive a table file uploaded by the merchant. The table file includes voucher combination information and user information of multiple users to be issued vouchers. The voucher combination information includes information on various vouchers.
[0200] The parsing module 1202 is used to parse and verify the voucher combination information and multiple user information.
[0201] The sending module 1203 is used to send a distribution request to the distributing device after the verification is confirmed to be successful. The distribution request is used to request the distribution of multiple vouchers to each user to be distributed, so that the distributing device can distribute multiple vouchers to each user to be distributed.
[0202] In some embodiments of this disclosure, the parsing module 1202 is specifically used for:
[0203] Parse the voucher combination information and user information of multiple users to be issued vouchers from the table file;
[0204] Verify whether multiple users awaiting voucher issuance all have the right to receive vouchers;
[0205] If the verification result indicates that multiple users to be issued vouchers are allowed to be issued vouchers, a verification request is sent to the issuing device. The verification request includes voucher combination information and user information of multiple users to be issued vouchers, so that the issuing device can verify the voucher combination information and user information of multiple users to be issued vouchers.
[0206] Receive the verification result from the issuing device. The verification result includes whether the verification passed or failed.
[0207] In some embodiments of this disclosure, the device may further include:
[0208] The display module is used to show the parsing results of the voucher combination information and multiple user information before sending the distribution request to the distribution device;
[0209] The detection module is used to call the sending module to execute the step of sending a distribution request to the distribution device after detecting the merchant's confirmation operation.
[0210] Based on the same inventive concept, corresponding to the above method embodiments, this disclosure also provides a voucher dispensing device, such as... Figure 13 As shown, the device includes: a receiving module 1301 and a transmitting module 1302;
[0211] The receiving module 1301 is used to receive the distribution request sent by the operating device. The distribution request is used to request the distribution of multiple vouchers to each user to be distributed. The user to be distributed is the user information represented by the user information parsed by the operating device from the table file uploaded by the merchant. The multiple vouchers are the vouchers represented by the combination information of vouchers parsed by the operating device from the table file.
[0212] The distribution module 1302 is used to distribute various vouchers to each user to be distributed.
[0213] In some embodiments of this disclosure, the device may further include:
[0214] The receiving module 1301 is also used to receive a verification request sent by the operating device before receiving the distribution request sent by the operating device. The verification request includes voucher combination information and user information of multiple users to be distributed.
[0215] The verification module is used to verify the voucher combination information and the user information of multiple users to be issued vouchers;
[0216] The sending module is used to send the verification results of the verification module to the operating equipment. The verification results include whether the verification passed or failed.
[0217] In some embodiments of this disclosure, the voucher combination information includes common attribute information and configuration information for each type of voucher; the verification module is specifically used for:
[0218] Verify whether the content and format of public attribute information meet the public attribute information specification;
[0219] If satisfied, verify the format and content of the configuration information for each type of voucher, and whether the types and quantities of vouchers conform to the voucher combination information specification.
[0220] If it meets the requirements, then verify whether the number of users to be issued, the format and content of the user information of multiple users to be issued, and whether they comply with the user information specifications.
[0221] If the conditions are met, the verification is considered successful.
[0222] In some embodiments of this disclosure, the verification module is specifically used for:
[0223] Verify whether the number of voucher types is within the preset range;
[0224] If it is, then based on the preset correspondence between cell position and formatting rules, determine the formatting rules corresponding to the cell position of each piece of information in the configuration information of each type of voucher, and verify whether the format of the information conforms to the formatting rules;
[0225] If each piece of information conforms to its corresponding format rules, then for each type of voucher, verify whether there is a relationship between the related information items in the configuration information of that type of voucher.
[0226] If so, then it is confirmed that the information complies with the voucher combination specifications.
[0227] In some embodiments of this disclosure, the verification module is specifically used for:
[0228] Verify that the number of users to be distributed is within the preset user number range;
[0229] If it is, then based on the preset correspondence between cell position and formatting rules, determine the formatting rule corresponding to the cell position of each user information, and verify whether the user information conforms to the formatting rule;
[0230] If each user information conforms to its corresponding format rules, then verify whether the content of the user information of multiple users to be issued is not repeated.
[0231] If none of them are repeated, then it is determined that they comply with the user information specifications.
[0232] In some embodiments of this disclosure, the configuration information for each voucher includes type, applicable region, applicable product, applicable scenario, rule identifier, and minimum spending requirement; the device may also include:
[0233] The verification module is used to verify, before confirming that the verification has passed, whether the applicable area of each type of voucher exists in a number of preset areas.
[0234] The verification module is also used to verify, if present, whether the applicable product of the voucher is within the applicable area of the voucher.
[0235] The verification module is also used to verify whether there is an applicable scenario for the voucher among the preset multiple scenarios if the type of voucher is a voucher, or to verify whether the applicable scenario for the voucher is a specified scenario if the type of voucher is a discount coupon.
[0236] The verification module is also used to verify whether the rule identifier of the voucher exists among the preset multiple rule identifiers if any verification result is yes.
[0237] The verification module is also used to verify, if it exists, whether the applicable scenario of the voucher matches the minimum discount amount of the voucher.
[0238] The determination module is used to determine that the voucher is verified if a match is found, and when multiple vouchers are verified, the verification module is called to perform the steps to determine that the verification is successful.
[0239] In some embodiments of this disclosure, the disbursement module 1302 is specifically used for:
[0240] For each type of voucher, if the configuration information of the voucher does not include any association with any user to be issued to, it is determined that each user to be issued to should be issued a specified number of vouchers of that type; wherein, the specified number is the number of vouchers included in the configuration information of the voucher type.
[0241] If the configuration information of this type of voucher includes the association with the target user to be issued the voucher, it is determined that the target user to be issued the voucher needs to be issued a specified number of vouchers.
[0242] For each voucher to be issued to each user, a thread from the thread pool is used to generate the voucher for that user.
[0243] After all the vouchers to be issued to each user have been successfully generated, the vouchers generated for that user will be issued to each user.
[0244] In some embodiments of this disclosure, the device may further include:
[0245] The statistics module is used to calculate the number of vouchers issued to each user after multiple vouchers have been issued to them.
[0246] The sending module is used to send a voucher notification to the user to be issued the voucher. The voucher notification indicates that a voucher will be issued to the user in this transaction.
[0247] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0248] Figure 14 A schematic block diagram of an example electronic device 1400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0249] like Figure 14 As shown, the electronic device 1400 includes a computing unit 1401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1402 or a computer program loaded from a storage unit 1408 into a random access memory (RAM) 1403. The RAM 1403 may also store various programs and data required for the operation of the electronic device 1400. The computing unit 1401, ROM 1402, and RAM 1403 are interconnected via a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.
[0250] Multiple components in electronic device 1400 are connected to I / O interface 1405, including: input unit 1406, such as keyboard, mouse, etc.; output unit 1407, such as various types of monitors, speakers, etc.; storage unit 1408, such as disk, optical disk, etc.; and communication unit 1409, such as network card, modem, wireless transceiver, etc. Communication unit 1409 allows electronic device 1400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0251] The computing unit 1401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1401 performs the various methods and processes described above, such as a voucher distribution method. For example, in some embodiments, the voucher distribution method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1400 via ROM 1402 and / or communication unit 1409. When the computer program is loaded into RAM 1403 and executed by the computing unit 1401, one or more steps of the voucher distribution method described above may be performed. Alternatively, in other embodiments, the computing unit 1401 may be configured to perform the voucher distribution method by any other suitable means (e.g., by means of firmware).
[0252] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0253] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0254] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0255] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0256] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0257] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0258] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0259] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for issuing vouchers, applied to operating equipment, comprising: The system receives a form file uploaded by a merchant. This form file is obtained by the merchant opening the issuance interface on the operating device, downloading a form template from the interface, and filling in the template. Different form templates may contain slightly different information items, and the positions of these items may vary, including the page on which they are located. The form file includes voucher combination information and user information for multiple users to be issued vouchers. The voucher combination information includes information on various types of vouchers, common attribute information, and configuration information for each type of voucher. These common attribute information, configuration information, and user information for multiple users to be issued vouchers are located in different areas of the form file. If the voucher configuration information does not include an association with any user to be issued vouchers, each user to be issued vouchers must be issued a specified number of vouchers of that type. If the voucher configuration information includes an association with a target user to be issued vouchers, that target user must be issued a specified number of vouchers of that type. Parse the voucher combination information and the user information of the multiple users to be issued vouchers from the table file; Verify whether all of the multiple users to be issued vouchers have consented to receiving them; If the verification result indicates that all of the multiple users to be issued vouchers are allowed to be issued vouchers, a verification request is sent to the issuing device. The verification request includes the voucher combination information and the user information of the multiple users to be issued vouchers, so that the issuing device can verify the voucher combination information and the user information of the multiple users to be issued vouchers. The system receives a verification result from the issuing device. The verification result includes whether the verification passed or failed. The verification result also includes an application ID, which is a randomly generated serial number. After the verification is confirmed to be successful, a distribution request is sent to the distribution device. The distribution request carries the application ID and is used to request the distribution of the various vouchers to each user to be distributed, so that the distribution device distributes the various vouchers to each user to be distributed.
2. The method according to claim 1, wherein before sending the disbursement request to the disbursement device, the method further comprises: Display the parsing results of the voucher combination information and the multiple user information; After detecting the merchant's confirmation operation, the step of sending a distribution request to the distribution device is executed.
3. A method for issuing vouchers, applied to a voucher issuing device, comprising: The system receives a distribution request from an operating device. This request carries an application ID and is used to request the distribution of multiple vouchers to each user to be distributed to. The user to be distributed to is represented by user information parsed from a table file uploaded by the merchant. The multiple vouchers are voucher combinations represented by voucher combination information parsed from the table file by the operating device. The table file is a file obtained by the merchant after opening the voucher distribution interface on the operating device, downloading a table template from the interface, and filling in the template. Different table templates contain slightly different information items. The positions of each information item within the board can vary, including the page on which the information item is located. The voucher combination information includes common attribute information and configuration information for each type of voucher. The common attribute information, configuration information for each type of voucher, and user information for multiple users to be issued vouchers are located in different areas of the table file. If the voucher configuration information does not include any association with any user to be issued vouchers, each user to be issued vouchers needs to be issued a specified number of vouchers of that type. If the voucher configuration information includes an association with a target user to be issued vouchers, the target user to be issued vouchers needs to be issued a specified number of vouchers of that type. Distribute the various types of vouchers to each user to be eligible for distribution; Before receiving the disbursement request sent by the operating equipment, the method further includes: The system receives a verification request sent by the operating device. The verification request includes the voucher combination information and the user information of multiple users to be issued vouchers. The verification request is sent after the operating device parses the voucher combination information and the user information of multiple users to be issued vouchers from the table file and verifies that all multiple users to be issued vouchers are allowed to be issued vouchers. Verify the voucher combination information and the user information of the multiple users to be issued vouchers; Send a verification result to the operating equipment. The verification result includes whether the verification passed or failed. The verification result also includes the application ID, which is a randomly generated serial number.
4. The method according to claim 3, wherein, The verification of the voucher combination information and the user information of the multiple users to be issued vouchers includes: Verify whether the content and format of the public attribute information meet the public attribute information specification; If satisfied, verify the format and content of the configuration information for each type of voucher, and whether the types and quantities of vouchers conform to the voucher combination information specification. If it meets the requirements, then verify whether the number of users to be issued, the format and content of the user information of the multiple users to be issued, and whether they conform to the user information specifications. If the conditions are met, the verification is considered successful.
5. The method according to claim 4, wherein, The verification of the format and content of the configuration information for each type of voucher, and whether the number of voucher types conforms to the voucher combination information specification, includes: Verify whether the number of voucher types is within the preset range; If it is, then based on the preset correspondence between cell position and formatting rules, determine the formatting rules corresponding to the cell position of each piece of information in the configuration information of each type of voucher, and verify whether the format of the information conforms to the formatting rules; If each piece of information conforms to its corresponding format rules, then for each type of voucher, verify whether there is a relationship between the related information items in the configuration information of that type of voucher. If so, then it is determined that the information conforms to the voucher combination specifications.
6. The method according to claim 4, wherein, The verification of the number of users to be issued, and whether the format and content of the user information of the multiple users to be issued conform to the user information specifications, includes: Verify whether the number of users to be distributed is within the preset user number range; If it is, then based on the preset correspondence between cell position and formatting rules, determine the formatting rule corresponding to the cell position of each user information, and verify whether the user information conforms to the formatting rule; If each user information conforms to its corresponding format rules, then verify whether the content of the user information of multiple users to be issued is not repeated. If none of them are repeated, then it is determined that the information conforms to the user information specification.
7. The method according to any one of claims 4-6, wherein the configuration information for each voucher includes type, applicable region, applicable product, applicable scenario, rule identifier, and minimum spending requirement; before determining that the verification has passed, the method further includes: For each type of voucher, verify whether there is an applicable area for that type of voucher in the preset multiple areas; If it exists, then verify whether the applicable product of this type of voucher is within the applicable area of this type of voucher; If so, then if the type of voucher is a voucher, verify whether there is an applicable scenario for this type of voucher among the preset multiple scenarios, or if the type of voucher is a discount coupon, verify whether the applicable scenario for this type of voucher is a specified scenario. If any verification result is yes, then verify whether there is a rule identifier for this type of voucher among the preset multiple rule identifiers; If it exists, verify whether the applicable scenario of the voucher matches the minimum discount amount of the voucher. If a match is found, the voucher is deemed to have been verified. If all of the vouchers have been verified, the step of determining that the verification has been passed is executed.
8. The method according to any one of claims 3-6, wherein, The process of distributing the various vouchers to each user to be eligible includes: For each type of voucher, if the configuration information of the voucher does not include any association with any user to be issued to, it is determined that each user to be issued to should be issued a specified number of vouchers of that type; wherein, the specified number is the number of vouchers included in the configuration information of the voucher type. If the configuration information of this type of voucher includes the association with the target user to be issued the voucher, it is determined that the target user to be issued the voucher needs to be issued a specified number of vouchers. For each voucher to be issued to each user, a thread from the thread pool is used to generate the voucher for that user. After all the vouchers to be issued to each user have been successfully generated, the vouchers generated for that user will be issued to each user.
9. The method according to claim 8, after issuing the various vouchers to each user to be issued, the method further includes: For each user awaiting distribution, tally the vouchers to be distributed to that user this time; Send a voucher notification to the user to be issued vouchers, the voucher notification indicating that a voucher will be issued to the user in this instance.
10. A voucher dispensing device, applied to operating equipment, comprising: The receiving module is used to receive a form file uploaded by the merchant. The form file is obtained by the merchant downloading and filling in a form template after opening the issuance interface on the operating device. Different form templates contain slightly different information items, and the positions of each information item vary, including the page on which it is located. The form file includes voucher combination information and user information for multiple users to be issued vouchers. The voucher combination information includes information on various types of vouchers, common attribute information, and configuration information for each type of voucher. The common attribute information, configuration information for each type of voucher, and user information for multiple users to be issued vouchers are located in different areas of the form file. If the voucher configuration information does not include an association with any user to be issued vouchers, each user to be issued vouchers needs to be issued a specified number of vouchers of that type. If the voucher configuration information includes an association with a target user to be issued vouchers, that target user needs to be issued vouchers of that type. The parsing module is used to parse the voucher combination information and the user information of the multiple users to be issued vouchers from the table file; verify whether all the multiple users to be issued vouchers are allowed to be issued vouchers; if the verification result is that all the multiple users to be issued vouchers are allowed to be issued vouchers, then a verification request is sent to the issuing device, the verification request including the voucher combination information and the user information of the multiple users to be issued vouchers, so that the issuing device can verify the voucher combination information and the user information of the multiple users to be issued vouchers; The system receives a verification result from the issuing device. The verification result includes whether the verification passed or failed. The verification result also includes an application ID, which is a randomly generated serial number. The sending module is used to send a distribution request to the distribution device after confirming that the verification is successful. The distribution request carries the application ID and is used to request the distribution of the various vouchers to each user to be distributed, so that the distribution device distributes the various vouchers to each user to be distributed.
11. The apparatus of claim 10, further comprising: The display module is used to display the parsing results of the voucher combination information and the multiple user information before sending the distribution request to the distribution device; The detection module is used to call the sending module to execute the step of sending a distribution request to the distribution device after detecting the merchant's confirmation operation.
12. A voucher dispensing device, applied to dispensing equipment, comprising: The receiving module is used to receive distribution requests sent by the operating device. The distribution request carries an application ID and is used to request the distribution of multiple vouchers to each user to be distributed to. The user to be distributed to is a user represented by user information parsed by the operating device from a table file uploaded by the merchant. The multiple vouchers are voucher combinations represented by voucher combination information parsed by the operating device from the table file. The table file is a file obtained by the merchant after opening the voucher distribution interface on the operating device, downloading a table template from the voucher distribution interface, and filling in the table template. Different table templates include slightly different information items. The positions of each information item within the table template can vary, including the page on which the information item is located. The voucher combination information includes common attribute information and configuration information for each type of voucher. The common attribute information, configuration information for each type of voucher, and user information for multiple users to be issued vouchers are located in different areas of the table file. If the voucher configuration information does not include an association with any user to be issued vouchers, each user to be issued vouchers needs to be issued a specified number of vouchers of that type. If the voucher configuration information includes an association with a target user to be issued vouchers, that target user to be issued vouchers needs to be issued a specified number of vouchers of that type. The distribution module is used to distribute the various types of vouchers to each user to be distributed; The device further includes: The receiving module is further configured to receive a verification request sent by the operating device before receiving the distribution request sent by the operating device. The verification request includes the voucher combination information and the user information of multiple users to be distributed. The verification request is sent after the operating device parses the voucher combination information and the user information of multiple users to be distributed from the table file and verifies that all multiple users to be distributed are allowed to receive vouchers. The verification module is used to verify the voucher combination information and the user information of the multiple users to be issued vouchers; The sending module is used to send the verification result of the verification module to the operating equipment. The verification result includes whether the verification passed or failed. The verification result also includes the application ID, which is a randomly generated serial number.
13. The apparatus according to claim 12, wherein, The verification module is specifically used for: Verify whether the content and format of the public attribute information meet the public attribute information specification; If satisfied, verify the format and content of the configuration information for each type of voucher, and whether the types and quantities of vouchers conform to the voucher combination information specification. If it meets the requirements, then verify whether the number of users to be issued, the format and content of the user information of the multiple users to be issued, and whether they conform to the user information specifications. If the conditions are met, the verification is considered successful.
14. The apparatus according to claim 13, wherein, The verification module is specifically used for: Verify whether the number of voucher types is within the preset range; If it is, then based on the preset correspondence between cell position and formatting rules, determine the formatting rules corresponding to the cell position of each piece of information in the configuration information of each type of voucher, and verify whether the format of the information conforms to the formatting rules; If each piece of information conforms to its corresponding format rules, then for each type of voucher, verify whether there is a relationship between the related information items in the configuration information of that type of voucher. If so, then it is determined that the information conforms to the voucher combination specifications.
15. The apparatus according to claim 13, wherein, The verification module is specifically used for: Verify whether the number of users to be distributed is within the preset user number range; If it is, then based on the preset correspondence between cell position and formatting rules, determine the formatting rule corresponding to the cell position of each user information, and verify whether the user information conforms to the formatting rule; If each user information conforms to its corresponding format rules, then verify whether the content of the user information of multiple users to be issued is not repeated. If none of them are repeated, then it is determined that the information conforms to the user information specification.
16. The apparatus according to any one of claims 13-15, wherein the configuration information for each voucher includes type, applicable region, applicable product, applicable scenario, rule identifier, and minimum spending requirement; the apparatus further includes: The verification module is used to verify, before the verification is confirmed to be passed, whether there is an applicable area for each type of voucher in a preset number of areas. The verification module is also used to verify, if present, whether the applicable product of the voucher is within the applicable area of the voucher. The verification module is further configured to, if the type of voucher is a voucher, verify whether there is an applicable scenario for the voucher among a number of preset scenarios, or if the type of voucher is a discount coupon, verify whether the applicable scenario for the voucher is a specified scenario. The verification module is further configured to verify whether a rule identifier for the voucher exists among a plurality of preset rule identifiers if any verification result is yes. The verification module is also used to verify, if it exists, whether the applicable scenario of the voucher matches the minimum discount amount of the voucher. The determination module is used to determine that the voucher is verified if a match is found, and when all of the vouchers are verified, the verification module is invoked to execute the step of determining that the verification is successful.
17. The apparatus according to any one of claims 12-15, wherein, The disbursement module is specifically used for: For each type of voucher, if the configuration information of the voucher does not include any association with any user to be issued to, it is determined that each user to be issued to should be issued a specified number of vouchers of that type; wherein, the specified number is the number of vouchers included in the configuration information of the voucher type. If the configuration information of this type of voucher includes the association with the target user to be issued the voucher, it is determined that the target user to be issued the voucher needs to be issued a specified number of vouchers. For each voucher to be issued to each user, a thread from the thread pool is used to generate the voucher for that user. After all the vouchers to be issued to each user have been successfully generated, the vouchers generated for that user will be issued to each user.
18. The apparatus of claim 17, further comprising: The statistics module is used to, after distributing the various types of vouchers to each user to be distributed, count the vouchers distributed to that user in this instance. The sending module is used to send a voucher notification to the user to be issued the voucher, the voucher notification being used to indicate that a voucher will be issued to the user in this issuance.
19. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-2 or 3-9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-2 or 3-9.
21. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-2 or 3-9.