Semantic recognition method and device, electronic device and computer-readable storage medium

Through the combination of slot extraction model and knowledge graph, the flexibility and accuracy of semantic recognition of Stanford CoreNLP processing tool in the e-commerce platform is solved, and multi-slot prediction and personalized recommendation of user input information are realized.

CN111368548BActive Publication Date: 2025-08-22BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201811498049.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-07
Publication Date
2025-08-22
Estimated Expiration
2038-12-07

AI Technical Summary

Technical Problem

In the prior art, the regular template matching method of Stanford CoreNLP processing tool is too rigid in semantic recognition, and more and more regular templates need to be written to adapt to the business expansion of the e-commerce platform, resulting in waste of manpower and insufficient flexibility.

Method used

The slot extraction model is adopted, including the input layer, the shared layer and the parallel sub-output layer. Through multi-task learning and deep learning methods, multi-slot prediction of the same word is realized, and the semantic meaning of user input is identified by combining the knowledge graph and business scenario classification model.

Benefits of technology

It improves the accuracy of semantic recognition, can adapt to different business scenarios more flexibly, reduces dependence on manually setting regular templates, and improves the accuracy of user experience and recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111368548B_ABST
    Figure CN111368548B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a semantic recognition method and device, an electronic device, and a computer-readable storage medium, which relate to the field of computer technology. The semantic recognition method includes: obtaining input information of a target object; extracting a target slot value of a target slot in the input information through a slot extraction model; wherein the slot extraction model includes an input layer, a shared layer, and an output layer connected in sequence, wherein the output layer includes n parallel sub-output layers, each sub-output layer is used to output a slot value prediction result of a slot; n is a positive integer greater than or equal to 2. The technical solution of the embodiment of the present invention can realize multi-slot prediction of the same word, thereby improving the accuracy of semantic recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a semantic recognition method, a semantic recognition device, an electronic device, and a computer-readable storage medium. Background Art

[0002] In existing technologies, semantic recognition uses the Stanford CoreNLP processing tool to first perform basic language low-level word segmentation, part-of-speech tagging and other analyses, and then write regular template matching to extract specific words in specific speech.

[0003] Among them, the wording here is a template. For example, "I want to buy ***" is a wording. Seeing this wording indicates that the user's shopping intention is to inquire about products.

[0004] The disadvantages of the above-mentioned prior art are:

[0005] The regular expression templates in the Stanford CoreNLP processing tool are pre-set by product developers, and then matched using regular expressions. However, the regular expression matching templates in the Stanford CoreNLP processing tool are rather rigid in extracting semantic information, and can only match the speech specified by the regular expression.

[0006] For example, in an after-sales business scenario, you can set the speech template to "I want to return the *** I bought." When the program sees such a sentence, it will predict it as an after-sales business scenario. However, this requires a strict match between what the user said and only a complete match can be recognized.

[0007] That is, in the existing technology, only the words specified by the regular expression can be matched. As the business scenarios of the e-commerce platform expand, more and more regular expression templates need to be written, which is a waste of manpower and the effect is not flexible enough.

[0008] Therefore, a new semantic recognition method, semantic recognition device, electronic device and computer-readable storage medium are needed.

[0009] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention

[0010] The purpose of the embodiments of the present invention is to provide a semantic recognition method, a semantic recognition device, an electronic device and a computer-readable storage medium, thereby overcoming one or more problems caused by the limitations and defects of related technologies to at least a certain extent.

[0011] According to a first aspect of an embodiment of the present invention, a semantic recognition method is provided, comprising: obtaining input information of a target object; extracting a target slot value of a target slot in the input information through a slot extraction model; wherein the slot extraction model comprises an input layer, a shared layer, and an output layer connected in sequence, wherein the output layer comprises n parallel sub-output layers, each sub-output layer being used to output a slot value prediction result of a slot; and n is a positive integer greater than or equal to 2.

[0012] In an exemplary embodiment of the present invention, the input information includes input voice information and / or input text information.

[0013] In an exemplary embodiment of the present invention, the target slot includes any one or more of a product word slot, a brand word slot, a modifier word slot, a gender slot, a price slot, an inquiry range slot, and a channel number slot.

[0014] In an exemplary embodiment of the present invention, it further includes: pre-defining n types of slots of target categories.

[0015] In an exemplary embodiment of the present invention, it also includes: generating a product vocabulary, a brand vocabulary and a brand-product word pairing vocabulary; and establishing a knowledge graph based on the product vocabulary, the brand vocabulary and the brand-product word pairing vocabulary.

[0016] In an exemplary embodiment of the present invention, the method further includes: retrieving recommendation information from the knowledge graph according to the target slot value of the target slot; and sending the recommendation information to the target object.

[0017] In an exemplary embodiment of the present invention, the method further includes: determining a target business scenario corresponding to the input information through a business scenario classification model.

[0018] In an exemplary embodiment of the present invention, the target business scenario includes any one or more of a product query scenario, an after-sales service scenario, a fuzzy discount query scenario, a specific product discount query scenario, an order query scenario, a full-site direct access scenario, and an unknown scenario.

[0019] In an exemplary embodiment of the present invention, it also includes: obtaining portrait information of the target object; the portrait information includes any one or more of purchasing power level, membership level, category preference information, and gender information.

[0020] In an exemplary embodiment of the present invention, the target slot includes a product word slot and a brand word slot, and the method further includes: if the target slot value of the product word slot in the input information is extracted, then predicting the target slot value of the brand word slot of the input information.

[0021] In an exemplary embodiment of the present invention, the method further includes: identifying negative semantics in the input information.

[0022] In an exemplary embodiment of the present invention, the method further includes: establishing a word library of wrong characters; and automatically correcting wrong characters in the input information based on the word library of wrong characters.

[0023] According to one aspect of the present invention, a semantic recognition device is provided, comprising: an input information acquisition module configured to acquire input information of a target object; a slot extraction model configured to extract a target slot value of a target slot in the input information through the slot extraction model; wherein the slot extraction model comprises an input layer, a shared layer and an output layer connected in sequence, wherein the output layer comprises n parallel sub-output layers, each sub-output layer being used to output a slot value prediction result of a slot; and n is a positive integer greater than or equal to 2.

[0024] According to one aspect of the present invention, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the semantic recognition method as described in any one of the above is implemented.

[0025] According to one aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the semantic recognition method as described above is implemented.

[0026] In the technical solutions provided by some embodiments of the present invention, a target slot value of a target slot in input information is extracted through a slot extraction model; wherein, the slot extraction model includes an input layer, a shared layer, and an output layer connected in sequence, wherein the output layer includes n parallel sub-output layers, and each sub-output layer is used to output a slot value prediction result of a slot; n is a positive integer greater than or equal to 2, which can realize multi-slot prediction of the same word and improve the accuracy of semantic recognition.

[0027] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0029] Figure 1A flowchart of a semantic recognition method according to some embodiments of the present invention is shown.

[0030] Figure 2 A schematic diagram of a training slot extraction model according to some embodiments of the present invention is shown.

[0031] Figure 3 A schematic diagram of a slot extraction model according to some embodiments of the present invention is shown.

[0032] Figure 4 A schematic diagram of an interface of a semantic recognition method according to some embodiments of the present invention is shown.

[0033] Figure 5 Shown are interface schematic diagrams of semantic recognition methods according to other embodiments of the present invention.

[0034] Figure 6 Shown are interface schematic diagrams of semantic recognition methods according to further embodiments of the present invention.

[0035] Figure 7 The overall architecture diagram of the semantic recognition method according to some embodiments of the present invention is shown.

[0036] Figure 8 A schematic diagram of the interface of the intelligent assistant log according to some embodiments of the present invention is shown.

[0037] Figure 9 A schematic diagram showing part of user input information according to some embodiments of the present invention.

[0038] Figure 10 A schematic diagram of a semantic recognition method according to some embodiments of the present invention is shown.

[0039] Figure 11 A schematic diagram of knowledge graph construction according to some embodiments of the present invention is shown.

[0040] Figure 12 A schematic diagram showing prediction results of user input information according to some embodiments of the present invention is shown.

[0041] Figure 13 Schematic diagram showing prediction results of user input information according to some other embodiments of the present invention.

[0042] Figure 14 A schematic diagram showing prediction results of user input information according to further embodiments of the present invention is shown.

[0043] Figure 15 A schematic diagram showing prediction results of user input information according to further embodiments of the present invention is shown.

[0044] Figure 16 A schematic diagram showing prediction results of user input information according to further embodiments of the present invention is shown.

[0045] Figure 17 A schematic block diagram of a semantic recognition device according to some exemplary embodiments of the present invention is shown.

[0046] Figure 18 A schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Like reference numerals in the drawings represent like or similar parts, and thus repeated description thereof will be omitted.

[0048] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, it will be appreciated by those skilled in the art that the technical solutions of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.

[0049] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0050] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0051] First, some terms involved in the embodiments of the present invention are defined and explained below.

[0052] A knowledge graph is a structured semantic knowledge base that uses symbols to describe concepts and their relationships. In the embodiments of the present invention, the desired knowledge can be accurately located and deeply acquired based on the knowledge graph.

[0053] NLP: Natural Language Processing. In most cases, NLP refers to various similar language processing applications on computers, as well as practical applications built with NLP technology, such as word segmentation, part-of-speech tagging, named entity recognition, syntactic analysis, and grammatical dependencies.

[0054] Entity recognition: refers to the automatic extraction of information entities from text corpus. Valuable entities can be extracted from data sources through machine learning (for example, product words, brand words, modifiers, etc. in the embodiments of the present invention can all be considered entities).

[0055] Smart assistant: In the embodiment of the present invention, it refers to a channel of a mobile terminal of an e-commerce platform, such as a mobile phone APP (application), where users can input information in the form of voice or text. The smart assistant will recognize the semantic intent of the user's input information and can further provide corresponding personalized recommendations based on a pre-built knowledge graph.

[0056] Semantic recognition: The embodiments of the present invention can be specifically applied in the intelligent assistant project of the e-commerce platform to identify the shopping intention of the user's input information or input content.

[0057] Figure 1 A flowchart of a semantic recognition method according to some embodiments of the present invention is shown.

[0058] like Figure 1 As shown, the semantic recognition method provided by the embodiment of the present invention may include the following steps.

[0059] In step S110 , input information of the target object is obtained.

[0060] In an embodiment of the present invention, the target object may be a user of an e-commerce platform. The input information may be collected through the user's mobile terminal or smart device and sent to a backend server for further processing, after which corresponding information is fed back to the target object.

[0061] In an exemplary embodiment, the input information may include input voice information and / or input text information.

[0062] For example, suppose there is an intelligent assistant product on the mobile phone APP of an e-commerce platform that can be used to guide users to shop online. Users can input one or more sentences into the intelligent assistant voice. The intelligent assistant robot can first convert the input voice information into text information, and then parse the text information, identify the user's intention and physical slot, and then search in the search interface to make personalized product recommendations.

[0063] In step S120 , a target slot value of a target slot in the input information is extracted using a slot extraction model.

[0064] In which, the slot extraction model may include an input layer, a shared layer and an output layer connected in sequence, wherein the output layer includes n parallel sub-output layers, each sub-output layer is used to output the slot value prediction result of a slot; n is a positive integer greater than or equal to 2.

[0065] In the embodiment of the present invention, the slot extraction model can be used to perform multi-slot prediction on the same word in the input information.

[0066] Existing named entity recognition methods, such as Bidirectional Long Short-Term Memory-Conditional Random Field (BLSTM-CRF) or CRF++, can only predict one slot for each word. For example, if a user uses a smart assistant to voice-encode "I want to buy a Xiaomi 6 phone," existing technology will predict "Xiaomi" as a brand word and "6" as a product word. Predicting "6" as a product word is inaccurate and will affect subsequent knowledge retrieval steps, potentially resulting in incorrect product recommendations or products that are not what the user is looking for.

[0067] In the embodiment of the present invention, a multi-task shared layer is designed in the slot extraction model, which improves the deficiency of existing BiLSTM_CRF or CRF++ in mapping one word to one slot. The multi-task shared layer shares some parameters of the feature layer embedding (word vector). For example, the product word, modifier word slot model and brand word slot model can be trained in parallel, and the respective loss functions of the product word, modifier word slot model and brand word slot model can be calculated in parallel. Finally, they are spliced ​​through a generalized fully connected layer (see below for details). Figure 2 and 3 ) together, we can achieve multi-slot prediction for the same word.

[0068] In an exemplary embodiment, the target slot may include any one or more of a product word slot, a brand word slot, a modifier word slot, a gender slot, a price slot, an inquiry range slot, a channel number slot, and the like.

[0069] It should be noted that the slots are not limited to the ones listed above, and can be adjusted and designed according to specific application scenarios and requirements, and the present invention does not limit this.

[0070] For example, the semantic slots for user input information can be predefined as follows:

[0071] (1) product, the product word slot of the product, represents the product name, that is, the product word of the product.

[0072] In the embodiment of the present invention, since the products have their own titles, but some product titles are very long, the product word is the core word of the product title.

[0073] For example, if the user input information is "I want to buy a mobile phone", the product word of the commodity in the input information is "mobile phone".

[0074] (2) wanted_deco, the modifier slot of the product, represents the product description.

[0075] For example, if the user inputs "I want to buy a rose gold mobile phone", the product description, i.e. the modifier, will be "rose gold".

[0076] (3) deco_of_product, the inquiry range slot of the product, indicates the inquiry range of the product.

[0077] For example, if the user inputs "What discounts are in my shopping cart?", the query scope is "shopping cart".

[0078] (4) brand, the brand word slot of the product, indicating the brand of the product.

[0079] For example, if the user input information is "I buy an Apple phone", the brand word of the product is "Apple".

[0080] (5)channel, channel number slot, indicates the channel number.

[0081] For example, "Direct access to the entire site" can be a special channel on an e-commerce platform, which can include channels unique to the e-commerce platform, such as "XX flash sale," "XX home delivery," "XX crowdfunding," "XX white strip," "XX wallet," etc. The definition of the channel here is all product design. For example, a flash sale will have several batches of flash sale products updated daily.

[0082] For example, if the user input information is "I want to buy a selfie stick from a flash sale", the channel number is "flash sale".

[0083] In the following examples, "product words" and "brand words" are often used as examples because the user input information of the smart assistant channel currently involves more product words and brand words and is widely distributed. However, the present invention is not limited to this.

[0084] In an embodiment of the present invention, in order to ensure the accuracy of the slot extraction model, a large amount of user input information, such as 50,000 pieces (for example only, the present invention is not limited to this), can be collected in advance, and each slot can be manually labeled. The labeled data is used as a training set for the slot extraction model to train the slot extraction model.

[0085] It should be noted that in embodiments of the present invention, manual annotation can be omitted during the data preprocessing phase, with the program using rule-based processing or crawlers to obtain annotations. For example, manually designed rules can be used to annotate data. For example, if the business scenario intent for a query is "I want to buy ***," the corresponding "***" would be a product term if it is in the product vocabulary; if it is in the brand vocabulary, it would be a brand term. Another example is a crawler using existing feedback data as annotations.

[0086] In an exemplary embodiment, the method further includes predefining n types of slots of target categories.

[0087] In an embodiment of the present invention, slots may be predefined in the intelligent assistant service. For example, the “slot_slot value” of the mobile phone category may be defined as shown in Table 1 below:

[0088] Table 1

[0089] Slot (KEY) Slot value (VALUE) Number of CPU cores Octa-core price 0-199 Pixel More than 16 million Front camera pixels 16 million and above Screen size 3.0 inches and below Screen Configuration 3D screen Photography features Optical zoom Built-in memory 32GB Body color White Material TPU shape Soft Shell Game Configuration ID differentiated design Hotspot 1080P screen Battery capacity Below 1000 mAh network Dual SIM card, single 4G Elderly phone configuration Thermometer hardware support style simplicity

[0090] In Table 1, the first column represents the defined slots, and the second column represents the slot values. Each slot value has multiple possible distributions. For example, a mobile phone brand can have multiple values, such as "Huawei," "Xiaomi," and "Apple." These multiple values ​​constitute the distribution of the mobile phone brand slot value.

[0091] In an exemplary embodiment, the method may further include: generating a product vocabulary, a brand vocabulary, and a brand-product word pairing vocabulary; and establishing a knowledge graph (KG) based on the product vocabulary, the brand vocabulary, and the brand-product word pairing vocabulary.

[0092] In this embodiment of the present invention, to better apply it to intelligent assistant services, the knowledge data layer can maintain a knowledge graph database with characteristics of an e-commerce platform under the mobile phone category, for example. Specifically, it can be divided into three levels: brand vocabulary construction, product vocabulary construction, and brand-product word pairing vocabulary construction. Each of these is explained below.

[0093] First, build a brand vocabulary.

[0094] In an embodiment of the present invention, a general brand vocabulary may be maintained. A table of the general brand vocabulary may include two fields, a first field being the brand name, and a second field being the brand source.

[0095] Among them, the brand sources can be divided into: a brand vocabulary maintained by the big data department; a proprietary brand vocabulary of the e-commerce platform (the proprietary brand vocabulary here is mainly e-commerce brands, including all online brands provided on the e-commerce platform, which provides better support for e-commerce business); brand words obtained by external crawlers; high-quality brand words maintained by operations; English brand words, etc.

[0096] In the brand vocabulary, for example, "mobile phone" and "Huawei" represent entities, and "brand" is the relationship between the two entities. The two entities "mobile phone" and "Huawei" are connected through the relationship "brand".

[0097] Second, the construction of product vocabulary.

[0098] In an embodiment of the present invention, a general product word library may be maintained. A table of the general product word library may include two fields, the first field being the product word name, and the second field being the product source.

[0099] The product sources can be further categorized as: a product vocabulary maintained by the Big Data Department; and a proprietary product vocabulary of the e-commerce platform. Similarly, a proprietary product vocabulary can also be specific to e-commerce. For example, "XX Baitiao" is a product vocabulary, but a general product vocabulary may not contain such fine-grained product vocabulary.

[0100] Third, build a vocabulary library of brand-product word pairs.

[0101] In the embodiment of the present invention, paired brand words and product words can be extracted from the product details table of each product on the e-commerce platform to form a brand-product word pairing vocabulary.

[0102] In an exemplary embodiment, the method may further include: retrieving recommendation information from the knowledge graph according to the target slot value of the target slot; and sending the recommendation information to the target object.

[0103] In an embodiment of the present invention, in the smart assistant channel of the e-commerce platform mobile APP, when a user clicks on the robot icon next to the search box, the robot will automatically answer the user's questions, and then attract the user to the module of interest, and intelligently make personalized recommendations for the user.

[0104] For example, a user inputs "I want to buy a Xiaomi mobile phone" in the smart assistant. The slot extraction model extracts the product word "mobile phone" and the brand word "Xiaomi" in the sentence input by the user. The target slot value "mobile phone" of the product word slot and the target slot value "Xiaomi" of the brand word slot are input into the service interface, and then the search interface is called to return personalized products to the user based on the user portrait.

[0105] In the embodiment of the present invention, the intelligent assistant can interact with the user during shopping, screen out the most desired products for the user, and comprehensively improve the shopping experience from brand price to performance and quality.

[0106] For example, if the slot extraction model extracts the product word "mobile phone" from the user's input information, the robot will ask the user "What brand of mobile phone do you want?" After the user answers "Xiaomi", the robot will ask the user "What color mobile phone do you want?" until the robot learns enough slot values ​​of the user and feels that it can recommend a product to the user. The interactive dialogue stops, and then the robot uses the slot information obtained from these interactions to select the most suitable product from the background knowledge graph database and recommend it to the user.

[0107] In an exemplary embodiment, the method may further include: determining a target business scenario corresponding to the input information by using a business scenario classification model.

[0108] In an embodiment of the present invention, the target business scenario may include any one or more of a product query scenario, an after-sales service scenario, a fuzzy discount query scenario, a specific product discount query scenario, an order query scenario, a full-site direct access scenario, and an unknown scenario.

[0109] For example, if a user inputs the information "I want to buy ***", it belongs to the product query scenario; for another example, if a user inputs the information "Where is my order?", it belongs to the order query scenario; for another example, if a user inputs the information "I want to return a product", it belongs to the after-sales service scenario; for another example, if a user inputs the information "Are there any discounted items?", it belongs to the fuzzy discount query scenario; for another example, if a user inputs the information "Is Xiaomi having another promotion?", it belongs to the specific product discount query scenario; for another example, "XX flash sale" belongs to the full site direct access scenario; for another example, if a user inputs the information "Haha", it belongs to the unknown scenario.

[0110] It should be noted that corresponding business scenarios can be designed in different application scenarios and requirements, and the present invention does not limit this. In the following embodiment, the user shopping intention of the intelligent assistant refers to seven business scenarios: product inquiry, order inquiry, after-sales service, fuzzy discount inquiry, specific product discount inquiry, full site direct access, and unknown.

[0111] In an embodiment of the present invention, the business scenario classification model can use a convolutional neural network (CNN) to implement a scenario classifier. In the intelligent assistant, the user's shopping intention is first determined by the scenario classifier, and then the slot values ​​of slots such as product words and brand words are extracted to recommend personalized products to the user.

[0112] In an embodiment of the present invention, the sorted and summarized knowledge is provided to users through a business scenario classification model (or also called a business scenario classifier) ​​and a slot extraction model (or also called a semantic recognition model, or a natural language understanding module).

[0113] In an embodiment of the present invention, at the knowledge computing layer, the user inputs one or more sentences in the intelligent assistant channel, and first calls the business scenario classification model (also known as NLU (natural language understanding) intent classifier) ​​and the slot extraction model to perform intent recognition and slot filling (for example, if the slot has "brand words" and "product words", the corresponding slots can be filled with "Huawei" and "mobile phone" respectively). Then, the session manager model can be used to identify the relationship between the user's current input information and the previously input context, and determine whether to retain the memory state. Compared with existing online systems, the method provided by the embodiment of the present invention can support users' product questions and answers based on knowledge graphs.

[0114] For example, if the user inputs the voice message "What types of cameras does Huawei mobile phone have? Please list them?", the robot will go to the knowledge graph database to query the corresponding Key and Value and feedback to the user.

[0115] In embodiments of the present invention, the interaction between the intelligent assistant and the user can be a multi-round conversation process. The slot extraction model can be applied to predict the slot of the current input information. If there is overlap with the slots in the previous sentences, the current input information is considered to be related to the previous text; otherwise, it is considered to be unrelated. In some embodiments, a data structure can be created to record the user's slots. Once a specified number of slots are recorded, the state is cleared.

[0116] In an embodiment of the present invention, the session manager model can be implemented as two sub-models. The first sub-model uses business logic to determine whether the information currently input by the user contains slots such as product words and brand words that have been extracted in the previous text. If so, it can be considered that the user's current input information is related to the previous text; if not, it can be considered that the user's current input information is not related to the previous text; the second sub-model can be a binary classification neural network model. The binary classification neural network model identifies that the prediction output of the related is 1, and the prediction output of the unrelated is 0 (for example only, the present invention is not limited to this).

[0117] It should be noted that the product question and answer mentioned in the embodiment of the present invention is combined with the specific scenarios of the e-commerce platform, adding the custom corpus of the e-commerce platform (such as the above-mentioned proprietary product vocabulary and proprietary brand vocabulary), debugging the network structure and parameters, and training a question and answer system suitable for the e-commerce platform business.

[0118] For example, when a user asks the smart assistant "What are the price ranges of Huawei phones?", the robot recognizes that the current input information slot is the brand word "Huawei" and the product word "phone", and the question is about the "price" slot. It then searches the knowledge graph for multiple price ranges and returns the price value to the user.

[0119] In an exemplary embodiment, the method may further include: obtaining portrait information of the target object; the portrait information may include any one or more of purchasing power level, membership level, category preference information, gender information, etc.

[0120] In an embodiment of the present invention, the target business scenario in the user input information identified by the business scenario classification model can be combined with the slot extraction model to extract the target slot value of the target slot in the input information, as well as the portrait information of the target object, to retrieve the matching personalized recommendation information from the knowledge graph constructed under each category of the pre-built e-commerce platform and return it to the target object.

[0121] In an exemplary embodiment, the target slot may include a product word slot and a brand word slot, and the method further includes: if the target slot value of the product word slot in the input information is extracted, predicting the target slot value of the brand word slot of the input information. Figure 15 and 16 Instance of .

[0122] In an exemplary embodiment, the method may further include: identifying negation semantics in the input information.

[0123] In the embodiment of the present invention, the knowledge graph can also be used to identify negation slots. The identification of negation intentions and negation slots is applied in the intelligent assistant business, and the semantic dependency algorithm can be used to identify the negation semantics.

[0124] For example, the user input information is "I want to buy a Xiaomi mobile phone, but I don't want one with a large screen." At this time, the robot recognizes that the corresponding negative slot value (slot_value) under the slot (slot_key) of "screen" is "large," and will not recommend a mobile phone with a large screen to the user. Among them, the entity associated with the "large screen" mobile phone through the knowledge graph plays the role of associating graph entities on the basis of understanding semantics (here "large" is a modifier, and "screen" is a specific value of the mobile phone slot, which together improve the effect of semantic understanding). In the prior art, there is no negative semantic recognition function. After adding the negative semantic recognition function provided by the embodiment of the present invention, the user experience is improved, and the AB test (A / B Testing) effect is better than the prior art. According to the bad cases fed back by users and testers, the model is constantly iterating and optimizing.

[0125] In an exemplary embodiment, the method may further include: establishing a typo word library; automatically correcting typos in the input information based on the typo word library.

[0126] In an embodiment of the present invention, on the one hand, there may be typos in the voice input by the user to the intelligent assistant during the voice recognition stage; on the other hand, there may also be typos in the text input by the user himself / herself to the intelligent assistant. The embodiment of the present invention can establish a typo word library for common typos in the e-commerce field based on a statistical algorithm, and automatically correct the typos in the user input information. Among them, the typo word library may include two columns. The first column is the incorrect word, and the second column is the correct word. For example, "A Di Da Si" ===> "A Di Da Si". Specifically, please refer to the following Figure 13 and 14 instance.

[0127] In the following embodiment, taking n = 2 as an example, and taking the slot value prediction result output of the product word slot model corresponding to the first sub-output layer and the slot value prediction result output of the brand word slot corresponding to the second sub-output layer as examples for illustration. However, in fact, the number of sub-output layers in the slot extraction model can be determined according to the number of pre-set slots.

[0128] Figure 2 FIG. shows a schematic diagram of training a slot extraction model according to some embodiments of the present invention.

[0129] As Figure 2 shown, where X represents the input information input to the input layer of the slot extraction model, Y1 represents the true label of each product word in the input information training set corresponding to the first task, and Y2 represents the true label of each brand word in the input information training set corresponding to the second task.

[0130] In an embodiment of the present invention, during the model training process, when the input information in the input information training set is input to the model, the first loss function can be obtained according to the product word prediction result output by the first sub-output layer and the true label Y1 of the first task; when the input information in the input information training set is input to the model, the second loss function can be obtained according to the brand word prediction result output by the second sub-output layer and the true label Y2 of the second task. The first loss function and the second loss function are respectively optimized by the first optimizer and the second optimizer to complete the training process of the model.

[0131] In an embodiment of the present invention, each task has its own output layer, loss function and optimizer.

[0132] For example, for each task, a loss function (also called optimization function) is established, and its specific form can be:

[0133] Loss=α*cross_entropy_loss+β*regularization_term(1)

[0134] Among them, Loss in the above formula (1) represents the loss function of the corresponding task, α represents the weight of cross_entropy_loss for each task, and the weights of different tasks can be different; β is the weight of the regularization function, and different tasks can use a uniform value; cross_entropy_loss is the cross entropy loss function, and the smaller the difference between the predicted result and the true label, the smaller the value; regularization_term can use the L2 norm of all trainable parameters, and the smaller the absolute value of the parameter, the smaller the value.

[0135] In an embodiment of the present invention, a stochastic gradient descent method (but the present invention is not limited thereto) can be used for training. Each time, a portion of the data set in the training set is input, and the optimizer corresponding to this task is optimized to update the shared parameters of the overlapping parts of the two tasks and the independent parameters unique to each task.

[0136] In an embodiment of the present invention, a multi-task learning combined with deep learning method is adopted to establish a slot extraction model, and the training set is used as the entire input information of the entire model. Under the premise of the same amount of training data, the prediction accuracy of each task can be enhanced.

[0137] Figure 3 A schematic diagram of a slot extraction model according to some embodiments of the present invention is shown.

[0138] In the embodiment of the present invention, multi-task learning is combined with deep learning, and the new network structure is as follows Figure 3 As shown, the last layer of the BiLSTM_CRF network structure, the fully connected layer, can be separated into multiple parallel fully connected layers (for example, Figure 3 The fully connected layer 1 and fully connected layer 2 shown in the figure are not limited to this embodiment. The number of parallel fully connected layers depends on the number of tasks, and each task has its own output layer parameters. For example, fully connected layer 1 can be used to output the first prediction result for the product word slot, and fully connected layer 2 can be used to output the second prediction result for the brand word slot.

[0139] In the embodiment of the present invention, the shared layer may vary depending on the deep convolutional neural network adopted, and is not limited to the BiLSTM_CRF exemplified above.

[0140] For example, in other embodiments, a two-layer LSTM-RNN (where LSTM stands for Long Short-Term Memory, a time-recursive neural network; RNN stands for Recurrent Neural Network, a type of neural network used to process sequence data) can also be trained. The first layer is also called the input layer, and the input content includes the word vector and position vector after embedding; then it enters the second hidden layer, and finally the output layer. The first layer LSTM inputs word vectors, position features, and parts of speech to identify entities such as product words and brand words. The distributed expression of the hidden layer in the trained LSTM and the classification label information of the entity serve as the input of the second layer RNN model. The second layer inputs the dependency paths between entities.

[0141] In the embodiment of the present invention, the multi-mask shared layer mainly refers to user input information, for example, "I want to buy an Apple 6 mobile phone", where "Apple" is identified as a brand word and is predicted once through the BiLSTM_CRF neural network; "Apple 6" is identified as a product word and is also predicted once through the BiLSTM_CRF neural network, that is, for the two words "Apple", they only appear once in the user input information, but are predicted to be in the "product word" slot and also in the "brand word" slot. These two predictions are made using two models in parallel, which is called a "multi-task" model, that is, the two models of product word prediction and brand word prediction are called in parallel in engineering.

[0142] In the embodiment of the present invention, two models are made for product word prediction and brand word prediction respectively. The previous input data is the same, but the annotations are different. However, the design of the feature layer is shared, and the loss function is calculated separately. That is, the user input information is first converted into a vector, including character vectors, word vectors, and context vectors. These are shared in the two models.

[0143] Figure 4 A schematic diagram of an interface of a semantic recognition method according to some embodiments of the present invention is shown.

[0144] like Figure 4 , which is a schematic diagram of a pre-release interface of a semantic recognition algorithm provided by an embodiment of the present invention.

[0145] Figure 5 Shown are interface schematic diagrams of semantic recognition methods according to other embodiments of the present invention.

[0146] like Figure 5As shown, the user inputs "I want to buy a Xiaomi 6 mobile phone". The embodiment of the present invention can simultaneously predict "Xiaomi 6" as a product word and "Xiaomi" as a brand word through the slot extraction model. That is, although the word "Xiaomi" only appears once in the user input information, it is predicted to two slots at the same time.

[0147] Figure 6 Shown are interface schematic diagrams of semantic recognition methods according to further embodiments of the present invention.

[0148] like Figure 6 As shown, the user inputs "I want to buy an oppo R15 mobile phone". Through the slot extraction model provided by the embodiment of the present invention, it can simultaneously predict that "oppo R15" is a product word and "oppo" is a brand word.

[0149] The semantic recognition method provided by the embodiment of the present invention can realize multi-slot prediction of the same word in the same input information, which is more suitable for e-commerce scenarios. In the specific application of intelligent assistants, it can recommend more accurate personalized products to users. For example, Figure 6 In the example above, the smart assistant can fine-tune the recommendations of the OPPO R15 mobile phone to the user, not just the OPPO mobile phone.

[0150] With the advent of the artificial intelligence era, knowledge graph technology has garnered widespread attention from both industry and academia. Extracting useful knowledge from massive amounts of data is crucial for big data analysis on e-commerce websites. Knowledge graph technology offers a means of abstracting structured knowledge from vast amounts of text, thus holding broad application prospects on e-commerce websites.

[0151] Speech recognition and semantic understanding are the future trends in e-commerce shopping. When a user speaks to a robot and the speech is converted into text, accurately understanding the user's intent becomes increasingly important. Against this backdrop, the semantic recognition method proposed in this embodiment of the present invention can be an improved NLP semantic recognition method based on knowledge graphs, used to extract key information from user input.

[0152] The improved NLP semantic recognition method based on knowledge graph proposed in the embodiment of the present invention can be applied to the intelligent assistant project of the e-commerce platform. The purpose is to perform accurate semantic recognition and key information extraction based on user voice or manually input information.

[0153] Figure 7 The overall architecture diagram of the semantic recognition method according to some embodiments of the present invention is shown.

[0154] The core process of the semantic recognition method based on knowledge graph provided by the embodiment of the present invention is as follows: Figure 7 As shown. Among them, Figure 7At the bottom is the data preprocessing section. This section cleans the business data used by the intelligent assistant to prepare it for model input. The natural language processing (NLP) section explains the specific application context of the slot extraction model within the intelligent assistant product. Knowledge storage, knowledge fusion, knowledge computation, and knowledge application explore how to apply knowledge graphs to improve performance within specific business contexts using processed data.

[0155] In the embodiment of the present invention, unstructured data is the initial input information of the user to the intelligent assistant, which is very noisy; semi-structured data is the more valuable intelligent assistant data obtained after the product is added to the tracking point; structured data is data processed by distributed processing tools and stored in the background database table.

[0156] In the embodiment of the present invention, in terms of data processing, the main text must first be extracted from the user data (that is, the sentences of the user's voice or text interaction with the intelligent assistant). After obtaining the user input, it is necessary to use natural language processing technology to identify entities such as product words, brand words, and modifiers. In the process of semantic recognition, word segmentation and part-of-speech tagging are used (the output information obtained after data preprocessing is input into the Figure 7 NLP in the next step of processing).

[0157] It should be noted that the user data mentioned above refers to the voice or text input by the user through the intelligent assistant. The interaction between the user and the intelligent assistant is divided into two parts. The first part is the user's voice input, which is converted into text by calling the voice recognition module. The second part is the text directly input by the user. The user data here refers to the extraction of these two parts of user interaction data.

[0158] In an embodiment of the present invention, the natural language processing (NLP) module includes models such as named entity recognition and similarity calculation. For example, the entire knowledge graph is connected under the mobile phone category, and NLP and e-commerce recommendations are linked together in actual business to generate application value.

[0159] In this embodiment of the present invention, knowledge computing primarily involves deriving more implicit knowledge from the information provided by the knowledge graph. For example, by writing regular expressions through word segmentation and part-of-speech tagging, we can infer implicit knowledge such as product terms, brand terms, and modifiers in user conversations. Regular expression programs can be written to fuzzy match user product terms and brand terms, thereby mining more similar product and brand terms from the knowledge graph.

[0160] For example, if the user inputs "I want to buy an Honor 8 mobile phone", the knowledge graph associates "Honor 8" with the "Huawei" brand and recommends Huawei products to the user.

[0161] In the embodiments of the present invention, during the construction of the slot extraction model, noise features are designed and formulated, which can be applied to the input error correction model to filter out the unsmooth and unimportant information in the user input text, correct the misspelled and important information and then use it. In this way, even if the user inputs misspelled words, the model can recognize them. For example, when the user inputs "I want to buy Xiaomingtongxue beverage", the method provided by the embodiments of the present invention can recognize that the character "ming" in "Xiaomingtongxue" is a misspelled word and will predict it as the correct brand word in the current context.

[0162] The knowledge application in the embodiments of the present invention refers to the product words, brand words, etc. predicted (i.e., recognized) based on the knowledge graph in the business, which serve the intelligent assistant to better recognize the user's intention.

[0163] Based on the entity association relationship mining of the knowledge graph, the embodiments of the present invention can also perform associative recommendations for users of the intelligent assistant channel. For example, when the user inputs the information "I'm thirsty", the robot mines in the knowledge graph that "thirsty" and "drink" are related, and thus feedbacks to the user "Xiaodong recommends the following drinks for you. How about a bottle of Coke?", and the application of the knowledge graph enhances the user experience of the intelligent assistant.

[0164] Figure 8 The schematic diagram of the interface of the intelligent assistant log according to some embodiments of the present invention is shown.

[0165] In the embodiments of the present invention, the main source of the preprocessed data is the intelligent assistant landing log table (i.e., Figure 7 the HIVE voice log table in it, which means writing the user's business data into the background data table of the intelligent assistant, and landing means writing the data in), and the logs of the intelligent assistant are landed in the big data Hive table. All fields are as Figure 8 shown. The field used in the embodiments of the present invention is the user input content, and the "input content" field is used as the user data.

[0166] It should be noted that a part of the data in the business scenarios mentioned above comes from the "business scenarios" here. The business scenario data here is based on the matching of the speech template, and another part of the data comes from manual annotation.

[0167] Figure 9 The schematic diagram of some user input information according to some embodiments of the present invention is shown.

[0168] In the embodiments of the present invention, after removing the user input that is garbage and has no information content through regular matching, some user inputs are as Figure 9 shown.

[0169] For example, through the program's regular matching, if the user input information is text such as "haha" or "okay", it will be filtered out. For another example, if the user input information is within three words, it will be filtered out.

[0170] Figure 10 A schematic diagram of a semantic recognition method according to some embodiments of the present invention is shown.

[0171] In the embodiment of the present invention, the basic part of semantic recognition requires word segmentation and part-of-speech tagging to extract text features (i.e. Figure 7 Feature extraction, feature extraction is the main link in data processing. All subsequent models require feature-extracted data as input, but different models require feature input in different formats) semantic parsing, syntactic dependencies, etc. are required.

[0172] In the embodiment of the present invention, in order to improve the word segmentation effect, the proprietary brand vocabulary and proprietary product vocabulary of the e-commerce platform are added; the part-of-speech tagging can use Stanford's CoreNLP tool to mark out the proper nouns, personal pronouns, verbs, etc. in the user input information, and then use them as text features; semantic analysis and syntactic dependencies are based on the context, understand the grammatical structure of the sentence, generate different syntax trees, and find the best parse tree in the repeated backtracking process. That is, in the embodiment of the present invention, the existing technology can be used as disaster recovery data. First, the business scenario classification model and slot extraction model proposed in the embodiment of the present invention are used to predict user intentions and extract user slots. If the model cannot capture it, the existing technology is used as a backup plan. The key steps are as follows: Figure 10 shown.

[0173] In an embodiment of the present invention, during the word segmentation stage, the proprietary brand vocabulary and proprietary product vocabulary of the e-commerce platform are added, which can not only improve the accuracy of word segmentation, but also serve as a pre-processing program for annotation, pre-annotating data for annotation personnel for reference.

[0174] For example, the proprietary product vocabulary may include product words with e-commerce characteristics such as "XX flash sale", "XX white slip", "white slip expiration", and "XXE card".

[0175] For example, the ordinary Chinese word segmentation of "Gu Li Duo" will be divided into two parts, "Gu Li" and "Duo", but after adding the proprietary product vocabulary of the e-commerce platform, "Gu Li Duo" as a whole will be taken as a word segmentation result.

[0176] Figure 10 The syntactic analysis in the sentence is to parse out the sentence components. Figure 7 The syntactic dependencies in .

[0177] Figure 10 The semantic level part on the right side refers to Figure 7The other part is semantic analysis, which is to output product words, brand words and other slots from the text. After that, the product words, brand words, etc. are displayed and then integrated with the following modules.

[0178] Figure 10 The meaning of the semantic block in is that when the intelligent assistant makes personalized recommendations, it will string together product words, brand words, etc. to comprehensively recommend products.

[0179] Figure 10 Text classification in the text classification refers to the sentence or multiple sentences input by the user into the intelligent assistant. The business scenario classification model classifies them into different business scenarios and identifies the user's shopping intention.

[0180] Figure 11 A schematic diagram of knowledge graph construction according to some embodiments of the present invention is shown.

[0181] In the embodiment of the present invention, the knowledge graph construction process is as follows Figure 11 shown.

[0182] Figure 11 The syntactic analysis-specific feature design in refers to extracting features from user input information using a syntactic dependency model. Figure 7 It is a macro-architecture diagram. Figure 11 It is a relatively fine-grained structure.

[0183] In an embodiment of the present invention, a part of the knowledge graph is visualized by associating related entities through a proprietary product vocabulary and a proprietary brand vocabulary; the other part is that in the process of interaction between the intelligent assistant and the user, new product words and brand words extracted by the slot extraction model are continuously added to the existing knowledge graph, and the knowledge graph library is continuously expanded.

[0184] Figure 11 In the knowledge acquisition stage, in order to improve the quality of knowledge services and provide users with satisfactory answers, the knowledge graph of the embodiment of the present invention not only includes proprietary product thesaurus and proprietary brand thesaurus, but also can timely discover and add new knowledge. The quantity and quality of knowledge determine the breadth and depth of the services it can provide. Therefore, the construction of the knowledge graph needs to be supported by efficient knowledge acquisition. The acquisition of common sense knowledge in the embodiment of the present invention (for example, mobile phones include brands such as Huawei and Xiaomi, and similar content that most users know) mainly comes from the structured data of the smart assistant log, including user input information under different business scenario classifiers. With the emergence of a large number of user inputs in the smart assistant, user-generated content continues to increase, and a large number of users contribute to the construction of the semantic network. New knowledge can discover new product words, brand words and modifiers from the user's input information, and continuously expand the coverage of knowledge.

[0185] The knowledge graph of the embodiment of the present invention is to provide relevant recommendations based on user interests, so the user's behavioral data is also extracted, including the user's membership level on the e-commerce platform, user purchasing power, user gender, and user product category preferences. Some behavioral descriptions such as supplementary modifiers are also obtained from these data.

[0186] For example, if the user inputs the information "I want to buy a mobile phone", the user's purchasing power level is extracted from the user portrait in the knowledge graph, and products suitable for their consumption level are recommended.

[0187] Continue to refer Figure 11 User input data, which refers to the user's original input into the intelligent assistant, is voice or text information. For example, "I want to buy a mobile phone" is user input. The slot extraction model described above predicts structured information from the user's original input, such as product terms and brand terms, to form structured data. The process of forming a knowledge graph is the process of associating these predicted entity slots. Later in the knowledge graph, complex models are also used. For example, the slot extraction model first predicts slots such as product terms and brand terms based on the user input information, and then inputs the slots into the entity relationship extraction model to predict entity relationships.

[0188] In this embodiment of the present invention, during the knowledge fusion stage, because the knowledge in the knowledge graph largely comes from input from e-commerce website users, there may be problems such as knowledge duplication and unclear relationships between knowledge. Therefore, knowledge fusion is performed. Knowledge fusion is a high-level knowledge abstraction. Knowledge fusion mainly consists of two parts: entity linking and knowledge merging.

[0189] The entity linking in the embodiment of the present invention is to extract product words and brand words from user input information, and design a feature kernel function to perform entity disambiguation. For example, in "I want to buy an Apple mobile phone", apple is a brand word, and in "I want to eat three pounds of apples", apple is a product word.

[0190] In the embodiment of the present invention, the "feature kernel function" is a mathematical formula, and specific reference may be made to the prior art. For example, after the user searches "Adidas' clothes" and "Adidas' clothes" are processed through the feature kernel function, it is calculated that the product words "Adidas" and "Adidas" are in the same category.

[0191] In the embodiment of the present invention, the semantic features include not only the bag-of-words vector but also the contextual relationship. The specific design of the semantic features in the embodiment of the present invention is that the bag-of-words feature is to construct a vocabulary of Chinese characters commonly used by users. The frequency of the current word in the vocabulary is a feature, and the contextual relationship feature refers to the context words of the current word. These together constitute part of the slot extraction model feature. After constructing a variety of semantic features, they can be input into the subsequent slot extraction model to perform more accurate slot extraction.

[0192] In an embodiment of the present invention, knowledge merging (i.e., removing duplicate knowledge) means that when constructing a knowledge graph, existing structured data can be obtained from a third-party knowledge base (e.g., Baidu Knowledge Base) to improve the coverage and accuracy of the slot extraction model.

[0193] For example, if a user asks "Who is the author of Journey to the West?" through an intelligent assistant, the answer to this question may be included in a third-party knowledge base. The addition of third-party knowledge bases has expanded the knowledge graph from the e-commerce field to more fields.

[0194] In an embodiment of the present invention, the knowledge stored in the knowledge graph is a relatively large-scale associated collection. The unstructured voice information input by the intelligent assistant user is integrated and processed in the early stage to form orderly, associated and available knowledge (for example, from the user input "I want to buy a rose gold Apple mobile phone.", the product word is "mobile phone", the brand word is "apple", the modifier is "rose gold" and other specific knowledge is extracted). According to the category of knowledge, it is stored in different modules of the knowledge graph database in a relatively standardized form (for example, brand word module, product word module, modifier word module, etc., among which the brand word module can be further subdivided into clothing brands, home appliance brands, etc.).

[0195] In an embodiment of the present invention, the categories of the knowledge may include, for example, common sense knowledge and e-commerce specific domain knowledge, wherein the e-commerce specific domain knowledge may be further divided into three fresh food categories, clothing categories, home appliances categories, electronic products categories, etc.

[0196] The corpus in the present invention (referring to the log of the intelligent assistant, the text features extracted from the bottom layer, etc.) is stored on the big data distributed HDFS (Hadoop Distributed File System), and the trained models (the models here include business scenario classification models, slot extraction models, etc.) are stored in Redis. Among them, the corpus is calculated in advance offline, there is no timeliness requirement, and it is a large amount, so it is stored on HDFS. The model is relatively small, and it is possible to call the model in real time, so it is stored in redis, but the present invention is not limited to this. The stored corpus is used by subsequent modules, and the model is used to predict real new data online.

[0197] The knowledge retrieval in the embodiment of the present invention is based on the product wide table, user wide table and product category correspondence table constructed by the e-commerce platform to realize the intelligent recognition of product words, brand words and modifiers of the smart assistant, and find the corresponding user semantic intention in the knowledge base through product similarity (for example, there are many known vectors in the vector space under the intention of the "product query" business scenario. For new products to be predicted online, the similarity with the vectors in each intent vector space is calculated, and the model believes that the most similar one is the user intention). The user input information is matched with the knowledge in the knowledge base after semantic understanding and analysis, and statistics, sorting, reasoning, recommendation, prediction, etc. are performed. Among them, retrieving valuable information based on the user input statement is the data processing stage of the knowledge graph.

[0198] In an embodiment of the present invention, the product wide table stores product information, such as product color, size, order quantity, etc.; the user wide table stores user information, such as user gender and purchasing power level; the product category correspondence table may store specific products under the third-level category, for example, Huawei, Xiaomi, etc. under the mobile phone category.

[0199] In an embodiment of the present invention, part of the data in the knowledge graph comes from three tables: the product broad table, the user broad table, and the product category correspondence table.

[0200] In the embodiment of the present invention, the functions of the knowledge graph are mainly reflected in knowledge organization, display and personalized recommendation:

[0201] First, provide users with correct and ideal answers, overcoming the ambiguity of natural language to a certain extent.

[0202] It should be noted that overcoming the ambiguity of natural language here is not completely equivalent to correcting typos, but rather finding associations in the knowledge graph based on the context of the current word.

[0203] For example, if the user inputs "I want to buy an Apple phone", the machine extracts the "apple" slot and combines it with the "phone" in the following text to find the association in the knowledge graph. It can then identify that the "apple" here is an electronic product, not an edible fruit.

[0204] Second, through the business scenario classification model and slot extraction model, the sorted and summarized knowledge is provided to users.

[0205] In an embodiment of the present invention, the intelligent assistant first determines the user's shopping intention through a business scenario classification model, and then extracts slots such as product words and brand words to recommend to the user.

[0206] Third, through information recommendation, it provides broader and deeper knowledge. The knowledge graph attempts to infer the relevant search records of other users, that is, to find the correlation between entities in the knowledge graph and infer the ones with the greatest similarity, helping users answer the next question before asking the question, stimulating users' search interest in shopping on e-commerce websites, and thus conducting a new shopping operation.

[0207] The semantic recognition method provided by the embodiment of the present invention is more flexible and has a wider coverage than the traditional Stanford CoreNLP regular matching template.

[0208] Figure 12 A schematic diagram showing prediction results of user input information according to some embodiments of the present invention is shown.

[0209] Figure 12 It means that the user inputs "I want an Apple mobile phone". The knowledge graph-based slot extraction model provided by the embodiment of the present invention is used to identify "Apple" as a brand word and "mobile phone" as a product word. Act_commodity represents the "commodity query" business intention of shopping.

[0210] The embodiment of the present invention mainly builds a common and specific knowledge base for e-commerce based on the knowledge graph, and then identifies the brand words and product words in the information currently input by the user based on the user input information, and then retrieves the same and / or similar brand words and product words in the knowledge base and feeds them back to the user.

[0211] In some embodiments, the text input by the user or the text converted by voice may contain typos or incoherent sentences. The method provided by the embodiment of the present invention can detect and correct these errors.

[0212] Figure 13 Schematic diagram showing prediction results of user input information according to some other embodiments of the present invention.

[0213] like Figure 13 As shown, the user inputs "Apple mobile phone", and the slot extraction model provided by the embodiment of the present invention will predict "Apple 8" as a product word and "Apple" as a brand word.

[0214] Figure 14 A schematic diagram showing prediction results of user input information according to further embodiments of the present invention is shown.

[0215] like Figure 14 As shown, the user inputs "iPhone is bad.", and the slot extraction model provided by the embodiment of the present invention can predict that "iPhoneX" is a brand word and "apple" is a brand word.

[0216] The semantic recognition method provided by the embodiment of the present invention can realize automatic correction of typos, improve the accuracy of semantic recognition, and return more accurate recommendation results to users, thereby improving user experience.

[0217] Figure 15 A schematic diagram showing prediction results of user input information according to further embodiments of the present invention is shown.

[0218] In the embodiment of the present invention, the slot extraction model can also implement brand mapping.

[0219] For example, under the mobile phone category, brands such as "Xiaomi" and "Huawei" further include many sub-series of mobile phones. The slot extraction model provided by the embodiment of the present invention can map the sub-series of mobile phones to the main brand of the series. It can be configured in the program to maintain a mapping table, and then the program can be run for automatic system updates.

[0220] like Figure 15 As shown, the user inputs "I want to buy a Redmi 4 mobile phone", and the slot extraction model provided by the embodiment of the present invention can predict that "Redmi 4" is a product word and "Xiaomi" is a brand word.

[0221] Figure 16 A schematic diagram showing prediction results of user input information according to further embodiments of the present invention is shown.

[0222] like Figure 16 As shown, the user inputs "Honor 4 mobile phone." The slot extraction model provided in the embodiment can predict that "Honor 4" is a product word and "Huawei" is a brand word.

[0223] The slot extraction model provided by the embodiment of the present invention can further realize brand word mapping points, which not only retains the original mobile phone sub-series as product words, but also extracts the accurate main brand of the mobile phone. While improving the business click-through rate, it also increases users' recognition of the intelligent assistant algorithm.

[0224] The semantic recognition method provided by the embodiment of the present invention adds different optimization techniques such as masks for different businesses in the network layer optimization of the model, and applies multiple models of the comprehensive knowledge graph to JD's specific business, thereby improving the model effect. In addition, combined with Stanford CoreNLP natural language processing tools, e-commerce platform featured product library (i.e., proprietary brand vocabulary and proprietary product vocabulary) and manual annotation (this solution can use Stanford's CoreNLP for word segmentation and part-of-speech tagging, and also used as annotation for product word and brand word identification), it provides better entity relationship classification data for the construction of the knowledge graph (for example, the sequence annotation model of the present invention identifies the "mobile phone" entity and the "Huawei" entity, and the corresponding relationship is "brand", the "short sleeve" entity and the "pink" corresponding relationship is "color", etc.), which improves the accuracy of the model's semantic prediction; at the business level, compared with the traditional idea of ​​template matching, the algorithm based on the knowledge graph improvement is flexible and covers more users, which improves the user experience and click-through conversion rate of the intelligent assistant project, and provides e-commerce website users with a better way to screen their favorite products.

[0225] In addition, in an embodiment of the present invention, a semantic recognition device is also provided. Figure 17 As shown, the semantic recognition device 1700 may include: an input information acquisition module 1710 and a slot extraction model 1720.

[0226] The input information acquisition module 1710 may be configured to acquire input information of a target object.

[0227] The slot extraction model 1720 may be configured to extract a target slot value of a target slot in the input information through a slot extraction model.

[0228] In which, the slot extraction model may include an input layer, a shared layer and an output layer connected in sequence, wherein the output layer includes n parallel sub-output layers, each sub-output layer is used to output the slot value prediction result of a slot; n is a positive integer greater than or equal to 2.

[0229] In an exemplary embodiment, the input information may include input voice information and / or input text information.

[0230] In an exemplary embodiment, the target slot may include any one or more of a product word slot, a brand word slot, a modifier word slot, a gender slot, a price slot, an inquiry range slot, a channel number slot, and the like.

[0231] In an exemplary embodiment, the semantic recognition device 1700 may further include a slot definition module, which may be configured to predefine n types of slots of a target category.

[0232] In an exemplary embodiment, the semantic recognition device 1700 may also include: a vocabulary building module, which can be configured to generate a product vocabulary, a brand vocabulary and a brand-product word pairing vocabulary; a knowledge graph building module, which can be configured to build a knowledge graph based on the product vocabulary, the brand vocabulary and the brand-product word pairing vocabulary.

[0233] In an exemplary embodiment, the semantic recognition device 1700 may further include: a knowledge retrieval module, which may be configured to retrieve recommendation information from the knowledge graph according to the target slot value of the target slot; and a recommendation sending module, which may be configured to send the recommendation information to the target object.

[0234] In an exemplary embodiment, the semantic recognition device 1700 may further include a scenario classification module, and the scenario classification module may be configured to determine the target business scenario corresponding to the input information through a business scenario classification model.

[0235] In an exemplary embodiment, the target business scenario may include any one or more of a product query scenario, an after-sales service scenario, a fuzzy discount query scenario, a specific product discount query scenario, an order query scenario, a full-site direct access scenario, and an unknown scenario.

[0236] In an exemplary embodiment, the semantic recognition device 1700 may also include: a portrait information acquisition module, which can be configured to obtain portrait information of the target object; the portrait information may include any one or more of purchasing power level, membership level, category preference information, gender information, etc.

[0237] In an exemplary embodiment, the target slot may include a product word slot and a brand word slot, and the semantic recognition device 1700 may also include: a brand word prediction module, which can be configured to predict the target slot value of the brand word slot of the input information if the target slot value of the product word slot in the input information is extracted.

[0238] In an exemplary embodiment, the semantic recognition device 1700 may further include: a negative intention recognition module, which may be configured to recognize negative semantics in the input information.

[0239] In an exemplary embodiment, the semantic recognition device 1700 may further include: a typo vocabulary building module, which may be configured to build a typo vocabulary; and a typo correction module, which may be configured to automatically correct typos in the input information based on the typo vocabulary.

[0240] Since the functional modules of the semantic recognition apparatus 1700 of the exemplary embodiment of the present invention correspond to the steps of the exemplary embodiment of the semantic recognition method described above, they will not be described in detail here.

[0241] In an exemplary embodiment of the present invention, an electronic device capable of implementing the above method is also provided.

[0242] Reference below Figure 18 , which shows a schematic structural diagram of a computer system 1800 of an electronic device suitable for implementing an embodiment of the present invention. Figure 18 The computer system 1800 of the electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0243] like Figure 18 As shown, computer system 1800 includes a central processing unit (CPU) 1801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1802 or a program loaded from a storage unit 1808 into a random access memory (RAM) 1803. Various programs and data required for system operation are also stored in RAM 1803. CPU 1801, ROM 1802, and RAM 1803 are connected to each other via a bus 1804. An input / output (I / O) interface 1805 is also connected to bus 1804.

[0244] The following components are connected to the I / O interface 1805: an input section 1806 including a keyboard, a mouse, and the like; an output section 1807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 1808 including a hard disk; and a communication section 1809 including a network interface card such as a LAN card or a modem. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to the I / O interface 1805 as needed. Removable media 1811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1810 as needed, so that computer programs read therefrom can be installed into the storage section 1808 as needed.

[0245] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1809, and / or installed from a removable medium 1811. When the computer program is executed by the central processing unit (CPU) 1801, the above-mentioned functions defined in the system of the present application are executed.

[0246] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0247] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0248] The units involved in the embodiments of the present invention may be implemented in software or hardware, and the units described may also be provided in a processor. In some cases, the names of these units do not limit the units themselves.

[0249] As another aspect, the present application further provides a computer-readable medium, which may be included in the electronic device described in the above embodiments, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device implements the semantic recognition method described in the above embodiments.

[0250] For example, the electronic device may implement Figure 1 As shown in: Step S110, obtaining input information of the target object; Step S120, extracting the target slot value of the target slot in the input information through a slot extraction model; wherein the slot extraction model includes an input layer, a shared layer and an output layer connected in sequence, wherein the output layer includes n parallel sub-output layers, each sub-output layer is used to output a slot value prediction result of a slot; n is a positive integer greater than or equal to 2.

[0251] It should be noted that although several modules of the device or apparatus for performing an action are mentioned in the above detailed description, such division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules to be embodied.

[0252] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present invention.

[0253] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.

[0254] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A semantic recognition method, characterized in that: include: Get the input information of the target object; Extracting target slot values ​​of target slots in the input information through a slot extraction model, wherein the target slots include product word slots, brand word slots, and modifier word slots; The slot extraction model includes an input layer, a multi-task sharing layer, and an output layer connected in sequence, wherein the output layer includes n parallel sub-output layers, each sub-output layer is used to output a slot value prediction result of a slot, the multi-task sharing layer shares some parameters of the feature layer word vector, and trains the product word, modifier word slot model, and brand word slot model in parallel, and calculates their respective loss functions in parallel. The models are spliced ​​together through a fully connected layer, so as to realize multi-slot prediction of the same word in the input information through the slot extraction model; n is a positive integer greater than or equal to 2.

2. The semantic recognition method according to claim 1, characterized in that: The input information includes input voice information and / or input text information.

3. The semantic recognition method according to claim 1, characterized in that: The target slot also includes any one or more of a gender slot, a price slot, an inquiry range slot, and a channel number slot.

4. The semantic recognition method according to claim 1, characterized in that: Also includes: Predefine n slots of target categories.

5. The semantic recognition method according to claim 1, characterized in that: Also includes: Generate product vocabulary, brand vocabulary and brand-product word pairing vocabulary; A knowledge graph is established based on the product vocabulary, brand vocabulary and brand-product word pairing vocabulary.

6. The semantic recognition method according to claim 5, characterized in that: Also includes: Retrieving recommendation information from the knowledge graph according to the target slot value of the target slot; The recommendation information is sent to the target object.

7. The semantic recognition method according to claim 1, characterized in that: Also includes: The target business scenario corresponding to the input information is determined through a business scenario classification model.

8. The semantic recognition method according to claim 7, characterized in that: The target business scenario includes any one or more of a product query scenario, an after-sales service scenario, a fuzzy discount query scenario, a specific product discount query scenario, an order query scenario, a full-site direct access scenario, and an unknown scenario.

9. The semantic recognition method according to claim 1, characterized in that: Also includes: Obtaining portrait information of the target object; The portrait information includes any one or more of purchasing power level, membership level, category preference information, and gender information.

10. The semantic recognition method according to claim 1, characterized in that: The method further comprises: If the target slot value of the product word slot in the input information is extracted, the target slot value of the brand word slot in the input information is predicted.

11. The semantic recognition method according to claim 1, characterized in that: Also includes: Negation semantics in the input information is identified.

12. The semantic recognition method according to claim 1, characterized in that: Also includes: Establish a vocabulary of typos; Automatically correct typos in the input information based on the typo database.

13. A semantic recognition device, characterized in that: include: An input information acquisition module configured to acquire input information of a target object; a slot extraction model configured to extract target slot values ​​of target slots in the input information through the slot extraction model, wherein the target slots include product word slots, brand word slots, and modifier word slots; The slot extraction model includes an input layer, a multi-task sharing layer, and an output layer connected in sequence, wherein the output layer includes n parallel sub-output layers, each sub-output layer is used to output a slot value prediction result of a slot, the multi-task sharing layer shares some parameters of the feature layer word vector, and trains the product word, modifier word slot model, and brand word slot model in parallel, and calculates their respective loss functions in parallel. The models are spliced ​​together through a fully connected layer, so as to realize multi-slot prediction of the same word in the input information through the slot extraction model; n is a positive integer greater than or equal to 2.

14. An electronic device, characterized in that: include: processor; and a memory storing computer-readable instructions, wherein the computer-readable instructions, when executed by the processor, implement the semantic recognition method according to any one of claims 1 to 12. 15 . A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the semantic recognition method according to claim 1 is implemented.

Citation Information

Patent Citations

  • Chinese event extraction method

    CN107122416A

  • Statement analysis method and apparatus, computer device and readable medium

    CN108549656A