Method, device and equipment for determining structured information of target object
By classifying the extracted text, determining the element type and extracting structured information, the problem of low accuracy in structured information extraction in the prior art is solved, and more efficient and accurate information extraction is achieved.
Patent Information
- Application Number
- CN202310638272.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2024-12-03
AI Technical Summary
The prior art fails to effectively distinguish the different contents of the text to be extracted in structured information extraction, resulting in limited extraction accuracy.
By classifying the extracted text, determining the element type based on the object category, and obtaining and extracting structured information based on the element type, a hierarchical process of first classification and then extraction is adopted to improve the efficiency and accuracy of information extraction.
The efficiency and accuracy of structured information extraction are improved, and the corresponding structured information can be extracted in a personalized manner for different categories of target objects, and the unstructured text features are converted into structured information.
Smart Images

Figure CN119066253A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of natural language processing technology, in particular to the field of structured information processing technology, and specifically to a method, device, electronic device, computer-readable storage medium, and computer program product for determining structured information of a target object. Background Art
[0002] With the development of computer technology, information processing technology implemented by computers is increasingly being applied to various fields. Generally speaking, the processing efficiency and accuracy of computers for structured information are much higher than those for unstructured information. By extracting structured information from the original data content, the effect of data processing can be effectively improved.
[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0004] The present disclosure provides a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for determining structured information of a target object.
[0005] According to one aspect of the present disclosure, a method for determining structured information of a target object is provided, comprising: obtaining text to be extracted corresponding to the target object; classifying the text to be extracted to obtain an object category of the target object; determining at least one first element type based on the object category; obtaining at least one first element of the text to be extracted corresponding to the at least one first element type; and determining the structured information of the target object based at least on the at least one first element.
[0006] According to another aspect of the present disclosure, a method for issuing electronic vouchers is provided, comprising: acquiring structured information of at least one historically used electronic voucher of a target user; determining at least one target electronic voucher from the multiple candidate electronic vouchers based on the structured information of the at least one historically used electronic voucher and the structured information of a plurality of candidate electronic vouchers; and issuing the at least one target electronic voucher to the target user, wherein the structured information of the at least one historically used electronic voucher and the structured information of the multiple candidate electronic vouchers are determined using the method for determining the structured information of a target object as described above, and wherein the text to be extracted corresponding to the target object includes description text of the at least one historically used electronic voucher and description text of the multiple candidate electronic vouchers.
[0007] According to another aspect of the present disclosure, a device for determining structured information of a target object is provided, comprising: a first acquisition unit, configured to acquire text to be extracted corresponding to the target object; a classification unit, configured to classify the text to be extracted to obtain an object category of the target object; a first determination unit, configured to determine at least one first element type based on the object category; a second acquisition unit, configured to acquire at least one first element of the text to be extracted corresponding to the at least one first element type; and a second determination unit, configured to determine the structured information of the target object based at least on the at least one first element.
[0008] According to another aspect of the present disclosure, a device for issuing electronic vouchers is provided, comprising: a third acquisition unit, configured to acquire structured information of at least one historically used electronic voucher of a target user and structured information of multiple candidate electronic vouchers; a third determination unit, configured to determine at least one target electronic voucher from the multiple candidate electronic vouchers based on the structured information of the at least one historically used electronic voucher and the structured information of the multiple candidate electronic vouchers; and an issuance unit, configured to issue the at least one target electronic voucher to the target user, wherein the structured information of the at least one historically used electronic voucher and the structured information of the multiple candidate electronic vouchers are determined using the device for determining the structured information of a target object as described above, and wherein the text to be extracted corresponding to the target object includes description text of the at least one historically used electronic voucher and description text of the multiple candidate electronic vouchers.
[0009] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for determining structured information of a target object and / or issuing an electronic voucher.
[0010] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the above-mentioned method for determining structured information of a target object and / or issuing an electronic voucher.
[0011] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the above-mentioned method for determining structured information of a target object and / or issuing an electronic voucher.
[0012] According to one or more embodiments of the present disclosure, the efficiency and accuracy of structured information extraction can be improved.
[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0015] Figure 1 A flowchart of a method for determining structured information of a target object according to an exemplary embodiment of the present disclosure is shown;
[0016] Figure 2 A flowchart showing a method for issuing an electronic voucher according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 3 A structural block diagram of an apparatus for determining structured information of a target object according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 4 A structural block diagram showing an electronic voucher issuing device according to an exemplary embodiment of the present disclosure
[0019] Figure 5 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0021] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0022] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0023] In the related art, a unified method is usually used to extract structured information of a text, but different contents contained in the text to be extracted cannot be extracted in a differentiated or hierarchical manner, resulting in limited accuracy in extracting structured information.
[0024] Based on this, the present disclosure provides a method for determining the structured information of a target object, which first classifies the text to be extracted, and then performs information extraction of the corresponding pattern based on the obtained object category, thereby utilizing the hierarchical process of first classifying and then extracting structured information to improve the efficiency and accuracy of information extraction.
[0025] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0026] Figure 1 FIG. 1 is a flowchart of a method 100 for determining structured information of a target object according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the method 100 includes:
[0027] Step S101, obtaining the text to be extracted corresponding to the target object;
[0028] Step S101, classifying the text to be extracted to obtain the object category of the target object;
[0029] Step S102: Determine at least one first element type based on the object category;
[0030] Step S103, obtaining at least one first element of the text to be extracted corresponding to at least one first element type; and
[0031] Step S104: Determine structured information of the target object based on at least one first element.
[0032] Therefore, by first using the corresponding text to be extracted of the target object to classify the target object, determining at least one first element type to be extracted based on the object category, and then extracting at least one corresponding first element based on this, the extracted first element type can be adapted to the object category of the target object, and the corresponding structured information can be extracted in a personalized manner for target objects of different categories, so that unstructured text features can be converted into structured information, thereby improving the efficiency and accuracy of structured information extraction.
[0033] In some examples, the text to be extracted is a text that can describe the characteristics of the target object, for example, it can be in the form of multiple text words, text sentences or text paragraphs. It can be understood that the text to be extracted contains key entity words that can clearly indicate the specific characteristics of the target object. However, in some practical application scenarios, the text to be extracted corresponding to the target object is unstructured, which contains both key entity words and non-entity content.
[0034] In some examples, the target object is an entity of a specific category. It is understandable that the feature types of the entity of a specific category are fixed. For example, the feature types of a commodity entity may include commodity name, commodity category, price, etc., and in some examples, there may be an association relationship between features. Thus, structured feature description rules can be manually configured according to actual needs, and structured information that can systematically describe the features of each target object can be determined based on this. By executing the above method 100, the key entity words in the text to be extracted can be determined to form structured information with a clear hierarchical structure.
[0035] In structured information, the locations where the properties and values of the information appear are fixed, so that fixed specifications can be used to easily and quickly read or manage structured information. In some examples, structured information can be obtained based on a preset template, which defines the properties of multiple groups of information and the locations where the properties and values of each group of information appear, so that structured information in the format of the preset template can be obtained. In some examples, the range of values of each group of information can also be further defined. Data format, etc. Structured information can be saved in a variety of formats, such as Json data, key-value data, table data, etc.
[0036] In the above-mentioned structured feature description rules, multiple element types can be configured according to actual needs, and each element type corresponds to a certain type of feature of the target object, so that the corresponding elements can be obtained based on the pre-configured multiple element types, that is, the key entity words that can clearly indicate this type of feature of the target object are obtained.
[0037] In some examples, the above-mentioned multiple element types may be further classified based on the category characteristics of the target object or the structural characteristics of the text to be extracted.
[0038] For example, the first element type may be an element type having a specific mapping relationship with the object category of the target object, that is, an element type unique to the target object of a specific object category. In this case, target objects of different object categories correspond to different first element types, and it is necessary to configure a mapping relationship between each object category and at least one corresponding first element type, based on which the extraction of structured information is performed.
[0039] It should be understood that in different application scenarios, the target object may be a different entity, and the corresponding text to be extracted may also include different content. For example, in some examples, the target object may be a commodity electronic voucher, and the text to be extracted may be a description text of the commodity electronic voucher, which may specifically include the name of the electronic voucher, the description information of the electronic voucher, etc. In this case, the object category of the target object may indicate the category of the electronic voucher, so that the corresponding structured electronic voucher attribute information, such as the electronic voucher usage information, etc., can be extracted based on the category of the electronic voucher, so as to use unified structured information to indicate the characteristics of the commodity electronic voucher.
[0040] In some examples, the target object may be a product, and the text to be extracted may be a description text of the product, which may specifically include the product name, product parameter information, product function introduction information, etc. In this case, the object category of the target object can indicate the category of the product, so that the corresponding structured product feature information, such as product parameters, etc., can be extracted based on the product category, thereby improving the accuracy of structured information extraction.
[0041] In this example, a product may correspond to multiple different product categories. Each product category may correspond to its own unique first element type. For example, when the product category of a product is food, it may include a first element type indicating that the product is raw food or cooked food. For another example, when the product category of a product is clothing, it may include a first element type indicating that the product is men's clothing or women's clothing.
[0042] In some examples, the target object may be other types of content to be recommended. For example, when method 100 is applied to a video playback platform, the structured information of the video can be determined based on the description text of the video (e.g., title, copy, etc.), and the video can be recommended to the user based on this. When method 100 is applied to an e-book reading platform, the structured information of the e-book can be determined based on the description text of the e-book (e.g., introduction, preface, directory, etc.), and the book can be recommended to the user based on this.
[0043] In some examples, the target object may be a user, and by applying the above method 100, the user's structured information may be determined based on the user's portrait and the description information of the user's historical behavior, and personalized advertising recommendations may be made based on this. For example, when the method 100 is applied to an e-commerce platform, the structured information that can indicate the characteristics of the user's consumption habits may be determined based on the description text that can describe the user's historical purchase behavior, and more accurate product recommendations may be made based on this.
[0044] In some examples, when the length of the text to be extracted is long, the text to be extracted may be first segmented into sentences, and then the structured information may be extracted sequentially based on the sentence segmentation results to improve the accuracy of the structured information extraction.
[0045] In some examples, the structured information of the target object may be Json data, and after determining the structured information of the target object, it may be converted into key-value data and stored in a structured table, or further stored in a relational database, so as to achieve unified management of the extracted text and the corresponding structured information.
[0046] According to some embodiments, obtaining at least one first element corresponding to at least one first element type of the text to be extracted includes: inputting the text to be extracted into an extraction model for at least one first element type to obtain at least one first element. Thus, the extraction model can be used to efficiently and accurately determine the structured information of the target object.
[0047] In some examples, the extraction model for at least one first element type may be obtained by supervised training using labeled data. For example, the training process may include: obtaining a sample text and at least one real first element of the sample text; inputting the sample text into the initial extraction model to obtain at least one predicted first element output by the initial extraction model; and adjusting the parameters of the initial extraction model based on the at least one real first element and the at least one predicted first element.
[0048] According to some embodiments, the extraction model includes a pre-trained language model and an adaptation network, and the training process of the extraction model includes: obtaining a sample text and at least one real first element of the sample text; inputting the sample text into the initial extraction model to obtain at least one predicted first element output by the initial extraction model; and adjusting the parameters of the adaptation network based on at least one real first element and at least one predicted first element to obtain an extraction model including the pre-trained language model and the adjusted adaptation network. Thus, on the basis of fully utilizing the performance of the pre-trained language model, the extraction model can be fine-tuned by training the adaptation network, thereby improving the training efficiency, so that the fine-tuned extraction model can achieve efficient and accurate information extraction.
[0049] In some examples, according to the requirements of the actual training process, the parameters of the pre-trained language model can be adjusted based on at least one real first element and at least one predicted first element to improve the training effect.
[0050] In some examples, the type of the adaptation network can be selected according to actual needs, for example, it can be a multi-layer fully connected network or a residual network, which is not limited in the present disclosure.
[0051] According to some embodiments, the pre-trained language model includes a plurality of codec networks connected in sequence from the bottom layer to the top layer, the adaptation network is located between the bottom-most codec network and the top-most codec network of the pre-trained language model, and the distance between the adaptation network and the bottom-most codec network is greater than the distance between the adaptation network and the top-most codec network. Generally speaking, the bottom-layer network of the pre-trained language model is used to understand the basic text semantic information, that is, the output result of the bottom-layer network is the basic semantic feature used to characterize the input text, and the top-layer network optimizes the output feature for the final reasoning task. By utilizing the above-mentioned means, it is possible to fully utilize the bottom-layer semantic understanding ability of the pre-trained language model without optimizing a large number of bottom-layer network parameters, and only optimize and adjust the top-layer output result by using the adaptation network, so that the optimized extraction model can adapt to the information extraction task, so as to realize the extraction of structured information of the target object, and improve the training efficiency while ensuring the training effect.
[0052] In some examples, the pre-trained language model can be a Transformer model, which includes an encoder consisting of multiple layers of encoding modules connected sequentially from the bottom layer to the top layer and a decoder consisting of multiple layers of decoding modules connected sequentially from the bottom layer to the top layer. By inserting the adaptation network between the top-level encoding modules and / or decoding modules of the encoder and / or decoder, the top-level output results can be optimized and adjusted as described above.
[0053] According to some embodiments, classifying the text to be extracted to obtain the object category of the target object includes: inputting the text to be extracted into a first classification model to obtain the object category. Thus, the extraction model can be used to achieve efficient and accurate structured information extraction.
[0054] The classification model is a deep learning model used to map input content to different predefined categories, that is, to predict discrete classification labels corresponding to the input content. By applying the classification model, the efficiency and accuracy of classifying the extracted text can be improved. In some examples, the initial first classification model can be constructed based on various types of neural network structures, such as logistic regression networks, decision tree networks, random forest networks based on multiple decision trees, support vector machines, etc. After determining the target neural network structure, the various parameters in the target neural network structure can be generated by random initialization to obtain the initial first classification model.
[0055] Furthermore, the established initial first classification model may be trained using labeled sample data to obtain the first classification model. According to some embodiments, the training process of the first classification model includes: obtaining sample text and the real object category of the sample text; inputting the sample text into the initial first classification model to obtain the predicted object category output by the initial first classification model; and adjusting the parameters of the initial first classification model based on the real object category and the predicted object category. By using labeled sample data to perform supervised training on the first classification model, the various parameters of the first classification model can fit the mapping relationship between the input content and multiple discrete predefined classification labels, that is, the first classification model can be used to determine the object category of the corresponding target object based on the input text to be extracted.
[0056] In some examples, the object category of the text to be extracted may also be obtained by other means, for example, category keywords in the text to be extracted may be extracted based on preset keywords associated with the preset object category, and the object category of the text to be extracted may be determined based on the keyword extraction result.
[0057] For example, when the text to be extracted is a description text of a commodity electronic voucher, the category keywords in the text to be extracted can be extracted based on preset keywords such as "discount" and "instant reduction". When the text to be extracted includes the keyword "discount", it is determined to be a description text of the discount category, and when the text to be extracted includes the keyword "instant reduction", it is determined to be a description text of the amount reduction category.
[0058] The above describes a method for obtaining the first element associated with the category of the target object. In actual application scenarios, there is also the following possibility: all target objects include one or several specific features. In this case, there is no need to consider the category of the target object, and information extraction can be performed directly based on a fixed element type. In some examples, the second element type may be an element type that does not have a specific mapping relationship with the object category of the target object, that is, an element type that is included in the structured information of all target objects. Therefore, at least one second element type can be pre-configured to determine the corresponding second element based on this.
[0059] According to some embodiments, method 100 further includes: obtaining at least one second element of the text to be extracted corresponding to a preset second element type; and classifying at least one second element to obtain a content category of the corresponding second element, and wherein, at least based on at least one first element, determining the structured information of the target object includes: determining the structured information of the target object based on at least one first element, at least one second element, and the content category of the second element. Thus, information extraction can be performed directly on the text to be extracted based on the preset second element type, classification can be performed based on the extraction result, and on the basis of the second element extraction result, the content classification result of the second element can be further combined to obtain more accurate and comprehensive structured information to indicate the characteristics of the text to be extracted.
[0060] For example, when the text to be extracted is the description text of a commodity electronic voucher, in this case, although different commodity electronic vouchers may correspond to different electronic voucher categories, the description text of each commodity electronic voucher contains the name of the commodity. Therefore, it is not necessary to perform a text classification process to directly extract the commodity name in the description text of the electronic voucher, and then classify it based on the name of the commodity to obtain the corresponding commodity category, so that the commodity category information can be used to more comprehensively and accurately indicate the characteristics of the commodity electronic voucher. For another example, when the extracted text is a commodity description text, the commodity name can be directly extracted, and then classified to obtain the corresponding commodity category to indicate the characteristics of the commodity.
[0061] As described above, in some examples, the above-mentioned multiple element types can be further classified based on the structural characteristics of the text to be extracted. It can be understood that the structural characteristics of the text to be extracted can directly affect the way the elements are obtained. For example, the plain text of some elements may be included in the text to be extracted, and the content of some elements may need to be analyzed and extracted based on the semantic features of the text to be extracted. In some examples, the third element type may be an element type that requires the use of specific acquisition rules to extract the corresponding elements, for example, it may be an element type whose corresponding element is known in the plain text of the target object to be extracted. Based on this, at least one third element type can be pre-configured, and different element acquisition rules can be configured for different third element types to determine the third element corresponding to each third element type based on preset rules.
[0062] According to some embodiments, method 100 further includes: obtaining at least one third element corresponding to the text to be extracted, and wherein, based at least on at least one first element, determining the structured information of the target object includes: determining the structured information of the target object based on at least one first element and at least one third element. Thus, at least one third element in the text to be extracted can be obtained based on a preset rule to obtain more accurate and comprehensive structured information to indicate the characteristics of the text to be extracted.
[0063] According to some embodiments, the process of obtaining at least one third element corresponding to the text to be extracted includes at least one of the following items: obtaining at least one third element corresponding to the text to be extracted based on preset rules; inputting the text to be extracted into a second classification model to obtain at least one third element; and inputting the text to be extracted into an extraction model for at least one preset third element type to obtain at least one third element.
[0064] In some examples, the value range of the third element corresponding to the third element type may be limited and discretized. That is, at least one third element corresponding to the text to be extracted is essentially a discrete label that can indicate a specific semantic feature of the text to be extracted.
[0065] As described above, the classification model can be used to predict discrete classification labels corresponding to the input content. Therefore, in the above example, a similar construction process to the first classification model can also be applied to construct a second classification model to fit the mapping relationship between the text to be extracted and multiple discrete optional third elements. In some examples, the initial second classification model can be constructed based on various types of neural networks, such as logistic regression networks, decision tree networks, random forest networks based on multiple decision trees, support vector machines, etc. Further, the initial second classification model established can be trained using labeled sample data to obtain the second classification model. In some examples, the training process of the second classification model is similar to the training process of the first classification model described above. It can be understood that the network structure of the first classification model and the second classification model can be the same or different. However, since the input content and the output discretized labels corresponding to the first classification model and the second classification model are different, that is, the mapping relationship fitted by each parameter of the first classification model is different from the mapping relationship fitted by each parameter of the second classification model, even if the first classification model and the second classification model apply the same network structure, the number of network nodes can be different, and their network parameters are different.
[0066] In some examples, the text to be extracted contains a third element that is part of the plain text. In this case, the plain text information already contained in the text to be extracted can be directly read using preset rules, and combined with the structured information extracted using the method of the embodiment of the present disclosure to obtain more comprehensive structured information of the target object. Alternatively, in some examples, when the text to be extracted and the third element corresponding to the target object are stored together in a database, at least one third element corresponding to the text to be extracted can be directly obtained based on the mapping relationship between the target object, the text to be extracted and the at least one third element.
[0067] When the text to be extracted includes a third element in plain text and cannot be directly obtained through specific reading rules, the extraction model for at least one third element type can be used to determine at least one third element. Alternatively, the second classification model can be used to classify the text to be extracted to efficiently and accurately determine at least one third element. The extraction model and the second classification model for at least one third element type can be obtained by supervised training using labeled data.
[0068] According to some embodiments, method 100 further includes: obtaining a text feature vector corresponding to the text to be extracted, and wherein, at least based on at least one first element, determining the structured information of the target object includes: determining the structured information of the target object based on at least one first element and the text feature vector. Thus, the text feature vector of the text to be extracted can be stored in the form of structured information, for example, it can be stored in a structured table or a relational database, so that the text feature vector corresponding to the text to be extracted can be directly read when data processing needs to be performed, thereby improving processing efficiency.
[0069] It can be understood that the text feature vector is a vector that represents the semantic features of the text. The similarity between the text feature vectors corresponding to texts with similar semantics is relatively high. In some examples, the text feature vector can be obtained by encoding based on the text to be extracted using a pre-trained language model, so as to improve the efficiency and accuracy of the text feature vector encoding. For example, the corresponding encoding can be obtained by calculating the word frequency of each text in the corpus to indicate different texts. For another example, embedding (embedding layer) can be used to map the text to be extracted to a text feature semantic space with a fixed dimension, so that the text feature vector with a fixed dimension in the text feature semantic space can represent the semantic features of the original text to be extracted. The pre-trained language model can be, for example, a Word2Vec model, which is not limited in the present disclosure.
[0070] According to some embodiments, the target object includes an electronic voucher, and the object category is used to indicate that the electronic voucher includes an amount reduction electronic voucher or a discount electronic voucher, and wherein, based on the object category, determining at least one first element type includes: in response to determining that the object category indicates that the electronic voucher includes an amount reduction electronic voucher, determining that at least one first element type includes reduction amount information; and in response to determining that the object category indicates that the electronic voucher includes a discount electronic voucher, determining that at least one first element type includes discount amount information. Thus, the corresponding structured electronic voucher attribute information can be extracted based on the category of the electronic voucher to obtain the structured information of the electronic voucher, thereby improving the efficiency and accuracy of extracting the structured information.
[0071] According to some embodiments, the second element includes the product name information corresponding to the electronic voucher, and the third element includes the usage rule information corresponding to the electronic voucher. Thus, more comprehensive structured information of the electronic voucher can be obtained to meet the needs of actual application scenarios.
[0072] In some examples, the target object may also include other objects, such as objects to be recommended in various recommendation scenarios. In some examples, the target object may be a commodity, video, e-book, online article, etc. to be recommended. By extracting the structured information of the target object, it is helpful to achieve more accurate and efficient recommendations. For example, when it is necessary to recommend an object to a target user, the structured information of multiple historical objects for the target user can be obtained. The historical objects may be, for example, commodities purchased by the target user in history, videos watched in history, e-books and online articles purchased or browsed in history, etc. The target user's preferences are analyzed based on the structured information of multiple historical objects, and new objects are recommended to the target user based on this. For example, the similarity between the structured information of multiple candidate objects and the structured information of multiple historical objects may be analyzed, and the object to be recommended is selected from multiple candidate objects based on this.
[0073] In some examples, the target object may be a user, and a more accurate and comprehensive user profile is established by extracting the structured information of the target object, so as to provide personalized services for each user and improve the user experience. For example, when it is necessary to recommend products to the target user, multiple other users who are similar to the target user may be determined based on the structured information of each user, and the recommended products for the target user may be determined based on the preferences of other users for products (for example, the products may be determined by analyzing the historical purchases of multiple other users) to improve the accuracy of the recommendation.
[0074] According to another aspect of the present disclosure, a method for issuing an electronic voucher is also provided. Figure 2 FIG. 2 shows a flow chart of a method 200 for issuing an electronic voucher according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method 200 includes:
[0075] Step S201: Obtain structured information of at least one historically used electronic voucher of a target user and structured information of multiple candidate electronic vouchers;
[0076] Step S202: determining at least one target electronic voucher from the plurality of candidate electronic vouchers based on the structured information of at least one historically used electronic voucher and the structured information of the plurality of candidate electronic vouchers, wherein the structured information of the at least one historically used electronic voucher and the structured information of the plurality of candidate electronic vouchers are determined based on the description text of the at least one historically used electronic voucher and the description text of the plurality of candidate electronic vouchers by using the method 100; and
[0077] Step S203: issuing at least one target electronic voucher to the target user.
[0078] Thus, by acquiring the structured information of the electronic voucher using the method 100 , a target electronic voucher to be issued can be selected based on the structured information of at least one historically used electronic voucher of the target user and the structured information of a plurality of candidate electronic vouchers.
[0079] In some examples, the historically used electronic vouchers are electronic vouchers used by the user for consumption within a specific time period in the past. By obtaining the structured information of the historically used electronic vouchers, the user's preference for electronic vouchers can be indicated. Multiple candidate electronic vouchers can be electronic vouchers that are manually configured according to actual needs and can be used to issue to users. Generally speaking, multiple candidate electronic vouchers for multiple target users are the same. In this case, it is necessary to determine a personalized target electronic voucher for each target user based on the target user's preference for electronic vouchers, so as to ultimately issue it to the user. Therefore, based on the structured information of the historically used electronic vouchers and the structured information of multiple candidate electronic vouchers, it is possible to determine whether each candidate electronic voucher can meet the user's preference, so as to issue at least one target electronic voucher that best meets the user's needs to the target user, thereby improving the user experience.
[0080] In some examples, determining at least one target electronic voucher from multiple candidate electronic vouchers based on the structured information of at least one historically used electronic voucher and the structured information of multiple candidate electronic vouchers in step S202 may include: determining at least one target electronic voucher from multiple candidate electronic vouchers based on the similarity between the structured information of at least one historically used electronic voucher and the structured information of multiple candidate electronic vouchers. Thus, a target electronic voucher that is more similar to the target user's historically used electronic voucher can be selected to be issued to the target user, thereby improving the effect of electronic voucher issuance.
[0081] In some examples, determining at least one target electronic voucher from multiple candidate electronic vouchers based on the structured information of at least one historically used electronic voucher and the structured information of multiple candidate electronic vouchers in step S202 may include: determining the target user's preference information for electronic vouchers with different structured information based on the structured information of at least one historically used electronic voucher; and determining at least one target electronic voucher from multiple candidate electronic vouchers based on the preference information. For example, when the structured information of the electronic voucher includes the type of electronic voucher, the target user's preferred electronic voucher type may be determined based on the type of the historically used electronic voucher, so that the target electronic voucher of the corresponding type can be selected from multiple candidate electronic vouchers to improve the effect of electronic voucher issuance.
[0082] According to some embodiments, the object category is used to indicate that the electronic voucher includes an amount reduction electronic voucher or a discount electronic voucher, and wherein, based on the object category, determining at least one first element type includes: in response to determining that the object category indicates that the electronic voucher includes an amount reduction electronic voucher, determining that at least one first element type includes reduction amount information; and in response to determining that the object category indicates that the electronic voucher includes a discount electronic voucher, determining that at least one first element type includes discount amount information. Thus, the corresponding structured electronic voucher attribute information can be extracted based on the category of the electronic voucher, thereby improving the efficiency and accuracy of extracting structured information.
[0083] According to some embodiments, the second element includes the product name information corresponding to the electronic voucher, and the third element includes the usage rule information corresponding to the electronic voucher. Thus, it is possible to fully combine the needs of the actual application scenario and more comprehensively indicate the characteristics of the product electronic voucher by extracting the corresponding type of structured information. In some examples, the usage rule information may include, for example, the usage scenario and usage threshold of the product electronic voucher.
[0084] In some examples, the usage rule information may include usage scenario information of the electronic voucher. For example, when the merchandise electronic voucher is a meal electronic voucher, the usage rule information may indicate that the usage scenario of the merchandise electronic voucher is dine-in or take-out.
[0085] In some examples, the structured information of the electronic voucher can be expressed in the form of a key-value pair, so that the key can be used to indicate different feature categories, and the value can be used to represent the feature content of each category. In some examples, the structured information of the electronic voucher can also be stored in a relational table, which is not limited in this disclosure.
[0086] In an example, when the commodity electronic voucher is a meal electronic voucher, the structured information of the electronic voucher may be as shown in Table 1.
[0087] Table 1:
[0088] Key Value Unique ID of the e-voucher 'E-voucher ID' E-voucher Name xx meal half price for the second one E-voucher Type Discount e-vouchers Discount 50% off Product Name xx food Product categories Staple Food Usage scenarios Dine-in Text feature vector 'Electronic coupon feature vector'
[0089] It can be understood that the content in Table 1 is only an example of the structured information of the electronic voucher. In actual application scenarios, the content of the structured information of the electronic voucher can be configured according to requirements, for example, some keys can be deleted or new keys can be added.
[0090] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0091] According to another aspect of the present disclosure, a device for determining structured information of a target object is also provided. Figure 3 FIG. 3 shows a structural block diagram of an apparatus 300 for determining structured information of a target object according to an exemplary embodiment of the present disclosure. Figure 3 As shown, the device 300 includes:
[0092] A first acquisition unit 301 is configured to acquire a text to be extracted corresponding to a target object;
[0093] A classification unit 302 is configured to classify the text to be extracted to obtain an object category of the target object;
[0094] A first determining unit 303 is configured to determine at least one first element type based on the object category;
[0095] A second acquisition unit 304 is configured to acquire at least one first element corresponding to at least one first element type of the text to be extracted; and
[0096] The second determining unit 305 is configured to determine the structured information of the target object based at least on the at least one first element.
[0097] The operations of units 301 to 305 of the apparatus 300 for determining structured information of a target object are similar to the operations of steps S101 to S105 described above, and are not described in detail herein.
[0098] According to another aspect of the present disclosure, a device for issuing electronic coupons is also provided. Figure 4 FIG. 4 shows a structural block diagram of an electronic voucher issuing device 400 according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the device 400 includes:
[0099] The third acquisition unit 401 is configured to acquire structured information of at least one historically used electronic voucher of the target user and structured information of a plurality of candidate electronic vouchers;
[0100] a third determining unit 402 configured to determine at least one target electronic voucher from the plurality of candidate electronic vouchers based on the structured information of at least one historically used electronic voucher and the structured information of the plurality of candidate electronic vouchers, wherein the structured information of the at least one historically used electronic voucher and the structured information of the plurality of candidate electronic vouchers are determined using the apparatus 300, and wherein the text to be extracted corresponding to the target object includes description text of the at least one historically used electronic voucher and description text of the plurality of candidate electronic vouchers; and
[0101] The issuing unit 403 is configured to issue at least one target electronic voucher to a target user.
[0102] The operations of units 401 to 403 of the electronic voucher issuing device 400 are similar to the operations of steps S201 to S203 described above, and are not described in detail here.
[0103] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for determining structured information of a target object and / or issuing an electronic voucher.
[0104] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned method for determining structured information of a target object and / or issuing an electronic voucher.
[0105] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, wherein the computer program implements the above-mentioned method for determining structured information of a target object and / or issuing an electronic voucher when executed by a processor.
[0106] See also Figure 5 , a block diagram of an electronic device 500 that can be used as the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device can be a computer device of different types, such as a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0107] Figure 51 shows a block diagram of an electronic device according to an embodiment of the present disclosure. Figure 5 As shown, the electronic device 500 may include at least one processor 501 , a working memory 502 , an I / O device 504 , a display device 505 , a storage device 506 , and a communication interface 507 that can communicate with each other via a system bus 503 .
[0108] The processor 501 may be a single processing unit or multiple processing units, all of which may include a single or multiple computing units or multiple cores. The processor 501 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuits, and / or any device that manipulates signals based on operating instructions. The processor 501 may be configured to obtain and execute computer-readable instructions stored in a working memory 502, a storage device 506, or other computer-readable media, such as program codes of an operating system 502a, program codes of an application 502b, and the like.
[0109] Working memory 502 and storage device 506 are examples of computer-readable storage media for storing instructions, which are executed by processor 501 to implement the various functions described above. Working memory 502 may include both volatile memory and non-volatile memory (e.g., RAM, ROM, etc.). In addition, storage device 506 may include a hard disk drive, a solid-state drive, a removable medium, including external and removable drives, memory cards, flash memory, a floppy disk, an optical disk (e.g., CD, DVD), a storage array, a network attached storage, a storage area network, etc. Working memory 502 and storage device 506 may all be collectively referred to herein as memory or computer-readable storage media, and may be a non-transitory medium capable of storing computer-readable, processor-executable program instructions as computer program code, which may be executed by processor 501 as a specific machine configured to implement the operations and functions described in the examples herein.
[0110] The I / O device 504 may include an input device and / or an output device. The input device may be any type of device capable of inputting information to the electronic device 500, and may include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output device may be any type of device capable of presenting information, and may include but is not limited to a video / audio output terminal, a vibrator, and / or a printer.
[0111] The communication interface 507 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device and / or the like.
[0112] The application 502b in the working register 502 can be loaded to execute the various methods and processes described above, such as Figure 1 In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the storage device 506 and / or the communication interface 507. When the computer program is loaded and executed by the processor 501, one or more steps of the method for determining the structured information of the target object and / or issuing the electronic voucher described above may be executed.
[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0115] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or 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 foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0118] A computing system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0120] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A method for determining structured information of a target object, comprising: Obtaining the text to be extracted corresponding to the target object; Classifying the text to be extracted to obtain the object category of the target object; Based on the object category, determining at least one first element type; Acquire at least one first element of the text to be extracted that corresponds to the at least one first element type; as well as Based at least on the at least one first element, structured information of the target object is determined.
2. The method of claim 1, wherein: The obtaining of at least one first element of the text to be extracted corresponding to the at least one first element type comprises: The text to be extracted is input into an extraction model for the at least one first element type to obtain the at least one first element.
3. The method of claim 2, wherein: The extraction model includes a pre-trained language model and an adaptation network, and the training process of the extraction model includes: Obtaining a sample text and at least one real first element of the sample text; Inputting the sample text into an initial extraction model to obtain at least one predicted first element output by the initial extraction model; and Based on the at least one true first element and the at least one predicted first element, parameters of the adaptation network are adjusted to obtain an extraction model including the pre-trained language model and the adjusted adaptation network.
4. The method of claim 3, wherein: The adaptation network includes at least one of a multi-layer fully connected network and a residual network.
5. The method of claim 3, wherein: The pre-trained language model includes a plurality of codec networks connected in sequence from the bottom layer to the top layer, the adaptation network is located between the bottom-most codec network and the top-most codec network of the pre-trained language model, and the distance between the adaptation network and the bottom-most codec network is greater than the distance between the adaptation network and the top-most codec network.
6. The method of claim 1, wherein: The classifying of the text to be extracted to obtain the object category of the target object includes: The text to be extracted is input into a first classification model to obtain the object category.
7. The method of claim 1, further comprising: Acquire at least one second element of the text to be extracted that corresponds to a preset second element type; as well as classifying the at least one second element to obtain a content category of the corresponding second element, And wherein, determining the structured information of the target object based at least on the at least one first element comprises: Based on the at least one first element, the at least one second element, and a content category of the second element, structured information of the target object is determined.
8. The method of claim 1, further comprising: Obtain at least one third element corresponding to the text to be extracted, And wherein, determining the structured information of the target object based at least on the at least one first element comprises: Based on the at least one first element and the at least one third element, structured information of the target object is determined.
9. The method of claim 8, wherein: The process of obtaining at least one third element corresponding to the text to be extracted includes at least one of the following: Based on a preset rule, obtaining at least one third element corresponding to the text to be extracted; Inputting the text to be extracted into a second classification model to obtain the at least one third element; as well as The text to be extracted is input into an extraction model for at least one preset third element type to obtain the at least one third element.
10. The method according to any one of claims 1 to 9, further comprising: Obtaining the text feature vector corresponding to the text to be extracted, And wherein, determining the structured information of the target object based at least on the at least one first element comprises: Based on the at least one first element and the text feature vector, structured information of the target object is determined.
11. The method according to any one of claims 1 to 9, wherein: The target object includes an electronic voucher, the object category is used to indicate that the electronic voucher includes an amount reduction electronic voucher or a discount electronic voucher, and wherein, based on the object category, determining at least one first element type includes: In response to determining that the object category indicates that the electronic voucher includes an amount reduction electronic voucher, determining that the at least one first element type includes reduction amount information; and In response to determining that the object category indicates that the electronic voucher includes a discount electronic voucher, determining that the at least one first element type includes discount amount information.
12. The method of claim 11, wherein: The second element includes the commodity name information corresponding to the electronic voucher, and the third element includes the usage rule information corresponding to the electronic voucher.
13. A method for issuing an electronic voucher, comprising: Acquire structured information of at least one historically used electronic voucher of the target user and structured information of a plurality of candidate electronic vouchers; determining at least one target electronic voucher from the plurality of candidate electronic vouchers based on the structured information of the at least one historically used electronic voucher and the structured information of the plurality of candidate electronic vouchers; as well as issuing the at least one target electronic voucher to the target user, Wherein, the structured information of at least one historically used electronic voucher and the structured information of multiple candidate electronic vouchers are determined using the method described in any one of claims 1-12, and wherein the text to be extracted corresponding to the target object includes the description text of the at least one historically used electronic voucher and the description text of the multiple candidate electronic vouchers.
14. The method of claim 13, wherein: The object category is used to indicate that the electronic voucher includes an amount reduction electronic voucher or a discount electronic voucher, and wherein, based on the object category, determining at least one first element type includes: In response to determining that the object category indicates that the electronic voucher includes an amount reduction electronic voucher, determining that the at least one first element type includes reduction amount information; and In response to determining that the object category indicates that the electronic voucher includes a discount electronic voucher, determining that the at least one first element type includes discount amount information.
15. The method of claim 14, wherein: The second element includes the commodity name information corresponding to the electronic voucher, and the third element includes the usage rule information corresponding to the electronic voucher.
16. A device for extracting structured information of a target object, comprising: A first acquisition unit is configured to acquire a text to be extracted corresponding to the target object; A classification unit, configured to classify the text to be extracted to obtain an object category of the target object; A first determining unit, configured to determine at least one first element type based on the object category; A second acquisition unit is configured to acquire at least one first element of the text to be extracted corresponding to the at least one first element type; as well as The second determining unit is configured to determine the structured information of the target object based at least on the at least one first element.
17. An electronic voucher issuing device, comprising: A third acquisition unit is configured to acquire structured information of at least one historically used electronic voucher of the target user and structured information of a plurality of candidate electronic vouchers; a third determining unit configured to determine at least one target electronic voucher from the plurality of candidate electronic vouchers based on the structured information of the at least one historically used electronic voucher and the structured information of the plurality of candidate electronic vouchers; as well as an issuing unit, configured to issue the at least one target electronic voucher to the target user, Wherein, the structured information of at least one historically used electronic voucher and the structured information of multiple candidate electronic vouchers are determined using the device as described in claim 16, and wherein the text to be extracted corresponding to the target object includes the description text of the at least one historically used electronic voucher and the description text of the multiple candidate electronic vouchers.
18. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 15.
19. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-15.
20. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 15 is implemented.
Citation Information
Patent Citations
Method and system for dynamically extracting information, storage medium
CN109145125A
Electronic coupon distribution method and device
CN110969471A
Structured information extraction method and device, electronic equipment and storage medium
CN114398434A
Product recommendation method and system, electronic equipment and storage medium
CN114723527A
