A method for verifying and canceling electronic vouchers to prevent reselling
Through the information collection and verification module combined with distance verification and AES encryption technology, the problem of insufficient validity period of dynamic codes in electronic coupon verification is solved, preventing reselling, and protecting the rights and activities of normal users.
Patent Information
- Application Number
- CN202410018292.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-05
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-01-05
AI Technical Summary
The existing electronic coupon verification method has the problem that the dynamic code validity period cannot be set too short, resulting in the reseller who can transfer or sell electronic coupons privately, affecting the rights and activities of normal users.
Collect user personal information through the information collection module, set priority verification, use the information verification model module to verify user identity, and generate 'fuzzy code' or 'clear code' according to the distance between the user and the merchant, limiting the display of the verification code and Use, combine AES encryption and validity period to prevent reselling.
It effectively prevents reselling of electronic coupons, protects the rights and interests of normal users, improves the security and user experience of electronic coupon verification, and avoids resellers from obtaining verification codes by taking screenshots or taking photos.
Smart Images

Figure CN117911025B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information service technology, and more specifically, relates to a method for verifying electronic coupons to prevent resale. Background Technology
[0002] With the continuous development of the internet industry, distributing electronic coupons to users through promotional activities, and allowing users to obtain discounts by using the received electronic coupons, has become a common business scenario in the industry.
[0003] Currently, the redemption method for electronic coupons involves users displaying the coupon to merchants. Electronic coupons are generally static or dynamic codes. For example, the electronic voucher redemption method published in Chinese patent application CN114240436A obtains the dynamic code of the electronic coupon; parses the dynamic code to obtain the static code, and verifies the static code; if the static code is successfully verified, the dynamic code is verified; and if the dynamic code is successfully verified, the electronic coupon is redeemed.
[0004] However, this method still has a problem. When the user displays a static or dynamic code for the e-coupon, the dynamic code has an expiration date. The expiration date cannot be set too short, as a short expiration date will cause the e-coupon to frequently expire during redemption, inconveniencing legitimate users. This allows resellers to privately screenshot and transfer or even sell the e-coupons to others for profit. As long as the buyer redeems the coupon within the expiration period, the redemption will be successful. This provides an opportunity for resellers, preventing legitimate users from receiving the e-coupons and affecting the effectiveness of the promotion. Summary of the Invention
[0005] The purpose of this invention is to provide a method for redeeming electronic coupons to prevent resale, thereby completely solving the problem of reselling electronic coupons affecting the rights and interests of normal users and the effectiveness of activities.
[0006] To solve the above-mentioned technical problems, the technical solution provided by the present invention is as follows:
[0007] This invention relates to a method for redeeming electronic coupons to prevent resale, comprising the following steps:
[0008] S1. Collect users' personal information using the information collection module, and set priority for the collected personal information, with facial information within the personal information being the last level to be collected;
[0009] S2. Use the information verification model module to verify whether the collected personal information belongs to the user. The information verification model module has a preset risk assessment value. The risk assessment value is the sum of the scores of other personal information that can be collected, excluding facial information. When the collected personal information is lower than the set risk assessment value, the verification fails and proceeds to facial information collection verification. Otherwise, the verification is successful and the user is identified as the user.
[0010] S3. Pre-set the maximum distance threshold within the electronic coupon management platform;
[0011] S4. Within the electronic coupon management platform, users can open the electronic coupon through the application and query the electronic coupon number details by calling the query interface of the electronic coupon management platform in the background;
[0012] S5. The application obtains the user's location information and sends it to the e-coupon management platform. It calculates the maximum and minimum latitude and longitude that merchants within the user's maximum distance threshold can reach. Based on the maximum and minimum latitude and longitude, it compares them with the merchant's own latitude and longitude to filter out merchants within the range and generates a merchant list. The e-coupon management platform calculates the distance between the user and the merchant based on the user's location information and the location information of the merchant applicable to the e-coupon. If the distance is greater than the maximum distance threshold, a "fuzzy code" mark is generated; if it is less than or equal to the maximum distance threshold, a "clear code" mark is generated. The e-coupon management platform feeds back the mark content to the user.
[0013] S6. If the user application receives a “fuzzy code” flag, it will display a fuzzy verification code, and the merchant’s verification will fail; if the user application receives a “clear code” flag, it will display a clear verification code, and the merchant’s verification will succeed.
[0014] As a further improvement of the present invention, the verification code generated in step S6 above is a dynamic code consisting of a verification coupon code and several random numbers.
[0015] As a further improvement of the present invention, after generating the verification code in step S6 above, the verification code is encrypted with AES and the validity period of the dynamic code is set; in step S6 above, after the application displays a clear verification code, the electronic coupon management platform first decrypts the verification code with AES, obtains the verification code information and performs verification. If the dynamic code expires, the dynamic code is obtained again. If the dynamic code has not expired, the verification is successful.
[0016] As a further improvement of the present invention, the validity period of the above-mentioned dynamic code is 60 seconds.
[0017] As a further improvement of the present invention, the maximum distance threshold mentioned above is 1 kilometer.
[0018] As a further improvement of the present invention, the formula for calculating the maximum and minimum latitude and longitude that merchants can reach within the maximum distance threshold range of the user in step S5 above is as follows:
[0019] double dlng=(2*Math.asin(Math.sin(1 / (2*6378.137) / Math.cos(lng1*Math.PI / 180)))*180 / Math.PI;
[0020] double min lng = lng1 - dlng;
[0021] double max lng = lng1 + dlng;
[0022] double dlat=(1 / 6378.137)* 180 / Math.PI;
[0023] double min lat = lat1 - dlat;
[0024] double max lat = lat1 + dlat;
[0025] Where double indicates two decimal places, Math indicates the function method, lng1 represents the user's longitude, PI represents pi (π), lat1 represents the user's latitude, min lng represents the minimum longitude, max lng represents the maximum longitude, min lat represents the minimum latitude, and max lat represents the maximum latitude.
[0026] As a further improvement of the present invention, the formula for calculating the distance between the user and the merchant in step S5 above is as follows:
[0027] The formula `doubledistance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin((lat1 * Math.PI / 180 - lat2 * Math.PI / 180) / 2),2) + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * Math.pow(Math.sin((lng1 * Math.PI / 180 - lng2 * Math.PI / 180) / 2),2)` represents the distance between the user and the merchant. In this formula, `distance` represents the distance between the user and the merchant, `sqrt` represents the square root, `pow` represents the POW function, `lng1` represents the user's longitude, `lat1` represents the user's latitude, `lng2` represents the merchant's longitude, and `lat2` represents the merchant's latitude. This distance is compared to a maximum distance threshold of 1 kilometer. If the distance is greater than the maximum distance threshold, a "fuzzy code" marker is generated; if it is less than or equal to the maximum distance threshold, a "clear code" marker is generated.
[0028] As a further improvement of the present invention, in step S5 above, the electronic coupon management platform generates a list of merchant stores by comparing the merchant's own latitude and longitude with the maximum and minimum latitude and longitude. By querying the electronic coupon number, the batch number of the ticket product to which the electronic coupon belongs is obtained, thereby further filtering the merchant stores that meet the conditions in the store list, circulating the list of merchant stores that meet the conditions, and then calculating the distance between the customer and the merchant.
[0029] As a further improvement of the present invention, in step S1 above, personal information includes mobile phone number, mobile phone model, WiFi connection information, virtual location status, facial information, user application account information, and user's latitude and longitude, etc.; based on the above information, according to customer habits, other verification methods other than facial recognition that the application backend can verify on its own are preferred, and verification is passed if the verification is successful; if the verification cannot be completed, facial recognition is used as the final means of verifying the user to complete the final verification.
[0030] As a further improvement of the present invention, when collecting information in step S1 above, the information collection module monitors whether the user has the permission to open the information collection corresponding to the personal information; the information collection module collects information from the user in a set order and performs a risk assessment on the collected information.
[0031] As a further improvement of the present invention, in step S2 above, during the process of verifying whether the user is the actual user using the information verification model module, based on the user's permission opening habits, for customers who have already opened APP location permissions, it is checked whether the user has enabled virtual location, to prevent resellers from passing verification through virtual location in other locations. If the location is real and unmodified within the range, it is included in the risk assessment value. Then, it is checked whether the user's location is within the airport area. If it is within the airport area, it is also included in the risk assessment value. For customers who have already opened WiFi permissions by default, if the customer's device is connected to the WiFi network, it is verified whether the user's WiFi information is consistent with the WiFi information configured at the airport. If they are consistent, the verification is passed and included in the risk assessment value; otherwise, it is not included. For customers who have opened the permission to access information within the APP, it is checked whether the user's account information within the application is consistent with the recipient of the electronic coupon. If the information matches, it passes verification and is included in the risk assessment value. For customers who have granted permission to read their phone status, the system checks whether the phone number matches the one used to claim the coupon; if they match, it is included in the risk assessment value. The system also checks whether the user's phone model matches the one used when claiming the coupon; if they match, it is included in the risk assessment value. The risk assessment value is detected and accumulated in real time according to the order set within the module. All of the above verifications are security verifications that run automatically in the background without disturbing the customer. If the user still fails to pass verification, it means that the collected user information is lower than the set risk assessment value, the user's required permissions are insufficient, and verification failure prevents the user from claiming the coupon. The user is then reminded to use facial recognition as the final means of verification to complete their identity verification. Because facial recognition can make customers feel monitored and thus cause aversion, it is only used as a final means of verification.
[0032] As a further improvement of the present invention, in step S6 above, the verification code is valid for a certain period of time. The verification code interface restricts screen capture through background permissions and activates the front camera to detect whether there is a camera in front. If there is, the dynamic code becomes blurred, so as to prevent resellers from trading the verification code after it has been verified.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0034] 1. The electronic coupon redemption method for preventing resale involved in this invention can, before a user obtains an electronic coupon, collect personal information such as the user's mobile phone number, mobile phone model, WiFi connection information, virtual location status, facial information, user's in-application account information, and the user's latitude and longitude from the information collection module. Prioritize the verification of personal information, with facial information verification as the final verification method and other methods as the first priority. While minimizing disturbance to the customer's facial monitoring and causing them aversion or inconvenience, the information verification module verifies whether the information belongs to the user.
[0035] 2. The electronic coupon redemption method for preventing resale involved in this invention obtains the user's location information when the user acquires the electronic coupon, calculates the distance between the user and the merchant, and if the distance between the user and the merchant is greater than a maximum distance threshold, returns an ambiguous redemption code to the user, preventing the merchant from redeeming the ambiguous code; if the distance between the user and the merchant is less than or equal to the maximum distance threshold, returns a clear redemption code to the user, allowing the merchant to redeem the code based on the redemption coupon code and dynamic code displayed on it. In this way, resellers cannot resell redemption codes, and criminals cannot steal the redemption codes of legitimate users, thus protecting the rights and interests of legitimate users and avoiding any impact on the effectiveness of the activity.
[0036] 3. The electronic coupon redemption method for preventing resale involved in this invention, when calculating the distance between the user and the merchant and determining that the distance is less than or equal to the maximum distance threshold, displays a dynamic code in the user application. The user uses the dynamic code to redeem the coupon at the merchant. The dynamic code has an expiration period, which further improves the security of electronic coupon redemption.
[0037] 4. The electronic coupon redemption method for preventing resale involved in this invention can restrict screen capture through background permissions on the dynamic code display interface, and activate the front camera to detect whether there is a camera in front. If there is, the dynamic code becomes blurred, thus preventing resellers from reselling electronic coupons by taking screenshots or photos.
[0038] 5. The electronic coupon verification method for preventing resale involved in this invention has a preset risk assessment value in the information verification model module. The risk assessment value is the sum of the scores of other personal information that can be collected at present, excluding facial information. When the risk assessment value of personal information is lower than the set risk assessment value, the verification fails and enters facial information collection verification. Multiple personal information are used to jointly verify the risk, which can not only ensure the security of verification, but also simplify the verification operation according to the user's permission opening habits. Attached Figure Description
[0039] Figure 1 This is a schematic diagram illustrating the steps of an electronic coupon redemption method for preventing resale according to the present invention;
[0040] Figure 2 This is a flowchart illustrating the generation of fuzzy electronic coupons or verification codes in the electronic coupon verification method of the present invention.
[0041] Figure 3 This is a flowchart illustrating the process of redeeming electronic coupons using the electronic coupon redemption method of the present invention. Detailed Implementation
[0042] Specific Implementation Example 1: Please refer to the appendix Figure 1 -Appendix Figure 3 A method for redeeming electronic coupons to prevent resale includes the following steps:
[0043] S1. Collect users' personal information using an information collection module, including but not limited to mobile phone number, mobile phone model, WiFi connection information, virtual location information, facial information, user application account information, and user's latitude and longitude. The collection of personal information is prioritized, with facial information being the lowest priority. Before collecting facial information, the information collection module monitors whether the user has granted permissions to collect the information corresponding to their personal information. For example, when collecting the user's mobile phone number and model information, it checks whether the user's phone has permission to read the phone's status by default; when collecting WiFi connection information, it checks whether the user's phone has WiFi permission enabled; when collecting virtual location information, it checks whether the user's phone has app location permission enabled; and when collecting user application information... When using in-app account information, whether the user has granted permission to access in-app account information, and when collecting facial information, whether the user has granted camera permission, etc., are all permissions sorted in a set order, such as permission to read phone status, app location permission, WiFi permission, and permission to access in-app account information. When the information collection module starts collecting information, it collects information from the user in this order (except for camera permission) and performs a risk assessment on the collected information in real time. If the risk assessment value of the information is higher than the preset value, the verification is successful; otherwise, the verification fails and proceeds to the final camera permission facial information verification. Because the verification methods are prioritized in advance, the appropriate verification method can be selected based on each customer's default permissions, improving the user experience.
[0044] Furthermore, the risk assessment value is the cumulative score of other personal information that can be collected, excluding facial information. The module pre-sets scores for other personal information: mobile phone number matching score a1, mobile phone model matching score a2, WiFi connection matching score a3, real location without virtual location score a4, user account information matching score a5, user location within the airport area matching score a6, and so on. The corresponding scores are pre-set. When there is no match or correspondence, the score is not included. When the total score accumulated in real time is higher than the preset risk assessment value, the verification is successful; otherwise, the verification fails.
[0045] S2. In the process of verifying user identity using the information verification model module, based on user permission granting habits, for customers who have granted permission to read phone status, the system checks whether the phone number matches the current coupon claim; if they match, score a1 is awarded. It also checks whether the user's phone model matches the one used when claiming the coupon; if they match, score a2 is awarded, and so on. For customers who have granted app location permissions, the system checks whether the user has enabled virtual location to prevent resellers from bypassing verification through virtual location in different locations. If the location is within range and genuine without modification, score a4 is awarded. Then, it checks whether the user's location is within the airport area; if within the airport area, score a6 is also awarded. For customers who have defaulted to WiFi permission, if the customer's device is connected to the WiFi network, the system verifies whether the user's WiFi information matches the airport's configured WiFi information; if they match, the corresponding score a3 is awarded; otherwise, no score is awarded. For customers who have enabled AP... For customers with access to information within the P application, the system checks whether the user's account information matches the recipient of the electronic coupon. If they match, the verification is successful and the corresponding score a5 is awarded. All of the above verifications are security verifications that run automatically in the background without disturbing the customer. The score is accumulated in real time based on the order set within the module. If the user still fails verification by the end, it means that the collected user information is below the set risk assessment value and the user's default permissions are insufficient. If the verification fails, the user cannot continue to receive coupons and is reminded to complete identity verification through facial recognition. If the camera permission is not enabled, the user should be reminded to enable it. If the camera permission is enabled, the user will directly enter facial recognition mode. Facial recognition is used as the final means of verifying the user and is used when other verification methods fail. This is to avoid the customer feeling monitored and their privacy being violated, which could cause resentment. Once identity verification is completed, the user can be confirmed as the actual user.
[0046] S3. Set a maximum distance threshold of 1 kilometer within the electronic coupon management platform. If the distance is too far, it will allow resellers to remotely obtain electronic coupons. If the distance is too close, it may result in too few nearby merchants being selected, affecting the user experience.
[0047] S4. As attached Figure 2 As shown, within the electronic coupon management platform, users open the electronic coupon through the application and query the electronic coupon number by calling the query interface of the electronic coupon management platform in the background;
[0048] S5. The application obtains the user's location information and sends it to the electronic coupon management platform. Based on the user's latitude and longitude values, it calculates the maximum and minimum latitude and longitude that merchants within 1 kilometer of the user can reach using a formula:
[0049] double dlng=(2*Math.asin(Math.sin(1 / (2*6378.137) / Math.cos(lng1*Math.PI / 180)))*180 / Math.PI;
[0050] double min lng = lng1 - dlng;
[0051] double max lng = lng1 + dlng;
[0052] double dlat=(1 / 6378.137)* 180 / Math.PI;
[0053] double min lat = lat1 - dlat;
[0054] double max lat = lat1 + dlat;
[0055] For example: User A: Longitude: 120.431657, Latitude: 30.228714;
[0056] double dlng=(2*Math.asin(Math.sin(1 / (2*6378.137) / Math.cos(120.431657*Math.PI / 180)))*180 / Math.PI;
[0057] dlng=0.017755;
[0058] double min lng =120.431657- 0.017755;
[0059] min lng = 120.413902;
[0060] double max lng =120.431657+ 0.017755;
[0061] max lng = 120.449412
[0062] double dlat=(1 / 6378.137)* 180 / Math.PI;
[0063] dlat=0.008993;
[0064] double min lat =30.228714-0.008993;
[0065] min lat = 30.219721;
[0066] double max lat =30.228714+0.008993;
[0067] max lat = 30.237707;
[0068] Where double indicates rounding to two decimal places, Math indicates a function method, PI represents pi (π), lng1 represents the user's longitude, lat1 represents the user's latitude, min lng represents the minimum longitude, max lng represents the maximum longitude, min lat represents the minimum latitude, and max lat represents the maximum latitude), merchants within the range are filtered based on the maximum and minimum longitude and latitude compared to their own latitude and latitude, and a merchant list is generated. The coupon number is used to query the batch number of the ticket product to which the e-coupon belongs, and the list of stores of merchants applicable to the e-coupon is searched based on the batch number of the ticket product. This initially reduces the number of merchants to be counted, simplifying the direct calculation of the distance between merchants and users. The e-coupon management platform further calculates the distance between users and merchants using a formula based on the user's location information and the location information of merchants in the merchant list: Calculation formula:
[0069] The formula `doubledistance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin((lat1 * Math.PI / 180 - lat2 * Math.PI / 180) / 2), 2) + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * Math.pow(Math.sin((lng1 * Math.PI / 180 - lng2 * Math.PI / 180) / 2), 2)` represents the distance between the user and the merchant. In this formula, `distance` represents the distance between the user and the merchant, `sqrt` represents the square root, `pow` represents the POW function, `lng1` represents the user's longitude, `lat1` represents the user's latitude, `lng2` represents the merchant's longitude, and `lat2` represents the merchant's latitude. This distance is compared to the maximum distance threshold of 1 kilometer. Two cases are then discussed:
[0070] For example: Merchant A: Longitude: 120.423902, Latitude: 30.229721;
[0071] doubledistance=2*Math.asin(Math.sqrt(Math.pow(Math.sin((30.228714*Math.PI / 180-30.229721*Math.PI / 180) / 2),2)+Math.cos(30.22 8714*Math.PI / 180)*Math.cos(30.229721*Math.PI / 180)*Math.pow(Math.sin(120.431657*Math.PI / 180-120.423902*Math.PI / 180) / 2),2);
[0072] distance = 0.754268; The distance between user A and merchant A is 0.754268 kilometers;
[0073] Merchant B: Longitude: 120.453902, Latitude: 30.249721;
[0074] doubledistance=2*Math.asin(Math.sqrt(Math.pow(Math.sin((30.228714*Math.PI / 180-30.249721*Math.PI / 180) / 2), 2)+Math.cos(30.228714*Math.PI / 180) *Math.cos(30.249721*Math.PI / 180)*Math.pow(Math.sin(120.431657*Math.PI / 180-120.453902*Math.PI / 180) / 2),2);
[0075] distance=3.16944; The distance between user A and merchant B is 3.16944 kilometers;
[0076] If the person is a reseller, since they sell electronic coupons to coupon holders, the distance between them and the merchants is likely to be greater than the maximum distance threshold of 1 kilometer. Therefore, the store list displayed on the application on the reseller's electronic device cannot show stores near the coupon holder. At this time, even if the reseller manually searches for stores near the coupon holder, the distance between the user and the merchant calculated by the electronic coupon management platform is still greater than the maximum distance threshold. In this case, the electronic coupon management platform records the "fuzzy code" mark and feeds it back to the user's application.
[0077] If the user is a normal user, the merchants they select will be within a 1-kilometer radius of themselves. At this time, the e-coupon management platform records the "clear code" mark and feeds the mark content back to the user's application.
[0078] S6. If the user application receives a "fuzzy code" flag, a fuzzy verification code will be displayed, and the merchant's verification will fail. If the user application receives a "clear code" flag, a clear verification code combined with a dynamic code consisting of several random digits will be displayed. The verification code will then be AES encrypted, and the dynamic code will have a validity period of 60 seconds. Within the validity period, the verification code interface will restrict screen capture through application background permissions and will also use application background permissions to activate the front-facing camera to detect the presence of a camera. If a camera is detected, the dynamic code will become fuzzy. This prevents resellers from potentially bypassing verification by being near the voucher holder and sending a screenshot or photo of the verification code interface to the holder, thus preventing loopholes in the verification process and protecting the rights of merchants or users. (See attached image) Figure 3 As shown, users redeem their vouchers at merchants using the redemption code and dynamic code. The merchant's POS machine reads the dynamic code, and the electronic voucher management platform decrypts the redemption code using AES to obtain the redemption code information and retrieves the corresponding dynamic code from the Redis cache. At this point, it is determined whether the dynamic code has expired. If the dynamic code has expired, a new dynamic code is obtained; if the dynamic code has not expired, the merchant's redemption is successful.
[0079] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for verifying and canceling electronic vouchers to prevent reselling, characterized in that: The following steps are involved: S1. Collect the user's personal information using the information collection module. The collected personal information is prioritized in advance, and the facial information in the personal information is the last level of collection; S2. Use the information verification model module to verify whether the collected personal information is the user himself. The information verification model module has a preset risk assessment value. The risk assessment value is the cumulative score of other personal information that can be collected except for the non-face information currently. When the collected personal information is lower than the set risk assessment value, the verification fails and enters the face information collection verification to verify whether it is the user himself. Otherwise, the verification succeeds and it is the user himself. S3. Pre-set the maximum distance threshold in the electronic voucher management platform; S4. The user in the electronic voucher management platform opens the electronic voucher through the application and calls the query interface of the electronic voucher management platform in the background to query the electronic voucher number details; S5. The application obtains the user's location information and sends it to the e-voucher management platform to calculate the maximum and minimum latitude and longitude that the merchant can reach within the user's maximum distance threshold. The maximum and minimum latitude and longitude formulas are: double dlng=(2*Math.asin(Math.sin(1 / (2*6378.137) / Math.cos(lng1 *Math.PI / 180)))*180 / Math.PI; double min lng =lng1-dlng; double max lng =lng1+ dlng; double dlat=(1 / 6378.137)* 180 / Math.PI; double min lat =lat1- dlat; double max lat =lat1+ dlat; Where double means taking two decimal places, Math means function method, lng1 means the user's longitude, PI means pi, lat1 means the user's latitude, min lng means the minimum longitude, max lng means the maximum longitude, min lat means the minimum latitude, and max lat means the maximum latitude. By comparing the maximum longitude and latitude with the minimum longitude and latitude, the merchants within the range are screened out and a merchant list is generated; The electronic voucher management platform calculates the distance between the user and the merchant based on the user's location information and the location information of the merchant to which the electronic voucher applies. The formula for the distance between the user and the merchant is: doubledistance=2*Math.asin(Math.sqrt(Math.pow(Math.sin((lat1*Math.PI / 180-lat2*Math.PI / 180) / 2),2)+Math.cos(lat1*Math.PI / 180)*Math.cos(lat2*Math.PI / 180)*Math.pow(Math.sin((lng1*Math.PI / 180- lng2*Math.PI / 180) / 2),2); In the formula, distance represents the distance between the user and the merchant, sqrt represents square root, pow represents pow function, lng1 represents the user's longitude, lat1 represents the user's latitude, lng2 represents the merchant's longitude, and lat2 represents the merchant's latitude; If it is greater than the maximum distance threshold, a "fuzzy code" mark is generated; If it is less than or equal to the maximum distance threshold, a "clear code" mark is generated, and the electronic voucher management platform feeds back the mark content to the user end; S6. The verification code is encrypted by AES, and the validity period of the dynamic code is set; if the user application receives the "fuzzy code" mark, the fuzzy verification code is displayed, and the merchant verification fails; if the user application receives the "clear code" mark, the clear verification code is displayed, and the electronic voucher management platform first decrypts the verification code by AES, obtains the information of the verification code and performs verification. If the dynamic code expires, the dynamic code is obtained again. If the dynamic code does not expire, the merchant verification is successful.
2. The electronic voucher cancellation method for preventing reselling according to claim 1, characterized in that: The verification code generated in step S6 is a dynamic code consisting of a verification voucher code and a number of random digits.
3. The electronic voucher cancellation method for preventing reselling according to claim 2, characterized in that: The validity period of the dynamic code is 60 seconds, and the maximum distance threshold is 1 kilometer.
4. The electronic voucher verification method for preventing reselling according to claim 1, characterized in that: In step S5, the electronic voucher management platform generates a merchant store list based on the maximum longitude and latitude and the minimum longitude and latitude compared to the merchant's own longitude and latitude, and obtains the ticket product batch number to which the electronic voucher belongs by querying the electronic voucher number details, thereby further screening the qualified merchant stores in the store list, looping the merchant store list information, and then calculating the distance between the customer and the merchant.
5. The electronic voucher verification method for preventing reselling according to claim 1, characterized in that: The personal information collected in step S1 also includes mobile phone number, mobile phone model, WiFi connection information, virtual positioning status and account information within the user application; the above information gives priority to other verification methods besides face verification that can be verified by the application background based on customer habits, and the verification is passed if the verification is successful; if the verification cannot be completed, face recognition is used as the final means to verify the user to complete the final verification.
6. The electronic voucher cancellation method for preventing reselling according to claim 1, characterized in that: The information collection module in step S1 monitors the permissions for collecting and opening information corresponding to the user's personal information, collects information from users in order of priority, and then conducts risk assessment on the collected information.
7. The electronic voucher verification method for preventing reselling according to claim 3 is characterized in that: The verification code in the above step S6 is within the validity period. The verification code interface is captured through the background permission restriction screen, and the front camera is started to detect whether there is a camera in front. If there is, the verification code becomes blurred.
