Electronic certificate generation method and device, equipment, medium and program product
By using a language processing model to perform intent recognition and structured processing on initial data information, electronic vouchers are automatically generated, solving the problem of low generation efficiency in existing technologies and achieving efficient and standardized electronic voucher generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2026-03-24
AI Technical Summary
Existing methods for generating electronic vouchers rely on predefined templates, which leads to cumbersome operations, low efficiency, and a lack of flexibility when dealing with large amounts of information, making it difficult to meet the generation needs when demand surges.
A language processing model is used to identify the intent of the initial data information. Through entity extraction and contextual understanding layers, target data information with a predetermined structure is automatically generated, and then electronic vouchers are generated.
It enables the automated generation of electronic vouchers, reduces manual input and processing time, improves efficiency, reduces operational error rates, standardizes and normalizes information, facilitates data processing, and reduces labor costs.
Smart Images

Figure CN121723972A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of digital marketing technology, artificial intelligence technology, and big data technology, and more specifically, to a method, apparatus, device, medium, and program product for generating electronic vouchers. Background Technology
[0002] Electronic vouchers exist and are presented digitally, organizing and storing relevant information in the form of electronic data to form a specific data set. Based on their function, electronic vouchers can be categorized into various types, such as electronic coupons, electronic receipts, electronic transcripts, and electronic certificates.
[0003] In realizing the concept disclosed herein, the inventors discovered at least the following problems in the related technology: the existing methods for generating electronic vouchers rely on predefined templates, and users need to fill in the field values one by one according to the rules under the fields of the template. When the amount of information to be filled in is very large, it leads to cumbersome operation and low efficiency in generating electronic vouchers. Summary of the Invention
[0004] In view of this, the present disclosure provides a method, apparatus, device, medium and program product for generating electronic vouchers.
[0005] One aspect of this disclosure provides a method for generating electronic vouchers, comprising: acquiring initial data information, wherein the initial data information includes feature description information expressed in natural language and related to the voucher content of the electronic voucher to be generated; performing intent recognition processing on the initial data information using a language processing model to obtain target data information with a predetermined structure; and generating an electronic voucher based on the target data information.
[0006] According to embodiments of this disclosure, the predetermined structure includes at least a plurality of attribute field names related to the content of the credential and at least one attribute field value corresponding to each attribute field name.
[0007] According to embodiments of this disclosure, the language processing model includes an entity extraction layer and a context understanding layer. The language processing model is used to perform intent recognition processing on initial data information to obtain target data information with a predetermined structure. This includes: using the entity extraction layer to extract initial attribute field values from the initial data information, obtaining multiple initial attribute field values and an initial attribute field name for each initial attribute field value; and using the context understanding layer to perform predetermined operations on the multiple initial attribute field values based on the semantic understanding and parsing results of the initial data information to obtain the target data information.
[0008] According to embodiments of this disclosure, a contextual understanding layer is used to perform predetermined operations on multiple initial attribute field values based on the semantic understanding and parsing results of initial data information to obtain target data information. This includes: performing semantic understanding on the initial data information to generate a semantic understanding result, wherein the semantic understanding result contains operation instructions for the initial attribute field values; parsing the dependency and referential relationships in the initial data information to generate a parsing result; and performing predetermined operations on the initial attribute field values based on the operation instructions and the parsing result to obtain the target data information.
[0009] According to embodiments of this disclosure, an entity extraction layer is used to extract initial attribute field values from initial data information to obtain multiple initial attribute field values and an initial attribute field name for each initial attribute field value. This includes: performing entity recognition on the initial data information to obtain multiple initial attribute field values; classifying the initial attribute field values according to predetermined field names to obtain a correspondence between each initial attribute field value and an initial attribute field name.
[0010] According to embodiments of this disclosure, the initial data information further includes multiple end indicators. Using a language processing model, the initial data information is subjected to intent recognition processing to obtain target data information with a predetermined structure, including: merging the feature description information between two adjacent end indicators into a set of initial data information; using a language processing model, the intent recognition processing is performed on each set of initial data information to obtain target data information corresponding to each set of initial data information.
[0011] According to embodiments of this disclosure, generating an electronic certificate based on target data information includes: performing structured processing on the target data information to obtain structured data information; and generating an electronic certificate based on the structured data information.
[0012] According to embodiments of this disclosure, the electronic certificate generation method further includes: performing data security verification on initial data information; and performing data format verification on target data information.
[0013] Another aspect of this disclosure provides an electronic voucher generation apparatus, comprising: an acquisition module for acquiring initial data information, wherein the initial data information includes feature description information expressed in natural language and related to the voucher content of the electronic voucher to be generated; a processing module for performing intent recognition processing on the initial data information using a language processing model to obtain target data information with a predetermined structure; and a generation module for generating an electronic voucher based on the target data information.
[0014] Another aspect of this disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method described above.
[0015] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are used to implement the methods described above.
[0016] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, are used to implement the methods described above.
[0017] According to embodiments of this disclosure, by utilizing a language processing model to perform intent recognition on initial data information in natural language form and directly outputting target data information, the generation of electronic vouchers is automated. This reduces the need for manual input and processing, saves time and effort, and improves work efficiency. Compared to manually filling in templates, it avoids problems such as errors that are easily made during manual input, thus improving the accuracy of electronic voucher generation. Specifically, the language processing model transforms information expressed in natural language into information with a fixed format, making the information more standardized and regulated, facilitating data processing and use. Furthermore, users only need to correctly express the key information of the electronic voucher to be generated using natural language; there is no need for users to learn and master complex templates and input formats, simplifying the electronic voucher generation process, reducing user effort, and lowering labor costs. Attached Figure Description
[0018] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0019] Figure 1 An exemplary system architecture 100 to which an electronic credential generation method can be applied according to an embodiment of the present disclosure is illustrated schematically;
[0020] Figure 2 A flowchart illustrating an electronic credential generation method according to an embodiment of the present disclosure is shown schematically;
[0021] Figure 3 A flowchart illustrating a method for generating target data information according to an embodiment of the present disclosure is shown schematically.
[0022] Figure 4 A flowchart illustrating a method for generating electronic credentials according to another embodiment of this disclosure is shown schematically;
[0023] Figure 5 A flowchart illustrating an electronic certificate generation method according to yet another embodiment of the present disclosure is shown schematically;
[0024] Figure 6 A block diagram schematically illustrates an electronic credential generation apparatus according to embodiments of the present disclosure; and
[0025] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing the electronic credential generation method described above, according to an embodiment of the present disclosure. Detailed Implementation
[0026] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0027] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0028] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0029] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0030] In the embodiments disclosed herein, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security and network security.
[0031] In the embodiments disclosed herein, user authorization or consent is obtained before acquiring or collecting user personal information.
[0032] Electronic vouchers are characterized by their diverse content and large amount of information. For example, each electronic voucher to be generated has multiple fields to be filled in, and the content corresponding to each field is different. Therefore, a large number of field names need to be set in the predefined template. Users need to select the corresponding field value under each field name according to the rules to obtain the final electronic voucher content.
[0033] Taking the generation of a coupon as an example, staff need to select information such as the distribution target, designated merchant, designated product, discount amount, validity period, and applicable region from the template based on the coupon generation rules. It's clear that the more field names in the template, the more field values staff need to fill in. Furthermore, if more types of coupons need to be generated, the workload for staff will increase exponentially. Especially when demand surges, the process of generating electronic vouchers becomes cumbersome and inflexible, leading to low efficiency and even failing to meet the demand for electronic vouchers.
[0034] In view of this, embodiments of the present disclosure provide an electronic voucher generation method, comprising: acquiring initial data information, wherein the initial data information includes feature description information expressed in natural language and related to the voucher content of the electronic voucher to be generated; using a language processing model to perform intent recognition processing on the initial data information to obtain target data information with a predetermined structure; and generating an electronic voucher based on the target data information.
[0035] Figure 1 An exemplary system architecture 100 to which an electronic credential generation method can be applied according to embodiments of this disclosure is illustrated schematically. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0036] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0037] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as electronic voucher generation systems, shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social media platform software, etc. (for example only).
[0038] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0039] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0040] It should be noted that the electronic voucher generation method provided in this embodiment can generally be executed by server 105. Correspondingly, the electronic voucher generation system provided in this embodiment can generally be located in server 105. The electronic voucher generation method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the electronic voucher generation system provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Alternatively, the electronic voucher generation method provided in this embodiment can also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or it can be executed by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the electronic certificate generation system provided in this embodiment of the present disclosure may also be set in the first terminal device 101, the second terminal device 102 or the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102 or the third terminal device 103.
[0041] For example, the initial data information may originally be stored in any one of the first terminal device 101, the second terminal device 102, or the third terminal device 103 (e.g., the first terminal device 101, but not limited thereto), or it may be stored on an external storage device and imported into the first terminal device 101. Then, the first terminal device 101 may execute the electronic credential generation method provided in the embodiments of this disclosure locally, or send the initial data information to other terminal devices, servers, or server clusters, and have the other terminal devices, servers, or server clusters that receive the initial data information execute the electronic credential generation method provided in the embodiments of this disclosure.
[0042] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0043] Figure 2 A flowchart illustrating an electronic credential generation method according to an embodiment of the present disclosure is shown schematically.
[0044] like Figure 2 As shown, the method includes operations S210~S230.
[0045] In operation S210, initial data information is obtained, which includes feature description information expressed in natural language and related to the content of the electronic voucher to be generated.
[0046] According to embodiments of this disclosure, electronic vouchers can be, for example, electronic coupons, electronic tickets, electronic transcripts, electronic certificates, and other vouchers with multiple field names. Different electronic voucher contents can be obtained by arranging and combining different field values. The electronic vouchers to be generated are characterized by a wide variety of information types and a large amount of data. For example, for electronic coupons, the issuance and use of coupons involve multiple conditions and scenarios, such as a minimum spending threshold, a specific delivery service area, and a validity period.
[0047] According to embodiments of this disclosure, the initial data information is expressed in natural language, which may be text, voice, image, video, etc.
[0048] For example, for electronic coupons, the feature description information in the initial data information can be text data such as "I need to provide new users with a coupon for 20 yuan off when purchasing 100 yuan, which can only be used when purchasing product A and is valid for 30 days"; or voice data such as "If the delivery address is in location A, location B or location D, provide users with a 15 yuan coupon, which is valid for 3 months".
[0049] For example, for electronic tickets, the feature description information in the initial data information could be text data such as "Purchased item 1 at a certain shopping mall, with a consumption amount of 20 yuan; purchased item 2, with a consumption amount of 50 yuan, for a total consumption amount of 70 yuan, with a discount amount of 5 yuan, the actual consumption amount of 65 yuan, and a parking voucher was given as a gift."
[0050] According to the embodiments of this disclosure, the feature description information listed in the above examples is merely illustrative. In practical applications, configuring electronic vouchers such as coupons or electronic tickets can include more content. Other types of electronic vouchers have the same features and effects as the above examples, and are not listed here.
[0051] In operation S220, the language processing model is used to perform intent recognition processing on the initial data information to obtain target data information with a predetermined structure.
[0052] According to embodiments of this disclosure, the initial data information may be obtained based on user input. Generally, the user is an operational or managerial staff member who needs to generate electronic vouchers, or an individual related to the content of the electronic voucher to be generated. Before obtaining the initial data information, consent or authorization from the individual related to the content of the electronic voucher to be generated should be obtained. For example, a request for consent or authorization to obtain the initial data information may be sent to the user, and the information may be obtained after the user's consent or authorization.
[0053] According to embodiments of this disclosure, a language processing model is used to perform intent recognition processing on initial data information to understand the true purpose or intent expressed by the input natural language. For example, by performing intent recognition processing on "I need to provide new users with a coupon for 20 yuan off purchases of 100 yuan or more, valid only for purchasing product A, and valid for 30 days," the intent to create the coupon can be obtained; or for other examples, such as "changing 20 yuan from the 20 yuan discount to 30 yuan," the intent to modify the coupon can be obtained, and the target data information can be output.
[0054] According to embodiments of this disclosure, the language processing model described in these embodiments can be used to organize data information into a predetermined structure to obtain target data information. The target data information with the predetermined structure includes each field and its corresponding multiple field values. For example, the predetermined structure can be a database table, key-value pairs, etc.
[0055] In operation S230, an electronic voucher is generated based on the target data information.
[0056] According to embodiments of this disclosure, electronic credentials are generated based on target data information with a pre-set template and a predetermined structure.
[0057] According to embodiments of this disclosure, electronic signatures can also be used to ensure the authenticity and integrity of electronic credentials. Specifically, when generating an electronic credential, the credential is digitally signed to verify its origin and lack of tampering.
[0058] According to embodiments of this disclosure, by utilizing a language processing model to perform intent recognition on initial data information in natural language form and directly outputting target data information, the generation of electronic vouchers is automated. This reduces the need for manual input and processing, saves time and effort, and improves work efficiency. Compared to manually filling in templates, it avoids problems such as errors that are easily made during manual input, thus improving the accuracy of electronic voucher generation. Specifically, the language processing model transforms information expressed in natural language into information with a fixed format, making the information more standardized and regulated, facilitating data processing and use. Furthermore, users only need to correctly express the key information of the electronic voucher to be generated using natural language; there is no need for users to learn and master complex templates and input formats, simplifying the electronic voucher generation process, reducing user effort, and lowering labor costs.
[0059] According to embodiments of this disclosure, before performing intent recognition processing on the initial data information using a language processing model, a data security verifier is used to perform data security verification on the initial data information. This data security verification includes verifying prohibited words in the initial data information and performing compliance verification on the initial data information. Prohibited words can be words used to characterize extreme effects. Examples include words like "most," "best," "favorite," "optimal," "best," "largest," "highest level," "lowest price," "top-tier," "ultimate," "preferred choice," "exclusive," "permanent," "omnipotent," "hereditary," "special effect," "invincible," "price increase at any time," and "price drop immediately," etc.
[0060] According to embodiments of this disclosure, prohibited words in the initial data information are verified. Specifically, the initial data information input by the user is scanned and matched with prohibited words in a pre-configured prohibited word database. If the matching confirms the presence of prohibited words in the initial data information, a modification prompt is generated and sent to the client, reminding the user to modify the natural language expression in the initial data information.
[0061] According to embodiments of this disclosure, compliance verification is performed on initial data information. Specifically, the initial data information input by the user is scanned and matched against pre-configured compliance verification rules to ensure that the information in the initial data information complies with legal and regulatory requirements.
[0062] For example, for e-coupons, check whether the coupon policy is fair to all users, without discrimination or unfair advantages. Ensure that the terms and conditions of the coupon are clear and transparent to users, allowing them to easily understand how to use the coupon. Check whether the coupon has reasonable usage restrictions, such as minimum spending requirements, restrictions on specific goods or services, etc. Ensure that the coupon policy includes anti-fraud measures to prevent abuse or fraudulent behavior. Check whether the coupon policy complies with data protection regulations, especially regarding the collection and use of users' personal information, etc.
[0063] For example, for electronic invoices, check whether the creation and use of the invoice comply with tax regulations to ensure that tax issues are handled correctly. Ensure that the content of the electronic invoice does not infringe upon consumers' legitimate rights, such as return policies and after-sales service.
[0064] According to embodiments of this disclosure, the language processing model includes an entity extraction layer and a context understanding layer.
[0065] Figure 3 A flowchart illustrating a method for generating target data information according to an embodiment of the present disclosure is shown.
[0066] like Figure 3 As shown, the initial data information is processed by the language processing model to obtain target data information with a predetermined structure, including operations S310 to S320.
[0067] In operation S310, the entity extraction layer is used to extract the initial attribute field values from the initial data information, resulting in multiple initial attribute field values and the initial attribute field name of each initial attribute field value, including steps 11 to 12.
[0068] In step 11, entity recognition is performed on the initial data information to obtain multiple initial attribute field values.
[0069] According to embodiments of this disclosure, initial attribute field values are extracted from initial data information. Specifically, this includes performing one or more processes on the initial data information, such as word segmentation, part-of-speech tagging, named entity recognition, entity linking, dependency parsing, coreference resolution, and entity relation extraction, to obtain each entity contained in the initial data information expressed in natural language, i.e., the initial attribute field values.
[0070] For example, entity recognition is performed on the natural language "I need to provide new users with a coupon for 20 yuan off when purchasing 100 yuan, which can only be used when purchasing product A and is valid for 30 days" to obtain the values of multiple initial attribute fields such as "I", "new user", "100 yuan", "20 yuan off", "coupon", "use when purchasing product A", "validity period", and "30 days".
[0071] For example, entity recognition is performed on the natural language statement "I bought item 1 at a shopping mall for 20 yuan; I also bought item 2 for 50 yuan, for a total of 70 yuan. The discount is 5 yuan, so the actual total price is 65 yuan. I also received a parking voucher." This yields multiple initial attribute field values such as "shopping mall", "purchase", "item 1", "20 yuan", "item 2", "50 yuan", ... "parking voucher".
[0072] In step 12, the initial attribute field values are categorized according to the predetermined field names to obtain the correspondence between each initial attribute field value and the initial attribute field name.
[0073] According to embodiments of this disclosure, the predetermined field names can be pre-configured based on experience and the type of electronic voucher to be generated. For example, if the type of electronic voucher to be generated is an electronic coupon, the predetermined field names can be the eligible recipient, the discounted product, the discount amount, the discount period, etc.; if the type of electronic voucher to be generated is an electronic certificate, the predetermined field names can be name, age, gender, certificate name, certificate number, etc.
[0074] According to embodiments of this disclosure, multiple identified initial attribute field values are categorized based on predetermined field names to obtain a correspondence between each initial attribute field value and its corresponding initial attribute field name. For example, in the above example, "Product 1" and "Product 2" belong to the same initial attribute field name, and "Consumption Amount 50 Yuan" and "Consumption Amount 20 Yuan" belong to the same initial attribute field name.
[0075] In operation S320, the context understanding layer is used to perform pre-defined operations on the values of multiple initial attribute fields based on the semantic understanding and parsing results of the initial data information to obtain the target data information, including steps 21 to 22.
[0076] In step 21, semantic understanding is performed on the initial data information to generate semantic understanding results, which contain operation instructions for the initial attribute field values.
[0077] According to embodiments of this disclosure, semantic understanding of initial data information specifically includes one or more processes such as lexical analysis, syntactic analysis, semantic representation, semantic reasoning, contextual understanding, domain knowledge fusion, intent recognition, and ambiguity resolution to obtain a semantic understanding result. The operation instructions on the initial attribute field values can include modifying initial attribute field values, merging initial attribute field values, filtering initial attribute field values, deleting initial attribute field values, etc.
[0078] In step 22, the dependencies and referential relationships in the initial data information are parsed to generate the parsing results.
[0079] According to embodiments of this disclosure, dependencies and referential relationships in initial data information are parsed. Specifically, dependencies between various components in a sentence are identified, referential relationships in the text are found, and the specific objects referred to by pronouns are determined. Contextual information of the text, including preceding and following text, is considered to more accurately understand dependencies and referential relationships. Furthermore, based on the identified dependencies and referential relationships, and the contextual information, reasoning and inference are performed to resolve potential ambiguities or uncertainties, generating parsing results.
[0080] In step 23, based on the operation instructions and parsing results, the initial attribute field values are subjected to predetermined operations to obtain the target data information.
[0081] According to embodiments of this disclosure, exemplarily, based on the semantic parsing results, the result of modifying the coupon is obtained, and based on dependency and referential relationships, the value of one initial attribute field is modified to the value of another initial attribute field.
[0082] According to embodiments of this disclosure, exemplarily, based on semantic parsing results, initial attribute field values unrelated to the content of the electronic voucher to be generated are deleted from multiple initial attribute field values, and initial attribute field values related to the content of the electronic voucher to be generated are selected and used as multiple attribute field names related to the voucher content. Based on the multiple attribute field names and at least one attribute field value corresponding to each attribute field name, target data information with a predetermined structure is generated.
[0083] According to embodiments of this disclosure, the predetermined structure includes at least a plurality of attribute field names related to the content of the credential and at least one attribute field value corresponding to each attribute field name.
[0084] According to an embodiment of this disclosure, the initial data information further includes multiple end indicators. Using a language processing model, the initial data information is processed for intent recognition to obtain target data information with a predetermined structure, including steps 31 to 32.
[0085] In step 31, the feature description information between two adjacent end indicator words is merged into a set of initial data information.
[0086] According to embodiments of this disclosure, a multi-turn dialog box is provided to clearly define the user's requirements and scope for the generated electronic voucher through multiple rounds of dialogue. Closing words are used to isolate each set of initial data information. These closing words can be user-defined natural language input, such as "that's it," "configured," etc., which can be identified using the natural language model of this disclosure to indicate a closing intent; or they can be pre-configured fixed phrases, such as "end," "complete," "finished," "above," "that's it," "configured," etc.
[0087] According to embodiments of this disclosure, initial data information input by the user is obtained sequentially, and the initial data information between the user's previously input end word and the currently input end word is used as the initial data information for the current group. Specifically, the first, second, and third initial data information input by the user, as well as the end word input by the user after the third initial data information, are obtained. The first, second, and third initial data information and the end word are used as the initial data information for the current group.
[0088] In step 32, the language processing model is used to perform intent recognition processing on each group of initial data information to obtain target data information corresponding to each group of initial data information.
[0089] According to embodiments of this disclosure, after the first initial data information, a first target data information with a predetermined structure is obtained using a language processing model; after the second initial data information, a second target data information with a predetermined structure is obtained using a language processing model, wherein the second target data information includes the attribute field names and their corresponding attribute field values from the first initial data information; after the third initial data information, a third target data information with a predetermined structure is obtained using a language processing model, wherein the third target data information includes the attribute field names and their corresponding attribute field values from the first initial data information as well as the attribute field names and their corresponding attribute field values from the second initial data information.
[0090] According to embodiments of this disclosure, after obtaining the end word input by the user, the initial data information of the current group is marked to isolate it from the initial data information of the next group. The first initial data information obtained after the end word is used as the initial data information of the next group.
[0091] According to embodiments of this disclosure, using closing words to isolate data clearly marks the end of each round of question-and-answer, making the boundaries between questions and answers more explicit and avoiding confusion and misunderstanding. By defining the scope of each round of question-and-answer through closing words, it is beneficial to accurately distinguish the question-and-answer data from different rounds, ensuring the accuracy and completeness of the data. Thus, both users and the system can clearly know the end and beginning of each round of question-and-answer, improving the interactive experience. It also reduces incorrect answers or misunderstandings caused by data confusion, improving the reliability of the system.
[0092] According to embodiments of this disclosure, after obtaining target data information with a predetermined structure, the target data information undergoes data format validation to check whether its data structure conforms to the predetermined structure, ensuring that each field is filled in according to the prescribed format. Specifically,
[0093] Figure 4A flowchart illustrating a method for generating electronic credentials according to another embodiment of this disclosure is shown schematically.
[0094] like Figure 4 As shown, an electronic voucher is generated based on the target data information, including operations S410 to S420.
[0095] In operation S410, the target data information is processed in a structured manner to obtain structured data information.
[0096] According to embodiments of this disclosure, the target data information can be structured and converted into information with a specific data structure, such as relational database tables, JSON documents, key-value pairs, etc.
[0097] For example, the target data information is transformed into relational database tables, and multiple tables are created to store different types of information. For instance, one table can be created to store the results of entity extraction, including the entity type, name, and related attributes; another table can store contextual understanding information, such as context and semantic relationships; and yet another table can be created to store information related to the generated electronic vouchers.
[0098] For example, the target data information is converted into key-value pairs, and the information is stored using a key-value pair data structure, where the key can be a unique identifier and the value can be a related information object.
[0099] For example, the target data information is converted into a JSON document format, and the results of entity extraction and context understanding, as well as the information of electronic credentials, are stored in the form of a JSON document to maintain the structure and flexibility of the data.
[0100] According to embodiments of this disclosure, after structuring the target data information, the structured data information is validated for data format to check whether the data structure conforms to the predetermined structure in the above embodiments, ensuring that each field is filled in according to the prescribed format. Furthermore, the logical relationships in the data are verified, such as whether the final validity period of an electronic coupon is reasonable (it should not be earlier than the current date) and whether the discount amount is within the allowed range.
[0101] According to embodiments of this disclosure, structured data information is mapped to database entities. Specifically, a one-to-one correspondence is established between structured data information and corresponding fields in the database. The structured data information is stored in the database to ensure that the data is correctly stored, including all relevant information about the electronic voucher, such as discount amount, usage conditions, and validity period. This ensures that the data related to generating the electronic voucher is stored reliably and long-term, and facilitates subsequent querying, use, statistics, and analysis of the electronic voucher data. Furthermore, storing structured data information also facilitates transactions during data storage, ensuring data consistency and integrity. In the event of an error, the system can roll back to the state before the operation, guaranteeing data accuracy.
[0102] When operating S420, electronic vouchers are generated based on structural data information.
[0103] According to embodiments of this disclosure, electronic vouchers are generated based on pre-set templates and structural data information of a predetermined structure. The pre-set template may contain only attribute field names and their corresponding values, or the attribute field names may be arranged in a pre-defined order. It may also include the layout, design, and other elements of a visual interface, such as logos, titles, dates, amounts, and transaction descriptions.
[0104] According to embodiments of this disclosure, the template can also be set according to necessary attribute field names and unnecessary attribute field names. Specifically, for unnecessary attribute field names, based on the initial data information input by the user, the target data information is output when unnecessary attribute field information is available, following the method described in embodiments of this disclosure. For necessary attribute field names, i.e., the attribute field names that must be included in generating the electronic voucher, if the user has not input them, the missing necessary attribute field names are filled in the template based on historical data and corpus information.
[0105] According to embodiments of this disclosure, missing necessary attribute field names are filled in the template based on historical data and corpus information, and a language processing model is trained based on historical data samples and a corpus. Based on the initial data model input by the user, the trained language processing model is used to fill in the necessary attribute field values corresponding to the necessary attribute field names.
[0106] According to embodiments of this disclosure, the generated electronic voucher information is visualized so that users can confirm whether it is correct or needs to be modified based on the displayed content.
[0107] According to embodiments of this disclosure, electronic signatures can also be used to ensure the authenticity and integrity of electronic credentials. Specifically, when generating an electronic credential, it is digitally signed to verify its origin and lack of tampering. For example, an electronic signature can be applied to a generated electronic certificate or electronic transcript to verify its issuing authority, thereby proving its validity or final interpretation rights.
[0108] According to embodiments of this disclosure, the generated electronic vouchers are sent to relevant parties. For example, electronic coupons are distributed to customers through the system, allowing them to enjoy discounts under specific conditions, scenarios, and durations when purchasing goods or services. Another example is sending electronic receipts to customers through the system or by printing them out as paper copies, allowing customers to retain the electronic receipts or access detailed transaction information. Yet another example is sending electronic certificates and electronic transcripts to the corresponding customers by name, enabling them to perform appropriate authentication upon receipt.
[0109] According to embodiments of this disclosure, this disclosure does not limit the method of sending electronic credentials, which can be through various forms such as a system, SMS, email, or mailing a printed paper version.
[0110] Figure 5 A flowchart illustrating an electronic credential generation method according to yet another embodiment of the present disclosure is shown.
[0111] like Figure 5 As shown, the electronic voucher generation method includes operations S510 to S550.
[0112] When operating S510, initial data information is obtained.
[0113] When operating the S520, perform data security verification on the initial data information.
[0114] When operating S530, the entity extraction layer in the language processing model is used to extract initial attribute field values from the initial data information, resulting in multiple initial attribute field values and the initial attribute field name for each initial attribute field value.
[0115] When operating the S540, the contextual understanding layer in the language processing model is used to perform predefined operations on the values of multiple initial attribute fields based on the semantic understanding and parsing results of the initial data information to obtain the target data information.
[0116] The S550 is used to perform structured processing on the target data information to obtain structured data information.
[0117] When operating S560, perform data format verification on the structural data information.
[0118] When operating S570, the structured data information is persisted.
[0119] When operating S580, electronic vouchers are generated based on structural data information.
[0120] When operating S590, the generated electronic voucher is visualized and sent to the client.
[0121] Figure 6 A block diagram of an electronic credential generation apparatus according to an embodiment of the present disclosure is shown schematically.
[0122] like Figure 6 As shown, the electronic voucher generation device 600 includes an acquisition module 610, a processing module 620, and a generation module 630.
[0123] The acquisition module is used to acquire initial data information, which includes feature description information expressed in natural language and related to the content of the electronic voucher to be generated.
[0124] The processing module is used to perform intent recognition processing on the initial data information using a language processing model to obtain target data information with a predetermined structure.
[0125] The generation module is used to generate electronic vouchers based on the target data information.
[0126] According to embodiments of this disclosure, the processing module utilizes a language processing model to perform intent recognition on initial data information in natural language form, directly outputting target data information. This achieves automated generation of electronic vouchers, reducing the need for manual input and processing, saving time and effort, and improving work efficiency. Compared to manually filling in templates, it avoids problems such as errors that are easily made during manual input, thus improving the accuracy of electronic voucher generation. Specifically, the processing module uses a language processing model to transform information expressed in natural language into information with a fixed format, making the information more standardized and regulated, facilitating data processing and use. Furthermore, users only need to correctly express the key information of the electronic voucher to be generated using natural language; there is no need for users to learn and master complex templates and input formats, simplifying the electronic voucher generation process, reducing user effort, and lowering labor costs. According to embodiments of this disclosure, the predetermined structure includes at least multiple attribute field names related to the voucher content and at least one attribute field value corresponding to each attribute field name.
[0127] According to embodiments of this disclosure, the language processing model includes an entity extraction layer and a context understanding layer. Utilizing the language processing model, the processing module includes an extraction submodule and an operation submodule.
[0128] The extraction submodule is used to extract initial attribute field values from the initial data information using the entity extraction layer, resulting in multiple initial attribute field values and the initial attribute field name for each initial attribute field value; the operation submodule is used to perform predetermined operations on the multiple initial attribute field values based on the semantic understanding and parsing results of the initial data information using the context understanding layer, to obtain the target data information.
[0129] According to embodiments of this disclosure, the operation submodule includes: a generation unit, a parsing unit, and an operation unit.
[0130] The generation unit is used to perform semantic understanding on the initial data information and generate semantic understanding results, wherein the semantic understanding results contain operation instructions on the values of the initial attribute fields; the parsing unit is used to parse the dependency and referential relationships in the initial data information and generate parsing results; the operation unit is used to perform predetermined operations on the values of the initial attribute fields according to the operation instructions and parsing results to obtain the target data information.
[0131] According to embodiments of this disclosure, the extraction submodule includes: an identification unit and a classification unit.
[0132] The identification unit is used to identify entities in the initial data information and obtain multiple initial attribute field values; the classification unit is used to classify the initial attribute field values according to the predetermined field names and obtain the correspondence between each initial attribute field value and the initial attribute field name.
[0133] According to embodiments of this disclosure, the initial data information further includes multiple end indicators, and the processing module further includes a merging submodule and an intent recognition processing submodule.
[0134] The merging submodule is used to merge the feature description information between two adjacent end indicator words into a set of initial data information; the intent recognition processing submodule is used to use a language processing model to perform intent recognition processing on each set of initial data information to obtain the target data information corresponding to each set of initial data information.
[0135] According to embodiments of this disclosure, the generation module includes a structured processing submodule and a generation submodule.
[0136] The structured processing submodule is used to perform structured processing on the target data information to obtain structured data information; the generation submodule is used to generate electronic vouchers based on the structured data information.
[0137] According to embodiments of this disclosure, the electronic certificate generation device further includes a security verification module and a format verification module.
[0138] The security verification module is used to perform data security verification on the initial data information; the format verification module is used to perform data format verification on the target data information.
[0139] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-a-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0140] For example, any plurality of the first building module 610, the second building module 620, and the output module 630 may be combined into one module / unit / subunit, or any one of these modules / units / subunits may be split into multiple modules / units / subunits. Alternatively, at least a portion of the functionality of one or more of these modules / units / subunits may be combined with at least a portion of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this disclosure, at least one of the first building module 610, the second building module 620, and the output module 630 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the first building module 610, the second building module 620, and the output module 630 may be implemented at least partially as a computer program module that can perform corresponding functions when the computer program module is run.
[0141] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing the electronic credential generation method described above, according to an embodiment of the present disclosure.
[0142] Figure 7The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0143] like Figure 7 As shown, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0144] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 709. Processor 701 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 702 and / or RAM 703. It should be noted that programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
[0145] According to embodiments of this disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 709. The electronic device 700 may also include one or more of the following components connected to the input / output (I / O) interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0146] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by processor 701, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0147] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0148] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0149] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0150] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the electronic credential generation method provided in the embodiments of this disclosure.
[0151] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0152] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0153] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0155] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for generating electronic vouchers, comprising: Acquire initial data information, wherein the initial data information includes feature description information expressed in natural language and related to the content of the electronic voucher to be generated; Using a language processing model, the initial data information is processed to identify the intent, thereby obtaining target data information with a predetermined structure; Based on the target data information, an electronic voucher is generated.
2. The method according to claim 1, wherein, The predetermined structure includes at least a number of attribute field names related to the content of the voucher and at least one attribute field value corresponding to each attribute field name.
3. The method according to claim 1 or 2, wherein, The language processing model includes an entity extraction layer and a context understanding layer. Using the language processing model, the initial data information is processed for intent recognition to obtain target data information with a predetermined structure, including: Using the entity extraction layer, initial attribute field values are extracted from the initial data information to obtain multiple initial attribute field values and the initial attribute field name of each initial attribute field value; Using the context understanding layer, based on the semantic understanding and parsing results of the initial data information, predetermined operations are performed on the values of the multiple initial attribute fields to obtain the target data information.
4. The method according to claim 3, wherein, Using the context understanding layer, based on the semantic understanding and parsing results of the initial data information, predetermined operations are performed on the values of the multiple initial attribute fields to obtain the target data information, including: The initial data information is semantically understood to generate a semantic understanding result, wherein the semantic understanding result contains operation instructions for the values of the initial attribute fields; The dependency and referential relationships in the initial data information are analyzed to generate the analysis results; Based on the operation instructions and the parsing results, the initial attribute field values are subjected to predetermined operations to obtain the target data information.
5. The method according to claim 3, wherein, Using the entity extraction layer, initial attribute field values are extracted from the initial data information to obtain multiple initial attribute field values and an initial attribute field name for each initial attribute field value, including: Entity recognition is performed on the initial data information to obtain multiple initial attribute field values; The initial attribute field values are categorized according to predetermined field names to obtain the correspondence between each initial attribute field value and the initial attribute field name.
6. The method according to claim 1, wherein, The initial data information also includes multiple end indicators. Using a language processing model, the initial data information undergoes intent recognition processing to obtain target data information with a predetermined structure, including: The feature description information between two adjacent end indicator words is merged into a set of initial data information; Using a language processing model, intent recognition processing is performed on each set of initial data information to obtain the target data information corresponding to each set of initial data information.
7. The method according to claim 1, wherein generating an electronic voucher based on the target data information includes: The target data information is processed in a structured manner to obtain structured data information; The electronic certificate is generated based on the structured data information.
8. The method according to claim 1, further comprising: Perform data security verification on the initial data information; The target data information is validated for its data format.
9. An electronic voucher generation device, comprising: The acquisition module is used to acquire initial data information, wherein the initial data information includes feature description information expressed in natural language and related to the content of the electronic voucher to be generated; The processing module is used to perform intent recognition processing on the initial data information using a language processing model to obtain target data information with a predetermined structure. The generation module is used to generate electronic vouchers based on the target data information.
10. An electronic device, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 8.
11. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 8.
12. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 8.