Artificial intelligence-based conversation processing method, device, equipment, and medium

By constructing an undirected graph model of user characteristics and corpus characteristics, combined with neural network training, the problem of the lack of multi-dimensional information connection of recommendation models in the existing technology is solved, and more accurate corpus recommendation is achieved.

CN115292464BActive Publication Date: 2025-08-19CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210949283.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2025-08-19
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

The existing insurance sales recommendation model lacks information links between multi-dimensional complex structures, resulting in low accuracy in recommendation of discourse corpus.

Method used

By obtaining the sequence features of user characteristics, corpus characteristics and access order, a positive and negative sample undirected graph is constructed, and a neural network model is trained to minimize the triangle area and difference value, and a neural network model is generated for the recommended neural network model.

Benefits of technology

It improves the accuracy of corpus recommendations, comprehensively considers the multi-faceted relationship between users and corpus, and improves the recommendation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115292464B_ABST
    Figure CN115292464B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based conversation processing method, apparatus, device, and medium. The present invention constructs a positive sample undirected graph and a negative sample undirected graph by acquiring user features, corpus features, and sequence features of a user in any conversation; uses the positive sample undirected graph and the negative sample undirected graph generated by each conversation in a conversation training set as a sample set, calculates the sum of the areas of all triangles in all positive sample undirected graphs and the sum of the areas of all triangles in all negative sample undirected graphs in the sample set; uses minimizing the difference between the sums of the two areas as a training condition, trains a preset neural network model, and obtains a trained neural network model. The trained neural network model is used to output a target corpus based on the target user features of the target user in the conversation to be processed, thereby improving the accuracy of corpus recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based conversation processing method, device, equipment, and medium. Background Art

[0002] The insurance sales process often requires answering customer questions and recommending relevant knowledge. Traditional methods rely on the insurance agent's own experience, lack automation, and are inefficient. With the recent introduction of machine learning and deep learning methods to the industry, systems often assist in recommending insurance knowledge through collaborative filtering and multi-layer neural networks (such as the Wide & Deep series of models).

[0003] Existing methods can, to a certain extent, process various features related to users, knowledge corpora, and access records, and thus automatically make recommendations. However, existing methods generally assume that users and corpora are independent objects, and use this to design and train models for recommendations. Existing methods build convolutional neural network models based on the similarity between text keywords. This method uses a text corpus and the aforementioned convolutional neural network model structure to train the convolutional neural network model, and finally uses this neural network model for automatic question answering. This method only considers the similarity between texts and lacks the information connection between multi-dimensional complex structures, which reduces the accuracy of dialogue corpus recommendations achieved through the model. Summary of the Invention

[0004] Based on this, it is necessary to provide an artificial intelligence-based conversation processing method, device, equipment and medium to address the above technical problems, so as to solve the problem that the recommendation model of the existing technology lacks information connection between multi-dimensional complex structures, resulting in low accuracy of conversation material recommendation achieved through the model.

[0005] In a first aspect, an embodiment of the present invention provides an artificial intelligence-based conversation processing method, the artificial intelligence-based conversation processing method comprising:

[0006] Obtain the user features of the user in any session, the corpus features of each of the N corpora accessed by the user, and the sequence features representing the order in which the user accesses the N corpora, where N is an integer greater than 1;

[0007] The user features in the session are regarded as first-class vertices, and the N corpus features are regarded as N second-class vertices respectively. All the second-class vertices are sequentially connected according to the order represented in the sequence features, and the first-class vertices are connected to all the second-class vertices to obtain a positive sample undirected graph corresponding to the session;

[0008] Generating a random order for the N corpora, sequentially connecting all the second-category vertices according to the random order, and connecting the first-category vertices with all the second-category vertices to obtain a negative sample undirected graph corresponding to the session, wherein the length of the side connecting any two vertices is obtained by processing the features of the two vertices using a preset neural network model;

[0009] Taking the positive sample undirected graph and the negative sample undirected graph generated by each session in the session training set as the sample set, calculate the sum of the areas of all triangles in all positive sample undirected graphs and the sum of the areas of all triangles in all negative sample undirected graphs in the sample set;

[0010] Minimizing the difference between the sums of the two areas is used as a training condition to train the preset neural network model to obtain a trained neural network model. The trained neural network model is used to output the target corpus according to the target user features of the target user in the session to be processed.

[0011] In a second aspect, an embodiment of the present invention provides an insurance corpus recommendation device based on an undirected graph, the insurance corpus recommendation device based on an undirected graph comprising:

[0012] A feature acquisition module is used to acquire the user features of the user in any session, the corpus features of each of the N corpora accessed, and the sequence features representing the order in which the user accesses the N corpora, where N is an integer greater than 1;

[0013] A positive sample construction module is configured to use the user features in the session as first-class vertices, use the N corpus features as N second-class vertices, connect all the second-class vertices in sequence according to the order represented in the sequence features, and connect the first-class vertices with all the second-class vertices to obtain a positive sample undirected graph corresponding to the session;

[0014] A negative sample construction module is configured to generate a random order for the N corpora, connect all the second-category vertices in sequence according to the random order, and connect the first-category vertices with all the second-category vertices to obtain a negative sample undirected graph corresponding to the session, wherein the length of the side connecting any two vertices is obtained by processing the features of the two vertices using a preset neural network model;

[0015] An area calculation module is configured to use the positive sample undirected graph and the negative sample undirected graph generated by each session in the session training set as a sample set, and calculate the sum of the areas of all triangles in all positive sample undirected graphs and the sum of the areas of all triangles in all negative sample undirected graphs in the sample set;

[0016] The corpus output module is used to train the preset neural network model by minimizing the difference between the sums of the two areas as a training condition to obtain a trained neural network model. The trained neural network model is used to output the target corpus according to the target user characteristics of the target user in the session to be processed.

[0017] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the artificial intelligence-based conversation processing method as described in the first aspect is implemented.

[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the artificial intelligence-based conversation processing method as described in the first aspect is implemented.

[0019] Compared with the prior art, the present invention has the following beneficial effects:

[0020] The artificial intelligence-based conversation processing method of the present invention obtains user features, corpus features and sequence features representing the order in which users access the corpus in the user conversation, constructs a positive sample undirected graph and a negative sample undirected graph, uses the positive sample undirected graph and the negative sample undirected graph generated by each conversation in the conversation training set as a sample set, and trains a preset neural network model until the sum of the areas of all triangles in the positive sample undirected graph and the sum of the areas of all triangles in the negative sample undirected graph in the training set is minimized, thereby obtaining a trained neural network model, and outputting the target corpus through the trained neural network model according to the target user features of the target user; in the process of generating and training the undirected graph structure of the present invention, the association relationship presented in the existing log and the characteristics of the corpus and the user themselves are combined, and the influence of multiple factors on the recommendation effect is comprehensively considered, thereby improving the accuracy of corpus recommendation. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 This is a schematic diagram of an application environment of an artificial intelligence-based conversation processing method provided in the first embodiment of the present invention;

[0023] Figure 2This is a flow chart of an artificial intelligence-based conversation processing method provided in the first embodiment of the present invention;

[0024] Figure 3 This is a schematic diagram of the structure of an undirected graph provided by the first embodiment of the present invention;

[0025] Figure 4 This is a structural diagram of an artificial intelligence-based conversation processing device provided in Embodiment 2 of the present invention;

[0026] Figure 5 This is a structural diagram of a computer device provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0027] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration and not limitation to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present invention with unnecessary detail.

[0028] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0029] It will also be understood that the term "and / or" used in the present description and appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0030] As used in the present specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0031] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0032] References to "one embodiment" or "some embodiments" in the present specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present invention. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0033] Embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0034] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0035] It should be understood that the order of execution of the steps in the following embodiments does not necessarily mean the order in which they are executed. The order in which each process is executed should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0036] In order to illustrate the technical solution of the present invention, specific embodiments are provided below.

[0037] The first embodiment of the present invention provides an artificial intelligence-based conversation processing method, which can be applied in the following situations: Figure 1 The application environment is an artificial intelligence-based conversation processing environment in which a client communicates with a server. The client includes, but is not limited to, palmtop computers, desktop computers, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, cloud clients, and personal digital assistants (PDAs). The server can be implemented as a standalone server or a server cluster consisting of multiple servers.

[0038] See also Figure 2 , is a flow chart of a conversation processing method based on artificial intelligence provided by the first embodiment of the present invention. The conversation processing method based on artificial intelligence can be applied to Figure 1 The client in the corresponding client connects to the server through the preset application programming interface (API). The local client obtains the access logs of all users through the central server, extracts the user's session records through the access logs, obtains user features, corpus features, and sequence features that represent the order in which users access the corpus, and builds a neural network model for outputting the target corpus. Figure 2 As shown, the above-mentioned artificial intelligence-based conversation processing method may include the following steps:

[0039] Step S201 : obtaining the user features of the user in any session, the corpus features of each of the N corpora accessed, and the sequence features representing the order in which the user accesses the N corpora.

[0040] The application scenario of this embodiment is user conversation, which can automatically recommend corpus that the user wants or meets the user's needs. For example, during an insurance business conversation, the user may ask some insurance-related questions or search for some insurance-related information. At this time, the computer can accurately recommend answers to related questions or search information to the user based on the user's characteristics through a neural network model.

[0041] In this embodiment, based on the above scenario, user access logs are obtained, and user features of the user in the user session, corpus features of N corpora, and access time corresponding to accessing the N corpora are extracted based on the access logs. The sequence features of the order in which the user accesses the N corpora are determined based on the access time, where N is an integer greater than 1.

[0042] Specifically, the access logs of all users are obtained. The access logs include the user information of all users, the relationship between all users' access to corpora, the order of access, the time, and the duration of access to each corpus. According to the time when users access N corpora, sequence features are constructed to characterize the order in which users access N corpora. According to the user information, user features such as age, gender, and occupation can be extracted. According to the detailed content of the corpora accessed by users, the corpus features of the N corpora can be extracted, such as information on insurance, claims, and beneficiaries in insurance business conversations, and the N corpora are numbered to distinguish the N corpora.

[0043] For example, the access log in an insurance business conversation scenario includes the conversation records of user Zhang San. Based on Zhang San's conversation records, it is extracted that Zhang San is a male and 35 years old. The above information can be used as the feature information of user Zhang San to constitute the feature vector of the user; based on the questions and answers and searched materials during the conversation, it is extracted that the corpus accessed by Zhang San includes words such as insurance, claims, and insurance. The above insurance, claims, and insurance can be used as the corpus features of the corpus accessed by Zhang San; during the conversation, Zhang San accessed more than one corpus in a certain order. Therefore, a sequence feature can be constructed based on the time when Zhang San accessed each corpus to characterize the order in which Zhang San accessed each corpus.

[0044] In step S202, the user features in the session are taken as first-class vertices, and the N corpus features are taken as N second-class vertices respectively. All the second-class vertices are connected in sequence according to the order represented in the sequence features, and the first-class vertices are connected to all the second-class vertices to obtain the positive sample undirected graph corresponding to the session.

[0045] An undirected graph, that is, a graph with no direction on the edges, is represented by the formula G=<V,E> , where V is a non-empty set called the vertex set, and E is a set of unordered two-tuples consisting of elements in V, called the edge set.

[0046] In this embodiment, the user characteristics of one user, the corpus characteristics of each of the N corpora accessed by the user, and the sequence characteristics are obtained in step S201; a positive sample undirected graph is constructed based on the above characteristics. The specific construction method is as follows:

[0047] Add the access time of the user to N corpora to N second-class vertices, traverse the access time in the N second-class vertices, connect the N second-class vertices in the order of their corresponding access time, and connect the first-class vertex with all the second-class vertices to obtain the positive sample undirected graph corresponding to the session.

[0048] See also Figure 3 , is an undirected graph provided by an embodiment of the present invention. The construction process of the undirected graph is as follows: user u i For corpus m i 、corpus m j and corpus m k Accessed by user u i The first thing to visit is the corpus m i , then access the corpus m j , the last accessed corpus is m k , then the connection order of the edges between the corpus vertices corresponding to the three corpora is: corpus vertex m i Connect the corpus vertex m as the starting point j , corpus vertex m j Reconnect corpus vertex mk , the last user vertex u i and corpus vertex m i 、corpus vertex m j and corpus vertex m k Connect them separately and get Figure 3 The positive sample undirected graph shown.

[0049] For all users in the access log and all corpora accessed by each user, an undirected graph including all users and all corpora accessed by each user can be constructed according to the above method.

[0050] Step S203 : Generate a random order for the N corpora, connect all the second-category vertices in sequence according to the random order, and connect the first-category vertices with all the second-category vertices to obtain a negative sample undirected graph corresponding to the conversation.

[0051] In this embodiment, the positive sample undirected graph of any user and the corpus accessed by the user is obtained through the above step S202. In order to train the neural network model later, it is also necessary to construct a negative sample undirected graph corresponding to the positive sample undirected graph. The process of constructing the negative sample undirected graph is as follows:

[0052] The sequence features used to characterize the order in which users access the corpus in step S202 are used to disrupt the various times in the sequence through a random function to regenerate a new random sequence. The various corpora accessed by the user are rearranged according to the newly generated sequence features, and then the various corpora accessed by the user are connected according to the newly generated sequence features to obtain a negative sample undirected graph.

[0053] Specifically, each access time in the sequence feature of the positive sample undirected graph is numbered, each number uniquely corresponds to each access time, the number sequence is randomly sorted using the rand function in the C language, the order of the corpus vertices in the positive sample undirected graph is rearranged according to the randomly sorted number sequence, and the N corpus vertices are connected in sequence according to the rearranged order of the corpus vertices to obtain the negative sample undirected graph.

[0054] For example, Figure 3 As shown, it is the user vertex u i and corpus vertex m i 、corpus vertex m j and corpus vertex m k The positive sample undirected graph is constructed, and the negative sample undirected graph is constructed based on the positive sample undirected graph: the corpus vertex m i Numbered 1, the corpus vertex m j Numbered 2, the corpus vertex m kThe number is 3, then the order of the corpus sequence features of the positive sample is 1, 2, 3. The order of the corpus sequence features of the positive sample is randomly disrupted by the rand random function of the C language, and the order is 1, 3, 2. Then, the order of the corresponding corpus vertex is m i 、m k 、m j , according to the randomly generated sequence, the corpus vertex m i 、corpus vertex m k 、corpus vertex m j Connect in sequence, user vertex u i Then respectively with the corpus vertex m i 、corpus vertex m k 、corpus vertex m j Connect them sequentially to obtain an undirected graph of negative samples.

[0055] The above steps construct the positive sample undirected graph and the negative sample undirected graph. Then, the weight of the edge between each vertex in the undirected graph is defined, that is, the length of the edge W ij =f(v i , v j ), where v i is the number of the vertex in the undirected graph, v j is the eigenvector of the vertex in the undirected graph, and the f function is the preset neural network model.

[0056] Among them, the length of the side connecting any two vertices is obtained by processing the features of the two vertices through a preset neural network model; specifically, the numbers and features of any two vertices are obtained, and the numbers and features of any two vertices are input into the preset neural network model. The preset neural network model calculates the correlation between any two vertices based on the initial weights, and represents the correlation as the length of the side between any two vertices.

[0057] In this embodiment, the length of the edge connecting the user vertex and the corpus vertex is negatively correlated with the probability that the user represented by the user vertex accesses the corpus represented by the corpus vertex, and the length of the edge connecting the corpus vertices is negatively correlated with the similarity between the corpuses represented by the corpus vertices; that is, the shorter the edge between the user vertex and the corpus vertex, the greater the probability that the user represented by the user vertex accesses the corpus represented by the corpus vertex, and the longer the edge between the user vertex and the corpus vertex, the smaller the probability that the user represented by the user vertex accesses the corpus represented by the corpus vertex; the shorter the edge connecting the corpus vertices, the higher the similarity between the corpuses represented by the corpus vertices, and the longer the edge connecting the corpus vertices, the lower the similarity between the corpuses represented by the corpus vertices.

[0058] Step S204 : Taking the positive sample undirected graph and the negative sample undirected graph generated by each session in the session training set as a sample set, the sum of the areas of all triangles in all positive sample undirected graphs and the sum of the areas of all triangles in all negative sample undirected graphs in the sample set are calculated.

[0059] In this embodiment, an undirected graph is constructed for all users and all corpora accessed by users. In the undirected graph, each vertex and edge forms a number of triangles. The probability of a user represented by a user vertex accessing the corpus represented by a corpus vertex is negatively correlated with the area of the triangle; for example, Figure 3 In the undirected graph, user u i In a session, the corpus m is accessed successively j and corpus m k The probability of i 、corpus vertex m j and corpus vertex m k The areas of the triangle formed by the three vertices are negatively correlated; that is, the smaller the distance between the triangle vertices, the smaller the area of the triangle, and the greater the probability of this access sequence appearing; the larger the distance between the triangle vertices, the larger the area of the triangle, and the smaller the probability of this access sequence appearing.

[0060] For the training sample set, the sample set contains triangles formed by several user vertices and corpus vertices. The sum of the areas of all triangles in the undirected graphs of all positive samples in the sample set is calculated, which is defined as the first area; the sum of the areas of all triangles in the undirected graphs of all negative samples in the sample set is calculated, which is defined as the second area.

[0061] In this embodiment, the area of a triangle can be calculated using Heron's formula, which is:

[0062]

[0063]

[0064] Where S is the area of the triangle, a is the length of the first side of the triangle, b is the length of the second side of the triangle, and c is the length of the third side of the triangle.

[0065] In step S205 , the preset neural network model is trained by minimizing the difference between the sums of the two areas as a training condition to obtain a trained neural network model. The trained neural network model is used to output the target corpus according to the target user features of the target user in the session to be processed.

[0066] In this embodiment, after obtaining the training sample set, the preset neural network model is trained, the weights of the preset neural network model are updated using the gradient descent method, the difference between the sum of the areas of all triangles in the positive sample undirected graph and the sum of the areas of all triangles in the negative sample undirected graph is recalculated, and compared with the previous calculation result, and the execution is repeated until the difference is minimized to obtain a trained neural network model.

[0067] Update the positive sample undirected graph based on the trained neural network model. When a conversation is detected, obtain the user information of the conversation user and determine whether the conversation user is the initial user.

[0068] If the user is an initial user, the features of the initial user are obtained. Based on the user features of the initial user and the updated positive sample undirected graph, the user vertex is matched for the initial user through the trained neural network model, and the corpus contained in the corpus class vertex closest to the matched user vertex is output as the target corpus.

[0069] For example, the trained neural network model matches the user with the following information based on the initial user: Figure 3 The user vertex u shown i , the trained neural network model traverses the undirected graph with the user vertex u i The corpus vertex connected by the shortest edge is corpus vertex m i , then, the corpus vertex m i The corresponding corpus is recommended to the user as the target corpus.

[0070] If the user is not the initial user, the updated positive sample undirected graph is traversed, and a triangle is constructed with the edge between the user vertex represented by the user and the corpus vertex represented by the currently accessed corpus as the base edge. The corpus represented by the corpus vertex that minimizes the area of the triangle is found and output as the target corpus.

[0071] For example, the trained neural network model traverses the user vertex u corresponding to the user in the updated positive sample undirected graph according to the user's information. i , and the corpus vertex accessed by the user in the current session is m j , at this time, user vertex u i and corpus vertex m j Construct a triangle for the base, and traverse the corpus vertex that can minimize the area of the triangle to be m k , then the corpus corresponding to the corpus vertex mi is recommended to the user as the target corpus.

[0072] The artificial intelligence-based conversation processing method of this embodiment obtains user features, corpus features, and sequence features representing the order in which users access the corpus in the user conversation, constructs a positive sample undirected graph and a negative sample undirected graph, uses the positive sample undirected graph and the negative sample undirected graph generated for each conversation in the conversation training set as a sample set, and trains a preset neural network model until the sum of the areas of all triangles in the positive sample undirected graph and the sum of the areas of all triangles in the negative sample undirected graph in the training set is minimized, thereby obtaining a trained neural network model. Based on the target user features of the target user, the trained neural network model outputs the target corpus. In the undirected graph structure generation and training process of the present invention, the association relationships presented in the existing logs, as well as the characteristics of the corpus and the user themselves, are combined to comprehensively consider the impact of multiple factors on the recommendation effect, thereby improving the accuracy of corpus recommendation.

[0073] Corresponding to the artificial intelligence-based conversation processing method of the above embodiment, Figure 4 The following is a block diagram of the structure of an artificial intelligence-based conversation processing device provided in a second embodiment of the present invention. This artificial intelligence-based conversation processing device is applied to a local client in an artificial intelligence-based conversation processing environment. The corresponding client connects to the server via a preset application programming interface (API). The local client obtains access logs of all users from the central server, extracts user conversation records from the access logs, obtains user features, corpus features, and sequence features representing the order in which users access the corpus, and constructs a neural network model for outputting the target corpus. For ease of explanation, only the portions relevant to this embodiment of the present invention are shown.

[0074] See also Figure 4 , the artificial intelligence-based conversation processing device includes:

[0075] A feature acquisition module 41 is configured to acquire user features of a user in any session, corpus features of each of the N corpora accessed, and sequence features representing the order in which the user accesses the N corpora, where N is an integer greater than 1;

[0076] Positive sample construction module 42 is used to treat user features in the session as first-class vertices, treat N corpus features as N second-class vertices, connect all second-class vertices in sequence according to the order represented in the sequence features, and connect the first-class vertices with all second-class vertices to obtain a positive sample undirected graph corresponding to the session;

[0077] Negative sample construction module 43 is used to generate a random order for N corpora, connect all the second-category vertices in sequence according to the random order, and connect the first-category vertices with all the second-category vertices to obtain a negative sample undirected graph corresponding to the conversation, wherein the length of the edge connecting any two vertices is obtained by processing the features of the two vertices using a preset neural network model;

[0078] An area calculation module 44 is configured to use the positive sample undirected graph and the negative sample undirected graph generated by each session in the session training set as a sample set, and calculate the sum of the areas of all triangles in all positive sample undirected graphs and the sum of the areas of all triangles in all negative sample undirected graphs in the sample set;

[0079] The corpus output module 45 is used to train the preset neural network model by minimizing the difference between the sums of the two areas as a training condition to obtain a trained neural network model. The trained neural network model is used to output the target corpus according to the target user characteristics of the target user in the session to be processed.

[0080] Optionally, the corpus output module 45 includes:

[0081] A first user determination unit is configured to update the positive sample undirected graph according to the trained neural network model, obtain user information of the conversation user when a conversation is detected, and determine whether the conversation user is an initial user;

[0082] The first corpus output unit is used to obtain the characteristics of the initial user, match a type of vertex for the initial user through the trained neural network model according to the user characteristics of the initial user and the updated positive sample undirected graph, and output the corpus contained in the second type of vertex closest to the matched first type of vertex as the target corpus.

[0083] Optionally, the corpus output module 45 further includes:

[0084] The second user judgment unit is used to update the positive sample undirected graph according to the trained neural network model, obtain the user information of the conversation user when a conversation is detected, and judge whether the conversation user is the initial user;

[0085] The second corpus output unit is used to traverse the updated positive sample undirected graph, construct a triangle with the edge between the first-class vertex represented by the user and the second-class vertex represented by the currently accessed corpus as the base, and find the corpus represented by the second-class vertex that makes the triangle area the smallest and output it as the target corpus.

[0086] Optionally, the feature acquisition module 41 includes:

[0087] The feature acquisition unit is used to obtain user access logs, extract user features of users in user sessions, corpus features of N corpora, and access times corresponding to accessing the N corpora based on the access logs, and determine sequence features of the order in which users access the N corpora based on the access times.

[0088] Optionally, the positive sample construction module 42 includes:

[0089] The vertex connection unit is used to add the access time of the user accessing N corpora to N second-class vertices, traverse the access time in the N second-class vertices, and connect the N second-class vertices in the order of the access time corresponding to the N second-class vertices.

[0090] Optionally, the negative sample construction module 43 includes:

[0091] The edge length calculation unit is used to obtain the numbers and features of any two vertices, input the numbers and features of any two vertices into a preset neural network model, and the preset neural network model calculates the correlation between any two vertices based on the initial weights, and represents the correlation as the edge length between any two vertices.

[0092] Optionally, the corpus output module 45 further includes:

[0093] An area calculation unit, configured to update the weights of the preset neural network model using a gradient descent method, and recalculate the difference between the sum of the areas of all triangles in all the positive sample undirected graphs and the sum of the areas of all triangles in all the negative sample undirected graphs;

[0094] The gradient updating unit is used to update the gradient in the gradient descent method according to the comparison result of the currently calculated difference and the last calculated difference, and return to execute the step of repeatedly using the gradient descent method to update the weights of the preset neural network model until the minimized difference is obtained to obtain a trained neural network model.

[0095] It should be noted that the information interaction, execution process and other contents between the above modules are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0096] Figure 5 This is a schematic diagram of the structure of a computer device provided in the third embodiment of the present invention. Figure 5 As shown, the computer device of this embodiment includes: at least one processor ( Figure 5 Only one is shown), a memory, and a computer program stored in the memory and executable on at least one processor, which implements the steps of any of the above-mentioned embodiments of the artificial intelligence-based conversation processing method when the processor executes the computer program.

[0097] The terminal device may include, but is not limited to, a processor and a memory. It will be understood by those skilled in the art that Figure 5 The above is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include a network interface, a display screen, and an input device.

[0098] The processor may be a CPU, or other general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. A general-purpose processor may be a microprocessor, or any conventional processor.

[0099] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory can be the client's internal memory, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The readable storage medium can be the client's hard disk, and in other embodiments, it can also be an external storage device of the client, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the client. Furthermore, the memory can also include both the internal storage unit of the client and the external storage device. The memory is used to store the operating system, application programs, boot loaders (BootLoader), data, and other programs, such as the program code of computer programs. The memory can also be used to temporarily store data that has been output or is about to be output.

[0100] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0101] The various functional units and modules in the embodiments may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units. Furthermore, the specific names of the various functional units and modules are merely for the purpose of distinguishing them from one another and are not intended to limit the scope of protection of the present invention.

[0102] The specific working processes of the units and modules in the above-mentioned device can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned artificial intelligence-based conversation processing method embodiment.

[0103] The computer program includes computer program code, which may be in source code form, object code form, executable file, or some intermediate form.

[0104] Computer-readable media may include at least any entity or device capable of carrying computer program code, recording media, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunications signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, due to legislation and patent practice, computer-readable media cannot include electric carrier signals or telecommunications signals.

[0105] The present invention can implement all or part of the processes in the above-mentioned embodiment method, and can also be completed through a computer program product. When the computer program product runs on the client, the client can implement the steps in the above-mentioned artificial intelligence-based conversation processing method embodiment when executing it.

[0106] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0107] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0108] In the embodiments provided herein, it should be understood that the disclosed devices / clients and methods can be implemented in other ways. For example, the device / client embodiments described above are merely illustrative. For example, the division into modules or units is merely a logical functional division. In actual implementation, other division methods may be used, such as combining or integrating multiple units or components into another system, or omitting or not implementing certain features. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interface, or the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0109] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0110] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A conversation processing method based on artificial intelligence, characterized in that: include: Obtain the user features of the user in any session, the corpus features of each of the N corpora accessed by the user, and the sequence features representing the order in which the user accesses the N corpora, where N is an integer greater than 1; The user features in the session are regarded as first-class vertices, and the N corpus features are regarded as N second-class vertices respectively. All the second-class vertices are sequentially connected according to the order represented in the sequence features, and the first-class vertices are connected to all the second-class vertices to obtain a positive sample undirected graph corresponding to the session; Generating a random order for the N corpora, sequentially connecting all the second-category vertices according to the random order, and connecting the first-category vertices with all the second-category vertices to obtain a negative sample undirected graph corresponding to the session, wherein the length of the side connecting any two vertices is obtained by processing the features of the two vertices using a preset neural network model; Taking the positive sample undirected graph and the negative sample undirected graph generated by each session in the session training set as the sample set, calculate the sum of the areas of all triangles in all positive sample undirected graphs and the sum of the areas of all triangles in all negative sample undirected graphs in the sample set; Minimizing the difference between the sums of the two areas is used as a training condition to train the preset neural network model to obtain a trained neural network model. The trained neural network model is used to output the target corpus according to the target user features of the target user in the session to be processed.

2. The artificial intelligence-based conversation processing method according to claim 1, characterized in that: The trained neural network model is used to output the target corpus according to the target user characteristics of the target user in the session to be processed, including: updating the positive sample undirected graph according to the trained neural network model, obtaining user information of the conversation user when a conversation is detected, and determining whether the conversation user is an initial user; If the user is an initial user, the characteristics of the initial user are obtained, and based on the user characteristics of the initial user and the updated positive sample undirected graph, the first type of vertices are matched for the initial user through the trained neural network model, and the corpus contained in the second type of vertices closest to the matched first type of vertices is output as the target corpus.

3. The artificial intelligence-based conversation processing method according to claim 1, characterized in that: The trained neural network model is used to output the target corpus according to the target user characteristics of the target user in the session to be processed, and further includes: updating the positive sample undirected graph according to the trained neural network model, obtaining user information of the conversation user when a conversation is detected, and determining whether the conversation user is an initial user; If the user is not the initial user, the updated positive sample undirected graph is traversed, and a triangle is constructed with the edge between the first-class vertex represented by the user and the second-class vertex represented by the currently accessed corpus as the base, and the corpus represented by the second-class vertex that minimizes the area of the triangle is found and output as the target corpus.

4. The artificial intelligence-based conversation processing method according to claim 1, characterized in that: Obtaining the user features of a user in any session, the corpus features of each of the N corpora accessed, and the sequence features representing the order in which the user accesses the N corpora includes: Obtain a user access log, extract user features of the user in the user session, corpus features of the N corpora, and access time corresponding to accessing the N corpora based on the access log, and determine a sequence feature of the order in which the user accesses the N corpora based on the access time.

5. The artificial intelligence-based conversation processing method according to claim 4, characterized in that: The user features in the session are regarded as first-class vertices, the N corpus features are regarded as N second-class vertices respectively, and all the second-class vertices are sequentially connected according to the order represented in the sequence features, including: The access time of the user accessing the N corpora is added to the N second-category vertices, the access time in the N second-category vertices is traversed, and the N second-category vertices are connected in sequence according to the order of the access time corresponding to the N second-category vertices.

6. The artificial intelligence-based conversation processing method according to claim 1, characterized in that: The length of the side connecting any two vertices is obtained by processing the features of the two vertices through a preset neural network model and includes: Obtain the numbers and features of any two vertices, input the numbers and features of any two vertices into the preset neural network model, and the preset neural network model calculates the correlation between any two vertices based on the initial weights, and represents the correlation as the side length between any two vertices.

7. The artificial intelligence-based conversation processing method according to claim 1, characterized in that: Minimizing the difference between the sums of the two areas is used as a training condition to train the preset neural network model, and the trained neural network model includes: Using the gradient descent method to update the weights of the preset neural network model, recalculating the difference between the sum of the areas of all triangles in all the positive sample undirected graphs and the sum of the areas of all triangles in all the negative sample undirected graphs; According to the comparison result of the currently calculated difference and the last calculated difference, the gradient in the gradient descent method is updated, and the step of repeatedly executing the gradient descent method to update the weights of the preset neural network model is returned until the minimized difference is obtained to obtain a trained neural network model.

8. An insurance corpus recommendation device based on an undirected graph, characterized in that: The undirected graph-based insurance corpus recommendation device includes: A feature acquisition module is used to acquire user features of a user in any session, corpus features of each of the N corpora accessed by the user, and sequence features representing the order in which the user accesses the N corpora, where N is an integer greater than 1; A positive sample construction module is configured to use the user features in the session as first-class vertices, use the N corpus features as N second-class vertices, connect all the second-class vertices in sequence according to the order represented in the sequence features, and connect the first-class vertices with all the second-class vertices to obtain a positive sample undirected graph corresponding to the session; A negative sample construction module is configured to generate a random order for the N corpora, connect all the second-category vertices in sequence according to the random order, and connect the first-category vertices with all the second-category vertices to obtain a negative sample undirected graph corresponding to the session, wherein the length of the side connecting any two vertices is obtained by processing the features of the two vertices using a preset neural network model; An area calculation module is configured to use the positive sample undirected graph and the negative sample undirected graph generated by each session in the session training set as a sample set, and calculate the sum of the areas of all triangles in all positive sample undirected graphs and the sum of the areas of all triangles in all negative sample undirected graphs in the sample set; The corpus output module is used to train the preset neural network model by minimizing the difference between the sums of the two areas as a training condition to obtain a trained neural network model. The trained neural network model is used to output the target corpus according to the target user characteristics of the target user in the session to be processed.

9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the artificial intelligence-based conversation processing method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the artificial intelligence-based conversation processing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Image segmentation based car window extraction method and system

    CN105809699A

  • Table structure identification method and device, storage medium and electronic equipment

    CN113297975A