An intelligent customer service question-answering system for e-commerce platforms that accurately understands semantics
By constructing e-commerce real-class knowledge spectrum and semantic understanding technology, it solves the problem that the existing e-commerce platform customer service Q&A system cannot accurately understand user intentions, achieves efficient semantic analysis and knowledge retrieval, reduces the burden on customer service, and improves the quality of answers. and user experience.
Patent Information
- Application Number
- CN202311828570.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2043-12-28
AI Technical Summary
The existing customer service question and answer system of the existing e-commerce platform cannot accurately understand the user's semantic intention, resulting in low-quality answers and many repeated questions, which increases the workload of customer service personnel, and it is difficult for the system to automatically update the knowledge base to deal with new questions.
Adopting an automatic question and answer system based on real class structure, through the construction of e-commerce real class knowledge spectrum, question semantic understanding and answer extraction, using relational database storage and vertical mode, semantic analysis and knowledge retrieval of user questions are realized, and accurate answers are generated. .
It reduces the customer service pressure of small and medium-sized e-commerce companies, improves search quality and user experience, can quickly and accurately understand user intentions and provide satisfactory responses, and automatically updates the knowledge base to adapt to changes in the field.
Smart Images

Figure CN117972041B
Abstract
Description
Technical Field
[0001] The present application relates to an intelligent customer service question and answer system for an e-commerce platform, and more particularly to an intelligent customer service question and answer system for an e-commerce platform that accurately understands semantics, and belongs to the technical field of intelligent customer service question and answer systems. Background Art
[0002] The automatic question-answering system is an artificial intelligence application. In Internet applications, the automatic question-answering system is becoming more and more widely used. Users are no longer satisfied with the mechanical answers of the traditional template question-answering system, and reducing the manual burden is also an important issue.
[0003] The combination of automatic question-answering systems and other technologies makes intelligent question-answering systems increasingly important, from intelligent voice input methods to intelligent customer service systems, from intelligent assistants to robots. Intelligent question-answering systems will be an important form and means of human-computer interaction in the future. The application of intelligent question-answering systems will also set off a greater climax.
[0004] The intelligent question-answering system allows users to ask questions in natural language and give them the answers they need. This kind of answer is not like the suggestions and links given by search engines, but directly gives answers to communicate with humans, making users feel that they are not facing machines, but talking to humans. This requires the intelligent question-answering system to be able to understand the true intention of users' questions and be able to answer the questions asked by users. Therefore, the intelligent question-answering system needs to solve two problems: one is the semantic understanding of natural language: including lexical analysis, grammatical analysis, semantic extraction, etc.; the other is the representation of knowledge: how to store complex knowledge in the form of data and extract accurate knowledge based on semantics.
[0005] With the increasing development and improvement of e-commerce platforms, online shopping has increased dramatically, bringing great development opportunities to traditional e-commerce platforms, but also challenges. More and more online shoppers pay more attention to the understanding of items before sale. They fully understand the characteristics of the required products through a lot of consultation and multi-party comparison. Shoppers' consultations take up most of the time in a shopping activity, and 96% of the questions are related to the characteristics of the product. For a customer service staff, answering questions every day takes up more than 84% of the entire working time, and 99% of the questions are repeated. For online shoppers, they hope to directly understand the characteristics of the product itself, rather than giving a hyperlink to the product and letting them search and filter it themselves.
[0006] The questions shoppers ask play an important role in the shopping orientation of shoppers. Some e-commerce platforms fail to provide a good customer service experience, which directly leads to consumer resistance. The questions shoppers ask are a lot of repetitive questions. With the development of the platform and the growth of customers, customer service work is becoming more and more arduous. For merchants, especially small and medium-sized micro-businesses, they are overwhelmed by the answers to various questions every day. They also hope to be liberated from the large amount of tedious customer service work, improve work efficiency and reduce work burden. Therefore, an intelligent question-and-answer system that can reduce the manual burden, accurately understand customer questions, give satisfactory answers and meet customer needs has important application value and is also an urgent requirement for the development of e-commerce platforms.
[0007] The problems that need to be solved by the existing e-commerce platform customer service question-and-answer system and the key technical difficulties of this application include:
[0008] (1) The surge in online shopping has brought great challenges to traditional e-commerce platforms. Shoppers’ inquiries take up most of the time in a shopping activity, and for a customer service staff, answering questions every day accounts for more than 84% of the entire working time, and 99% of the questions are repeated. The customer service question-and-answer system of the existing e-commerce platform gives users answers like search engines give suggestions and links, allowing them to search and filter by themselves, but it is difficult to give direct answers to communicate with humans, making users feel that they are facing machines, not talking to humans. The system is unable to understand the true intention of the user's questions, and naturally cannot answer the questions raised by the user. The existing technology cannot solve two problems: one is natural language semantic understanding: including lexical analysis, grammatical analysis, semantic extraction and other aspects; the other is knowledge representation: it is impossible to store complex knowledge in the form of data and cannot extract accurate knowledge based on semantics.
[0009] (2) The questions shoppers ask play an important role in their shopping orientation. Some e-commerce platforms fail to provide a good customer service experience, which directly leads to consumer resistance. The questions shoppers ask are numerous and repetitive. Merchants are overwhelmed by the answers to various questions every day. They also hope to be freed from the large amount of tedious customer service work, improve work efficiency, and reduce work burden. The existing technology lacks an intelligent question-and-answer system that can reduce manual burden, accurately understand customer questions, give satisfactory answers, and meet customer needs. The existing technology is not intelligent enough: the system cannot truly understand the intention of the questioner. In fact, the system does not analyze the question or the content of the conversation at all. Many times, irrelevant or even completely opposite answers may be obtained.
[0010] (3) The analysis of existing technical problems lacks an understanding of the semantics of the problem. Information retrieval lacks the result of problem analysis to find relevant knowledge from the knowledge spectrum. The generation of answers cannot generate answers to users based on the retrieved knowledge. It is impossible to use the real class structure to extract knowledge. The extraction and generation of answers are too simple: when extracting answers, for non-e-commerce field questions, most of them are generated by matching in preset fixed templates, and the answer quality is poor. The knowledge spectrum is complex to maintain and manage. The existing systems often use fixed question and answer pairs for approximate matching. When these systems need to update fixed answers, they need to modify them manually. For some new possible questions, templates need to be added manually, which is complex to maintain. There is an urgent need for intelligent question-answering systems that can truly understand the semantics of customers and make correct responses based on user intentions. For domain and non-domain knowledge, they can automatically learn knowledge and update according to the changing domain data and the questions asked by the questioner. Summary of the invention
[0011] The analysis of the questions in this application adopts the understanding of the semantics of the questions, and the information retrieval uses the results of the question analysis to find relevant knowledge from the knowledge spectrum. The generation of answers generates responses to users based on the retrieved knowledge; the real class structure is used to extract knowledge, and an automatic question-answering system based on the real class of the e-commerce platform is constructed, which consists of three parts: the construction of the e-commerce real class knowledge spectrum, the semantic understanding of the e-commerce platform questions, and the extraction of answers. This application is developed and designed for small and medium-sized e-commerce platforms, which reduces the pressure on the customer service of small and medium-sized e-commerce companies. It can extract knowledge from product data information, is easy to deploy, and has good semantic understanding. It is a form of search and retrieval. Compared with traditional search, the automatic question-answering system can understand the semantics of user inquiries and quickly and accurately find answers to user inquiries; it can better improve search quality and user experience.
[0012] In order to achieve the above technical effects, the technical solutions adopted in this application are as follows:
[0013] An intelligent customer service question-and-answer system for e-commerce platforms that accurately understands semantics. Question analysis uses semantic understanding of questions, and information retrieval uses the results of question analysis to find relevant knowledge from the knowledge spectrum. Answer generation generates responses to users based on the retrieved knowledge. The real class structure is used to extract knowledge, and an automatic question-and-answer system based on the real classes of e-commerce platforms is constructed. It consists of three parts: the construction of the e-commerce real class knowledge spectrum, the semantic understanding of e-commerce platform questions, and the extraction of answers.
[0014] (1) Construction of e-commerce entity knowledge spectrum: including the storage and structure of entity knowledge spectrum and the mining of entity: 1) When storing entity, a method of using relational database to store entity in vertical mode is established, in which concepts and individuals in entity are stored as entities, and various associations between two elements in entity are stored in the form of relationships, including attributes and inclusions, through records in relational tables, i.e., vertical storage mode of entity; 2) By constructing the database structure of e-commerce platform, the knowledge inquired by users is mined in various data tables of the database. The format of the data table is fixed. By parsing each field of each data in the data table, entity information is extracted, and an automatic maintenance and update mechanism of entity is established;
[0015] (2) Semantic understanding of questions on e-commerce platforms: In question processing, we first perform word segmentation, and then perform syntactic analysis on the questions based on the word segmentation results. The word segmentation adopts the lexical analysis method that integrates the real category knowledge spectrum. The concepts and individual noun semantics in the real category knowledge spectrum are added to the lexical analysis to improve the accuracy of word segmentation. In addition, we summarize the commonly used question models on e-commerce platforms, and construct syntactic analysis methods for question words in different positions. We parse and extract the subject, predicate, and object components of the questions, and then obtain the semantic classification of the questions.
[0016] (3) Answer extraction: Construct a similarity calculation method based on the question model: extract the sentence structure of the question through the word segmentation results. After classifying the question, calculate the similarity with the question model in the classification in terms of length, components, and sequence. For different question models, construct SQL statements to extract retrieval results from the real class library to obtain the answer;
[0017] (4) Construct a question-and-answer system based on the real categories of the e-commerce platform: Build the overall framework of the system, run it on the .net framework based on the C# language, establish a real category knowledge spectrum, and the question-and-answer processing system answers users' questions on the specific e-commerce platform.
[0018] Preferably, the construction of e-commerce entity category knowledge spectrum and the extraction of entity categories: using relational database to store entity categories, using triples as the basic unit of knowledge, and storing OWL resources through vertical mode;
[0019] The knowledge in the question-answering system comes from the e-commerce platform database to which the question-answering system is attached. The construction of the real category knowledge spectrum of the e-commerce platform is achieved by analyzing the specific e-commerce platform database, constructing real categories from it, and storing the real category data in the database.
[0020] Preferably, e-commerce platform data analysis:
[0021] (1) According to the classification hierarchy, the categories of goods are defined as Class, where the parent category ID is 0 and is the top-level category by default. Other categories use rdfs:subClassOf to declare the inheritance relationship of concepts based on the inheritance relationship.
[0022] (2) Propertyof relationship of type attributes;
[0023] (3) The attribute values of commodities are properties, which are attributes of instances;
[0024] (4) A specific product record is an instance, and the relationship between an instance and a concept is InstanceOf;
[0025] (5) There is a relationship of inheritance and derivation between the categories of commodities.
[0026] Preferably, the storage of e-commerce platform entities: four data tables are used to store e-commerce platform entities, and their structures and models are as follows:
[0027] (1) Entity table: All noun terms that appear on the e-commerce platform are considered identifiable entities. Entity types include concepts, instances, attributes, and attribute constraints. Attributes include data attributes and object attributes, which are consistent with the attributes in Protege.
[0028] Model 1: entity entity<entity ID, entity name, entity category ID, entity description>
[0029] The entity category ID is a foreign key, referenced from the entity category table;
[0030] (2) Entity category: a name describing a type, used to identify the category of an entity and the constraints on its scope;
[0031] Model 2: Entity category type <category ID, category name, category constraint>
[0032] (3) Relationship type: a class that describes the relationship between entities. Relationship types include the four most basic relationships in the class description. If needed, more inference relationships for reasoning or describing stronger logic can be added. Relationship types are extensible.
[0033] Model 3: Relationship type <relationship type ID, relationship type name, relationship type description>
[0034] (4) Entity relationships: describe the relationships between entities in the entity table. The relationships between entities are the knowledge embodiment of the entity class. The knowledge describing facts in the entity class is embodied through the relationships between various entity class entities. The more relationship types there are, the richer the entity class knowledge is.
[0035] Model 4: Entity Relationship <ID, Main Entity ID, Guest Entity ID, Relationship Type ID, Relationship Value, Relationship Description>.
[0036] Preferably, a word segmentation system based on the e-commerce entity knowledge spectrum: Add a user-defined dictionary, add the user's dictionary to the lexical analysis, and give priority to recognition. The process is summarized as follows:
[0037] Step 1: Scan the entity data table of the entity knowledge spectrum, obtain the proper nouns therein, and form a dictionary. All the words in the entity table are nouns, and the part-of-speech of the words in the dictionary is noun;
[0038] Step 2: Add the dictionary in Step 1 to the lexical analysis;
[0039] Step 3: Perform word segmentation and part-of-speech tagging using the new lexical analysis to obtain word segmentation and part-of-speech tagging that meet the requirements of the e-commerce platform.
[0040] Preferably, question sentence syntax analysis: Obtain the structure of the subject, predicate, and object in the question sentence and the relationships between them. In the case where the interrogative pronoun is used as the subject, object, and attributive, among them, when the interrogative pronoun is used as the subject, there is a predicate verb following it immediately, and the distance between the interrogative pronoun and the predicate verb is 1. When the interrogative pronoun is used as the object, it is at the end of the question sentence. When the interrogative pronoun is used as the attributive, corresponding judgments need to be made based on the position information of the interrogative pronoun and the predicate verb. The above process is described in detail as follows:
[0041] The first step: Store the word segmentation and tagging results in the lexical analysis into an array;
[0042] The second step: Search for the interrogative pronoun. There is only one interrogative pronoun in a question sentence;
[0043] The third step: Search for the predicate verb: In the question sentence, the predicate verb is the closest to the interrogative pronoun;
[0044] The fourth step: Analyze the subject and object parts:
[0045] (1) The interrogative pronoun is at the end of the sentence. At this time, the interrogative pronoun acts as the object, and the noun before the predicate verb is used as the characteristic subject;
[0046] (2) The interrogative pronoun is not at the end of the sentence, and the predicate verb follows the interrogative pronoun immediately. At this time, the interrogative pronoun acts as the subject, and the noun after the predicate verb is used as the characteristic object;
[0047] (3) The interrogative pronoun is not at the end of the sentence and is not adjacent to the predicate verb. At this time, the interrogative pronoun generally acts as an attributive, and it is divided into two cases:
[0048] 1) The interrogative pronoun is before the predicate verb: The noun between the interrogative pronoun and the predicate verb is used as the characteristic subject item. If there is no noun between the interrogative pronoun and the predicate verb, the noun after the predicate verb is used as the characteristic object item;
[0049] 2) The interrogative pronoun comes after the predicate verb: The noun after the interrogative pronoun is taken as the characteristic object item. If there is no noun after the interrogative pronoun, the noun before the predicate verb is taken as the characteristic subject item.
[0050] Preferably, the establishment of a question model based on question classification: combined with the construction of a real class database, common question models are summarized, and question model parsing and matching methods are used to understand the questions; this application constructs a question model from the search purpose of e-commerce platform users, the user's inquiry method, and the real class knowledge spectrum stored vertically in the relational database. The method of searching is combined to construct a question model.
[0051] Preferably, question model recognition: suppose the question to be recognized is S, and the system question model set is M = {M1...Mn}. The process is to find the question model Ms that best matches S from M. The question model recognition process used includes two steps: remove the semantic block part of S to obtain the sentence structure Si of question S; calculate the approximation between Mi and Si, and finally select the question model corresponding to the maximum approximation as the sentence structure of S. If the maximum approximation is less than a set critical value, the match fails, and the sentence S is not a question or the semantic understanding fails.
[0052] 1) Analysis of question sentence structure
[0053] For the interrogative pronoun semantic block: combine the word segmentation result of the lexical analysis with the predetermined interrogative pronoun library to search and extract the interrogative pronoun semantic block in the question sentence;
[0054] For feature words: feature words are the target to be searched, which are the semantics of the user's inquiry. Feature words are near interrogative pronouns or predicates, i.e., subjects, objects or attributes.
[0055] For the search subject of the question sentence: it is a noun or a noun phrase. This application directly uses the segmentation result to represent it in the form of variables. During the search, the variable components in the question sentence are identified through the real class knowledge spectrum, and the search is constructed according to the question sentence model;
[0056] Through the above process, the question is represented as a question model, in which the part without the feature words is represented by parameters. The question is finally converted into a retrieval of the real class, which needs to be matched according to the existing model. Before that, it is necessary to find the most suitable model in the question model library, find the model that best matches the user's question model from the question model library, and calculate the similarity between the sentence pattern of the user's question and the model in the question model library;
[0057] 2) Question model approximation calculation
[0058] After obtaining the sentence structure Si, identify whether the structure matches the corresponding question model Mi, use sentence similarity to calculate the similarity between the two, and achieve matching recognition of the sentence structure Si and the question model Mi;
[0059] Question S generates sentence structure Si using question model Mi as template. (Mi, Si) is a set of symbols consisting of phrases and tokens representing parts of speech. The model contains dynamic semantic blocks and feature semantic blocks. The similarity between question model Mi and question S is represented by the similarity between Mi and sentence structure Si, which includes three parts:
[0060] 1) Model length approximation: Length refers to the number of semantic blocks. Assuming the length of the sentence structure Si is m and the length of the question model Mi is n, the approximation SimLen between the user question S and the sentence model M is calculated using formula 1:
[0061]
[0062] 2)) Sentence component approximation: The dot product of vectors is introduced for calculation. Assume that the number of semantic blocks of sentence structure Si is m (i.e., the length is m), the number of semantic blocks of question model Mi is n (i.e., the length is n), and the weight vectors of each component (semantic block) in Si are: Ws = (ws1, ws2, ..., ws m}, the weight vectors of each component (semantic block) in Mi are: Wm={wm1,wm2,…,wm n}, where wm1+wm2+…+wm n =1, each value is manually determined according to the importance of each component of the question when constructing the question model;
[0063] For each value in Ws, it is the approximation degree of each semantic block in Si and each semantic component in Mi. If each component in Si exists in Mi, the corresponding ws i =1, otherwise it is considered non-existent. When m is not equal to n, the shorter vector is taken, and the component approximation SimTerm of the sentence is calculated using formula 2:
[0064] SimTerm=Ws*Wm Formula 2
[0065] Formula 2 is the dot product of the two vectors Ws and Wm;
[0066] 3) Sequence similarity: Compare with each semantic block of the question model Mi, record the number of positions of each semantic block component in the sentence structure Si that are different in Mi and Si, and record the number of reversed order as num;
[0067] The sequence similarity SimOrder is calculated using formula 3:
[0068]
[0069] In summary, the total sentence similarity Sim is calculated. The total sentence similarity is a linear combination of model length similarity, sentence component similarity, and sequence similarity:
[0070] Sim=k1*SimLen+k2*SimTerm+k3*SimOrder Formula 4
[0071] In Formula 4: k1, k2, k3 are the weights of the model length approximation SimLen, the sentence component approximation SimTerm, and the sequence approximation SimOrder, respectively, indicating the weight of each approximation in the total approximation, and k1, k2, k3 satisfy k1+k2+k3=1, then Sim∈[0,1], the higher the Sim value, the more the question S matches a certain question model Mi;
[0072] Set k1=0.7, k2=0.2, k3=0.1 to increase the adaptability of the question model and introduce semantic components into the real class knowledge spectrum for retrieval and reasoning as much as possible;
[0073] A brief description of the above process is as follows:
[0074] Step 1: According to the results of syntactic analysis, select the sentence type classification of the question;
[0075] Step 2: Extract the structure of the question: traverse the word segmentation structure, extract the noun and adjective parts in the question as parameters, and the parameterized question is the structure Si of the question;
[0076] Step 3: Calculate the similarity between the question structure and each question model in the category to which the question belongs, and select the optimal question model.
[0077] Preferably, construct a search statement and generate an answer:
[0078] 1. Steps for searching in the real class knowledge spectrum
[0079] Step 1: Scan the question sentence, extract the variables in the question sentence model, and assign values to the variables in the model based on the best matching model and using the word segmentation structure;
[0080] Step 2: Find the real class type corresponding to the variable in the local knowledge spectrum, build a real class model in memory, and retrieve it;
[0081] 1) First, search the entity table, search for the entity type corresponding to each variable, search in the entity table, and after finding it, search for its entity type;
[0082] 2) For those that cannot be found in the entity table, the relationship value field is searched in the relationship table, and the corresponding entity is found according to the entity type found in step 1. This entity is the search subject;
[0083] 3) Analyze the search terms, search for the subject found in step 2, search for the relevant features of the subject, and get the answer that needs to be returned;
[0084] 4) If one of the retrievals in step 1 or step 2 fails, the knowledge in the real class knowledge spectrum cannot answer the user's question and returns failure;
[0085] 2. Build the retrieval subject and its relationship model in memory
[0086] In the retrieval process, after scanning the entities, if there is only one concept or individual, it is determined that this concept or individual is the subject of the retrieval. At this time, the database is searched again, and the various relationships of the retrieval subject are mined through the relationship table of the retrieval entity;
[0087] If two or more concepts or individuals appear in the search statement, the semantics of the question is to find the relationship between the two concepts or individuals, and to retrieve and return the relationship or relationship value in the relationship entity based on the two concepts or individuals.
[0088] Preferably, a knowledge spectrum of real class knowledge is established: a method for automatically establishing and extracting real classes:
[0089] (1) Relational Model of Real Class Knowledge Storage Database
[0090] The real class knowledge spectrum breaks down each piece of data into the most basic elements, analyzes the relationship between these basic elements, and then forms semantic knowledge;
[0091] (2) Steps for automatically extracting real classes
[0092] 1) Set entity categories and relationship categories in the entity knowledge database: Entity categories are the collection of elements that appear in the entity class. The elements that appear in the entity class include: concepts, individuals, object attributes, and data attributes. Data attributes describe individual attributes and have specific values.
[0093] The relationship category describes the relationship between the elements, including: ObjectPropertyOf: describes the relationship between a concept and its object property; DataPropertyOf: describes the relationship between an individual and its data property. In this case, in addition to the relationship between the two, it also includes the relationship value between the two; InstanceOf: describes the relationship between a concept and an individual. A specific product is an instance of a certain product category; SubClassOf: describes the subordinate relationship between concepts and concepts, and describes the subordinate relationship between product categories; PartOf: describes the relationship between concepts and concepts as a whole and as a part;
[0094] 2) Scan the product classification table, establish the top-level concepts of the product classification, and store the top-level concepts in the entity table in the real class knowledge spectrum. The category is the concept. The classification with a parent classification of 0 represents the top-level concept. If the parent classification is not 0, it is a subclassification. It is necessary to establish a relationship between the subclassification and the parent classification. The relationship type is SubClassOf;
[0095] 3) Scan the commodity attribute name table, store the attributes of the commodity classification into the entity table of the real class knowledge database, and the category is object attribute; at the same time, store the relationship between the commodity attribute and the commodity classification into the entity relationship data table of the real class knowledge database, and the relationship type is DataPropertyOf, and the relationship value is empty;
[0096] 4) Scan the product table, create individual products one by one, and store the individual products in the entity table. The entity type is individual. At the same time, establish a relationship between the individual product and its category. The relationship type is InstanceOf, and the relationship value is empty.
[0097] 5) Scan the commodity attribute value table, establish a relationship between the commodity individual and its attribute. The relationship type at this time is a DataPropertyOf relationship, and store the relationship value;
[0098] 6) For the SKU of the product, set it as the relationship between individuals and attributes;
[0099] Through the above steps, the product data table of the e-commerce platform is stored in the relational database in the form of organization of real class knowledge. The above relationship describes the knowledge of the real class.
[0100] Compared with the prior art, the innovations and advantages of this application are:
[0101] (1) The analysis of the problem in this application adopts the understanding of the semantics of the problem. Information retrieval uses the results of the problem analysis to find relevant knowledge from the knowledge spectrum. The generation of answers generates responses to users based on the retrieved knowledge. The real class structure is used to extract knowledge, and an automatic question-answering system based on the real class of the e-commerce platform is constructed. It consists of three parts: the construction of the e-commerce real class knowledge spectrum, the semantic understanding of the e-commerce platform questions, and the extraction of answers. This application is developed and designed for small and medium-sized e-commerce platforms to reduce the pressure on customer service of small and medium-sized e-commerce companies. It can extract knowledge from product data information, is easy to deploy, and has good semantic understanding. It is a form of precise retrieval. Compared with traditional searches, automatic question-answering systems can understand the semantics of user inquiries and quickly and accurately find answers to user inquiries; they can better improve search quality and user experience.
[0102] (2) This application creatively proposes a method for constructing an e-commerce entity knowledge spectrum. When storing entity classes, a method for storing entity classes in a vertical mode using a relational database is established. Concepts and individuals in the entity class are stored in the form of entities, while the various associations between two elements in the entity class, including attributes and inclusions, are stored in the form of relationships through records in a relational table, which is a vertical storage mode of the entity class. By constructing an e-commerce platform database structure, the knowledge inquired by users is mined in each data table of the database. The format of the data table is fixed. By parsing each field of each data in the data table, the entity class information is extracted, and an automatic maintenance and update mechanism for the entity class is established. This is conducive to reducing the manual burden, accurately understanding customer questions, making satisfactory answers, and meeting customer needs. The intelligent question-and-answer system has important application value and meets the urgent requirements for the development of e-commerce platforms.
[0103] (3) The present application creatively proposes a method for semantic understanding of questions on an e-commerce platform. In question processing, word segmentation is first performed, and then the question is parsed syntactically based on the word segmentation results. The word segmentation adopts a lexical analysis word segmentation method that integrates the real class knowledge spectrum. The concepts and individual noun semantics in the real class knowledge spectrum are added to the lexical analysis to improve the accuracy of word segmentation. In addition, the commonly used question models on the e-commerce platform are summarized, and a syntactic parsing method for question words in different positions is constructed to parse out the subject, predicate and object components of the question, and then obtain the semantic classification of the question; it effectively solves the problems of natural language semantic understanding, lexical analysis, grammatical analysis, and semantic extraction in the intelligent question-answering system.
[0104] (4) This application creatively proposes a method for extracting answers, constructs a similarity calculation method based on a question model, extracts the sentence structure of the question through the word segmentation results, and calculates the similarity with the question model in the classification in terms of length, composition, and order after the question is classified. For different question models, SQL statements are constructed to extract retrieval results from the real class library to obtain the answer. A question-and-answer system based on the real class of the e-commerce platform is constructed to answer users' questions on specific e-commerce platforms. It is intelligent and can truly understand the customer's semantics and make correct responses based on user intent. For domain and non-domain knowledge, the system can automatically learn knowledge and update it according to the continuous changes in domain data and the questioner's questions. The answer provided by the question-and-answer system to the questioner is a true description of the domain problem, and the user experience is good. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] Figure 1 It is a flowchart of lexical analysis combined with user-defined word library segmentation.
[0106] Figure 2 It is a schematic diagram of the question model based on question sentence pattern classification.
[0107] Figure 3 It is a relationship diagram of the database of the e-commerce platform of this application.
[0108] Figure 4 It is a relationship diagram of the storage structure of the real class knowledge spectrum.
[0109] Figure 5 It is a schematic diagram of the performance test results of the system of this application. DETAILED DESCRIPTION
[0110] The following, in conjunction with the accompanying drawings, further describes the technical solution of the intelligent customer service question-and-answer system for an e-commerce platform that accurately understands semantics provided by the present application, so that technical personnel in the field can better understand the present application and implement it.
[0111] The automatic question answering system is a form of search and retrieval. Compared with traditional search, the automatic question answering system can understand the semantics of user queries; quickly and accurately find answers to user queries; and better improve search quality and user experience. Most of the existing technologies are based on the retrieval and matching of keywords in user questions, and rarely involve semantic understanding.
[0112] The development and design of an automatic question-answering system for small and medium-sized e-commerce platforms to reduce the pressure on customer service of small and medium-sized e-commerce companies is the focus of this application. Small and medium-sized e-commerce platforms usually have complete product data information, and these systems have simple structures. The question-answering system for this platform needs to be able to extract knowledge from product data information, be easy to deploy, and have good semantic understanding.
[0113] (1) Storage of real class knowledge spectrum: Using the relational database to store real classes in a vertical mode, the concepts and individuals in the real class are stored in the form of entities, and the various associations between two elements in the real class (such as attributes, inclusion, etc.) are stored in the form of relationships through records in the relational table, that is, the vertical storage mode of the real class. This method can easily mine and extract knowledge from the e-commerce data table and store it in the form of real classes.
[0114] (2) Syntactic parsing based on real class library: The word segmentation granularity of lexical analysis is relatively fine. When performing word segmentation, adding nominal semantics such as concepts and individuals in the real class knowledge spectrum into the lexical analysis can improve the accuracy of word segmentation. In addition, this application summarizes the models of commonly used questions on e-commerce platforms and designs syntactic parsing methods for question words in different positions. Through this method, the subject, predicate and object components of the question can be easily analyzed, thereby obtaining the semantic classification of the question.
[0115] (3) Question processing method based on question model: This application proposes a similarity calculation method based on question model. The sentence structure of the question is extracted through the word segmentation results. After the question is classified, the similarity is calculated from the three aspects of length, composition, and order with the question model in the classification. By comparing the similarity of the structure of the question and the model in the question model library, the question model closest to the question structure is obtained, and the specific semantic block is handed over to the retrieval corresponding to the question model, and the answer is retrieved in the real class knowledge spectrum, which makes the system have good robustness. For different question models, SQL statements are designed to extract the retrieval results from the real class library to obtain the answer.
[0116] Finally, based on the above technical features, this application designed a system prototype and conducted experimental analysis to prove the correctness and effectiveness of the system design.
[0117] 1. Construction of e-commerce real category knowledge spectrum and extraction of real categories
[0118] Considering the clear classification of products on the e-commerce platform, this application decides not to use direct storage in XML files, but to use a relational database to store real classes, using triples as the basic unit of knowledge, and storing OWL resources in a vertical mode.
[0119] The advantages of using a vertical model to store knowledge in a relational database are as follows: 1) A unified structure can be used to decompose and store real classes. If other models are used, the knowledge database will inevitably expand and become complicated to maintain. 2) It is easy to update and maintain. There is no need to change the structure of the database or the content of the database. Knowledge can be added directly to the database according to the definition model. 3) The advantages of relational databases can be leveraged to facilitate knowledge sharing and access. 4) Resources and storage space can be saved. Complex OWL real class tags that represent semantics can be converted into fields or records in a relational database to represent them, which greatly saves storage space and resources. 5) Access efficiency is improved.
[0120] The knowledge in the question-answering system comes from the e-commerce platform database to which the question-answering system depends. The construction of the real category knowledge spectrum of the e-commerce platform is to analyze the specific e-commerce platform database, construct the real category from it, and store the real category data in the database.
[0121] (I) E-commerce platform data analysis
[0122] (1) According to the classification hierarchy, the categories of goods are defined as Class, where the parent category ID is 0 and is the top-level category by default. Other categories use rdfs:subClassOf to declare the inheritance relationship of concepts based on the inheritance relationship.
[0123] (2) Propertyof relationship of type attributes;
[0124] (3) The attribute values of commodities are properties, which are attributes of instances;
[0125] (4) A specific product record is an instance, and the relationship between an instance and a concept is InstanceOf;
[0126] (5) There is a relationship of inheritance and derivation between the categories of commodities.
[0127] (II) Storage of E-commerce Platform Entities
[0128] Four data tables are used to store e-commerce platform entities. Their structures and models are as follows:
[0129] (1) Entity table: All noun terms that appear on the e-commerce platform are considered identifiable entities. Entity types include concepts, instances, attributes, and attribute constraints. Attributes include data attributes and object attributes, which are consistent with the attributes in Protege.
[0130] Model 1: entity entity<entity ID, entity name, entity category ID, entity description>
[0131] The entity category ID is a foreign key, referenced from the entity category table;
[0132] (2) Entity category: The name of the description type, used to determine the category of the entity and the constraints on the scope of the entity;
[0133] Model 2: Entity category type <category ID, category name, category constraint>
[0134] (3) Relationship type: The actual category that describes the relationship between entities. The relationship type includes the four most basic relationships in the actual category description. Inference relationships for reasoning or describing stronger logic can be added as needed, and the relationship type can be extended;
[0135] Model 3: Relationship type <relationship type ID, relationship type name, relationship type description>
[0136] (4) Entity relationship: Describes the relationship between entities in the entity table. The relationship between entities is the knowledge manifestation of the actual category. The knowledge describing facts in the actual category is reflected through the relationships of various actual category entities. The more relationship types, the richer the relationships between entities and the richer the actual category knowledge;
[0137] Model 4: Entity relationship <ID, main entity ID, guest entity ID, relationship type ID, relationship value, relationship description>
[0138] In the process of semi - automatically constructing the actual category knowledge spectrum, the connection between e - commerce platform data is improved.
[0139] II. Semantic Understanding of Questions on E - commerce Platforms
[0140] The questions raised in this application are subjected to word segmentation, part - of - speech tagging, named entity recognition, and keyword extraction, and finally the logical expression of the questions is obtained to search for results in the knowledge spectrum.
[0141] (1) Word Segmentation System Based on E - commerce Actual Category Knowledge Spectrum
[0142] Adopt a word - segmentation system for morphological analysis based on the e - commerce actual category knowledge spectrum, so that the system can not only accurately segment words but also well consider the needs of users.
[0143] (1) Problems with Simply Adopting a Certain Word - Segmentation Method
[0144] For the dictionary - matching - oriented method, since it needs to additionally construct a dictionary tree, the word segmentation is not comprehensive and accurate enough, and the efficiency is not high; for an e - commerce - oriented question - answering system, if simply using morphological analysis, some problems will also occur: 1) The lexical division is too fine; 2) The division of professional vocabulary is inaccurate; 3) The problem of identifying new words.
[0145] (2) The Solution of This Application
[0146] The word segmentation results of lexical analysis cannot recognize nouns in some professional fields. To solve this problem, we have added a user-defined dictionary, added the user's dictionary into the lexical analysis, and gave priority to recognition. The specific process is as follows: Figure 1 shown.
[0147] The working process of the above flowchart is summarized as follows:
[0148] Step 1: Scan the entity data table of the entity knowledge spectrum, obtain the proper nouns in it, and form a dictionary. All the words in the entity table are nouns, and the word part of speech in the dictionary is noun;
[0149] Step 2: Add the dictionary from step 1 to the lexical analysis;
[0150] Step 3: Use new lexical analysis to perform word segmentation and part-of-speech tagging to obtain word segmentation and part-of-speech tags that meet the needs of the e-commerce platform.
[0151] (II) Syntactic Analysis of Question Sentences
[0152] Obtain the subject-predicate-object structure and the relationship between them in the question sentence. In the case where the interrogative pronoun acts as the subject, object and attributive, when the interrogative pronoun acts as the subject, the predicate verb follows it, the distance between the interrogative pronoun and the predicate verb is 1 (i.e., close to each other), when the interrogative pronoun acts as the object, it is at the end of the question sentence, and when the interrogative pronoun acts as the attributive, the corresponding judgment needs to be made according to the position information of the interrogative pronoun and the predicate verb. The above process is described in detail as follows:
[0153] Step 1: Store the segmentation and tagging results in the lexical analysis into an array;
[0154] Step 2: Find the interrogative pronoun. There is only one interrogative pronoun in a question sentence.
[0155] Step 3: Find the predicate verb: In a question sentence, the predicate verb is closest to the interrogative pronoun;
[0156] Step 4: Analyze the subject and object parts:
[0157] (1) The interrogative pronoun is at the end of the sentence. In this case, the interrogative pronoun acts as the object, and the noun before the predicate verb acts as the characteristic subject;
[0158] (2) The interrogative pronoun is not at the end of the sentence, and the predicate verb follows the interrogative pronoun. In this case, the interrogative pronoun serves as the subject, and the noun following the predicate verb serves as the characteristic object.
[0159] (3) When the interrogative pronoun is not at the end of the sentence and is not adjacent to the predicate verb, the interrogative pronoun generally serves as an attributive, which can be divided into two cases:
[0160] 1) The interrogative pronoun comes before the predicate verb: the noun between the interrogative pronoun and the predicate verb is used as the characteristic subject item. If there is no noun between the interrogative pronoun and the predicate verb, the noun after the predicate verb is used as the characteristic object item.
[0161] 2) The interrogative pronoun comes after the predicate verb: The noun after the interrogative pronoun is taken as the characteristic object item. If there is no noun after the interrogative pronoun, the noun before the predicate verb is taken as the characteristic subject item.
[0162] 3. Extraction of answers
[0163] (I) Establishment of question model based on question classification
[0164] Combined with the construction of the real class database, common question models are summarized, and the question model parsing and matching methods are used to understand the questions; this application constructs a question model based on the search purpose of e-commerce platform users, the user's inquiry method, and the real class knowledge spectrum stored vertically in the relational database.
[0165] (1) Question model based on question pattern classification
[0166] Combining the types of interrogative pronouns in interrogative sentences and the common question patterns on e-commerce platforms, we can summarize the following: Figure 2 The question model is increased as needed in actual applications. n represents the noun in the word segmentation result, a represents the adjective in the word segmentation result; {} represents the semantic block in the question, [] represents the optional part, the non-semantic necessary component, | represents the relationship between the question participle or;
[0167] Summarize and analyze user questions, and adopt certain strategies to establish as many question models as possible, building a dynamic and complete question model library that covers most user search expressions. In addition, the question model can be expanded, and the retrieval model can be dynamically constructed based on the expanded model.
[0168] (2) Question model recognition
[0169] Suppose the question to be identified is S, and the system question model set is M = {M1…Mn}. The process is to find the question model Ms that best suits S from M. The question model recognition process used includes two steps: removing the semantic block part of S to obtain the sentence structure Si of question S; calculating the similarity between Mi and Si, and finally selecting the question model corresponding to the maximum similarity as the sentence structure of S. If the maximum similarity is less than a set critical value, the match fails, and the sentence S is not a question or the semantic understanding fails.
[0170] 1) Analysis of question sentence structure
[0171] For the interrogative pronoun semantic block: combine the word segmentation result of the lexical analysis with the predetermined interrogative pronoun library to search and extract the interrogative pronoun semantic block in the question sentence;
[0172] For feature words (target semantic blocks): feature words are the targets to be retrieved, which are the semantics of the user's inquiry. Feature words are near interrogative pronouns or predicates, i.e., subjects, objects or attributes.
[0173] For the retrieval subject (subject semantic block) of the question sentence: it is a noun or a noun phrase. This application directly uses the segmentation result to represent it in the form of variables. During the retrieval, the variable components in the question sentence are identified through the real class knowledge spectrum, and the retrieval is constructed according to the question sentence model;
[0174] Through the above process, the question is represented as a question model, in which the part without feature words is represented by parameters. The question is finally converted into a retrieval of the real class, which needs to be matched according to the existing model. Before that, it is necessary to find the most suitable model in the question model library and find the model that is most suitable for the user's question model from the question model library by calculating the similarity between the sentence pattern of the user's question and the model in the question model library.
[0175] 2) Question model approximation calculation
[0176] After obtaining the sentence structure Si, it is identified whether the structure matches the corresponding question model Mi, and the sentence similarity is used to calculate the similarity between the two to achieve matching recognition of the sentence structure Si and the question model Mi.
[0177] Question S generates sentence structure Si using question model Mi as template. (Mi, Si) is a set of symbols consisting of phrases and tokens representing parts of speech. The model contains dynamic semantic blocks and feature semantic blocks. The similarity between question model Mi and question S is represented by the similarity between Mi and sentence structure Si, which includes three parts:
[0178] 1) Model length approximation: Length refers to the number of semantic blocks. Assuming the length of the sentence structure Si is m and the length of the question model Mi is n, the approximation SimLen between the user question S and the sentence model M is calculated using Formula 1:
[0179]
[0180] 2) Sentence component similarity: The dot product of vectors is introduced for calculation. Assume that the number of semantic blocks of sentence structure Si is m (i.e., the length is m), the number of semantic blocks of question model Mi is n (i.e., the length is n), and the weight vectors of each component (semantic block) in Si are: Ws = (ws1, ws2, ..., ws m}, the weight vectors of each component (semantic block) in Mi are: Wm={wm1,wm2,…,wmn}, where wm1+wm2+…+wm n =1, each value is manually determined according to the importance of each component of the question when constructing the question model;
[0181] For each value in Ws, it is the approximation degree of each semantic block in Si and each semantic component in Mi. If each component in Si exists in Mi, the corresponding ws i =1, otherwise it is considered non-existent. When m is not equal to n, the shorter vector is taken, and the component approximation SimTerm of the sentence is calculated using formula 2:
[0182] SimTerm=Ws*Wm Formula 2
[0183] Formula 2 is the dot product of the two vectors Ws and Wm;
[0184] 3) Sequence similarity: Compare with each semantic block of the question model Mi, record the number of different positions of each semantic block component in the sentence structure Si in Mi and Si, and record the number of reversed order as num;
[0185] The sequence similarity SimOrder is calculated using formula 3:
[0186]
[0187] In summary, the total sentence similarity Sim is calculated. The total sentence similarity is a linear combination of model length similarity, sentence component similarity, and sequence similarity:
[0188] Sim=k1*SimLen+k2*SimTerm+k3*SimOrder Formula 4
[0189] In Formula 4: k1, k2, k3 are the weights of the model length approximation SimLen, the sentence component approximation SimTerm, and the sequence approximation SimOrder, respectively, indicating the weight of each approximation in the total approximation, and k1, k2, k3 satisfy k1+k2+k3=1, then Sim∈[0,1], the higher the Sim value, the more the question S matches a certain question model Mi;
[0190] Set k1=0.7, k2=0.2, k3=0.1 to increase the adaptability of the question model and introduce semantic components into the real class knowledge spectrum for retrieval and reasoning as much as possible.
[0191] A brief description of the above process is as follows:
[0192] Step 1: According to the results of syntactic analysis, select the sentence type classification of the question;
[0193] Step 2: Extract the structure of the question: traverse the word segmentation structure, extract the noun and adjective parts in the question as parameters, and the parameterized question is the structure Si of the question;
[0194] Step 3: Calculate the similarity between the question structure and each question model in the category to which the question belongs, and select the optimal question model.
[0195] (II) Constructing search statements and generating answers
[0196] 1. Steps for searching in the real class knowledge spectrum
[0197] Step 1: Scan the question sentence, extract the variables in the question sentence model, and assign values to the variables in the model based on the best matching model and using the word segmentation structure;
[0198] Step 2: Find the real class type corresponding to the variable in the local knowledge spectrum, build a real class model in memory, and retrieve it;
[0199] 1) First, search the entity table, search for the entity type corresponding to each variable, search in the entity table, and after finding it, search for its entity type;
[0200] 2) If the variable cannot be found in the entity table, it may be a relational value. Then find the relational value field in the relational table and perform a coordinated search based on the entity type found in step 1 to find the corresponding entity. This entity is the search subject.
[0201] 3) Analyze the search terms, search for the subject found in step 2, search for the relevant features of the subject, and get the answer that needs to be returned;
[0202] 4) If one of the retrievals in step 1 or step 2 fails, the knowledge in the real class knowledge spectrum cannot answer the user's question and returns failure.
[0203] 2. Build the retrieval subject and its relationship model in memory
[0204] During the retrieval process, after scanning the entities, if there is only one concept or individual, it is determined that this concept or individual is the subject of the retrieval. At this time, the database is searched again, and the various relationships of the retrieval subject are mined through the relationship table of the retrieval entity.
[0205] If two or more concepts or individuals appear in the search statement, the semantics of the question is to find the relationship between the two concepts or individuals, and to retrieve and return the relationship or relationship value (constraint) in the relationship entity based on the two concepts or individuals.
[0206] 4. Build a question-answering system based on e-commerce platform categories
[0207] 1. System overall framework
[0208] (1) The question-answering system completes two tasks: question-answering processing and knowledge management. The question-answering processing module completes the entire process from accepting user questions, performing grammatical analysis and sentence understanding on the user's questions, to finally retrieving knowledge from the real-class knowledge spectrum and returning the answer, while knowledge management dynamically extracts real-class knowledge from the local e-commerce database.
[0209] (2) The workflow of the question-answering system: In terms of question-answering processing: When receiving a user's question, the system pre-processes the question by performing lexical analysis, word segmentation, and part-of-speech tagging. Then, the system extracts the components of the question, extracts the semantic blocks, generates the logical structure of the question, and uses this structure to match the model in the question model library to understand the question. Finally, for different question models, the system dynamically generates a search for the real class knowledge spectrum according to the extracted semantic parts, obtains the answer to the user's question and returns it. In terms of knowledge management: knowledge is extracted from the e-commerce database, modeled with real classes, and the data is stored in the real class knowledge database.
[0210] (II) Establishing a knowledge spectrum of real class knowledge
[0211] Automatically create and extract the real class method:
[0212] (1) Relational Model of Real Class Knowledge Storage Database
[0213] Most users of e-commerce platforms ask questions about product prices and product attributes. The relationship between the database of e-commerce platforms is as follows: Figure 3 As shown, the storage structure of the real class knowledge spectrum is as follows Figure 4 shown.
[0214] The real class knowledge spectrum breaks down each piece of data into the most basic elements, analyzes the relationship between these basic elements, and then forms semantic knowledge.
[0215] (2) Steps for automatically extracting real classes
[0216] 1) Set entity categories and relationship categories in the entity knowledge database: Entity categories are the collection of elements that appear in the entity class. The elements that appear in the entity class include: concepts, individuals, object attributes, and data attributes. Data attributes describe individual attributes and have specific values.
[0217] The relationship category describes the relationship between each element, including: ObjectPropertyOf: describes the relationship between a concept and its object property; DataPropertyOf: describes the relationship between an individual and its data property. In this case, in addition to the relationship between the two, it also includes the relationship value between the two; InstanceOf: describes the relationship between a concept and an individual. A specific product is an instance of a certain product category; SubClassOf: describes the subordinate relationship between concepts and concepts, and describes the subordinate relationship between product categories; PartOf: describes the relationship between concepts as a whole and as a part.
[0218] 2) Scan the product classification table, establish the top-level concept of the product classification, and store the top-level concept in the entity table in the real class knowledge spectrum. The category is the concept. The classification with a parent classification of 0 represents the top-level concept. If the parent classification is not 0, it is a subclassification. It is necessary to establish a relationship between the subclassification and the parent classification. The relationship type is SubClassOf;
[0219] 3) Scan the commodity attribute name table, store the attributes of the commodity classification into the entity table of the real class knowledge database, and the category is object attribute; at the same time, store the relationship between the commodity attribute and the commodity classification into the entity relationship data table of the real class knowledge database, and the relationship type is DataPropertyOf, and the relationship value is empty;
[0220] 4) Scan the product table, create individual products one by one, and store the individual products in the entity table. The entity type is individual. At the same time, establish a relationship between the individual product and its category. The relationship type is InstanceOf, and the relationship value is empty.
[0221] 5) Scan the commodity attribute value table, establish a relationship between the commodity individual and its attribute. The relationship type at this time is a DataPropertyOf relationship, and store the relationship value;
[0222] 6) For the SKU of the product, set it as the relationship between individuals and attributes;
[0223] Through the above steps, the product data table of the e-commerce platform is stored in the relational database in the form of organization of real class knowledge. The above relationship describes the knowledge of the real class.
[0224] (III) Question and Answer Processing System
[0225] It includes three parts: processing user questions, semantic parsing of questions and generation of answers.
[0226] (1) Processing of User Questions
[0227] The processing of question sentences includes word segmentation and question component extraction. The extraction of question components uses lexical analysis to perform word segmentation. After word segmentation, the word segmentation result is input into Stanford parse for syntactic analysis to obtain the subject, predicate and object sentence blocks.
[0228] 1) Add entities in the entity class knowledge spectrum into the lexical analysis user dictionary as nouns;
[0229] 2) Call lexical analysis to segment the user's question into words;
[0230] 3) Syntactic parsing: using the word segmentation results of the second step as input, extracting the sentence structure components of the subject, predicate and object;
[0231] (2) Semantic Analysis of Questions
[0232] Using the structure of the question extracted in the previous step, classify the questions and compare the similarity between the structural components of the questions and the question model. The steps are: extract the subject, retain the predicate and object as the feature words and structure; calculate the similarity between the question structure and the question model, and find the most suitable question model.
[0233] (3) Generation of answers
[0234] By using the results of word segmentation and building a real class model in the real class model, and through dependency syntax parsing, the noun subject in the user's question is the main semantic block of the question and the subject of question retrieval. After removing the interrogative pronoun, the object becomes the purpose of retrieval. Different question models have different ways of constructing sentences.
[0235] (IV) System performance
[0236] The question-answering system requires an evaluation mechanism to measure its performance. For this purpose, this application adopts an evaluation method for testing. First, a test set is established. The test set consists of manually summarized "question-model-answer pairs". The questions in the test set are asked to the question-answering system in turn, and the question-answering system is asked to match the question model and automatically give answers. Then the question model matched by the question-answering system and the returned answer are manually compared with the model and answer in the test set. The matching accuracy of the question model and the accuracy of the answer to the question can be obtained respectively, and the accuracy (precision) of the question-answering system can be calculated.
[0237] Assume that the number of test sets is N, the number of correct question models matched is M, when the correct question model is matched, the correct answer returned by the system is K, the total number of correct answers returned is K1, and the accuracy of question understanding is defined as P1, then P1 is expressed by formula 5:
[0238]
[0239] Define the accuracy of the question answering system as P2, then P2 is expressed by formula 6:
[0240]
[0241] At this time, P2 is the precision rate of the system, where K1 is the total number of correct answers, including the number of correct answers obtained when the user's question matches the wrong model.
[0242] Define the recall rate of the question answering system as P3, then P3 is expressed by formula 7:
[0243]
[0244] The recall rate reflects the number of correct answers that can be obtained when the question is matched correctly, and reflects the effectiveness of the system's retrieval algorithm.
[0245] In order to observe the performance of this question-answering system, we designed 50 "question-model-answer pairs" from two different question categories: the price of the product and other parameter characteristics of the product, and tested the system. The test results are as follows: Figure 5 As shown in the figure. N represents the number of test sets; M represents the number of correct question model matches; K represents the number of correct answers given by the question answering system when the question model matches correctly; K1 represents the total number of correct answers given by the question answering system; P1 represents the accuracy of question understanding; P2 represents the accuracy of the question answering system, which measures the accuracy (precision) of the retrieval algorithm; P3 represents the recall rate of the answer generated by the question answering system when the question understanding is correct.
[0246] from Figure 5 It can be seen that for different question types, in terms of price, due to its obvious characteristics, price belongs to the attributes of the product, so the matching accuracy of the model is higher than that of questions about product parameters, that is, the question-answering system has a better semantic understanding of questions about product attributes.
[0247] On the other hand, we can see that the precision of the system is very high. This is because the retrieval corresponding to the question model is fixed and designed correctly. Only the semantic block has an impact on the question, so the precision of the answer generation is high.
[0248] The question-and-answer system can reduce manpower costs to a large extent and alleviate the burden of manual customer service.
Claims
1. An intelligent customer service question-and-answer system for e-commerce platforms that accurately understands semantics, characterized by: The analysis of the question adopts the understanding of the semantics of the question, and the information retrieval uses the results of the question analysis to find relevant knowledge from the knowledge spectrum. The generation of the answer generates answers to the user based on the retrieved knowledge; the real class structure is used to extract knowledge, and an automatic question-answering system based on the real class of the e-commerce platform is constructed, which consists of three parts: the construction of the e-commerce real class knowledge spectrum, the semantic understanding of the e-commerce platform question, and the extraction of the answer; (1) Construction of e-commerce entity knowledge spectrum: including the storage and structure of entity knowledge spectrum and the mining of entity: 1) When storing entity, a method of using relational database to store entity in vertical mode is established, in which concepts and individuals in entity are stored as entities, and various associations between two elements in entity are stored in the form of relationships, including attributes and inclusions, through records in relational tables, i.e., vertical storage mode of entity; 2) By constructing the database structure of e-commerce platform, the knowledge inquired by users is mined in various data tables of the database. The format of the data table is fixed. By parsing each field of each data in the data table, entity information is extracted, and an automatic maintenance and update mechanism of entity is established; (2) Semantic understanding of questions on e-commerce platforms: In question processing, word segmentation is first performed, and then the question is parsed syntactically based on the word segmentation results. The word segmentation adopts the lexical analysis method that integrates the real category knowledge spectrum. The concepts and individual noun semantics in the real category knowledge spectrum are added to the lexical analysis to improve the accuracy of word segmentation. In addition, the commonly used question models on e-commerce platforms are summarized, and the syntactic parsing method of question words in different positions is constructed to parse the subject, predicate and object components of the question, and then obtain the semantic classification of the question. (3) Answer extraction: Construct a similarity calculation method based on the question model: extract the sentence structure of the question through the word segmentation results. After classifying the question, calculate the similarity with the question model in the classification in terms of length, components, and sequence. For different question models, construct SQL statements to extract retrieval results from the real class library to obtain the answer; (4) Build a question-and-answer system based on the real category of the e-commerce platform: Build the overall framework of the system, run it on the .netframework based on the C# language, establish a knowledge spectrum of real category knowledge, and the question-and-answer processing system answers users' questions on the specific e-commerce platform; Storage of e-commerce platform entities: Four data tables are used to store e-commerce platform entities. Their structures and models are as follows: 1) Entity table: All noun terms that appear on the e-commerce platform are considered identifiable entities. The types of entities include concepts, instances, attributes, and attribute constraints. Attributes include data attributes and object attributes, which are consistent with the attributes in Protege. Model 1: entity entity<entity ID, entity name, entity category ID, entity description> The entity category ID is a foreign key, referenced from the entity category table; 2) Entity category: a name describing the type, used to determine the category of the entity and the constraints on the scope of the entity; Model 2: Entity category type <category ID, category name, category constraint> 3) Relationship type: A kind of entity class that describes the relationships between entities. The relationship type includes the four most basic relationships in the entity class description. Inferential relationships can be added as needed for reasoning or describing stronger logic, and the relationship type can be extended; Model 3: Relationship type <Relationship type ID, Relationship type name, Relationship type description> 4) Entity relationship: Describes the relationships between entities in the entity table. The relationships between entities are the knowledge manifestations of the entity class. The knowledge describing facts in the entity class is reflected through the relationships of various entity class entities. The more relationship types, the richer the entity class knowledge; Model 4: Entity relationship <ID, Main entity ID, Guest entity ID, Relationship type ID, Relationship value, Relationship description>; Establish an entity class knowledge spectrum: Methods for automatically establishing and extracting entity classes: (I) Relational model of the entity class knowledge storage database The entity class knowledge spectrum splits each piece of data into the most basic elements, analyzes the relationships between these basic elements, and then forms semantic knowledge; (II) Steps for automatically extracting entity classes a) Set the entity categories and relationship categories in the entity class knowledge database: The entity category is the set of elements that appear in the entity class. The elements that appear in the entity class include: concepts, individuals, object properties, data properties. Data properties describe the properties of individuals and have specific values; The relationship category describes the relationships between various elements, including: ObjectPropertyOf: Describes the relationship between a concept and its object property; DataPropertyOf: Describes the relationship between an individual and its data property. At this time, in addition to the relationship between the two, it also includes the relationship value between the two; InstanceOf: Describes the relationship between a concept and an individual. A specific commodity is an instance of a certain commodity classification; SubClassOf: Describes the subordinate relationship between concepts and concepts, and describes the subordinate relationship between commodity classifications; PartOf: Describes the relationship between the whole and the part between concepts and concepts; b) Scan the commodity classification table, establish the top-level concepts of commodity classification, and store the top-level concepts in the entity table in the entity class knowledge spectrum. The category is a concept. For a classification with a parent classification of 0, it represents the top-level concept. If the parent classification is not 0, it is a sub-classification, and the relationship between the sub-classification and the parent classification needs to be established. The relationship type is SubClassOf; c) Scan the commodity attribute name table, store the attributes of the commodity classification in the entity table of the entity class knowledge database, and the category is the object property; at the same time, store the relationship between the commodity attribute and the commodity classification in the entity relationship data table of the entity class knowledge database, and the relationship type is DataPropertyOf, and the relationship value is empty; d) Scan the commodity table, establish individuals of the commodity item by item, and store the individuals of the commodity in the entity table. The entity type is an individual; at the same time, establish the relationship between the individual of the commodity and its affiliated classification, and the relationship type is InstanceOf, and the relationship value is empty; e) Scan the commodity attribute value table, establish the relationship between the commodity individual and its attributes. At this time, the relationship type is the relationship of DataPropertyOf, and store the relationship value; f) For the SKU of the product, set it as the relationship between the individual and the attribute; Through the above steps, the product data table of the e-commerce platform is stored in the relational database in the form of organization of real class knowledge. The above relationship describes the knowledge of the real class.
2. The intelligent customer service question-and-answer system for an e-commerce platform that accurately understands semantics according to claim 1, characterized in that: Construction of e-commerce entity knowledge spectrum and extraction of entity categories: using relational database to store entity categories, using triples as the basic unit of knowledge, and storing OWL resources through vertical mode; The knowledge in the question-answering system comes from the e-commerce platform database to which the question-answering system is attached. The construction of the real category knowledge spectrum of the e-commerce platform is achieved by analyzing the specific e-commerce platform database, constructing real categories from it, and storing the real category data in the database.
3. The intelligent customer service question-and-answer system for an e-commerce platform with accurate semantic understanding according to claim 1 is characterized in that: E-commerce platform data analysis: (1) According to the classification hierarchy, the categories of goods are defined as Class, where the parent category ID is 0 and is the top-level class by default. Other categories use rdfs:subClassOf to declare the inheritance relationship of concepts according to the inheritance relationship. (2) Propertyof relationship of type attributes; (3) The attribute values of commodities are properties, which are attributes of instances; (4) A specific product record is an instance, and the relationship between an instance and a concept is InstanceOf; (5) There is a relationship of inheritance and derivation between the categories of commodities.
4. The intelligent customer service question-and-answer system for an e-commerce platform that accurately understands semantics according to claim 1, characterized in that: Word segmentation system based on e-commerce entity knowledge spectrum: add user-defined dictionary, add user's dictionary into lexical analysis, and give priority to recognition. The process is summarized as follows: Step 1: Scan the entity data table of the entity knowledge spectrum, obtain the proper nouns in it, and form a dictionary. All the words in the entity table are nouns, and the word part of speech in the dictionary is noun; Step 2: Add the dictionary from step 1 to the lexical analysis; Step 3: Use new lexical analysis to perform word segmentation and part-of-speech tagging to obtain word segmentation and part-of-speech tags that meet the needs of the e-commerce platform.
5. The intelligent customer service question-and-answer system for an e-commerce platform that accurately understands semantics according to claim 1, characterized in that: Question sentence syntactic analysis: Get the subject-predicate-object structure and the relationship between them in the question sentence. When the interrogative pronoun is used as the subject, object and attributive, the interrogative pronoun is followed by the predicate verb when it is used as the subject, and the distance between the interrogative pronoun and the predicate verb is 1. When the interrogative pronoun is used as the object, it is at the end of the question sentence. When the interrogative pronoun is used as the attributive, the corresponding judgment needs to be made according to the position information of the interrogative pronoun and the predicate verb. The above process is described in detail as follows: Step 1: Store the segmentation and tagging results in the lexical analysis into an array; Step 2: Find the interrogative pronoun. There is only one interrogative pronoun in a question sentence. Step 3: Find the predicate verb: In a question sentence, the predicate verb is closest to the interrogative pronoun; Step 4: Analyze the subject and object parts: (1) The interrogative pronoun is at the end of the sentence. In this case, the interrogative pronoun acts as the object, and the noun before the predicate verb acts as the characteristic subject; (2) The interrogative pronoun is not at the end of the sentence, and the predicate verb follows the interrogative pronoun. In this case, the interrogative pronoun serves as the subject, and the noun following the predicate verb serves as the characteristic object. (3) When the interrogative pronoun is not at the end of the sentence and is not adjacent to the predicate verb, the interrogative pronoun generally serves as an attributive, which can be divided into two cases: 1) The interrogative pronoun comes before the predicate verb: the noun between the interrogative pronoun and the predicate verb is used as the characteristic subject item. If there is no noun between the interrogative pronoun and the predicate verb, the noun after the predicate verb is used as the characteristic object item. 2) The interrogative pronoun comes after the predicate verb: The noun after the interrogative pronoun is taken as the characteristic object item. If there is no noun after the interrogative pronoun, the noun before the predicate verb is taken as the characteristic subject item.
6. The e-commerce platform intelligent customer service question-answering system with accurate semantic understanding according to claim 1 is characterized in that: Establishment of a question model based on question classification: Combined with the construction of a real class database, common question models are summarized, and question model parsing and matching methods are used to understand questions; this application constructs a question model based on the search purpose of e-commerce platform users, the user's inquiry method, and the real class knowledge spectrum stored vertically in the relational database.
7. The e-commerce platform intelligent customer service question-answering system with accurate semantic understanding according to claim 1 is characterized in that: Question model recognition: Let the question to be recognized be S, and the system question model set be M = {M1…Mn}. Find the question model Ms that best matches S from M. The question model recognition process used includes two steps: remove the semantic block part of S to obtain the sentence structure Si of question S; calculate the approximation between Mi and Si, and finally select the question model corresponding to the maximum approximation as the sentence structure of S. If the maximum approximation is less than a set critical value, the match fails, and the sentence S is not a question or the semantic understanding fails. 1) Analysis of question sentence structure For the interrogative pronoun semantic block: combine the word segmentation result of the lexical analysis with the predetermined interrogative pronoun library to search and extract the interrogative pronoun semantic block in the question sentence; For feature words: feature words are the target to be searched, which are the semantics of the user's inquiry. Feature words are near interrogative pronouns or predicates, i.e., subjects, objects or attributes. For the search subject of the question sentence: it is a noun or a noun phrase. This application directly uses the segmentation result to represent it in the form of variables. During the search, the variable components in the question sentence are identified through the real class knowledge spectrum, and the search is constructed according to the question sentence model; Through the above process, the question is represented as a question model, in which the part without the feature words is represented by parameters. The question is finally converted into a retrieval of the real class, which needs to be matched according to the existing model. Before that, it is necessary to find the most suitable model in the question model library, find the model that best matches the user's question model from the question model library, and calculate the similarity between the sentence pattern of the user's question and the model in the question model library; 2) Question model approximation calculation After obtaining the sentence structure Si, identify whether the structure matches the corresponding question model Mi, use sentence similarity to calculate the similarity between the two, and achieve matching recognition of the sentence structure Si and the question model Mi; Question S generates sentence structure Si using question model Mi as template. (Mi, Si) is a set of symbols consisting of phrases and tokens representing parts of speech. The model contains dynamic semantic blocks and feature semantic blocks. The similarity between question model Mi and question S is represented by the similarity between Mi and sentence structure Si, which includes three parts: 1) Model length approximation: Length refers to the number of semantic blocks. Assuming the length of the sentence structure Si is m and the length of the question model Mi is n, the approximation SimLen between the user question S and the sentence model M is calculated using formula 1: 2)) Sentence component approximation: The dot product of vectors is introduced for calculation. Assume that the number of semantic blocks of sentence structure Si is m (i.e., the length is m), the number of semantic blocks of question model Mi is n (i.e., the length is n), and the weight vectors of each component (semantic block) in Si are: Ws = (ws1, ws2, ..., ws m }, the weight vectors of each component (semantic block) in Mi are: Wm={wm1,wm2,…,wm n }, where wm1+wm2+…+wm n =1, each value is determined manually when constructing the question model according to the importance of each component of the question; For each value in Ws, it is the approximation degree of each semantic block in Si and each semantic component in Mi. If each component in Si exists in Mi, the corresponding ws i =1, otherwise it is considered non-existent. When m is not equal to n, the shorter vector is taken, and the component approximation SimTerm of the sentence is calculated using formula 2: SimTerm=Ws*Wm Formula 2 Formula 2 is the dot product of the two vectors Ws and Wm; 3) Sequence similarity: Compare with each semantic block of the question model Mi, record the number of positions of each semantic block component in the sentence structure Si that are different in Mi and Si, and record the number of reversed order as num; The sequence similarity SimOrder is calculated using formula 3: In summary, the total sentence similarity Sim is calculated. The total sentence similarity is a linear combination of model length similarity, sentence component similarity, and sequence similarity: Sim=k1*SimLen+k2*SimTerm+k3*SimOrder Formula 4 In Formula 4: k1, k2, k3 are the weights of the model length approximation SimLen, the sentence component approximation SimTerm, and the sequence approximation SimOrder, respectively, indicating the weight of each approximation in the total approximation, and k1, k2, k3 satisfy k1+k2+k3=1, then Sim∈[0,1], the higher the Sim value, the more the question S matches a certain question model Mi; Set k1=0.7, k2=0.2, k3=0.1 to increase the adaptability of the question model and introduce semantic components into the real class knowledge spectrum for retrieval and reasoning as much as possible; A brief description of the above process is as follows: Step 1: According to the results of syntactic analysis, select the sentence type classification of the question; Step 2: Extract the structure of the question: traverse the word segmentation structure, extract the noun and adjective parts in the question as parameters, and the parameterized question is the structure Si of the question; Step 3: Calculate the similarity between the question structure and each question model in the category to which the question belongs, and select the optimal question model.
8. The intelligent customer service question-and-answer system for an e-commerce platform with accurate semantic understanding according to claim 1, characterized in that: Construct search statements and generate answers:
1. Steps for searching in the real class knowledge spectrum Step 1: Scan the question sentence, extract the variables in the question sentence model, and assign values to the variables in the model based on the best matching model and using the word segmentation structure; Step 2: Find the real class type corresponding to the variable in the local knowledge spectrum, build a real class model in memory, and retrieve it; 1) First, search the entity table, search for the entity type corresponding to each variable, search in the entity table, and after finding it, search for its entity type; 2) For those that cannot be found in the entity table, the relationship value field is searched in the relationship table, and the corresponding entity is found according to the entity type found in step 1. This entity is the search subject; 3) Analyze the search terms, search for the subject found in step 2, search for the relevant features of the subject, and get the answer that needs to be returned; 4) If one of the retrievals in step 1 or step 2 fails, the knowledge in the real class knowledge spectrum cannot answer the user's question and returns failure; 2. Build the retrieval subject and its relationship model in memory In the retrieval process, after scanning the entities, if there is only one concept or individual, it is determined that this concept or individual is the subject of the retrieval. At this time, the database is searched again, and the various relationships of the retrieval subject are mined through the relationship table of the retrieval entity; If two or more concepts or individuals appear in the search statement, the semantics of the question is to find the relationship between the two concepts or individuals, and to retrieve and return the relationship or relationship value in the relationship entity based on the two concepts or individuals.
