Electronic ticket generation method, device, medium and electronic equipment
By receiving and processing the random ticket identification and material data sent by the server, combined with QR code synthesis and matching logic configuration, the problem of insufficient matching accuracy and interactivity of existing electronic tickets is solved, and a more efficient user experience and ceremony are achieved. sense, improving the effect of the electronic ticket generation method.
Patent Information
- Application Number
- CN202110548168.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-19
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-05-19
AI Technical Summary
Existing electronic ticket generation methods have shortcomings in matching accuracy and interactivity, and the user experience is poor, lacking a sense of ritual, and unable to meet users' needs for matching results.
By receiving the random ticket identification and ticket material data sent by the server, the ticket drawing process and QR code synthesis are performed, and the matching logic configuration and scan code matching module are combined to achieve accurate matching and identification between the scanned terminal and the scanning party terminal, and display Target reward information to enhance user experience and sense of ritual.
It improves the accuracy of matching and the smoothness of user experience, enhances the depth of activity interaction and communication between users, and increases the sense of ritual and return of users participating in the activity.
Smart Images

Figure CN113159869B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an electronic ticket generation method, an electronic ticket generation device, a computer-readable medium, and an electronic device. Background Art
[0002] With the development of the Internet and the popularization of terminals, people have put forward more intelligent and humanized demands for transactions and social interactions. In the application scenario of electronic tickets, users can trigger the matching of electronic tickets between terminals by clicking on a specific page.
[0003] However, this way of experiencing the matching process on a specific page by a single person lacks interactivity and the matching accuracy is not high. In addition, the background material of the electronic tickets is the same, which cannot meet the user's needs for feeling the matching results. The sense of ritual of event participation is weak and the user experience is poor.
[0004] In view of this, there is an urgent need in the art to develop a new method and device for generating electronic tickets.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the technical background of the present application, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide an electronic ticket generation method, an electronic ticket generation device, a computer-readable medium and an electronic device, thereby overcoming the technical problem of low matching degree of electronic tickets at least to a certain extent.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to one aspect of an embodiment of the present disclosure, there is provided an electronic ticket generation method, which is applied to a scanned terminal, the method comprising: receiving a random ticket identifier and ticket material data sent by a server, and performing ticket drawing processing on the random ticket identifier and the ticket material data to obtain an original electronic ticket;
[0009] Performing a QR code synthesis process on the random ticket identifier to obtain a QR code to be identified by the scanned terminal, and performing an object integration process on the QR code to be identified and the original electronic ticket to obtain a QR code to be identified displayed on the original electronic ticket;
[0010] Performing matching logic configuration on the random ticket identifier to obtain a logic configuration result;
[0011] In response to a scanning event of the to-be-identified QR code on the original electronic ticket, matching and identifying the to-be-identified QR code according to the logic configuration result to obtain a matching and identifying result;
[0012] Based on the reward issuance processing performed by the server on the original electronic ticket according to the matching identification result, the target reward information corresponding to the reward issuance processing is received, and the target reward information is displayed on the original electronic ticket to obtain the target electronic ticket.
[0013] According to one aspect of an embodiment of the present disclosure, there is provided an electronic ticket generating device, which is applied to a scanned terminal, and the device comprises: a data receiving module, which is configured to receive a random ticket identifier and ticket material data sent by a server, and perform ticket drawing processing on the random ticket identifier and the ticket material data to obtain an original electronic ticket;
[0014] The object integration module is configured to perform a two-dimensional code synthesis process on the random ticket identifier to obtain a two-dimensional code to be identified by the scanned terminal, and perform an object integration process on the two-dimensional code to be identified and the original electronic ticket to obtain a two-dimensional code to be identified displayed on the original electronic ticket;
[0015] A logic configuration module is configured to perform matching logic configuration on the random ticket identifier to obtain a logic configuration result;
[0016] A code scanning and matching module is configured to respond to a code scanning event of the to-be-identified QR code on the original electronic ticket, and to perform matching and identification processing on the to-be-identified QR code according to the logic configuration result to obtain a matching and identification result;
[0017] The reward display module is configured to receive target reward information corresponding to the reward issuance processing based on the reward issuance processing performed by the server side on the original electronic ticket according to the matching identification result, and display the target reward information on the original electronic ticket to obtain the target electronic ticket.
[0018] In some embodiments of the present disclosure, based on the above technical solution, the data receiving module includes: a material identification submodule configured to perform material data identification processing on the ticket material data to obtain a material identification result;
[0019] The recognition result submodule is configured to perform ticket drawing processing on the random ticket identifier and the ticket material data based on the material recognition result to obtain an original electronic ticket.
[0020] In some embodiments of the present disclosure, based on the above technical solution, the recognition result submodule includes: a material splicing unit configured to, if the material recognition result is that the ticket material data includes primary index material data and secondary index material data, perform material data splicing on the primary index material data and the secondary index material data to obtain a material data address of the ticket material data;
[0021] The ticket generating unit is configured to perform ticket generating processing on the random ticket identifier based on the material data address to obtain an original electronic ticket, and perform ticket display processing on the original electronic ticket to display the original electronic ticket.
[0022] In some embodiments of the present disclosure, based on the above technical solution, the recognition result submodule includes: a default material unit configured to obtain a default material address of the default material data if the material recognition result is that the ticket material data includes default material data;
[0023] The ticket display unit is configured to perform ticket generation processing on the random ticket identifier based on the default material address to obtain an original electronic ticket, and perform ticket display processing on the original electronic ticket to display the original electronic ticket.
[0024] In some embodiments of the present disclosure, based on the above technical solution, the ticket material data further includes primary index material data and secondary index material data, and the electronic ticket generation device further includes: an update material module configured to perform material data splicing on the primary index material data and the secondary index material data based on the matching recognition result to obtain an update material address;
[0025] The ticket update module is configured to perform address update processing on the update material address and the default material address to obtain an address update result, and perform material update processing on the original electronic ticket according to the address update result to obtain the updated original electronic ticket.
[0026] In some embodiments of the present disclosure, based on the above technical solution, the object integration module includes: an identification picture submodule, configured to perform identification picture processing on the random ticket identification to obtain a random ticket picture;
[0027] The picture generation submodule is configured to perform a QR code generation process on the random ticket picture to obtain a QR code to be identified by the scanned terminal.
[0028] In some embodiments of the present disclosure, based on the above technical solution, the logic configuration module includes: a rule configuration submodule configured to perform a QR code rule configuration on the random ticket identifier to obtain a rule configuration result;
[0029] The path configuration submodule is configured to perform page path configuration on the rule configuration result to obtain a code scanning matching page, so as to use the code scanning matching page as a logic matching result.
[0030] In some embodiments of the present disclosure, based on the above technical solution, the code scanning and matching module includes: an identification sending submodule, configured to use the code scanning and matching page to obtain the random ticket identification that generates the QR code to be identified, and send the random ticket identification to the server side to perform matching and identification processing on the QR code to be identified;
[0031] The identification matching submodule is configured to receive the identification matching result of the random ticket identification sent by the server to obtain the matching recognition result of the QR code to be recognized.
[0032] In some embodiments of the present disclosure, based on the above technical solution, the electronic ticket generating device further includes: a data integration module, configured to receive the paired user data sent by the server, and perform data integration processing on the original electronic ticket and the paired user data to obtain the original electronic ticket displaying the paired user data.
[0033] In some embodiments of the present disclosure, based on the above technical solution, the electronic ticket generating device further includes: a matching prompt module, which is configured to generate matching prompt information corresponding to the matching recognition result if the matching recognition result is a failure to match the QR code to be recognized, and display the matching prompt information on the scanned terminal.
[0034] According to one aspect of an embodiment of the present disclosure, another electronic ticket generation method is provided, which is applied to a server, and includes: acquiring initial user data stored in a scanned terminal, and performing pairing state setting on the initial user data to obtain paired user data;
[0035] Perform ticket material setting on the paired user data to obtain ticket material data, and generate a random ticket identifier;
[0036] sending the paired user data, the random ticket identifier and the ticket material data to the scanned terminal to generate an original electronic ticket displayed on the scanned terminal;
[0037] Receive the random ticket identifier sent by the scanned terminal, and obtain the ticket identifier to be matched stored in the scanning terminal corresponding to the scanned terminal;
[0038] Performing identification matching processing on the random ticket identification sent by the scanned terminal and the ticket identification to be matched to obtain an identification matching result, and sending the identification matching result to the scanned terminal;
[0039] Based on the identification matching result, the original electronic ticket is subjected to reward issuance processing, so as to send target reward information corresponding to the reward issuance processing to the scanned terminal.
[0040] According to one aspect of an embodiment of the present disclosure, another electronic ticket generation device is provided, which is applied to a server side, and includes: a state setting module, configured to obtain initial user data stored by a scanned terminal, and perform pairing state setting on the initial user data to obtain paired user data;
[0041] A material setting module, configured to perform ticket material setting on the paired user data to obtain ticket material data and generate a random ticket identifier;
[0042] a data sending module configured to send the paired user data, the random ticket identifier and the ticket material data to the scanned terminal to generate an original electronic ticket displayed on the scanned terminal;
[0043] An identification acquisition module is configured to receive the random ticket identification sent by the scanned terminal, and obtain the to-be-matched ticket identification stored in the scanning terminal corresponding to the scanned terminal;
[0044] An identification matching module is configured to perform identification matching processing on the random ticket identification sent by the scanned terminal and the to-be-matched ticket identification to obtain an identification matching result, and send the identification matching result to the scanned terminal;
[0045] The reward issuing module is configured to perform a reward issuing process on the original electronic ticket based on the identification matching result, so as to send target reward information corresponding to the reward issuing process to the scanned terminal.
[0046] In some embodiments of the present disclosure, based on the above technical solution, the state setting module includes: a shuffling submodule configured to shuffle the initial user data to obtain disordered user data;
[0047] The state setting submodule performs pairing state setting on the disordered user data to obtain paired user data that are paired in pairs.
[0048] In some embodiments of the present disclosure, based on the above technical solution, the shuffling submodule includes: a reverse order traversal unit, configured to perform data sorting processing on the initial user data to obtain sorted user data, and perform reverse order traversal processing on the sorted user data to obtain target user data in the sorted user data;
[0049] The random screening unit is configured to perform random screening processing on the sorted user data to obtain random user data, and perform random exchange processing on the target user data and the random user data to obtain random user data.
[0050] In some embodiments of the present disclosure, based on the above technical solution, the state setting module includes: a neighboring screening unit configured to perform a previous matching screening process on the disordered user data to obtain previous user data, and perform a subsequent matching screening process on the disordered user data according to the previous user data to obtain subsequent user data;
[0051] The pairing setting unit is configured to set the pairing status of the previous user data and the next user data to obtain paired user data.
[0052] In some embodiments of the present disclosure, based on the above technical solution, the material setting module includes: an index configuration submodule, configured to obtain at least two pairs of material data to be selected, and perform primary index configuration on the at least two pairs of material data to obtain primary index material data in the at least two pairs of material data;
[0053] The material determination submodule is configured to perform secondary index configuration on the primary index material data according to the paired user data to obtain secondary index material data, so as to determine that the primary index material data and the secondary index material data are ticket material data.
[0054] In some embodiments of the present disclosure, based on the above technical solution, the electronic ticket generating device further includes: a pairing reward module, which is configured to perform reward issuance processing on the electronic ticket displayed on the scanning party terminal based on the identification matching result, so as to send the target reward information corresponding to the reward issuance processing to the scanning party terminal.
[0055] According to one aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the electronic ticket generating method in the above technical solution is implemented.
[0056] According to one aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the electronic ticket generation method in the above technical solution by executing the executable instructions.
[0057] In the technical solution provided by the embodiment of the present disclosure, on the one hand, the server side can set the pairing state and ticket material settings for the initial user data, providing a data basis for the matching of the scanned terminal and the scanning party terminal and the paired display of the electronic ticket, and because the pairing state setting is set in advance, compared with the configuration during the matching process, the concurrency of the activity is reduced, and the smoothness of the user experience can be guaranteed. On the other hand, the scanned terminal can perform matching and identification processing with the scanning party terminal in response to the scanning event, and the interactive form of mutual scanning and matching improves the matching accuracy, strengthens the depth of activity interaction, and improves the communication between users. Furthermore, the scanned terminal uses the ticket material data to draw the pairing material, which can not only experience the theme of the event, but also increase the user's sense of ritual in participating in the event and improve user return.
[0058] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0060] Figure 1 A schematic diagram of an exemplary system architecture applying the technical solution of the present disclosure is schematically shown;
[0061] Figure 2 A flowchart schematically shows the steps of a method for generating an electronic ticket in some embodiments of the present disclosure;
[0062] Figure 3 A flowchart schematically shows the steps of a method for ticket drawing processing in some embodiments of the present disclosure;
[0063] Figure 4 A flowchart schematically shows a method for performing ticket drawing processing according to material recognition results in some embodiments of the present disclosure;
[0064] Figure 5A flowchart schematically shows another method for performing ticket drawing processing according to material recognition results in some embodiments of the present disclosure;
[0065] Figure 6 A flowchart schematically shows the steps of a method for synthesizing and processing a two-dimensional code in some embodiments of the present disclosure;
[0066] Figure 7 Schematically showing a flowchart of steps of a method for matching logic configuration in some embodiments of the present disclosure;
[0067] Figure 8 Schematically shows an interface diagram of matching logic configuration in some embodiments of the present disclosure;
[0068] Fig. 9 A flowchart schematically shows the steps of a method for matching and identifying processing in some embodiments of the present disclosure;
[0069] Fig.10 A flowchart schematically illustrates the steps of a method for updating an original electronic ticket in some embodiments of the present disclosure;
[0070] Fig.11 A flowchart schematically shows the steps of another method for generating an electronic ticket in some embodiments of the present disclosure;
[0071] Fig.12 A flowchart schematically shows the steps of a method for pairing status setting in some embodiments of the present disclosure;
[0072] Fig.13 A flowchart schematically shows the steps of a method for shuffling cards in some embodiments of the present disclosure;
[0073] Fig.14 A flowchart schematically shows the steps of a method for pairing status setting in some embodiments of the present disclosure;
[0074] Fig.15 The following schematically shows an interface diagram of a method for setting a pairing status in some embodiments of the present disclosure;
[0075] Fig.16 A flowchart schematically shows the steps of a method for setting ticket materials in some embodiments of the present disclosure;
[0076] Fig.17 Schematically showing an interactive schematic diagram of an electronic ticket generation method in some embodiments of the present disclosure;
[0077] Fig.18 The flowchart schematically shows the steps of the method for generating an electronic ticket in an application scenario according to an embodiment of the present disclosure;
[0078] Fig.19 A schematic diagram schematically shows a style of paired materials represented by the candidate material data in an application scenario of an embodiment of the present disclosure;
[0079] Fig. 20 The following schematically shows an interface diagram of an electronic ticket generated according to paired materials in an application scenario according to an embodiment of the present disclosure;
[0080] Fig.21 The first part of the interface diagram of the original electronic ticket displayed in the application scenario of the embodiment of the present disclosure is schematically shown;
[0081] Fig. 22 The second part of the interface diagram of the original electronic ticket displayed in the application scenario of the embodiment of the present disclosure is schematically shown;
[0082] Fig.23 The following schematically shows an interface diagram of a scanning event initiated by a scanning terminal in an application scenario according to an embodiment of the present disclosure;
[0083] Fig.24 The following schematically shows an interface diagram for displaying target rewards in an application scenario according to an embodiment of the present disclosure;
[0084] Fig.25 The following schematically shows the interface diagram of the target electronic ticket in the application scenario of the embodiment of the present disclosure;
[0085] Fig.26 The structure block diagram of an electronic ticket generating device in some embodiments of the present disclosure is schematically shown;
[0086] Fig. 27 Schematically shows a structural block diagram of another electronic ticket generating device in some embodiments of the present disclosure;
[0087] Fig.28 The structure diagram of a computer system suitable for implementing the electronic device of the embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0088] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.
[0089] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0090] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0091] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0092] In the related technologies in this field, with the development of the Internet and the popularization of terminals, the user base of terminals is becoming more and more powerful, and at the same time, more intelligent and humanized trading and social methods are required. Through Internet technology, users can conduct online activities conveniently and effectively, which is an experience that cannot be compared with offline.
[0093] Taking the application scenario of electronic ticketing as an example, users can collect the electronic data of physical tickets before entering the event and interact with other users on a specific Web (World Wide Web) page.
[0094] Specifically, in a specific web page, the matching between terminals is triggered by a click operation. However, this way of a single person experiencing the matching process on a web page is too monotonous and lacks interactivity, and the matching accuracy of this triggering method is not high.
[0095] In addition, the background material of the electronic tickets used by all users is the same, only the ticket information is inconsistent. This unified display of electronic tickets cannot meet the user's needs for matching results, the sense of ritual of event participation is weak, and the user experience is poor.
[0096] Based on the problems existing in the above solutions, the present disclosure provides a new electronic ticket generation method based on cloud technology, an electronic ticket generation device, a computer-readable medium and an electronic device.
[0097] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.
[0098] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0099] Among them, Cloud Social is a virtual social application model of interactive applications of the Internet of Things, cloud computing and mobile Internet. It aims to establish the famous "resource sharing relationship map" and then carry out online social networking. The main feature of Cloud Social is to integrate and evaluate a large number of social resources to form an effective resource pool to provide services to users on demand. The more users who participate in sharing, the greater the utilization value that can be created.
[0100] Cloud computing refers to the delivery and use model of IT infrastructure, which means obtaining required resources through the network in an on-demand and easily scalable manner; in a broad sense, cloud computing refers to the delivery and use model of services, which means obtaining required services through the network in an on-demand and easily scalable manner. This service can be related to IT and software, the Internet, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.
[0101] With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the demand for search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Different from the previous parallel distributed computing, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model from a conceptual perspective.
[0102] The Internet of Things (IOT) refers to the use of various information sensors, radio frequency identification technology, global positioning system, infrared sensors, laser scanners and other devices and technologies to collect any objects or processes that need to be monitored, connected, and interacted in real time, collect their sound, light, heat, electricity, mechanics, chemistry, biology, location and other required information, and realize ubiquitous connection between objects and objects and between objects and people through various possible network access, and realize intelligent perception, identification and management of objects and processes. The Internet of Things is an information carrier based on the Internet, traditional telecommunications networks, etc. It allows all ordinary physical objects that can be independently addressed to form an interconnected network.
[0103] Cloud IOT aims to connect the information sensed and instructions received by sensor devices in traditional IoT to the Internet, truly realize networking, and achieve massive data storage and computing through cloud computing technology. Due to the characteristics of IoT, objects are connected to each other and the current operating status of each "object" is perceived in real time. A large amount of data information will be generated in this process. How to aggregate this information and how to filter out useful information from the massive information to support decision-making for subsequent development have become key issues affecting the development of IoT. IoT cloud based on cloud computing and cloud storage technology has therefore become a strong support for IoT technology and applications.
[0104] The electronic ticket generation method that utilizes cloud social technology in cloud technology reduces the concurrency of activities, can ensure the smoothness of user experience, and improves the accuracy of matching through the interactive form of mutual scanning and matching, strengthens the depth of activity interaction, and improves the communication between users.
[0105] Figure 1 A schematic diagram of an exemplary system architecture applying the technical solution of the present disclosure is shown.
[0106] like Figure 1 As shown, the system architecture 100 may include a scanning terminal 110 , a scanned terminal 120 and a server 130 .
[0107] Among them, the scanning terminal 110 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to these.
[0108] Similarly, the scanned terminal 120 may also be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto.
[0109] The server side 130 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.
[0110] It is worth noting that, in the electronic ticket generation method or device disclosed in this application, multiple servers can be combined into a blockchain, and the servers are nodes on the blockchain.
[0111] The scanning terminal 110 and the server terminal 130 are connected via a network 140 .
[0112] The network 140 may be a communication medium of various connection types capable of providing a communication link between the scanning terminal 110 and the server 130 , such as a wired communication link, a wireless communication link, or an optical fiber cable.
[0113] Likewise, the scanned terminal 120 and the server 130 are connected via a network 150 .
[0114] The network 150 may also be a communication medium of various connection types capable of providing a communication link between the scanned terminal 120 and the server section 130 , such as a wired communication link, a wireless communication link, or a fiber optic cable.
[0115] In addition, the scanning terminal 110 and the scanned terminal 120 may also be connected via the network 160 .
[0116] The network 160 may also be a communication medium of various connection types capable of providing a communication link between the scanned terminal 120 and the scanning terminal 110 , such as a wired communication link, a wireless communication link, or an optical fiber cable.
[0117] Specifically, first, the server 130 may obtain the initial user data stored in the scanning terminal 110 and the scanned terminal 120, and perform pairing state setting on the initial user data to obtain paired user data for pairing.
[0118] Furthermore, the server 130 performs ticket material setting on the paired user data to obtain ticket material data, and generates a random ticket identifier.
[0119] Then, the server 130 sends the paired user data, the random ticket identifier and the ticket material data to the scanning terminal 110 and the scanned terminal 120 respectively.
[0120] Furthermore, the scanning terminal 110 and the scanned terminal 120 respectively receive the random ticket identifier and ticket material data sent by the server 130, and perform ticket drawing processing on the random ticket identifier and ticket material data respectively to obtain the original electronic ticket displayed by the scanning terminal 110 and the original electronic ticket displayed by the scanned terminal 120.
[0121] In addition, the scanning terminal 110 and the scanned terminal 120 can also receive the paired user data sent by the server 130, and perform data integration processing on the corresponding original electronic ticket and the paired user data to obtain the original electronic ticket displaying the paired user data.
[0122] Then, the scanning terminal 110 and the scanned terminal 120 respectively perform a QR code synthesis process on the corresponding random ticket identifier to obtain a QR code to be matched of the scanning terminal 110 and a QR code to be identified of the scanned terminal 120, and the scanned terminal 120 performs an object integration process on the QR code to be identified and the corresponding original electronic ticket to obtain a QR code to be identified displayed on the original electronic ticket. Similarly, the scanning terminal 110 also performs an object integration process on the QR code to be matched and the corresponding original electronic ticket to obtain a QR code to be identified displayed on the original electronic ticket.
[0123] Furthermore, the scanning terminal 110 and the scanned terminal 120 respectively perform matching logic configuration on the corresponding random ticket identifiers to obtain a logic configuration result.
[0124] In response to a scanning event of the scanning terminal 110 scanning the QR code to be identified on the original electronic ticket of the scanned terminal 120, the QR code to be identified is matched and identified according to the logic configuration result to obtain a matching identification result.
[0125] On the other hand, the server 130 receives the random ticket identifier sent by the scanned terminal 120, and obtains the ticket identifier to be matched of the scanning terminal 110, that is, the random ticket identifier of the scanning terminal.
[0126] Then, the server 130 performs identification matching processing on the random ticket identification and the to-be-matched ticket identification to obtain an identification matching result, and sends the identification matching result to the scanned terminal 120 and the scanning party terminal 110 .
[0127] Finally, based on the identification matching result, the server side 130 performs reward issuance processing on the original electronic tickets of the scanning terminal 110 and the scanned terminal 120 respectively, so as to send the target reward information corresponding to the reward issuance processing to the scanning terminal 110 and the scanned terminal 120.
[0128] Correspondingly, the scanning terminal 110 and the scanned terminal 120 receive the target reward information corresponding to the reward issuance process, and display the target reward information on the corresponding original electronic ticket to obtain the target electronic ticket.
[0129] In addition, the electronic ticket generation method in the embodiment of the present disclosure can be applied to the scanning terminal 110 or the scanned terminal 120, and the present disclosure does not make any special limitation on this. The embodiment of the present disclosure mainly uses the electronic ticket generation method applied to the scanned terminal 120 as an example.
[0130] The electronic ticket generation method, electronic ticket generation device, computer-readable medium and electronic device provided by the present disclosure are described in detail below in conjunction with specific implementations.
[0131] Figure 2 The flowchart schematically shows the steps of the electronic ticket generation method in some embodiments of the present disclosure, which is applied to the scanned terminal, such as Figure 2 As shown, the electronic ticket generation method may mainly include the following steps:
[0132] Step S210: receiving the random ticket identifier and ticket material data sent by the server, and performing ticket drawing processing on the random ticket identifier and ticket material data to obtain an original electronic ticket.
[0133] Step S220: Perform QR code synthesis processing on the random ticket identifier to obtain the QR code to be identified by the scanned terminal, and perform object integration processing on the QR code to be identified and the original electronic ticket to obtain the QR code to be identified displayed on the original electronic ticket.
[0134] Step S230: Perform matching logic configuration on the random ticket identifier to obtain a logic configuration result.
[0135] Step S240: In response to the scanning event of the QR code to be identified on the original electronic ticket, the QR code to be identified is matched and identified according to the logic configuration result to obtain a matching identification result.
[0136] Step S250. Based on the reward issuance processing performed on the original electronic ticket by the server according to the matching identification result, the target reward information corresponding to the reward issuance processing is received, and the target reward information is displayed on the original electronic ticket to obtain the target electronic ticket.
[0137] In an exemplary embodiment of the present disclosure, the scanned terminal can perform matching and identification processing with the scanning terminal in response to the scanning event, and the matching accuracy is improved through the interactive form of mutual scanning and matching, which strengthens the depth of activity interaction and improves the communication between users. Furthermore, the scanned terminal uses the ticket material data to draw the matching material, which can not only experience the theme of the event, but also increase the sense of ritual of users participating in the event and improve user return.
[0138] The following is a detailed description of each step of the electronic ticket generation method.
[0139] In step S210, the random ticket identifier and ticket material data sent by the server are received, and the random ticket identifier and ticket material data are subjected to ticket drawing processing to obtain an original electronic ticket.
[0140] In an exemplary embodiment of the present disclosure, the server may have an API (Application Programming Interface) that can provide user data such as random ticket identifiers and ticket material data to the terminal. The API is used to provide data for generating electronic tickets to the scanning terminal and the scanned terminal without requiring the scanning terminal and the scanned terminal to access the source code or understand the details of the internal working mechanism.
[0141] Therefore, the random ticket ID and ticket material data sent by the server can be obtained through this API.
[0142] The random ticket ID is a string randomly generated by the server. For example, it is generated by the getShuffleNumber class:
[0143] ticketId=getShuffleNumber();
[0144] user.ticket_id = ticketId;
[0145] Among them, ticketId is the random string generated by the getShuffleNumber class, and the random string is assigned to user.ticket_id as a random ticket identifier.
[0146] The ticket material data is obtained by setting the ticket material on the server side according to the paired user data stored in the scanned terminal. The ticket material data represents the paired material information that can be displayed on the background of the electronic ticket before the scanned terminal matches with the scanning terminal, or after the match is successful, and can also include the default material data provided by the server side for all terminals.
[0147] Furthermore, the original electronic ticket can be obtained by performing ticket drawing processing on the random ticket identifier and the ticket material data.
[0148] In an alternative embodiment, Figure 3 A flowchart showing the steps of the method for ticket drawing processing is shown as follows: Figure 3 As shown, the method at least includes the following steps: In step S310, material data recognition processing is performed on the ticket material data to obtain a material recognition result.
[0149] Since the ticket material data includes the ticket material data of the paired material and also includes the default material data, the ticket material data may be subjected to material data recognition processing to determine the data content included in the ticket material data.
[0150] For example, the material data identification process may be to identify an identifier representing the default material data, or to identify the number of ticket material data, or other identification methods capable of determining the data content in the ticket material data, which is not particularly limited in this exemplary embodiment.
[0151] In step S320, based on the material recognition result, the random ticket identifier and the ticket material data are subjected to ticket drawing processing to obtain an original electronic ticket.
[0152] Figure 4 and Figure 5 Two flow charts of the steps of the method for drawing tickets according to the material recognition results are shown respectively. Figure 4 A flowchart of the steps of a method for directly using the primary index material data and the secondary index material data to draw a paired electronic ticket when the ticket material data includes the primary index material data and the secondary index material data is shown; Figure 5 The flowchart shows the steps of a method for drawing a unified electronic ticket for all users by using the default material data when the ticket material data includes default material data in addition to the primary index material data and the secondary index material data.
[0153] In an alternative embodiment, Figure 4 A flowchart of a method for performing ticket drawing processing according to a material recognition result is shown. Figure 4 As shown, the method at least includes the following steps: in step S410, if the material identification result is that the ticket material data includes primary index material data and secondary index material data, the primary index material data and the secondary index material data are concatenated to obtain the material data address of the ticket material data.
[0154] The primary index material data and the secondary index material data may represent paired materials. For example, the paired materials may be materials of a pair of mythical animals, such as a pair of seagull patterns.
[0155] The ticket material data of the paired material includes the main index material data main idx and sub-index material data sub idx The main index material data of the paired material used by the scanning terminal and the scanned terminal idx are the same, for example, both are 1. The main index material data indicates which of the paired materials is to be selected.
[0156] The sub-index material data sub idx is different, for example, the sub-index material data sub of the scanned terminal idx 0, the sub-index material data sub of the scanning terminal idx is 1. And, the sub-index material data sub idx 0 can represent the mythical beast pattern on the left side of the paired material, sub-index material data sub idx A value of 1 can represent the mythical beast pattern on the right side of the paired material.
[0157] After determining that the ticket material data includes the primary index material data and the secondary index material data, the primary index material data and the secondary index material data may be concatenated to obtain the corresponding material data address.
[0158] For example, you can splice material data in this way:
[0159] this.setData({
[0160] ticketBg: `${this.data.bgUrl}ticket${mainIdx}-1-${subIdx}.jpg? ${hash}`
[0161] })
[0162] Among them, mainIdx represents the main index material data, and subIdx represents the secondary index material data.
[0163] In addition, material data splicing may also be performed in other ways, which are not particularly limited in this exemplary embodiment.
[0164] After the material data are spliced, the material data address generated by the primary index material data and the secondary index material data can be obtained.
[0165] In step S420, based on the material data address, the random ticket identifier is subjected to ticket generation processing to obtain an original electronic ticket, and the original electronic ticket is subjected to ticket display processing to display the original electronic ticket.
[0166] For example, the ticket generation process may be performed in this manner:
[0167]
[0168] Among them, getTicketInfo can obtain ticket data such as random ticket identification and material data address, and generate an original electronic ticket through createTicket.
[0169] Further, the ticket display processing is performed in this way:
[0170] <view style="background-image:url({{ticketBg}});″>
[0171] Among them, ticketBg is the material data address.
[0172] In addition, there may be other ticket generation processing methods and ticket display processing methods, which are not particularly limited in this exemplary embodiment.
[0173] In this exemplary embodiment, after obtaining the ticket material data and the random ticket identifier, an electronic ticket displaying the pairing material can be directly generated, so that the scanning terminal and the scanned terminal can find the pairing user through the pairing background of the electronic ticket, thereby improving the pairing speed and efficiency, reducing the occurrence of invalid matches, and providing users with a faster interactive experience.
[0174] In an alternative embodiment, Figure 5 Another method for performing ticket drawing processing according to the material recognition result is shown in the flowchart of the steps. Figure 5 As shown, the method at least includes the following steps: In step S510, if the material identification result is that the ticket material data includes default material data, a default material address of the default material data is obtained.
[0175] The default material data represents the default material provided by the server and used uniformly by all terminals. In addition, the default material data can also be stored in the scanned terminal without being obtained from the server, and this exemplary embodiment does not make any special limitation on this.
[0176] When it is determined that the ticket material data includes the default material data, it indicates that the electronic ticket is drawn by first using the default material to draw the original electronic ticket, and after the match is successful, the default material behind the original electronic ticket will be updated to the paired material represented by the primary index material data and the secondary index material data.
[0177] Therefore, the default material address of the default material data can be obtained in this way:
[0178] this.setData({
[0179] ticketBg:this.data.defaultBg
[0180] })
[0181] Furthermore, the original electronic ticket is generated through the default material address.
[0182] In step S520, based on the default material address, the random ticket identifier is subjected to ticket generation processing to obtain an original electronic ticket, and the original electronic ticket is subjected to ticket display processing to display the original electronic ticket.
[0183] For example, the ticket generation process can proceed in this way:
[0184]
[0185] Among them, getTicketInfo can obtain ticket data such as random ticket identification and default material address, and generate an original electronic ticket through createTicket.
[0186] Further, the ticket display processing is performed in this way:
[0187] <view style="background-image:url({{ticketBg}});">
[0188] At this time, ticketBg is the default material address.
[0189] In this exemplary embodiment, the original electronic ticket can be obtained through the default material data and random ticket identification. The user cannot visually perceive the companions who need to be paired, which provides the user with deep interactive matching fun. It can also further ensure the visual impact and experience brought to the user when the matching material is updated, and enhance the sense of ceremony and experience of the event.
[0190] In step S220, the random ticket identifier is subjected to a QR code synthesis process to obtain a QR code to be identified by the scanning terminal, and the QR code to be identified and the original electronic ticket are subjected to an object integration process to obtain the QR code to be identified displayed on the original electronic ticket.
[0191] In an exemplary embodiment of the present disclosure, a QR code synthesis process may be performed on the random ticket logo.
[0192] In an alternative embodiment, Figure 6 A flowchart showing the steps of the method for synthesizing a two-dimensional code is shown. Figure 6As shown, the method at least includes the following steps: In step S610, the random ticket logo is processed into a logo image to obtain a random ticket image.
[0193] For example, the logo is processed as follows:
[0194] const qrUrl=this.data.codeUrl+ticketId;
[0195] qrcode.addData(qrUrl);
[0196] Among them, ticketId is the random ticket identifier.
[0197] In addition, the logo image processing may also be performed in other ways, and this exemplary embodiment does not specifically limit this.
[0198] In step S620, a QR code generation process is performed on the random ticket image to obtain a QR code to be identified by the scanned terminal.
[0199] Specifically, the qrcode.js library can be used to generate a QR code. For example, the qrcode.js library generates a QR code in the following way:
[0200] qrcode.make();
[0201] this.setData({
[0202] ticketQrcode:qr.createImgTag(),
[0203] })
[0204] The qrcode.js library is a JavaScript library for generating QR codes. It mainly obtains the DOM (Document Object Model) tag and then draws it through the HTML5 Canvas tag. It does not rely on any library. <canvas>The tag is used to draw graphics dynamically through scripts (usually JavaScript).
[0205] In this exemplary embodiment, the QR code synthesis processing of the random ticket logo can obtain the QR code to be identified by the scanned terminal. The generation method is simple and fast, and provides an entry for users to pair by scanning the code.
[0206] After obtaining the original electronic ticket and the QR code to be identified, the original electronic ticket and the QR code to be identified may be subjected to object integration processing so that the QR code to be identified is displayed on the original electronic ticket.
[0207] For example, you can use this method to integrate objects:
[0208] <rich-text class="ticket-qrcode"nodes="{{ticketQrcode}}">
[0209] Among them, rich-text is a hypertext that presents images and can display the QR code to be identified on the original electronic ticket.
[0210] In addition to receiving the random ticket identification and ticket material data sent by the server, the scanned terminal can also receive the paired user data sent by the server, so the paired user data and the original electronic ticket can be integrated.
[0211] In an optional embodiment, the paired user data sent by the server is received, and data integration processing is performed on the original electronic ticket and the paired user data to obtain the original electronic ticket displaying the paired user data.
[0212] Among them, the paired user data includes user data that has been matched with the scanning party terminal, and may include identification data such as user work number, and may also include a ticket number consisting of the event date and ticket collection order, and may also include other paired user data. This exemplary embodiment does not make any special limitations on this.
[0213] It is worth noting that the paired user data also includes the random ticket identifier of the scanned terminal that matches the terminal when the terminal is used as a scanning terminal, that is, the ticket identifier to be matched. In addition, since all scanning terminals can also be scanned by other terminals, that is, become scanned terminals, the paired user data of the scanned terminal also stores the ticket identifier to be matched. In other words, all terminals, whether scanning terminals or scanned terminals, store paired random ticket identifiers, that is, ticket identifiers to be matched.
[0214] The data integration processing of the original electronic ticket and the paired user data may be to display the pulled paired user data on the original electronic ticket through the view function, so as to enrich the ticket data displayed on the original electronic ticket and optimize the user's participation experience.
[0215] In step S230, a matching logic configuration is performed on the random ticket identifier to obtain a logic configuration result.
[0216] In an exemplary embodiment of the present disclosure, a matching logic configuration may also be performed on the random ticket identification.
[0217] In an alternative embodiment, Figure 7 A flowchart showing the steps of a method for matching logic configuration is shown in FIG. Figure 7 As shown, the method at least includes the following steps: In step S710, a QR code rule is configured for the random ticket identifier to obtain a rule configuration result.
[0218] Figure 8 A schematic diagram of the interface for matching logic configuration is shown, Figure 8 As shown, at 810, a QR code rule is configured for the random ticket identifier.
[0219] The QR code rule configuration can configure the QR code jump rule. Therefore, according to the QR code jump rule, you need to fill in the QR code rule that needs to jump to the mini program. Specifically, the configuration of the QR code jump rule requires that the domain name of the QR code rule must pass the verification of the ICP (Internet Content Provider, network content service provider) filing, or support links starting with http, https, and ftp, such as http: / / wx.qq.com, https: / / wx.qq.com / mp / , https: / / wx.qq.com / mp?id=123. It can also be that a mini program account can configure no more than 10 QR code prefix rules.
[0220] When configuring the QR code rules, a random ticket identifier can be written to enable subsequent matching and recognition processing when the QR code to be recognized by the scanning terminal is scanned.
[0221] In step S720, a page path is configured for the rule configuration result to obtain a code scanning matching page, so that the code scanning matching page is used as a logical matching result.
[0222] Continue to refer Figure 8 At 820 , the page path configuration may be performed on the rule configuration result.
[0223] The page path configuration is to configure the function page path opened after scanning the QR code, such as: pages / wish / scanTicket / scanTicket.
[0224] After configuring the page path for the rule configuration result, a scan code matching page can be obtained. The scan code matching page can implement the judgment logic of matching and identifying processing when the QR code to be identified of the scanned terminal is scanned.
[0225] In this exemplary embodiment, a code scanning matching page for matching and identifying processing can be obtained as a result of the logic configuration through matching logic configuration, and the matching logic after scanning the QR code is implemented, providing a basis for subsequent matching and identifying processing.
[0226] In step S240, in response to the scanning event of the QR code to be identified on the original electronic ticket, the QR code to be identified is matched and identified according to the logic configuration result to obtain a matching identification result.
[0227] In an exemplary embodiment of the present disclosure, a code scanning event may be an event of scanning a QR code to be identified displayed by a scanned terminal, and a corresponding function or service may be realized by scanning the QR code to be identified. Therefore, when the scanning terminal scans the QR code to be identified on the original electronic ticket of the scanned terminal, the QR code to be identified may be matched and identified according to the result of the logic configuration.
[0228] In an alternative embodiment, Fig. 9 A flowchart showing the steps of the matching identification process is shown in FIG. Fig. 9 As shown, the method includes at least the following steps: in step S910, a random ticket identifier for generating a QR code to be identified is obtained by using a scan code matching page, and the random ticket identifier is sent to a server to perform matching and identification processing on the QR code to be identified.
[0229] The scan code matching page obtained by the matching logic configuration can extract the random ticket identifier that generates the QR code to be identified. Further, the random ticket identifier is sent to the server, and the server performs identifier matching processing on the random ticket identifier to achieve matching and identification processing of the QR code to be identified.
[0230] In step S920, the identification matching result of the identification matching process performed on the random ticket identification sent by the server is received to obtain the matching recognition result of the QR code to be recognized.
[0231] After the server performs identification matching processing on the random ticket identification, the identification matching result of the identification matching processing can be sent to the scanned terminal to determine the matching recognition result of the QR code to be recognized according to the identification matching result.
[0232] When the identification matching result is a match, the matching recognition result is that the scanned terminal and the scanning party terminal match successfully; when the identification matching result is a mismatch, the matching recognition result is that the scanned terminal and the scanning party terminal fail to match.
[0233] Therefore, the matching identification result may include that the scanning terminal initiating the scanning event matches the scanned terminal, or may include that the scanning terminal initiating the scanning event does not match the scanned terminal.
[0234] In this exemplary embodiment, a random ticket identifier is obtained by utilizing a configured scan code matching page, and a matching identification result of a QR code to be identified is obtained by performing identification matching processing on the random ticket identifier. The matching result is generated accurately and quickly, and is convenient for users to view.
[0235] In step S250, based on the reward issuance processing performed by the server on the original electronic ticket according to the matching identification result, the target reward information corresponding to the reward issuance processing is received, and the target reward information is displayed on the original electronic ticket to obtain the target electronic ticket.
[0236] In an exemplary embodiment of the present disclosure, when the matching identification result is that the scanning terminal initiating the scanning event matches the scanned terminal, the server side can perform reward issuance processing on the original electronic ticket according to the matching identification result.
[0237] Specifically, the scanned terminal can obtain the target reward information issued by the server, so as to display the target reward information on the original electronic ticket.
[0238] For example, you can use this method to pull target reward information:
[0239] api.getTicketInfo().then(res=>{
[0240] ticketInfo:data
[0241] })
[0242] Here, ticketInfo is data containing target reward information.
[0243] And, display the target reward information in this way:
[0244] <view class="movie-content"wx:if="{{ticketInfo.ticket_info!==”}}">
[0245] <view class="movie-text">Ticket number: {{ticketInfo.ticket_info}}
[0246]
[0247] Among them, the redemption code when the target reward is a movie ticket can be displayed after the words "Ticket Number:" for the user to view.
[0248] In addition, when the target reward is other rewards, the target reward information can also be displayed in other ways, and this exemplary embodiment does not make special restrictions on this. In addition, the electronic ticket that displays the target reward information is the target electronic ticket.
[0249] Furthermore, when the matching recognition result is that the scanning terminal initiating the scanning event matches the scanned terminal, and the original electronic ticket is generated by default material data, the electronic ticket can also be updated based on the matching recognition result.
[0250] In an optional embodiment, the ticket material data also includes primary index material data and secondary index material data. Fig.10 A flowchart showing the steps of a method for updating an original electronic ticket is shown in FIG. Fig.10 As shown, the method at least includes the following steps: In step S1010, based on the matching recognition result, the main index material data and the secondary index material data are spliced to obtain an updated material address.
[0251] For example, the material data can be spliced in this way:
[0252] this.setData({
[0253] ticketBg:ˋ${this.data.bgUrl}ticket${mainIdx}-1-${subIdx}.jpg? ${hash}ˋ
[0254] })
[0255] Among them, mainIdx represents the main index material data, and subIdx represents the secondary index material data.
[0256] In addition, the material data splicing process may also be performed in other ways, and this exemplary embodiment does not specifically limit this.
[0257] In step S1020, address update processing is performed on the updated material address and the default material address to obtain an address update result, and material update processing is performed on the original electronic ticket according to the address update result to obtain an updated original electronic ticket.
[0258] Specifically, the default material address may be replaced by the updated material address to implement address update processing.
[0259] For example, address update processing can be performed in this way:
[0260] Api.matchPartner({
[0261] data:params,
[0262] }).then(res=>{
[0263] if(res.match === true){
[0264] this.setData({
[0265] ticketBg:ˋ${this.data.bgUrl}ticket${mainIdx}-1-${subIdx}.jpg? ${hash}ˋ
[0266] })
[0267] }
[0268] })
[0269] Among them, if (res.match === true) confirms the matching recognition result, and the ticket material data is replaced by updating the material address and replacing the default material address.
[0270] Furthermore, the original electronic ticket is updated according to the updated address result to obtain an updated original electronic ticket.
[0271] The material update process may be implemented by updating the material address to pull the paired material represented by the primary index material data and the secondary index material data, so as to display the paired material on the background image of the original electronic ticket.
[0272] In this exemplary embodiment, after the matching recognition result is confirmed, the original electronic ticket is updated using the paired material represented by the primary index material data and the secondary index material data, which brings visual impact and experience to the user after the match is successful, enhances the sense of ceremony of the event, and optimizes the user's experience.
[0273] When the matching identification result is that the scanning terminal initiating the scanning event does not match the scanned terminal, a prompt message may also be displayed.
[0274] In an optional embodiment, if the matching recognition result is that the matching of the to-be-recognized two-dimensional code fails, matching prompt information corresponding to the matching recognition result is generated, and the matching prompt information is displayed on the scanned terminal.
[0275] When the matching recognition result is that the QR code to be recognized fails to match, it indicates that the scanning terminal that initiated the scanning event does not match the scanned terminal. Therefore, a matching prompt message such as "matching failed" can be generated to display the matching prompt message on the scanned terminal for the user to view and perform the next scanning and being scanned operation to find a pairing partner.
[0276] Based on the problems existing in the above solutions, the present disclosure also provides another electronic ticket generation method, which is applied to the server side.
[0277] The electronic ticket generation method in the embodiment of the present disclosure can be applied to Figure 1 The server end 130 in the embodiment may also be applied to other servers, and this exemplary embodiment does not specifically limit this.
[0278] The embodiment of the present disclosure mainly uses the electronic ticket generation method applied to the server 130 as an example for illustration.
[0279] Fig.11 The following schematically shows a flow chart of steps of the electronic ticket generation method in some embodiments of the present disclosure, which is applied to the server side. Fig.11 As shown, the electronic ticket generation method may mainly include the following steps:
[0280] Step S1110: Acquire initial user data stored in the scanned terminal, and set the initial user data to a pairing state to obtain pairing user data for pairing.
[0281] Step S1120: Set the paired user data to obtain ticket material data and generate a random ticket identifier.
[0282] Step S1130: Send the paired user data, random ticket identifier and ticket material data to the scanned terminal to generate an original electronic ticket displayed on the scanned terminal.
[0283] Step S1140: Receive the random ticket identifier sent by the scanned terminal, and obtain the ticket identifier to be matched stored in the scanning terminal corresponding to the scanned terminal.
[0284] Step S1150: Perform identification matching processing on the random ticket identification sent by the scanned terminal and the ticket identification to be matched to obtain an identification matching result, and send the identification matching result to the scanned terminal.
[0285] Step S1160: Based on the identification matching result, the original electronic ticket is processed for reward issuance, so as to send the target reward information corresponding to the reward issuance process to the scanned terminal.
[0286] In an exemplary embodiment of the present disclosure, the server side is able to perform pairing status settings and ticket material settings for the initial user data, and can provide a data basis for the matching of the scanned terminal and the scanning party terminal and the pairing display of the electronic ticket. Moreover, since the pairing status setting is set in advance, compared to configuration during the matching process, the concurrency of activities is reduced, and the smoothness of the user experience can be ensured.
[0287] The following is a detailed description of the steps of another method for generating an electronic ticket.
[0288] In step S1110, the initial user data stored in the scanned terminal is obtained, and the initial user data is set to a pairing state to obtain paired user data for pairing.
[0289] In an exemplary embodiment of the present disclosure, the server side may acquire the initial user data of the scanned terminal.
[0290] The initial user data is user data that has not yet been matched with the scanning party terminal, including identification data such as the user's work number, and may also include a ticket number consisting of the event date and the order in which the tickets are collected, and may also include other user data. This exemplary embodiment does not make any special limitations on this.
[0291] For example, you can get the initial user data in this way:
[0292] db.Query("select * from `user`")
[0293] Among them, user represents the initial user data in the user list.
[0294] In an alternative embodiment, Fig.12 A flowchart showing the steps of the method for pairing status setting is shown as follows: Fig.12 As shown, the method includes at least the following steps: In step S1210, the initial user data is shuffled to obtain disordered user data.
[0295] After the initial user data is obtained, the initial user data may be shuffled.
[0296] In an alternative embodiment, Fig.13 A flow chart showing the steps of the method for shuffling the cards is shown, as shown in FIG. Fig.13 As shown, the method at least includes the following steps: in step S1310, the initial user data is sorted to obtain sorted user data, and the sorted user data is reversely traversed to obtain target user data in the sorted user data.
[0297] The data sorting process for the initial user data may be performed by sorting according to the user ID in the initial user data, or by sorting according to the order of ticket collection, or by sorting according to other data in the initial user data, which is not specifically limited in this exemplary embodiment. After the data sorting process for the initial user data is performed, sorted user data arranged in order may be obtained.
[0298] Furthermore, a target user data is selected from the sorted user data in a reverse traversal process to shuffle the target user data. Specifically, the target user data may be selected in a traversal process from the last, the second to last, the third to last, ..., the first of the sorted user data to shuffle all the sorted user data.
[0299] For example, reverse order traversal processing can be implemented as follows:
[0300] for i from n-1 downto 1 do
[0301] Here, i represents the index of the target user data determined in a reverse traversal processing manner, so that the target user data is determined by an index query manner.
[0302] In step S1320, random screening is performed on the sorted user data to obtain random user data, and random exchange is performed on the target user data and the random user data to obtain random user data.
[0303] After the target user data is determined, random screening may be performed on the sorted user data to determine random user data.
[0304] For example, the random screening process can be implemented in this way:
[0305] j←randominteger such that 0≤j≤i
[0306] Here, j represents a method of obtaining an index of random user data by randomly screening from 0 to i, and the random user data is determined in the sorted user data according to the index.
[0307] After the target user data and the random user data are determined, a random order exchange process may be performed on the target user data and the random user data.
[0308] For example, out-of-order swap processing can be implemented in this way:
[0309] exchange a[j]and a[i]
[0310] Specifically, the random user data represented by a[j] and the target user data represented by a[i] may be exchanged to implement out-of-order exchange processing.
[0311] It is worth noting that the method for shuffling the initial user data is the Knuth-Durstenfeld Shuffle algorithm, which is an improvement of the Fisher-Yates Shuffle algorithm by Knuth and Durstenfeld. The numbers are swapped on the original array, saving the extra O(n) space. The basic idea of this algorithm is similar to the Fisher-Yates Shuffle algorithm. Each time, a number is randomly taken from the unprocessed data and then placed at the end of the array, that is, the numbers that have been processed are stored at the end of the array.
[0312] Therefore, the shuffling of the initial user data can also be achieved through the Fisher-Yates Shuffle algorithm. The Fisher-Yates Shuffle algorithm was proposed by Ronald A. Fisher and Frank Yates. The basic idea is to randomly select a number that has not been selected before from the original array and put it into the new array.
[0313] Specifically, first, initialize the original array and the new array. The length of the original array is n, and the length of the original data is known. Then, randomly generate a number p between [0, k) (assuming the array starts at 0) from the array that has not been processed (assuming there are k numbers left). Then, take the pth number from the remaining k numbers, and repeat the steps of generating the number p and taking the pth number until all the data are taken. The number sequence taken out at this time is a scrambled sequence.
[0314] In addition, since Knuth-Durstenfeld Shuffle is an internal shuffle algorithm, the original data is directly shuffled after the algorithm is completed. Although this method can save space, in some applications it may be necessary to retain the original data, so another array can be opened to store the generated new sequence.
[0315] The basic idea of the Inside-Out Algorithm is to scan the data from front to back, and randomly insert the data at position i into the first i (including the i-th) positions (assuming it is k). This operation is performed in the new array, and then the number at position k in the original data replaces the number at position i in the new array. In fact, the effect is equivalent to the interaction between the numbers at position k and position i in the new array.
[0316] If the length of the initial user data is known, it can be changed to a for loop. Since it traverses from front to back, it can handle the situation where the length of the initial user data is unknown, or the initial user data is dynamically increased.
[0317] Therefore, when using the shuffling algorithm to shuffle the initial user data, you can make a choice based on the actual needs.
[0318] In addition, the reservoir algorithm can also be used to shuffle the initial user data.
[0319] The reservoir algorithm is a method of randomly and equally probabilistically extracting a data from a data stream of unknown length. Specifically, assuming that the data sequence is n and the number of samples required is k. First, an array that can accommodate k elements is constructed, the first k elements of the array are put into the array, and then the probability of k / n is used to determine whether the element is replaced in the array. Obviously, the probability of elements in the array being replaced is the same. After traversing all elements, the remaining elements in the array are the samples taken.
[0320] In this exemplary embodiment, the initial user data can be shuffled into disordered user data through shuffling processing, which provides a data basis for subsequent pairing status settings, ensures the user's sense of participation in activities through scanning code matching, and enhances the fun of the activity and user experience.
[0321] In step S1220, the disordered user data is paired to obtain paired user data.
[0322] In an alternative embodiment, Fig.14 A flowchart showing the steps of the method for pairing status setting is shown as follows: Fig.14 As shown, the method at least includes the following steps: in step S1410, performing a previous matching screening process on the disordered user data to obtain the previous user data, and performing a subsequent matching screening process on the disordered user data according to the previous user data to obtain the subsequent user data.
[0323] The disordered user data obtained after the initial user data is shuffled is also arranged in order. Therefore, the previous matching process can be performed according to the arrangement order of the disordered user data to obtain the previous user data.
[0324] For example, in the four disordered user data of user 1, user 2, user 3 and user 4, the previous user data of user 1 and user 2 can be determined to be user 1, and the previous user data of user 3 and user 4 can be determined to be user 3. That is, the previous match screening process is a method of determining the previous user data of two selected disordered user data.
[0325] After the previous user data is determined, a subsequent matching and screening process may be performed based on the previous user data to obtain the subsequent user data.
[0326] For example, if the previous user data of user 1 and user 2 is determined to be user 1, the next matching screening process can be performed based on user 1 to determine the next user data to be user 2; if the previous user data of user 3 and user 4 is determined to be user 3, the next matching screening process can be performed based on user 3 to determine the next user data to be user 4. That is, the next matching screening process is a method of determining that the other user data of two selected out-of-order user data is the next user data when the previous user data is determined.
[0327] In step S1420, pairing status is set for the previous user data and the next user data to obtain paired user data.
[0328] Fig.15 A schematic diagram of the interface showing a method for setting the pairing status is shown in FIG. Fig.15 As shown, when the current user data is user 1 and the next user data is user 2, user 1 and user 2 can be set to a pairing state, that is, user 1 and user 2 are paired and bound, so that the two are users who have successfully scanned and paired; when the current user data is user 3 and the next user data is user 4, user 3 and user 4 can be set to a pairing state, and the same is true for user 5 and user 6, and so on, which will not be repeated here.
[0329] Furthermore, the pairing status may also be set in other ways, which are not particularly limited in this exemplary embodiment.
[0330] In this exemplary embodiment, by setting the pairing status of the previous user data and the next user data in the matching screening process, paired user data can be obtained, which provides a data basis for the subsequent identification matching process.
[0331] In step S1120, the paired user data is set with ticket material to obtain ticket material data, and a random ticket identifier is generated.
[0332] In an exemplary embodiment of the present disclosure, after obtaining the paired user data, the paired user data may be further subjected to ticket material setting to obtain the ticket material data.
[0333] In an alternative embodiment, Fig.16 A flowchart showing the steps of the method for setting the ticket material is shown in FIG. Fig.16 As shown, the method at least includes the following steps: in step S1610, at least two pairs of material data to be selected are acquired, and primary index configuration is performed on the at least two pairs of material data to obtain primary index material data in the at least two pairs of material data.
[0334] The material data to be selected may be data provided by the server with four pairs of mythical beasts as paired materials. The four pairs of mythical beasts may include seagulls, or may include mythical beast types set by themselves, such as dragons and phoenixes, which are not specifically limited in this exemplary embodiment.
[0335] In order to set the ticket material for the paired user data, primary index configuration may be performed on at least two pairs of material data to obtain primary index material data.
[0336] Specifically, the main indexes of the candidate material data with 4 pairs of mythical beasts as pairing materials are 0, 1, 2 and 3 respectively, among which 1 represents the candidate material data with seagull as pairing material. Therefore, when the main index material data is set to 1 for main index configuration, it indicates that the pairing user data is set to use seagull as pairing material.
[0337] Among them, the main index material data can be used idx It is worth noting that the main index material data main of the paired material used by the paired scanning terminal and the scanned terminal idx are the same, for example, both are 1. The main index material data indicates which one of the paired materials.
[0338] For example, the primary index configuration can be implemented as follows:
[0339] user.main_idx:x;
[0340] Among them, user.main_idx represents the main index material data of the paired user data.
[0341] In step S1620, secondary index configuration is performed on the primary index material data according to the paired user data to obtain secondary index material data, so as to determine that the primary index material data and the secondary index material data are ticket material data.
[0342] After determining the primary index material data, in order to determine which one of a pair of paired materials to set for the paired user data corresponding to the scanned terminal, the primary index material data may be further secondary indexed to obtain secondary index material data.
[0343] The secondary index configuration method can be to continue to configure the primary index material data with 0 or 1, wherein 0 can represent the configuration of the mythical beast pattern on the left side of the paired material, and 1 can represent the configuration of the mythical beast pattern on the right side of the paired material.
[0344] For example, the secondary index configuration can be implemented in this way:
[0345] user.sub_idx:x;
[0346] Wherein, user.sub_idx represents the sub-index material data of the paired user data.
[0347] Sub-index material data can be used idx Indicates that the paired materials used by the scanning terminal and the scanned terminal are different, for example, the sub-index material data sub of the scanned terminal idx 0, the sub-index material data sub of the scanning terminal idx is 1.
[0348] The primary index configuration and secondary index configuration of a pair of paired scanning terminal and scanned terminal can be configured in this way:
[0349] user1.main_idx:0;
[0350] uer1.sub_idx:0;
[0351] user2.main_idx:0;
[0352] user2.sub_idx: 1;
[0353] The primary index material data of user1 and user2 are both 0, which are the same, while the secondary index material data of user1 is 0 and the secondary index material data of user2 is 1, which are different.
[0354] In this exemplary embodiment, by performing primary index configuration and secondary index configuration on at least two pairs of selected material data, ticket material data adapted to the paired user data can be obtained, and material data can be provided for generating paired electronic tickets for the scanned terminal and the scanning terminal, thereby bringing users a better visual experience and a more active experience.
[0355] Furthermore, the server may generate a random ticket identifier.
[0356] Specifically, the random ticket identifier is a randomly generated string. For example, it is generated by the getShuffleNumber class:
[0357] ticketId=getShuffleNumber();
[0358] user.ticket_id = ticketId;
[0359] Among them, ticketId is the random string generated by the getShuffleNumber class, and the random string is assigned to user.ticket_id as a random ticket identifier.
[0360] In step S1130, the paired user data, the random ticket identifier and the ticket material data are sent to the scanned terminal to generate an original electronic ticket displayed on the scanned terminal.
[0361] In an exemplary embodiment of the present disclosure, the server side may provide an API for pairing user data, random ticket identifier and ticket material data to the terminal, so as to send the pairing user data, random ticket identifier and ticket material data to the server side.
[0362] Through this API, the scanned terminal and the scanning terminal can obtain the random ticket identifier and ticket material data sent by the server, and perform ticket drawing processing on the random ticket identifier and ticket material data to obtain the original electronic ticket. In addition, each terminal can also receive the paired user data provided by the server, and perform data integration processing on the original electronic ticket and the paired user data to obtain the original electronic ticket displaying the paired user data.
[0363] In step S1140, the random ticket identifier sent by the scanned terminal is received, and the ticket identifier to be matched stored in the scanning terminal corresponding to the scanned terminal is obtained.
[0364] In an exemplary embodiment of the present disclosure, in order to perform matching and identification processing on the QR code to be identified, the scanned terminal will send the random ticket identifier of the generated corresponding electronic ticket to the server.
[0365] For example, you can get a random ticket ID in this way:
[0366] code = request.Post('code')
[0367] Among them, code is the random ticket identifier.
[0368] Furthermore, in order to determine whether the random ticket identifier matches the scanning terminal at the time of initiating the scan, the scanning terminal will also send the stored ticket identifier to be matched to the server.
[0369] For example, you can use this method to obtain the ID of the ticket to be matched:
[0370] user = getCurrentUser()
[0371] That is, the identification of the ticket to be matched stored in the scanning terminal can be obtained by obtaining the current paired user data.
[0372] It is worth noting that the ticket identifier to be matched can be data in the paired user data, and the data represents the random ticket identifier of the terminal that can be matched with the scanning terminal. Obviously, since all scanning terminals can also be scanned by other terminals, that is, become scanned terminals, the paired user data of the scanned terminal also stores the ticket identifier to be matched. In other words, all terminals, whether scanning terminals or scanned terminals, store paired random ticket identifiers, that is, ticket identifiers to be matched.
[0373] In step S1150, an identifier matching process is performed on the random ticket identifier sent by the scanned terminal and the ticket identifier to be matched to obtain an identifier matching result, and the identifier matching result is sent to the scanned terminal.
[0374] In an exemplary embodiment of the present disclosure, after obtaining the random ticket identifier and the to-be-matched ticket identifier sent by the scanned terminal, an identifier matching process may be performed on the random ticket identifier and the to-be-matched ticket identifier sent by the scanned terminal.
[0375] For example, the identification matching process can be performed in this way:
[0376] user.partner.code==code&&tickets=getTickets()
[0377] That is, it is determined whether the random ticket identification sent by the scanned terminal is equal to the ticket identification to be matched, and the result of whether the random ticket identification sent by the scanned terminal is equal to the ticket identification to be matched is sent as the identification matching result to the scanned terminal. In addition, the identification matching result can also be sent to the scanning party terminal.
[0378] In step S1160, based on the identification matching result, the original electronic ticket is processed for reward issuance, so that the target reward information corresponding to the reward issuance process is sent to the scanned terminal.
[0379] In an exemplary embodiment of the present disclosure, when the identification matching result is that the random ticket identification sent by the scanning terminal is equal to the ticket identification to be matched, the original electronic ticket may be processed for award issuance.
[0380] When the target reward is a movie ticket, the redemption code of the movie ticket can be written into the original electronic ticket as the target reward information for reward distribution.
[0381] For example, the original e-ticket distribution target reward can be modified in this way:
[0382] user1 = getCurrentUser()
[0383] user1.ticket_info: movie ticket redemption code
[0384] user2=getUser1Parter()
[0385] user2.ticket_info: movie ticket redemption code
[0386] Furthermore, user 1 and user 2 can obtain movie tickets in this way:
[0387]
[0388] Among them, if user.partner.code==code&&tickets=getTickets() means that user 1 and user 2 have completed the match; user.ticket=tickets[0] and user.partner.ticket=tickets[1] mean that on the premise that user 1 and user 2 are matched, user 1 and user 2 obtain the target reward of movie tickets.
[0389] Therefore, the scanned terminal can obtain the target reward information, and call the API again to obtain the target reward information, so as to display the target reward information on the original electronic ticket to obtain the target electronic ticket.
[0390] In addition, since the target reward information is issued in pairs, the scanning terminal can also obtain the target reward information.
[0391] In an optional embodiment, based on the identification matching result, the electronic ticket displayed on the scanning party terminal is processed for reward issuance, so that the target reward information corresponding to the reward issuance process is sent to the scanning party terminal.
[0392] In addition to performing reward distribution processing on the scanned terminal of the two matched terminals, the server can also perform reward distribution processing on the scanning terminal, so that the target reward information is distributed to the scanning terminal. The scanning terminal can obtain the target reward information and call the API again to obtain the target reward information, so as to display the target reward information on the original electronic ticket to obtain the target electronic ticket.
[0393] It is worth noting that the target rewards of the scanning terminal and the scanned terminal may be the same or different, and this exemplary embodiment does not specifically limit this.
[0394] In this exemplary embodiment, when the identification matching result is that the random ticket identification sent by the scanned terminal is equal to the ticket identification to be matched, the target reward can be issued not only to the scanned terminal, but also to the scanning terminal, providing users with rewards for scanning code matching, stimulating users' enthusiasm for participating in activities, increasing user return flow to a certain extent, and improving the communication and interaction depth between users.
[0395] To further illustrate the relationship between the drawings and the interaction between multiple terminals, Fig.17 An interactive schematic diagram of the electronic ticket generation method is shown, such as Fig.17 As shown, in step S1701, the server side obtains the initial user data stored in the scanned terminal, and sets the initial user data to a pairing state to obtain paired user data; in step S1702, the server side sets the paired user data to a ticket material to obtain ticket material data, and generates a random ticket identifier; in step S1703, the server side generates a random ticket identifier of the scanned terminal, and sends the paired user data, the random ticket identifier and the ticket material data to the scanned terminal; in step S1704, the scanned terminal receives the random ticket identifier and the ticket material data, and performs ticket drawing processing on the random ticket identifier and the ticket material data to obtain the original electronic ticket; in step S1705, the scanned terminal The scanning terminal performs a two-dimensional code synthesis process on the random ticket identifier to obtain a two-dimensional code to be identified of the scanned terminal, and performs object integration processing on the two-dimensional code to be identified and the original electronic ticket to obtain the two-dimensional code to be identified displayed on the original electronic ticket; in step S1706, the scanned terminal performs a matching logic configuration on the random ticket identifier to obtain a logic configuration result; in step S1707, the server generates a random ticket identifier for the scanning terminal, and sends the paired user data, the random ticket identifier and the ticket material data to the scanning terminal; in step S1708, the scanning terminal receives the random ticket identifier and the ticket material data, and performs ticket drawing processing on the random ticket identifier and the ticket material data to obtain the original electronic ticket; in step S17 09, the random ticket identifier is subjected to a QR code synthesis process to obtain a QR code to be identified of the scanned terminal, and the QR code to be identified and the original electronic ticket are subjected to object integration process to obtain the QR code to be identified displayed on the original electronic ticket; in step S1710, the random ticket identifier is subjected to a matching logic configuration to obtain a logic configuration result; in step S1711, the scanning terminal scans the scanned terminal; in step S1712, the scanned terminal responds to the scanning event of the QR code to be identified on the original electronic ticket by using the scanning matching page to obtain the random ticket identifier that generates the QR code to be identified, and sends the random ticket identifier to the server; in step S1713, the scanning terminal sends the stored ticket identifier to the server. to the server side; in step S1714, the server side performs an identification matching process on the random ticket identification sent by the scanned terminal and the ticket identification to be matched to obtain an identification matching result; in step S1715, the server side performs a reward issuance process on the original electronic ticket based on the identification matching result, so as to send the target reward information corresponding to the reward issuance process to the scanned terminal; in step S1716, the target reward information corresponding to the reward issuance process is received, and the target reward information is displayed on the original electronic ticket to obtain the target electronic ticket; in step S1717, the server side performs a reward issuance process on the original electronic ticket based on the identification matching result, so as to send the target reward information corresponding to the reward issuance process to the scanned terminal;In step S1718, the target reward information corresponding to the reward issuance process is received, and the target reward information is displayed on the original electronic ticket to obtain the target electronic ticket. ;
[0396] The following is a detailed description of the electronic ticket generation method provided in the embodiment of the present disclosure in conjunction with a specific application scenario.
[0397] Fig.18 The flowchart of the steps of the electronic ticket generation method in the application scenario is shown as follows: Fig.18 As shown, in step S1801, user list.
[0398] Specifically, the initial user data in the user list is read.
[0399] For example, you can get the initial user data in this way:
[0400] db.Query("select*fromˋuserˋ")
[0401] Among them, user represents the initial user data in the user list. Therefore, in this way, the initial user data of all users participating in this activity stored in the scanned terminal and the scanning terminal can be obtained.
[0402] The initial user data is the user data participating in the game that has not yet been matched with the scanning party terminal. It may include identification data such as the user's work number or the user's game account. It may also include a ticket number consisting of the date of the game event and the order of ticket collection. It may also include other user data. This exemplary embodiment does not specifically limit this.
[0403] In step S1802, ticket information interface.
[0404] Based on the acquired initial user data, the server can provide an API to the terminal that provides user data such as a random ticket identifier and ticket material data. The API is used to provide data for generating electronic tickets to the scanning terminal and the scanned terminal without requiring the scanning terminal and the scanned terminal to access the source code or understand the details of the internal working mechanism.
[0405] The random ticket ID can be generated by the getShuffleNumber class:
[0406] ticketId=getShuffleNumber();
[0407] user.ticket_id = ticketId;
[0408] Among them, ticketId is the random string generated by the getShuffleNumber class, and the random string is assigned to user.ticket_id as a random ticket identifier.
[0409] The ticket material data is obtained by setting the ticket material after obtaining the paired user data, corresponding to step S1804. In addition, after obtaining the matched user data, the random ticket identifier of the other terminal paired with the terminal, that is, the ticket identifier to be matched, can also be stored in the paired user data to achieve subsequent identifier matching processing.
[0410] In step S1803, the cards are shuffled.
[0411] That is, the initial user data is sorted to obtain sorted user data, and the sorted user data is reversely traversed to obtain target user data in the sorted user data. The sorted user data is randomly screened to obtain random user data, and the target user data and the random user data are randomly exchanged to obtain random user data.
[0412] Specifically, the data sorting process for the initial user data may be to sort by the user ID in the initial user data, or by the order of ticket collection, or by the registration time of the game account and other data in the initial user data, which is not specifically limited in this exemplary embodiment. After the data sorting process for the initial user data is performed, the sorted user data arranged in order can be obtained.
[0413] Furthermore, a target user data is selected from the sorted user data in a reverse traversal process to shuffle the target user data. Specifically, the target user data may be selected in a traversal process from the last, the second to last, the third to last, ..., the first of the sorted user data to shuffle all the sorted user data.
[0414] For example, reverse order traversal processing can be implemented as follows:
[0415] for i from n-1downto 1do
[0416] Here, i represents the index of the target user data determined in a reverse traversal processing manner, so that the target user data is determined by an index query manner.
[0417] After the target user data is determined, random screening may be performed on the sorted user data to determine random user data.
[0418] For example, the random screening process can be implemented in this way:
[0419] j←randominteger such that 0≤j≤i
[0420] Here, j represents a method of obtaining an index of random user data by randomly screening from 0 to i, and the random user data is determined in the sorted user data according to the index.
[0421] After the target user data and the random user data are determined, a random order exchange process may be performed on the target user data and the random user data.
[0422] For example, out-of-order swap processing can be implemented in this way:
[0423] exchange a[j]and a[i]
[0424] Specifically, the random user data represented by a[j] and the target user data represented by a[i] may be exchanged to implement out-of-order exchange processing.
[0425] In addition, the Fisher-Yates Shuffle algorithm, the Inside-Out Algorithm algorithm or the Reservoir Algorithm can be used to shuffle the initial user data.
[0426] In step S1804, pairs are paired.
[0427] That is, the disordered user data is subjected to a previous matching screening process to obtain the previous user data, and the disordered user data is subjected to a subsequent matching screening process based on the previous user data to obtain the subsequent user data. The previous user data and the subsequent user data are paired to obtain paired user data.
[0428] Specifically, the disordered user data obtained after the initial user data is shuffled is also arranged in order. Therefore, the previous matching process can be performed according to the arrangement order of the disordered user data to obtain the previous user data.
[0429] For example, in the four disordered user data of user 1, user 2, user 3 and user 4, the previous user data of user 1 and user 2 can be determined to be user 1, and the previous user data of user 3 and user 4 can be determined to be user 3. That is, the previous match screening process is a method of determining the previous user data of two selected disordered user data.
[0430] After the previous user data is determined, a subsequent matching and screening process may be performed based on the previous user data to obtain the subsequent user data.
[0431] For example, if the previous user data of user 1 and user 2 is determined to be user 1, the next matching screening process can be performed based on user 1 to determine the next user data to be user 2; if the previous user data of user 3 and user 4 is determined to be user 3, the next matching screening process can be performed based on user 3 to determine the next user data to be user 4. That is, the next matching screening process is a method of determining that the other user data of two selected out-of-order user data is the next user data when the previous user data is determined.
[0432] When the current user data is user 1 and the next user data is user 2, the pairing status of user 1 and user 2 can be set, that is, user 1 and user 2 are paired and bound, so that the two are users who have successfully scanned and paired. The pairing status setting of other users is the same, and will not be repeated here.
[0433] After obtaining the paired user data, the paired user data can also be set as a ticket material to obtain the ticket material data. First, at least two pairs of candidate material data are obtained, and primary index configuration is performed on the at least two pairs of material data to obtain primary index material data in the at least two pairs of material data. Then, secondary index configuration is performed on the primary index material data according to the paired user data to obtain secondary index material data, so as to determine that the primary index material data and the secondary index material data are ticket material data.
[0434] Fig.19 A schematic diagram of the style of paired materials represented by the candidate material data in the application scenario is shown, such as Fig.19 As shown, the selected material data can be data provided by the server with 4 pairs of mythical beasts in the game as pairing materials. Among them, one pair of mythical beasts is a seagull. In addition, in addition to displaying a pair of seagulls on the two pairing materials, in order to make the style of the pairing materials richer, the name of the event and other contents can also be displayed in different styles. For example, the event name TX Company's 2021 New Year's Eve Party "We" is displayed horizontally and vertically. In addition, in order to make the pairing materials more in line with the theme of the game activity, game characters and other contents can also be displayed.
[0435] In order to set the ticket material for the paired user data, primary index configuration may be performed on at least two pairs of material data to obtain primary index material data.
[0436] Specifically, the main indexes of the candidate material data with 4 pairs of mythical beasts as pairing materials are 0, 1, 2 and 3 respectively, among which 1 represents the candidate material data with seagull as pairing material. Therefore, when the main index material data is set to 1 for main index configuration, it indicates that the pairing user data is set to use seagull as pairing material.
[0437] Among them, the main index material data can be used idx It is worth noting that the main index material data main of the paired material used by the paired scanning terminal and the scanned terminal idx are the same, for example, both are 1. The main index material data indicates which one of the paired materials.
[0438] For example, the primary index configuration can be implemented as follows:
[0439] user.main_idx:x;
[0440] Among them, user.main_idx represents the main index material data of the paired user data.
[0441] After determining the primary index material data, in order to determine which one of a pair of paired materials to set for the paired user data corresponding to the scanned terminal, the primary index material data may be further secondary indexed to obtain secondary index material data.
[0442] The secondary index configuration method can be to continue to configure the primary index material data with 0 or 1, wherein 0 can represent the configuration of the mythical beast pattern on the left side of the paired material, and 1 can represent the configuration of the mythical beast pattern on the right side of the paired material.
[0443] For example, the secondary index configuration can be implemented in this way:
[0444] user.sub_idx:x;
[0445] Wherein, user.sub_idx represents the sub-index material data of the paired user data.
[0446] Sub-index material data can be used idx Indicates that the paired materials used by the scanning terminal and the scanned terminal are different, for example, the sub-index material data sub of the scanned terminal idx 0, the sub-index material data sub of the scanning terminal idx is 1.
[0447] The primary index configuration and secondary index configuration of a pair of paired scanning terminal and scanned terminal can be configured in this way:
[0448] user1.main_idx:0;
[0449] uer1.sub_idx:0;
[0450] user2.main_idx:0;
[0451] user2.sub_idx: 1;
[0452] The primary index material data of user1 and user2 are both 0, which are the same, while the secondary index material data of user1 is 0 and the secondary index material data of user2 is 1, which are different.
[0453] In step S1805, interfaces are matched.
[0454] The server provides an API for detecting whether the scanning terminal matches the scanned terminal based on the configured pairing user data, so that when a scanning event occurs, the matching detection API is applied to perform identification matching processing.
[0455] In step S1806, the ticket identification is obtained.
[0456] The terminal can obtain the corresponding random ticket identifier through the API provided by the server, which can provide user data such as random ticket identifier and ticket material data. Both the scanning terminal and the scanned terminal can obtain the corresponding random ticket identifier. In addition, since each scanned terminal can also scan other terminals, each terminal stores the random ticket identifier of the paired terminal, that is, the ticket identifier to be matched.
[0457] In step S1807, a ticket and a QR code are generated.
[0458] Specifically, an electronic ticket may be generated through ticket drawing processing, and a corresponding QR code may be generated through QR code synthesis processing.
[0459] First, the ticket material data is processed for material data recognition to obtain a material recognition result. Then, based on the material recognition result, the random ticket mark and the ticket material data are processed for ticket drawing to obtain an original electronic ticket.
[0460] Specifically, since the ticket material data includes the ticket material data of the paired material and also includes the default material data, the ticket material data may be subjected to material data recognition processing to determine the data content included in the ticket material data.
[0461] For example, the material data identification process may be to identify an identifier representing the default material data, or to identify the number of ticket material data, or other identification methods capable of determining the data content in the ticket material data, which is not particularly limited in this exemplary embodiment.
[0462] There are two ways to generate the original electronic ticket. One is to generate the ticket to obtain the original electronic ticket when the ticket material data includes the primary index material data and the secondary index material data; the other is to generate the ticket according to the default material data to obtain the original electronic ticket when the ticket material data includes not only the primary index material data and the secondary index material data but also the default material data.
[0463] If the material identification result is that the ticket material data includes primary index material data and secondary index material data, the primary index material data and the secondary index material data are concatenated to obtain the material data address of the ticket material data.
[0464] The paired materials represented by the primary index material data and the secondary index material data may be paired materials. For example, a pair of mythical beasts in a game, such as a pair of seagulls, are paired materials.
[0465] It is worth noting that the paired materials represented by the primary index material data and the secondary index material data may have a front side and a back side, or the front side and the back side may be identical, and this exemplary embodiment does not specifically limit this.
[0466] The ticket material data of the paired material includes the main index material data main idx and sub-index material data sub idx The main index material data of the paired material used by the scanning terminal and the scanned terminal idx are the same, for example, both are 1. The main index material data indicates which one of the paired materials.
[0467] The sub-index material data sub idx is different, for example, the sub-index material data sub of the scanned terminal idx 0, the sub-index material data sub of the scanning terminal idx is 1. And, the sub-index material data sub idx 0 can represent the mythical beast pattern on the left side of the paired material, sub-index material data sub idx A value of 1 can represent the mythical beast pattern on the right side of the paired material.
[0468] After determining that the ticket material data includes the primary index material data and the secondary index material data, the primary index material data and the secondary index material data may be concatenated to obtain the corresponding material data address.
[0469] For example, you can splice material data in this way:
[0470] this.setData({
[0471] ticketBg:ˋ${this.data.bgUrl}ticket${mainIdx}-1-${subIdx}.jpg? ${hash}ˋ
[0472] })
[0473] Among them, mainIdx represents the main index material data, and subIdx represents the secondary index material data.
[0474] In addition, material data splicing may also be performed in other ways, which are not particularly limited in this exemplary embodiment.
[0475] After the material data are spliced, the material data address generated by the primary index material data and the secondary index material data can be obtained.
[0476] For example, the ticket generation process may be performed in this manner:
[0477]
[0478] Among them, getTicketInfo can obtain ticket data such as random ticket identification and material data address, and generate an original electronic ticket through createTicket.
[0479] Further, the ticket display processing is performed in this way:
[0480] <view style="background-image:url({{ticketBg}});">
[0481] Among them, ticketBg is the material data address.
[0482] In addition, there may be other ticket generation processing methods and ticket display processing methods, which are not particularly limited in this exemplary embodiment.
[0483] Fig. 20 The schematic diagram of the interface of the electronic ticket generated according to the paired materials in the application scenario is shown as follows: Fig. 20 It is worth noting that Fig.19 The seagull-like paired material shown in the figure has two sides, the back side of the paired material used for the electronic ticket. In addition, the back side of the paired material can also display the activity name displayed in horizontal and vertical rows in the background of the electronic ticket for users to view. Fig.19 The front side of the paired material with the seagull can display the QR code of the mini program or application, as well as information about employees participating in the event. In this way, the front and back sides of the paired material are paired and used on the electronic ticket, and the front and back sides of the electronic ticket can be displayed by jumping, and the content of the front and back sides of the electronic ticket can be displayed by the paired material with the front and back sides, maximizing the content carrying capacity of the electronic ticket and displaying more information that the user cares about.
[0484] If the material identification result is that the ticket material data includes default material data, a default material address of the default material data is obtained.
[0485] The default material data represents the default material uniformly provided by the server for all terminals, and may also be stored in the scanned terminal, which is not specifically limited in this exemplary embodiment. In addition, the default material may have a front and back side, or the front and back sides may be the same, which is not specifically limited in this exemplary embodiment.
[0486] When it is determined that the ticket material data includes the default material data, it indicates that the electronic ticket is drawn by first using the default material to draw the original electronic ticket, and after the match is successful, the default material behind the original electronic ticket will be updated to the paired material represented by the primary index material data and the secondary index material data.
[0487] Therefore, the default material address of the default material data can be obtained in this way:
[0488] this.setData({
[0489] ticketBg:this.data.defaultBg
[0490] })
[0491] Furthermore, the original electronic ticket is generated through the default material address.
[0492] For example, the ticket generation process can proceed in this way:
[0493]
[0494] Among them, getTicketInfo can obtain ticket data such as random ticket identification and default material address, and generate an original electronic ticket through createTicket.
[0495] Further, the ticket display processing is performed in this way:
[0496] <view style="background-image:url({{ticketBg}});">
[0497] At this time, ticketBg is the default material address.
[0498] The QR code synthesis process first performs a logo image processing on the random ticket logo to obtain a random ticket image. Then, the random ticket image is subjected to a QR code generation process to obtain a QR code to be identified by the scanned terminal.
[0499] For example, the logo is processed as follows:
[0500] const qrUrl=this.data.codeUrl+ticketId;
[0501] qrcode.addData(qrUrl);
[0502] Among them, ticketId is the random ticket identifier.
[0503] Furthermore, the qrcode.js library can be used to generate a QR code. For example, the qrcode.js library generates a QR code in the following way:
[0504] qrcode.make();
[0505] this.setData({
[0506] ticketQrcode:qr.createImgTag(),
[0507] })
[0508] After obtaining the original electronic ticket and the QR code to be identified, the original electronic ticket and the QR code to be identified may be subjected to object integration processing so that the QR code to be identified is displayed on the original electronic ticket.
[0509] For example, you can use this method to integrate objects:
[0510] <rich-text class="ticket-qrcode"nodes="{{ticketQrcode}}">
[0511] Among them, rich-text is a hypertext that presents images and can display the QR code to be identified on the original electronic ticket.
[0512] In addition to receiving the random ticket identification and ticket material data sent by the server, the scanned terminal can also receive the paired user data sent by the server, so the paired user data and the original electronic ticket can be integrated.
[0513] The paired user data includes user data that has been matched with the scanning party terminal, and may include identification data such as the user's work number, and may also include a ticket number consisting of an event date and a ticket collection order, and may also include other paired user data. This exemplary embodiment does not specifically limit this.
[0514] The data integration process for the original electronic ticket and the paired user data may be to display the pulled paired user data on the original electronic ticket through a view function.
[0515] Fig.21 The first part of the interface diagram of the original electronic ticket displayed in the application scenario is shown, Fig.21 As shown, the original electronic ticket is an electronic ticket for the event named "We", which is the 2021 New Year's Eve Party of XX Company, and the event time is 19:30 on December 18, and the QR code to be identified is also displayed on the original electronic ticket. In addition, a ticket number is also displayed for users to view, which is composed of the event date and the order of ticket collection, such as NO.2020121800001.
[0516] besides, Fig. 22 The second part of the interface diagram of the original electronic ticket displayed in the application scenario is shown, Fig. 22 As shown, the original electronic ticket can not only display the QR code to be identified and information about the event, but also display a prompt message such as "'Our' New Year's Eve Gala is more enjoyable when watched together. The organizing committee has arranged a viewing companion for you: XX. Go find him / her, scan the tickets for each other, and unlock the surprise gift we have prepared for you" to prompt the user to continue the next QR code scanning interaction process.
[0517] Moreover, before the code is scanned and matched successfully, when the target reward is a movie ticket, the redemption code of the movie ticket, that is, the card code, will not be displayed.
[0518] In step S1808, scan the QR code.
[0519] Fig.23 The following is a schematic diagram showing the interface of the scanning terminal initiating a code scanning event in an application scenario. Fig.23 As shown, the scanning terminal can scan the QR code to be identified through the QR code alignment box to initiate a code scanning event. In addition, when the QR code to be identified of the scanned terminal is in a dark scene, the flashlight-style control in the QR code alignment box can be clicked to illuminate the QR code to be identified of the scanned terminal for scanning.
[0520] It is worth noting that the participation process of the integrated activity of generating electronic tickets, generating QR codes and scanning QR codes can be implemented on the mini program side or in the native application.
[0521] Among them, mini programs are a new way to connect users and services. They can be easily obtained and spread in applications such as WeChat, and have an excellent user experience. The main development language of mini programs is JavaScript, and the development of mini programs is very similar to that of ordinary web pages.
[0522] When using mini programs or native applications, only the development method and acquisition method are different.
[0523] Specifically, mini programs are developed in JavaScript, and when the native application is for iOS, it can be developed in Objective-C, Swift, C / C++, and when the native application is for Android, it can be developed in Java.
[0524] Among them, JavaScript is a function-first, lightweight, interpreted or just-in-time compiled programming language. It is a scripting language belonging to the network and has been widely used in Web application development. It is often used to add a variety of dynamic functions to web pages to provide users with a smoother and more beautiful browsing experience. Usually JavaScript scripts are embedded in HTML to realize their own functions.
[0525] The only way to obtain a mini program is to search for its name in the application or scan its QR code to open it. When the native application is running on the iOS system, it can be downloaded from the App Store. When the native application is on the Android system, it can be downloaded from the application market of each Android application.
[0526] In step S1809, matching.
[0527] The server provides an API for detecting whether the scanning terminal matches the scanned terminal based on the configured pairing user data, and performs identification matching processing between the scanning terminal and the scanned terminal.
[0528] In order to match and identify the QR code to be identified, the scanned terminal will send the random ticket identifier of the generated corresponding electronic ticket to the server.
[0529] Specifically, the scan code matching page obtained through the matching logic configuration can extract the random ticket identifier that generates the QR code to be identified.
[0530] Furthermore, the random ticket identification is sent to the server, and the server performs identification matching processing on the random ticket identification to achieve matching and identification processing of the QR code to be identified.
[0531] The code scanning matching page is obtained through matching logic configuration. First, the QR code rule configuration is performed on the random ticket logo to obtain the rule configuration result. Then, the page path configuration is performed on the rule configuration result to obtain the code scanning matching page, so that the code scanning matching page is used as the logic matching result.
[0532] Specifically, the QR code rule configuration is to configure the QR code jump rule. Therefore, according to the QR code jump rule, it is necessary to fill in the QR code rule that needs to jump to the mini program. Specifically, the configuration of the QR code jump rule requires that the domain name of the QR code rule must pass the ICP filing verification, or support links starting with http, https, or ftp, such as http: / / wx.qq.com, https: / / wx.qq.com / mp / , https: / / wx.qq.com / mp?id=123. It can also be that a mini program account can configure no more than 10 QR code prefix rules.
[0533] When configuring the QR code rules, a random ticket identifier can be written to enable subsequent matching and recognition processing when the QR code to be recognized by the scanning terminal is scanned.
[0534] The page path configuration is to configure the function page path opened after scanning the QR code, such as: pages / wish / scanTicket / scanTicket.
[0535] After configuring the page path for the rule configuration result, a scan code matching page can be obtained. The scan code matching page can realize the judgment logic of matching and identifying processing when the two-dimensional code to be identified of the scanned terminal is scanned.
[0536] For example, the server can obtain the random ticket ID in this way:
[0537] code = request.Post('code')
[0538] Among them, code is the random ticket identifier.
[0539] Furthermore, in order to determine whether the random ticket identifier matches the scanning terminal at the time of initiating the scan, the scanning terminal will also send the stored ticket identifier to be matched to the server.
[0540] For example, you can use this method to obtain the ID of the ticket to be matched:
[0541] user = getCurrentUser()
[0542] That is, the identification of the ticket to be matched stored in the scanning terminal can be obtained by obtaining the current paired user data.
[0543] It is worth noting that the ticket identifier to be matched can be data in the paired user data, and the data represents the random ticket identifier of the terminal that can be matched with the scanning terminal. Obviously, since all scanning terminals can also be scanned by other terminals, that is, become scanned terminals, the paired user data of the scanned terminal also stores the ticket identifier to be matched. In other words, all terminals, whether scanning terminals or scanned terminals, store the partner's random ticket identifier, that is, the ticket identifier to be matched.
[0544] After obtaining the random ticket identifier and the to-be-matched ticket identifier sent by the scanned terminal, an identifier matching process may be performed on the random ticket identifier and the to-be-matched ticket identifier sent by the scanned terminal.
[0545] For example, the identification matching process can be performed in this way:
[0546] user.partner.code==code&&tickets=getTickets()
[0547] That is, it is determined whether the random ticket identification sent by the scanned terminal is equal to the ticket identification to be matched, and the result of whether the random ticket identification sent by the scanned terminal is equal to the ticket identification to be matched is sent as the identification matching result to the scanned terminal. In addition, the identification matching result can also be sent to the scanning party terminal.
[0548] In step S1810, the match is successful and a reward is obtained.
[0549] When the original electronic ticket is drawn using the default material data, the original electronic ticket can be updated after the scanning terminal and the scanned terminal are successfully matched.
[0550] First, based on the matching recognition result, the main index material data and the secondary index material data are spliced to obtain the updated material address. Then, the updated material address and the default material address are updated to obtain the address update result, and the original electronic ticket is updated according to the address update result to obtain the updated original electronic ticket.
[0551] For example, the material data can be spliced in this way:
[0552] this.setData({
[0553] ticketBg:ˋ${this.data.bgUrl}ticket${mainIdx}-1-${subIdx}.jpg? ${hash}ˋ
[0554] })
[0555] Among them, mainIdx represents the main index material data, and subIdx represents the secondary index material data.
[0556] In addition, the material data splicing process may also be performed in other ways, and this exemplary embodiment does not specifically limit this.
[0557] Specifically, the default material address may be replaced by the updated material address to implement address update processing.
[0558] For example, address update processing can be performed in this way:
[0559] Api.matchPartner({
[0560] data:params,
[0561] }).then(res=>{
[0562] if(res.match === true){
[0563] this.setData({
[0564] ticketBg:ˋ${this.data.bgUrl}ticket${mainIdx}-1-${subIdx}.jpg? ${hash}ˋ
[0565] })
[0566] }
[0567] })
[0568] Among them, if (res.match === true) confirms the matching recognition result, and the ticket material data is replaced by updating the material address and replacing the default material address.
[0569] Furthermore, the original electronic ticket is updated according to the updated address result to obtain an updated original electronic ticket.
[0570] The material update process may be implemented by updating the material address to pull the paired material represented by the primary index material data and the secondary index material data, so as to display the paired material on the background image of the original electronic ticket.
[0571] In addition, when the identification matching result is that the random ticket identification sent by the scanned terminal is equal to the ticket identification to be matched, that is, the scanning terminal and the scanned terminal are successfully matched, the original electronic ticket can be rewarded and issued.
[0572] When the target reward is a movie ticket, the redemption code of the movie ticket can be written into the original electronic ticket as the target reward information for reward distribution.
[0573] For example, the original e-ticket distribution target reward can be modified in this way:
[0574] user1 = getCurrentUser()
[0575] user1.ticket_info: movie ticket redemption code
[0576] user2=getUser1Parter()
[0577] user2.ticket_info: movie ticket redemption code
[0578] Furthermore, user 1 and user 2 can obtain movie tickets in this way:
[0579] if user.partner.code==code&&tickets=getTickets(){
[0580] user.match=true
[0581] user.partner.match=true
[0582] user.ticket = tickets[0]
[0583] user.partner.ticket=tickets[1]
[0584] }
[0585] Among them, if user.partner.code==code&&tickets=getTickets() means that user 1 and user 2 have completed the match; user.ticket=tickets[0] and user.partner.ticket=tickets[1] mean that on the premise that user 1 and user 2 are matched, user 1 and user 2 obtain the target reward of movie tickets.
[0586] Therefore, the scanned terminal can obtain the target reward information, and call the API again to obtain the target reward information, so as to display the target reward information on the original electronic ticket to obtain the target electronic ticket.
[0587] Specifically, the scanned terminal can obtain the target reward information issued by the server, so as to display the target reward information on the original electronic ticket.
[0588] For example, you can use this method to pull target reward information:
[0589] api.getTicketInfo().then(res=>{
[0590] ticketInfo:data
[0591] })
[0592] Here, ticketInfo is data containing target reward information.
[0593] And, display the target reward information in this way:
[0594] <view class="movie-content"wx:if="{{ticketInfo.ticket_info!==”}}">
[0595] <view class="movie-text"> Ticket number: {{ticketInfo.ticket_info}}
[0596]
[0597] Among them, movie-text indicates that the target reward information is the redemption code of the movie ticket. And, since the reward is the redemption code of the movie ticket, the words "Ticket number:" can be displayed for the convenience of users to view.
[0598] In addition, when the target reward is other rewards, the target reward information can also be displayed in other ways, and this exemplary embodiment does not make special restrictions on this. In addition, the electronic ticket that displays the target reward information is the target electronic ticket.
[0599] In addition, since the target reward information is issued in pairs, the scanning terminal can also obtain the target reward information.
[0600] In addition to performing reward distribution processing on the scanned terminal of the two matched terminals, the server can also perform reward distribution processing on the scanning terminal, so that the target reward information is distributed to the scanning terminal. The scanning terminal can obtain the target reward information and call the API again to obtain the target reward information, so as to display the target reward information on the original electronic ticket to obtain the target electronic ticket.
[0601] Fig.24 A schematic diagram of an interface showing target rewards in an application scenario is shown, such as Fig.24 As shown, the original electronic information will display the words "Congratulations on winning a movie ticket, card code: xxxxxx, validity period: 2022-10-22, redemption guide: Here is a simple redemption guide" to show the user the redemption code when the target reward is a movie ticket.
[0602] Fig.25 The interface diagram of the target electronic ticket in the application scenario is shown as follows: Fig.25 As shown, the upper half of the target electronic ticket can display the activity information and pairing partner before the match, as well as the QR code to be identified and other content, which are the same as the display content of the original electronic ticket. After the pairing is successful, prompt information related to the target reward can be displayed in the lower half of the target electronic ticket to provide users with a method for redeeming the target reward.
[0603] It is worth noting that the display contents of the target electronic ticket on both the scanning terminal and the scanned terminal are the same as Fig.25 As shown, the only difference is the content of the target reward information. For example, when the target reward is a movie ticket, the redemption code of the movie ticket is different.
[0604] In step S1811, the matching fails.
[0605] If the matching recognition result is that the matching of the to-be-recognized two-dimensional code fails, matching prompt information corresponding to the matching recognition result is generated, and the matching prompt information is displayed on the scanned terminal.
[0606] When the matching recognition result is that the QR code to be recognized fails to match, it indicates that the scanning terminal that initiated the scanning event does not match the scanned terminal. Therefore, a matching prompt message such as "matching failed" can be generated to display the matching prompt message on the scanned terminal for the user to view and perform the next scanning and being scanned operation to find a pairing partner.
[0607] Based on the above application scenarios, it can be seen that the electronic ticket generation method provided by the embodiment of the present disclosure, on the one hand, the server side can set the pairing status and ticket material settings for the initial user data, and can provide a data basis for the matching of the scanned terminal and the scanning party terminal and the pairing display of the electronic ticket. Moreover, since the pairing status setting is set in advance, compared with the configuration during the matching process, the concurrency of activities is reduced, which can ensure the smoothness of the user experience.
[0608] On the other hand, the scanned terminal can match and identify the scanning terminal in response to the scanning event, and the interactive form of mutual scanning and matching improves the accuracy of matching, strengthens the depth of activity interaction, and improves the communication between users. Furthermore, the scanned terminal uses the ticket material data to draw matching materials, which can not only experience the theme of the event, but also increase the sense of ritual of users participating in the event and improve user return.
[0609] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0610] The following describes an apparatus embodiment of the present disclosure, which can be used to execute the electronic ticket generation method in the above-mentioned embodiment of the present disclosure. For details not disclosed in the apparatus embodiment of the present disclosure, please refer to the above-mentioned embodiment of the electronic ticket generation method of the present disclosure.
[0611] Fig.26 The structure block diagram of an electronic ticket generating device in some embodiments of the present disclosure is schematically shown. Fig.26 As shown, the electronic ticket generating device 2600 may mainly include: a data receiving module 2610, an object integration module 2620, a logic configuration module 2630, a code scanning and matching module 2640 and a reward display module 2650.
[0612] The data receiving module 2610 is configured to receive the random ticket identification and ticket material data sent by the server, and perform ticket drawing processing on the random ticket identification and the ticket material data to obtain the original electronic ticket; the object integration module 2620 is configured to perform QR code synthesis processing on the random ticket identification to obtain the QR code to be identified by the scanned terminal, and perform object integration processing on the QR code to be identified and the original electronic ticket to obtain the QR code to be identified displayed on the original electronic ticket; the logic configuration module 2630 is configured to perform matching logic configuration on the random ticket identification to obtain a logic configuration result; the code scanning matching module 2640 is configured to respond to the code scanning event of the QR code to be identified on the original electronic ticket, and perform matching and identification processing on the QR code to be identified according to the logic configuration result to obtain a matching identification result; the reward display module 2650 is configured to receive the target reward information corresponding to the reward issuance processing based on the reward issuance processing performed by the server on the original electronic ticket according to the matching identification result, and display the target reward information on the original electronic ticket to obtain the target electronic ticket.
[0613] In some embodiments of the present disclosure, the data receiving module includes: a material identification submodule configured to perform material data identification processing on the ticket material data to obtain a material identification result;
[0614] The recognition result submodule is configured to perform ticket drawing processing on the random ticket identifier and the ticket material data based on the material recognition result to obtain the original electronic ticket.
[0615] In some embodiments of the present disclosure, the recognition result submodule includes: a material splicing unit configured to, if the material recognition result is that the ticket material data includes primary index material data and secondary index material data, perform material data splicing on the primary index material data and the secondary index material data to obtain a material data address of the ticket material data;
[0616] The ticket generation unit is configured to perform ticket generation processing on the random ticket identifier based on the material data address to obtain an original electronic ticket, and perform ticket display processing on the original electronic ticket to display the original electronic ticket.
[0617] In some embodiments of the present disclosure, the recognition result submodule includes: a default material unit configured to obtain a default material address of the default material data if the material recognition result is that the ticket material data includes default material data;
[0618] The ticket display unit is configured to perform ticket generation processing on the random ticket identifier based on the default material address to obtain an original electronic ticket, and perform ticket display processing on the original electronic ticket to display the original electronic ticket.
[0619] In some embodiments of the present disclosure, the ticket material data further includes primary index material data and secondary index material data, and the electronic ticket generation device further includes: an update material module configured to perform material data splicing on the primary index material data and the secondary index material data based on the matching recognition result to obtain an update material address;
[0620] The ticket update module is configured to perform address update processing on the update material address and the default material address to obtain an address update result, and perform material update processing on the original electronic ticket according to the address update result to obtain an updated original electronic ticket.
[0621] In some embodiments of the present disclosure, the object integration module includes: an identification picture submodule configured to perform identification picture processing on the random ticket identification to obtain a random ticket picture;
[0622] The picture generation submodule is configured to perform QR code generation processing on the random ticket picture to obtain a QR code to be recognized by the scanned terminal.
[0623] In some embodiments of the present disclosure, the logic configuration module includes: a rule configuration submodule configured to perform QR code rule configuration on the random ticket identifier to obtain a rule configuration result;
[0624] The path configuration submodule is configured to perform page path configuration on the rule configuration result to obtain a code scanning matching page, so as to use the code scanning matching page as a logical matching result.
[0625] In some embodiments of the present disclosure, the code scanning and matching module includes: an identification sending submodule, configured to obtain a random ticket identification for generating a QR code to be identified by using a code scanning and matching page, and send the random ticket identification to the server side to perform matching and identification processing on the QR code to be identified;
[0626] The identification matching submodule is configured to receive the identification matching result of the random ticket identification sent by the server to obtain the matching recognition result of the QR code to be recognized.
[0627] In some embodiments of the present disclosure, the electronic ticket generating device further includes: a data integration module configured to receive paired user data sent by the server, and perform data integration processing on the original electronic ticket and the paired user data to obtain the original electronic ticket displaying the paired user data.
[0628] In some embodiments of the present disclosure, the electronic ticket generating device further includes: a matching prompt module, which is configured to generate matching prompt information corresponding to the matching recognition result if the matching recognition result is a failure to match the QR code to be recognized, and display the matching prompt information on the scanned terminal.
[0629] Fig. 27 The structure block diagram of another electronic ticket generating device in some embodiments of the present disclosure is schematically shown. Fig. 27 As shown, the electronic ticket generating device 2700 may mainly include: a state setting module 2710 , a material setting module 2720 , a data sending module 2730 , an identification acquisition module 2740 , an identification matching module 2750 and a reward issuing module 2760 .
[0630] The state setting module 2710 is configured to obtain the initial user data stored in the scanned terminal, and perform pairing state setting on the initial user data to obtain paired user data; the material setting module 2720 is configured to perform ticket material setting on the paired user data to obtain ticket material data and generate a random ticket identifier; the data sending module 2730 is configured to send the paired user data, the random ticket identifier and the ticket material data to the scanned terminal to generate an original electronic ticket displayed on the scanned terminal; the identifier acquisition module 2740 is configured to receive the random ticket identifier sent by the scanned terminal, and obtain the ticket identifier to be matched stored in the scanning party terminal corresponding to the scanned terminal; the identifier matching module 2750 is configured to perform identifier matching processing on the random ticket identifier sent by the scanned terminal and the ticket identifier to be matched to obtain an identifier matching result, and send the identifier matching result to the scanned terminal; the reward issuance module 2760 is configured to perform reward issuance processing on the original electronic ticket based on the identifier matching result, so as to send the target reward information corresponding to the reward issuance processing to the scanned terminal.
[0631] In some embodiments of the present disclosure, the state setting module includes: a shuffling submodule configured to shuffle the initial user data to obtain disordered user data;
[0632] The state setting submodule performs pairing state setting on the disordered user data to obtain paired user data that are paired in pairs.
[0633] In some embodiments of the present disclosure, the shuffling submodule includes: a reverse order traversal unit configured to perform data sorting processing on the initial user data to obtain sorted user data, and to perform reverse order traversal processing on the sorted user data to obtain target user data in the sorted user data;
[0634] The random screening unit is configured to perform random screening processing on the sorted user data to obtain random user data, and perform random exchange processing on the target user data and the random user data to obtain random user data.
[0635] In some embodiments of the present disclosure, the state setting module includes: a neighboring screening unit configured to perform a previous matching screening process on the disordered user data to obtain the previous user data, and perform a subsequent matching screening process on the disordered user data according to the previous user data to obtain the subsequent user data;
[0636] The pairing setting unit is configured to set the pairing status of the previous user data and the next user data to obtain paired user data.
[0637] In some embodiments of the present disclosure, the material setting module includes: an index configuration submodule configured to obtain at least two pairs of material data to be selected, and perform primary index configuration on the at least two pairs of material data to obtain primary index material data in the at least two pairs of material data;
[0638] The material determination submodule is configured to perform secondary index configuration on the primary index material data according to the paired user data to obtain secondary index material data, so as to determine that the primary index material data and the secondary index material data are ticket material data.
[0639] In some embodiments of the present disclosure, the electronic ticket generating device further includes: a pairing reward module, which is configured to perform reward issuance processing on the electronic ticket displayed on the scanning party terminal based on the identification matching result, so as to send the target reward information corresponding to the reward issuance processing to the scanning party terminal.
[0640] The specific details of the two electronic ticket generating devices provided in each embodiment of the present disclosure have been described in detail in the corresponding method embodiments, and therefore will not be repeated here.
[0641] Fig.28 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown.
[0642] It should be noted that Fig.28 The computer system 2800 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0643] like Fig.28 As shown, computer system 2800 includes a central processing unit (CPU) 2801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 2802 or the program loaded from the storage part 2808 to the random access memory (RAM) 2803. In RAM 2803, various programs and data required for system operation are also stored. CPU 2801, ROM 2802 and RAM 2803 are connected to each other through bus 2804. Input / output (I / O) interface 2805 is also connected to bus 2804.
[0644] The following components are connected to the I / O interface 2805: an input section 2806 including a keyboard, a mouse, etc.; an output section 2807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 2808 including a hard disk, etc.; and a communication section 2809 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 2809 performs communication processing via a network such as the Internet. A drive 2810 is also connected to the I / O interface 2805 as needed. A removable medium 2811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 2810 as needed so that a computer program read therefrom is installed into the storage section 2808 as needed.
[0645] In particular, according to an embodiment of the present disclosure, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 2809, and / or installed from a removable medium 2811. When the computer program is executed by a central processing unit (CPU) 2801, various functions defined in the system of the present application are executed.
[0646] It should be noted that the computer-readable medium shown in the embodiment of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0647] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0648] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0649] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0650] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0651] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.< / canvas>
Claims
1. A method for generating an electronic ticket, characterized in that: Applied to the scanned terminal, the method comprises: Receive the random ticket identifier and ticket material data sent by the server, and perform ticket drawing processing on the random ticket identifier and the ticket material data to obtain an original electronic ticket; the ticket material data is obtained by setting the ticket material for the paired user data, and the paired user data is obtained by setting the paired state for the initial user data stored in the scanned terminal; Performing a QR code synthesis process on the random ticket identifier to obtain a QR code to be identified by the scanned terminal, and performing an object integration process on the QR code to be identified and the original electronic ticket to obtain a QR code to be identified displayed on the original electronic ticket; Performing matching logic configuration on the random ticket identifier to obtain a logic configuration result; In response to a scanning event of the to-be-identified QR code on the original electronic ticket, matching and identifying the to-be-identified QR code according to the logic configuration result to obtain a matching and identifying result; the matching and identifying result is obtained by the server end performing an identification matching process on the random ticket identifier and the to-be-matched ticket identifier, the to-be-matched ticket identifier is provided by the scanning party terminal, and the to-be-matched ticket identifier is generated by the server end based on the initial user data stored in the scanning party terminal; Based on the reward issuance processing performed by the server on the original electronic ticket according to the matching identification result, the target reward information corresponding to the reward issuance processing is received, and the target reward information is displayed on the original electronic ticket to obtain the target electronic ticket.
2. The electronic ticket generation method according to claim 1, characterized in that: The step of performing ticket drawing processing on the random ticket identifier and the ticket material data to obtain an original electronic ticket includes: Performing material data recognition processing on the ticket material data to obtain a material recognition result; Based on the material recognition result, the random ticket identifier and the ticket material data are subjected to ticket drawing processing to obtain an original electronic ticket.
3. The electronic ticket generation method according to claim 2, characterized in that: The step of performing ticket drawing processing on the random ticket identifier and the ticket material data based on the material recognition result to obtain an original electronic ticket includes: If the material identification result is that the ticket material data includes primary index material data and secondary index material data, material data splicing is performed on the primary index material data and the secondary index material data to obtain a material data address of the ticket material data; Based on the material data address, the random ticket identifier is subjected to ticket generation processing to obtain an original electronic ticket, and the original electronic ticket is subjected to ticket display processing to display the original electronic ticket.
4. The electronic ticket generation method according to claim 2, characterized in that: The step of performing ticket drawing processing on the random ticket identifier and the ticket material data based on the material recognition result to obtain an original electronic ticket includes: If the material identification result is that the ticket material data includes default material data, obtaining a default material address of the default material data; Based on the default material address, the random ticket identifier is subjected to ticket generation processing to obtain an original electronic ticket, and the original electronic ticket is subjected to ticket display processing to display the original electronic ticket.
5. The electronic ticket generation method according to claim 4, characterized in that: The ticket material data also includes primary index material data and secondary index material data. After performing matching and recognition processing on the to-be-recognized two-dimensional code according to the logic configuration result to obtain a matching and recognition result, the method further includes: Based on the matching recognition result, the primary index material data and the secondary index material data are concatenated to obtain an updated material address; The update material address and the default material address are subjected to address update processing to obtain an address update result, and the original electronic ticket is subjected to material update processing according to the address update result to obtain the updated original electronic ticket.
6. The electronic ticket generation method according to claim 1, characterized in that: The matching logic configuration of the random ticket identifier to obtain a logic configuration result includes: Performing QR code rule configuration on the random ticket identifier to obtain a rule configuration result; The rule configuration result is configured with a page path to obtain a code scanning matching page, so as to use the code scanning matching page as a logic matching result.
7. The electronic ticket generation method according to claim 6, characterized in that: The performing matching and recognition processing on the to-be-recognized two-dimensional code according to the logic configuration result to obtain a matching and recognition result includes: Using the code scanning and matching page to obtain the random ticket identifier that generates the QR code to be identified, and sending the random ticket identifier to the server to perform matching and identification processing on the QR code to be identified; Receive the identification matching result of the identification matching processing performed on the random ticket identification sent by the server to obtain the matching recognition result of the two-dimensional code to be recognized.
8. A method for generating an electronic ticket, characterized in that: Applied to the server side, the method includes: Acquire initial user data stored in the scanned terminal, and set the pairing state of the initial user data to obtain paired user data for pairing; Performing ticket material setting on the paired user data to obtain ticket material data, and generating a random ticket identifier; sending the paired user data, the random ticket identifier and the ticket material data to the scanned terminal to generate an original electronic ticket displayed on the scanned terminal; Receiving the random ticket identifier sent by the scanned terminal, and acquiring the to-be-matched ticket identifier stored in the scanning terminal corresponding to the scanned terminal, wherein the to-be-matched ticket identifier is generated by the server based on the initial user data stored in the scanning terminal; Performing identification matching processing on the random ticket identification sent by the scanned terminal and the ticket identification to be matched to obtain an identification matching result, and sending the identification matching result to the scanned terminal; Based on the identification matching result, the original electronic ticket is processed for reward issuance, so as to send the target reward information corresponding to the reward issuance process to the scanned terminal, so that the scanned terminal displays the target reward information on the original electronic ticket to obtain the target electronic ticket.
9. The electronic ticket generation method according to claim 8, characterized in that: The step of setting the pairing state of the initial user data to obtain paired user data for pairing includes: Shuffling the initial user data to obtain out-of-order user data; The disordered user data are paired in a pairing state to obtain paired user data.
10. The electronic ticket generation method according to claim 9, characterized in that: The step of shuffling the initial user data to obtain out-of-order user data includes: Performing data sorting processing on the initial user data to obtain sorted user data, and performing reverse traversal processing on the sorted user data to obtain target user data in the sorted user data; The sorted user data is randomly screened to obtain random user data, and the target user data and the random user data are randomly exchanged to obtain random user data.
11. The electronic ticket generation method according to claim 8, characterized in that: The step of performing ticket material setting on the paired user data to obtain ticket material data includes: Acquire at least two pairs of material data to be selected, and perform primary index configuration on the at least two pairs of material data to obtain primary index material data in the at least two pairs of material data; The primary index material data is sub-indexed according to the paired user data to obtain secondary index material data, so as to determine that the primary index material data and the secondary index material data are ticket material data.
12. An electronic ticket generating device, characterized in that: Applied to a scanned terminal, the device comprises: The data receiving module is configured to receive the random ticket identifier and ticket material data sent by the server, and perform ticket drawing processing on the random ticket identifier and the ticket material data to obtain an original electronic ticket; the ticket material data is obtained by setting the ticket material for the paired user data, and the paired user data is obtained by setting the paired state for the initial user data stored in the scanned terminal; The object integration module is configured to perform a two-dimensional code synthesis process on the random ticket identifier to obtain a two-dimensional code to be identified by the scanned terminal, and perform an object integration process on the two-dimensional code to be identified and the original electronic ticket to obtain a two-dimensional code to be identified displayed on the original electronic ticket; A logic configuration module, configured to perform matching logic configuration on the random ticket identifier to obtain a logic configuration result; The code scanning matching module is configured to respond to a code scanning event of the to-be-identified QR code on the original electronic ticket, and to perform matching and identification processing on the to-be-identified QR code according to the logic configuration result to obtain a matching and identification result; the matching and identification result is obtained by the server side performing identification matching processing on the random ticket identifier and the to-be-matched ticket identifier, the to-be-matched ticket identifier is provided by the scanning party terminal, and the to-be-matched ticket identifier is generated by the server side based on the initial user data stored in the scanning party terminal; The reward display module is configured to receive target reward information corresponding to the reward issuance processing based on the reward issuance processing performed by the server side on the original electronic ticket according to the matching identification result, and display the target reward information on the original electronic ticket to obtain the target electronic ticket.
13. An electronic ticket generating device, characterized in that: Applied to the server side, the device comprises: A state setting module is configured to obtain initial user data stored in the scanned terminal, and perform pairing state setting on the initial user data to obtain paired user data for pairing; A material setting module, configured to perform ticket material setting on the paired user data to obtain ticket material data, and generate a random ticket identifier; a data sending module configured to send the paired user data, the random ticket identifier and the ticket material data to the scanned terminal to generate an original electronic ticket displayed on the scanned terminal; an identification acquisition module, configured to receive the random ticket identification sent by the scanned terminal, and obtain the to-be-matched ticket identification stored in the scanning terminal corresponding to the scanned terminal, wherein the to-be-matched ticket identification is generated by the server based on the initial user data stored in the scanning terminal; An identification matching module is configured to perform identification matching processing on the random ticket identification sent by the scanned terminal and the to-be-matched ticket identification to obtain an identification matching result, and send the identification matching result to the scanned terminal; The reward issuance module is configured to perform reward issuance processing on the original electronic ticket based on the identification matching result, so as to send the target reward information corresponding to the reward issuance processing to the scanned terminal, so that the scanned terminal displays the target reward information on the original electronic ticket to obtain the target electronic ticket.
14. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the electronic ticket generating method according to any one of claims 1 to 7 or claims 8 to 11 is implemented.
15. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the electronic ticket generating method according to any one of claims 1 to 7 or claims 8 to 11 by executing the executable instructions.
