Method and device for generating recommendation list
By generating document and user feature vectors, and using a recommendation model to automatically extract candidate documents from the document database, the problem of inaccurate legal document recommendations in existing technologies is solved, and efficient recommendation list generation is achieved.
Patent Information
- Application Number
- CN202011010274.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-23
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2040-09-23
AI Technical Summary
Existing legal document recommendation technologies cannot achieve accurate recommendations, resulting in low recommendation efficiency and increasing the time users spend searching for documents of interest.
By acquiring user information, document and user feature vectors are generated based on legal and user knowledge graphs. A recommendation model is then used to automatically extract candidate documents from the document database and generate a recommendation list, avoiding the need for users to manually input keywords.
It improves the accuracy of recommended document selection and reduces the time users spend searching for documents they are interested in.
Smart Images

Figure CN112148889B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular relates to a method and device for generating a recommendation list. Background Art
[0002] With the widespread adoption of legal knowledge, the public has increasingly come into contact with legal documents. Users can select specific documents for review, whether for work or personal interest. However, due to the large number of legal documents, manually filtering through them would significantly increase the time and difficulty required to select a document. Therefore, recommending legal documents to users has become an urgent issue.
[0003] Existing legal document recommendation technologies mainly use keyword searches to recommend legal documents. However, since the law uses a large amount of standardized language, the same keyword can appear in legal documents in multiple different fields, which affects the accuracy of recommended document selection, making it impossible to achieve accurate recommendations, reducing recommendation efficiency, and increasing the time it takes for users to search for documents of interest. Summary of the Invention
[0004] In view of this, an embodiment of the present application provides a method and device for generating a recommendation list to solve the problem that the existing legal document recommendation technology cannot achieve accurate recommendation, reduces recommendation efficiency, and increases the time spent by users in searching for documents of interest.
[0005] A first aspect of an embodiment of the present application provides a method for generating a recommendation list, comprising:
[0006] Based on user information of a target user, extracting candidate documents associated with the user information from a document database; the user information includes browsing history of the target user;
[0007] Based on a preset legal knowledge graph, the legal entities contained in each candidate document are determined respectively, and the text feature vectors of all the legal entities are determined;
[0008] Obtaining a user knowledge graph of the target user, and generating content feature vectors corresponding to each browsing record of the target user through the user knowledge graph;
[0009] Outputting a user attribute vector corresponding to the target user according to the user information of the target user;
[0010] generating a user feature vector of the target user based on the content feature vectors and the user attribute vectors of all the browsing records;
[0011] Determine recommended documents based on the user feature vector and the text feature vector, and generate a recommendation list.
[0012] A second aspect of an embodiment of the present application provides a device for generating a recommendation list, including:
[0013] A candidate document acquisition unit is configured to extract candidate documents associated with the target user information from a document database based on the target user's user information; the user information includes the target user's browsing history;
[0014] A text feature vector generating unit is used to determine the legal entities contained in each of the candidate documents based on a preset legal knowledge graph, and generate text feature vectors of all the legal entities;
[0015] A content feature vector generating unit, configured to obtain a user knowledge graph of the target user and generate a content feature vector corresponding to each browsing record of the target user through the user knowledge graph;
[0016] A user attribute vector generating unit, configured to output a user attribute vector corresponding to the target user based on the user information of the target user;
[0017] A user feature vector generating unit, configured to generate a user feature vector of the target user based on the content feature vectors and the user attribute vectors of all the browsing records;
[0018] The recommendation list generating unit is configured to determine the recommended documents based on the user feature vector and the text feature vector, and generate a recommendation list.
[0019] A third aspect of an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the first aspect when executing the computer program.
[0020] A fourth aspect of the embodiments of the present application 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 steps of the first aspect are implemented.
[0021] Implementing the method and device for generating a recommendation list provided in the embodiments of the present application has the following beneficial effects:
[0022] The embodiment of the present application obtains the user information of the user, determines the documents that have an association relationship with the user as candidate documents, performs a preliminary screening of the documents in the document database, and generates a document feature vector corresponding to each candidate document; and generates a user feature vector based on the user knowledge graph corresponding to each user and the browsing history in the user information, imports the text feature vector and the user feature vector into the preset recommendation model, determines the recommended documents from the candidate documents, and generates a recommendation list containing the above-mentioned recommended documents, and outputs it to the user, thereby achieving the purpose of automatically generating a recommendation list. Compared with the existing recommendation list generation technology, the embodiment of the present application does not require the user to manually enter keywords, but can automatically extract candidate documents from the document database through the user's browsing history, and generate corresponding document feature vectors based on the document content, configure the user feature vector according to the user's browsing habits and the content of interest, and thus determine whether the content of the candidate document is the content of interest to the user based on the matching degree between the above two vectors, select the recommended document, and generate a recommendation list, thereby improving the accuracy of the recommended document selection and reducing the time spent by the user in searching for documents of interest. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0024] Figure 1 This is a flowchart of a method for generating a recommendation list provided in the first embodiment of the present application;
[0025] Figure 2 This is a flowchart for determining recommended documents provided by an embodiment of the present application;
[0026] Figure 3 This is a specific implementation flowchart of a method S101 for generating a recommendation list provided in the second embodiment of the present application;
[0027] Figure 4 This is a schematic diagram of the structure of the legal document relationship tree provided in one embodiment of the present application;
[0028] Figure 5 This is a specific implementation flowchart of a method S101 for generating a recommendation list provided in the third embodiment of the present application;
[0029] Figure 6 This is a specific implementation flowchart of a method S103 for generating a recommendation list provided in the fourth embodiment of the present application;
[0030] Figure 7 This is a schematic diagram of generating a browsing knowledge path provided by an embodiment of the present application;
[0031] Figure 8 This is a flowchart of a specific implementation of a method S604 for generating a recommendation list provided in the fifth embodiment of the present application;
[0032] Figure 9 This is a specific implementation flowchart of a method S106 for generating a recommendation list provided in the sixth embodiment of the present application;
[0033] Figure 10 This is a flowchart of a specific implementation method of a recommendation list generation method provided in the seventh embodiment of the present application;
[0034] Figure 11 This is a structural block diagram of a device for generating a recommendation list provided in one embodiment of the present application;
[0035] Figure 12 This is a schematic diagram of a terminal device provided in another embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0037] The embodiment of the present application obtains the user information of the user, determines the documents that are associated with the user as candidate documents, performs a preliminary screening of the documents in the document database, and generates a document feature vector corresponding to each candidate document; and generates a user feature vector based on the user knowledge graph corresponding to each user and the browsing history in the user information, imports the text feature vector and the user feature vector into a preset recommendation model, determines the recommended documents from the candidate documents, and generates a recommendation list containing the above-mentioned recommended documents, and outputs it to the user, thereby achieving the purpose of automatically generating a recommendation list and solving the problem that the existing legal document recommendation technology cannot achieve accurate recommendation, reduces recommendation efficiency, and increases the time-consuming search for documents of interest to users.
[0038] In the embodiment of the present application, the execution subject of the process is a terminal device, which includes but is not limited to: a server, a computer, a smart phone, a tablet computer, and other devices capable of generating a recommendation list. Figure 1 The following is a flowchart illustrating a method for generating a recommendation list according to the first embodiment of the present application, which is described in detail as follows:
[0039] In S101 , based on user information of a target user, candidate documents associated with the user information are extracted from a document database; the user information includes browsing history of the target user.
[0040] In this embodiment, the terminal device can retrieve user information associated with the target user from a user database based on the target user's user ID. This user information includes the target user's browsing history, each of which corresponds to relevant browsing content. This browsing content can be existing documents stored in the document database or articles on the internet. Optionally, this user information can also include information related to user attributes such as the user's age, occupation, educational background, and areas of interest. Using this information, existing documents with a high degree of relevance to the user can be identified from the document database as candidate documents, thereby enabling preliminary document screening.
[0041] For example, the target user's user information records an area of interest, namely "Civil Affairs." Each existing document in the document database is assigned a document tag that identifies the document's content or category. The terminal device can select existing documents with the document tag "Civil Affairs" from the document database as candidate documents for the target user.
[0042] In one possible implementation, the terminal device can be configured with a number of matching information items. If the number of matching information items between the file tags of an existing document in the document database and the user item of the user information is greater than or equal to the number of matching information items, the existing document is identified as a candidate document associated with the user information. For example, if the number of matching information items is 3, the terminal device detects whether any three or more file tags in the existing file's file tags match the user information. If so, the existing document is identified as a candidate file.
[0043] In one possible implementation, the target user may install a client program that matches the terminal device on a local user terminal. When the user needs to browse a document, the client program may be launched. The client program records the user ID of the target user and sends a startup instruction to the terminal device. Upon receiving the startup instruction from the client program, the terminal device may determine the user ID associated with the client program based on the user ID included in the startup instruction or the client ID of the client program, identify the user corresponding to the user ID as the target user, and execute the operation of S101.
[0044] In S102, based on a preset legal knowledge graph, the legal entities contained in each of the candidate documents are determined respectively, and the text feature vectors of all the legal entities are used.
[0045] In this embodiment, the terminal device may be pre-stored with a legal knowledge graph, which may be downloaded from a cloud server. The legal knowledge graph downloaded from the cloud server may be generated based on multiple standard legal texts. For example, based on standard legal texts such as criminal law, civil law, and constitution, the legal entities contained in the above legal texts may be identified, and based on the number of common occurrences and locations of occurrences between the various legal entities, associations between different legal entities may be established, thereby constructing the above legal knowledge graph. The above legal knowledge graph may also be constructed based on all existing documents in a document database. In this case, if new documents are added to the document database, the legal knowledge graph may be updated based on the new documents, thereby ensuring the validity of the legal knowledge graph.
[0046] In one possible implementation, a legal knowledge graph may be constructed based on existing documents in a document database as follows: a terminal device extracts document entities contained in each existing document through a semantic analysis algorithm, where each document entity contains multiple preset document dimension items. The terminal device may determine the bit value corresponding to each document dimension item in each document entity through the number of occurrences of each document entity in all existing documents and the document label of the existing document. When identifying whether there is an association relationship between each document entity, in addition to calculating a first association factor based on the number of co-occurrences between any two document entities, the terminal device may also construct an entity vector corresponding to the document entity based on the document dimension item, calculate a vector distance between the two entity vectors, determine a second association factor based on the vector distance, and obtain a degree of association between the document entities based on the first association factor and the second association factor. If the degree of association is greater than a preset association threshold, it is determined that there is an association relationship between the two document entities. The document entities are connected through edges on the legal knowledge graph, and the association threshold is the association confidence between the two document entities.
[0047] In this embodiment, the terminal device can use a semantic analysis algorithm to identify the document entities contained in the candidate text, and determine the knowledge nodes corresponding to the above document entities on the legal knowledge graph. According to the node number of each knowledge node, the entity vector corresponding to each document entity is determined, all document entities are encapsulated, and a document feature vector about the candidate text is obtained.
[0048] In one possible implementation, each knowledge node can be numbered using sparse coding, i.e., one-hot coding, where each knowledge node corresponds to one bit. Based on the number of knowledge nodes in the legal knowledge graph, an N-bit vector is generated, where N is the number of knowledge nodes in the knowledge graph. The terminal device can generate a corresponding vector clustering algorithm based on the degree of association between each knowledge node, thereby compressing the N-bit vector into an n-bit vector. This vector clustering algorithm can be implemented using the word2vec algorithm or the tf-idf algorithm, identifying the compressed n-bit vector as a text feature vector, and using the text feature vector to represent the content information of the candidate document.
[0049] In S103, a user knowledge graph of the target user is obtained, and content feature vectors corresponding to each browsing record of the target user are generated through the user knowledge graph.
[0050] In this embodiment, the terminal device can configure a corresponding user knowledge graph for each user. When generating a corresponding recommendation list for a target user, the terminal device can select a user knowledge graph that matches the target user ID from the user database based on the target user's user ID. The user knowledge graph can be created based on user information and user browsing history.
[0051] In one possible implementation, a user knowledge graph can be created by: a terminal device obtains a user's browsing history, each of which can correspond to an associated candidate tag; the number of occurrences of each candidate tag is counted; a first user tag is identified from the candidate tags based on the number of occurrences; a second user tag related to the user's attributes is determined based on the user information; and a user knowledge graph for the target user is generated based on the first and second user tags. The user knowledge graph can be used to determine user-related information such as the target user's browsing habits and areas of interest.
[0052] In this embodiment, the terminal device can use a semantic analysis algorithm to identify browsing entities contained in the browsing content corresponding to the browsing history, determine the knowledge nodes corresponding to the browsing entities on the legal knowledge graph, and then determine the entity vector corresponding to each browsing entity based on the node number of each knowledge node. All browsing entities are then packaged to obtain a content feature vector for the browsing history. The method for generating the content feature vector can be found in the description of S103 and will not be repeated here.
[0053] In S104, a user attribute vector corresponding to the target user is output based on the user information of the target user.
[0054] In this embodiment, user information may include information related to user attributes, such as age, occupation, gender, education level, and major. In addition to the aforementioned information related to static user attributes, the target user's areas of interest can be determined based on their browsing history. Dynamic attributes such as the target user's interaction probability and interaction type can also be determined based on interactive operations during browsing. The terminal device can generate a user attribute vector based on the target user's dynamic and static attributes. This user attribute vector can be adjusted accordingly based on changes in the user's browsing history and user information.
[0055] In one possible implementation, the terminal device can be configured with preset user attribute update conditions. For example, if the number of newly added browsing records of the target user exceeds a preset threshold, or if a preset update trigger condition is reached at the current moment, the user attribute vector can be updated based on the newly added browsing records or newly acquired user information. In the subsequent process of generating recommended documents, the user attribute vector can be directly extracted from the user database without having to be generated again.
[0056] In S105 , a user feature vector of the target user is generated based on the content feature vectors and the user attribute vectors of all the browsing records.
[0057] In this embodiment, after obtaining the content feature vectors of all browsing records of the target user and the user attribute vector related to the user attributes, the terminal device can fuse the above two types of vectors to obtain a user feature vector. This user feature vector can not only represent the content features of the historical texts browsed by the user, but also represent the user features related to the user's areas of interest, thereby being able to predict the user's content of interest from multiple dimensions, and further improving the accuracy of selecting recommended documents.
[0058] In S106 , recommended documents are determined based on the user feature vector and the text feature vector, and a recommendation list is generated.
[0059] In this embodiment, the terminal device can import each text feature vector and user feature vector into a preset recommendation model and calculate the recommendation degree corresponding to each candidate document. The terminal device can select candidate documents with a recommendation degree greater than a preset recommendation threshold as recommended documents, determine the recommendation order of each recommended document from large to small according to the recommendation degree value, and generate a recommendation list based on the above recommendation order, so that recommended documents with higher recommendation degrees can be displayed first, which facilitates the selection efficiency of the target user. The recommendation model can be obtained from a cloud server or generated by adjusting an existing recommendation algorithm.
[0060] For example, Figure 2 FIG1 shows a flowchart of determining recommended documents provided by an embodiment of the present application. Figure 2 As shown, the terminal device can first perform semantic analysis on the candidate document, extract the content entities contained in the candidate document, which may include multiple entities such as "A Bank", "and", "User A", "User B", "Loan Contract Dispute" and "Designated Ruling", perform word vector conversion based on each document entity, obtain a first semantic vector, and identify the knowledge nodes associated with each document entity in the legal knowledge graph, thereby generating a corresponding first knowledge vector, and merge the first semantic vector and the first knowledge vector to obtain a text feature vector. Similarly, a second semantic vector and a second knowledge vector can be generated by the above corresponding method, wherein the knowledge graph used to generate the second knowledge vector is a user knowledge graph, and a user attribute vector is generated by the dynamic user information and static user information contained in the user information, and the above two vectors are merged to generate a user feature vector. It should be noted that if the browsing history contains multiple, multiple content feature vectors can be generated, and a user feature vector can be generated based on multiple content feature vectors and user attribute vectors. By importing the text feature vector and the user feature vector into the preset recommendation model, it can be determined whether the candidate document is a recommended document.
[0061] In one possible implementation, the above recommendation model can use the cosine distance algorithm to calculate the vector distance between the user feature vector and the text feature vector, and determine the similarity between the two vectors based on the vector distance. If the value of the vector distance is larger, the corresponding similarity value is smaller.
[0062] As can be seen from the above, the method for generating a recommendation list provided by the embodiment of the present application obtains the user information of the user, determines the documents that are associated with the user as candidate documents, performs preliminary screening of the documents in the document database, and generates a document feature vector corresponding to each candidate document; and generates a user feature vector based on the user knowledge graph corresponding to each user and the browsing history in the user information, imports the text feature vector and the user feature vector into the preset recommendation model, determines the recommended documents from the candidate documents, and generates a recommendation list containing the above recommended documents, and outputs it to the user, thereby achieving the purpose of automatically generating a recommendation list. Compared with the existing recommendation list generation technology, the embodiment of the present application does not require the user to manually enter keywords, but can automatically extract candidate documents from the document database through the user's browsing history, and generate corresponding document feature vectors based on the document content, configure the user feature vector according to the user's browsing habits and the content of interest, and thus determine whether the content of the candidate document is the content of interest to the user based on the matching degree between the above two vectors, select the recommended document, and generate a recommendation list, thereby improving the accuracy of the recommended document selection and reducing the time spent by the user in searching for documents of interest.
[0063] Figure 3 The following is a flowchart showing a specific implementation of a method S101 for generating a recommendation list provided in the second embodiment of the present application. Figure 3 , relative to Figure 1 In the embodiment, the method for generating a recommendation list provided in this embodiment includes S101 including S301 to S304, which are described in detail as follows:
[0064] Furthermore, the method of extracting candidate documents associated with the user information of the target user from the document database includes:
[0065] In S301, the legal category label of each existing document in the document database is obtained.
[0066] In this embodiment, when a document is stored in a document database, a corresponding document tag can be assigned to the document based on dimensions such as the document's content, title, and the document's acquisition channel. These document tags can be configured manually by the user or automatically extracted by a terminal device after performing semantic analysis on the document content. Existing documents in the document database may contain document tags for identifying information of different dimensions, including a legal category tag for identifying the legal field to which the existing document belongs. The terminal device can extract the legal category tag from all document tags of the existing document to determine the legal field to which the existing document corresponds.
[0067] For example, the legal category label can be determined based on the document content of the existing document. If the document content of the existing document describes the process of property inheritance of a certain user, the value of the legal category label can be "Inheritance Law"; if the document content of the existing document describes the process of determining the marriage relationship between two users, the value of the legal category label can be "Marriage Law". Of course, if the document content of an existing document involves multiple legal fields, for example, an existing document involves the content of property inheritance of divorced and widowed partners, then the existing document may involve two parts of content, "Inheritance Law" and "Marriage Law", and the legal type label can be "Inheritance Law" and "Marriage Law".
[0068] In S302, a legal document relationship tree corresponding to the document database is generated according to the cascading relationship between each of the legal category tags; the legal document relationship tree includes a plurality of tag nodes; each tag node is associated with at least one of the existing documents.
[0069] In this embodiment, each legal category label can determine the cascade relationship between each other according to the size and coverage relationship of the field to which it belongs. For example, if a legal category label is "Civil Law" and another legal category label is "Marriage Law", and Marriage Law is a legal branch of Civil Law, that is, Civil Law belongs to an upper label node of Marriage Law; and Marriage Law belongs to a lower label node of Civil Law. The terminal device can generate a legal document relationship tree corresponding to the document database based on the cascade relationship between each legal category label, and according to the legal category label corresponding to each existing text, the existing documents are associated and stored in the corresponding label node, thereby achieving the purpose of classifying existing documents based on the legal document relationship tree.
[0070] For example, Figure 4 The following is a schematic diagram showing the structure of the legal document relationship tree provided by an embodiment of the present application. Figure 4 As shown, the legal document relationship tree contains multiple label nodes, each label node corresponds to a legal category label. The cascade relationship between each label node can be determined according to the size of the field to which it belongs and the inclusion relationship. Among them, the coverage of the parent node covers the coverage of the child node, that is, the field range of the parent node is larger than the field range of the child node, and the inclusion relationship between the parent node and the child node. Among them, each label node can be marked with the number of associated existing documents.
[0071] In S303, based on the user tags corresponding to the browsing contents of all the browsing records, the tag node associated with the target user is selected from the legal document relationship tree.
[0072] In this embodiment, the terminal device can determine the corresponding content tags of the browsing content corresponding to each browsing record based on the browsing history included in the user information, count the number of occurrences of each content tag, and select the content tag with a number of occurrences greater than the occurrence threshold as the user tag of the target user.
[0073] In this embodiment, the terminal device can identify the tag nodes associated with each user tag in the legal document relationship tree. Associated tag nodes include those where the user tag and the legal category tag corresponding to the tag node have the same tag value. For example, if the user tag is "Civil Law" and the legal category tag corresponding to a tag node in the legal document relationship tree is also "Civil Law," then if the two tag values are identical, the two tags can be identified as associated tags.
[0074] In one possible implementation, the associated tag node includes a user tag whose correlation with the tag value of the corresponding legal category tag is greater than a preset correlation threshold. For example, the user tag is "civil lawyer," and the legal category tag corresponding to a tag node in the legal text tree is "civil law." Semantic analysis of the user tag can determine that its knowledge entities are "civil law" and "lawyer." Within the knowledge entities, "civil law" and "lawyer" are the same concept, so the correlation between the two tags is high, and the two tags can be identified as associated tags.
[0075] In one possible implementation, the associated tag nodes include the tag node that matches the user tag, as well as all subordinate tags of the aforementioned tag node. For example, if the user tag is "Civil Law," and the legal category tag corresponding to a tag node in the legal document relationship tree is also "Civil Law," then the tag node is identified as matching the user tag. Furthermore, if "Civil Law" has other subordinate tags, such as "Marriage Law" and "Contract Law," then all other tag nodes subordinate to the "Civil Law" tag node are identified as tag nodes associated with the target user.
[0076] In S304, the existing document in the associated tag node is used as the candidate document for the target user.
[0077] In this embodiment, after determining the label node associated with the target user, the terminal device may use the existing document associated with the label node as a candidate document for the target user.
[0078] In an embodiment of the present application, by constructing a legal document relationship tree, the associated nodes matching the target user are determined based on the legal document relationship tree, and the existing documents corresponding to the associated nodes are selected as candidate documents, thereby improving the accuracy of candidate document selection.
[0079] Figure 5The specific implementation flow chart of the method S101 for generating a recommendation list provided in the third embodiment of the present application is shown. Figure 5 , relative to Figure 1 In the embodiment described above, the method for generating a recommendation list provided in this embodiment includes S101 including S501 to S504, which are described in detail as follows:
[0080] Furthermore, the user information includes the to-be-processed tasks of the target user, and the step of extracting candidate documents associated with the user information from the document database based on the user information of the target user includes:
[0081] In S501, a task feature vector corresponding to the target user is generated according to the task to be processed.
[0082] In this embodiment, during the actual document search process, users often collect data based on task requirements. For example, before handling a civil case, a user may need to review related historical cases to determine a response strategy and develop a response strategy. In this case, documents related to the civil case can be pushed to the user, allowing them to quickly find related cases related to the pending case, improving data collection efficiency. Therefore, when obtaining candidate documents, the target user's pending task can be used as a selection criterion to select candidate documents from the document database.
[0083] In this embodiment, the terminal device can extract the target user's pending tasks from the user information. The pending tasks may include information such as task content, task type, and task deadline. The terminal device extracts task keywords from the task content, determines associated tags for the pending task based on the task keywords and task type, and generates the aforementioned task feature vector based on all associated tags.
[0084] In one possible implementation, if the user information contains multiple pending tasks, the priorities of the different pending tasks can be determined based on their deadlines. The priority of the pending task with the smallest difference between its deadline and the current time is set to the highest. Semantic analysis is performed on the pending tasks' content to extract task keywords, and task text vectors are generated based on these keywords. Based on the priorities of each pending task and the task text vectors, a task feature vector for the target user is generated.
[0085] In S502, semantic analysis is performed on each existing document in the document database to determine the legal entity contained in each existing document.
[0086] In this embodiment, the terminal device can use a semantic analysis algorithm to determine the document keywords contained in the existing document, identify the part-of-speech type of each document keyword, select document keywords related to legal knowledge as the above-mentioned legal entities, and thus obtain the legal entities of each existing document.
[0087] In S503 , based on the legal entity, a legal entity vector is constructed for each of the existing documents.
[0088] In this embodiment, the terminal device can generate a word vector corresponding to each legal entity through a preset word vector conversion algorithm, and encapsulate the word vectors of all legal entities to generate a legal entity vector corresponding to an existing document.
[0089] In S504 , the similarity between the task feature vector and the legal entity vector is calculated, and the existing documents whose similarity is greater than a preset similarity threshold are selected as the candidate documents.
[0090] In this embodiment, the terminal device may calculate the similarity between the task feature vector and the legal entity vector using a preset similarity calculation algorithm. Specifically, the similarity calculation algorithm may be a cosine similarity calculation algorithm or a Euclidean distance calculation algorithm. Specifically, the similarity between the two vectors is determined, and based on the vector distance, the similarity between the task to be processed and the existing document is determined. Existing documents whose similarity is greater than a similarity threshold are selected as candidate documents.
[0091] In an embodiment of the present application, by obtaining the target user's pending tasks and extracting candidate documents from the document database based on the pending tasks, the accuracy of selecting candidate documents can be improved, thereby improving the efficiency of the user's search for target documents and the recommendation effect.
[0092] Figure 6 The specific implementation flow chart of the method S103 for generating a recommendation list provided in the fourth embodiment of the present application is shown. Figure 6 , relative to Figure 1 In the embodiment, a method S103 for generating a recommendation list provided in this embodiment includes: S601 to S604, which are described in detail as follows:
[0093] Furthermore, the step of obtaining a user knowledge graph of the target user and generating a content feature vector corresponding to each browsing history of the target user through the user knowledge graph includes:
[0094] In S601, semantic analysis is performed on the browsing content corresponding to the browsing record to extract content entities contained in the browsing content.
[0095] In this embodiment, the terminal device can use a semantic analysis algorithm to determine the content keywords contained in the browsing content, identify the part-of-speech type of each content keyword, and select content keywords related to legal knowledge as the above-mentioned content entities, thereby obtaining the content entities of each existing document.
[0096] In S602, knowledge nodes matching the content entity are identified from the user knowledge graph respectively.
[0097] In this embodiment, the terminal device can identify each content entity based on whether there is a corresponding existing node in the user knowledge graph. If so, the terminal device can identify the existing node as the knowledge node corresponding to the content entity. Optionally, if the user knowledge graph does not contain the content entity associated with the browsing content of the browsing record, a new node corresponding to the content entity can be created in the user knowledge graph. Based on the association relationship between the content entity and the existing nodes in the user knowledge graph, the new node and the associated existing nodes are connected to achieve the purpose of importing the new node into the user knowledge graph.
[0098] In S603, subpaths connecting the various knowledge nodes are determined in the user knowledge graph, and all the subpaths are merged to obtain a browsing knowledge path.
[0099] In this embodiment, the terminal device can mark all knowledge nodes associated with the browsing history on the user knowledge graph, and determine the interconnection paths between different knowledge nodes, that is, the above-mentioned sub-paths. By merging the sub-paths between all knowledge nodes, a browsing knowledge path corresponding to the browsing history can be generated.
[0100] For example, Figure 7 A schematic diagram of generating a browsing knowledge path provided by an embodiment of the present application is shown. Figure 7 As shown, the knowledge nodes corresponding to this browsing record are "Contract Disputes," "Civil," and "Fines." These three knowledge nodes can be marked on the user knowledge graph. There is a direct edge between "Civil" and "Fines." Therefore, the subpath between these two knowledge nodes does not contain other nodes, namely, "Civil-Fines." If corresponding relationship types exist between edges at different nodes, these relationship types can be added to the above subpaths. For example, "Civil-(Sentence)-Fines" constitutes a ternary relationship. There is an intermediate node between "Contract Disputes" and "Civil," namely, "Contract Law." These two knowledge nodes need to be connected through "Contract Law." Therefore, the resulting subpath is "Contract Disputes-Contract Law-Civil." By merging these two subpaths, we obtain the browsing knowledge path of "Contract Disputes-Contract Law-Civil-Fines."
[0101] In S604, a content feature vector corresponding to the browsing record is generated based on the browsing knowledge path.
[0102] In this embodiment, the terminal device can convert each node number into a corresponding word vector based on all the knowledge nodes contained in the above-mentioned browsing knowledge path and the node number corresponding to each knowledge node, merge all the word vectors, and generate a content feature vector of the browsing record.
[0103] In an embodiment of the present application, by identifying the knowledge nodes of the browsing records in the user's knowledge graph, the browsing knowledge path is determined according to each knowledge node, and the content feature vector is generated according to the browsing knowledge path, thereby realizing the vectorization of the browsing content of the browsing records and improving the accuracy of subsequent recommended document selection.
[0104] Figure 8 FIG5 shows a specific implementation flow chart of a method S604 for generating a recommendation list provided in the fifth embodiment of the present application. Figure 8 , relative to Figure 6 In the embodiment described above, a method S604 for generating a recommendation list provided in this embodiment includes: S6041 to S6043, which are described in detail as follows:
[0105] Furthermore, generating a content feature vector corresponding to the browsing record based on the browsing knowledge path includes:
[0106] In S6041, the associated nodes of the knowledge nodes included in the browsing knowledge path in the user knowledge graph are determined.
[0107] In this embodiment, since knowledge nodes are not independent nodes in the user knowledge graph, but may have an association relationship with other existing nodes, that is, there will be corresponding edges between knowledge nodes with an association relationship, the existing nodes that have an association relationship with the knowledge nodes in the browsing knowledge path will be identified as the above-mentioned association nodes.
[0108] In S6042, an associated node vector corresponding to the knowledge node is generated based on the associated node; the function for calculating the associated node vector is specifically:
[0109]
[0110] Among them, Link i is the key node vector of the i-th knowledge node; content(E i ) is the number of associated nodes contained in the i-th knowledge node; E ij is the word vector of the jth associated node corresponding to the i-th knowledge node.
[0111] In this embodiment, the existing nodes in the user knowledge graph can be represented by word vectors according to the node numbers. The terminal device can import the word vectors of all associated nodes that have an association relationship with the knowledge nodes in the browsing knowledge path into the association vector conversion model to calculate the association node vector corresponding to the knowledge node.
[0112] In S6043, the associated node vectors of all the knowledge nodes are merged to obtain the content feature vector.
[0113] In this embodiment, the terminal device performs operations S6041 to S6042 on each knowledge node in the browsed knowledge path to obtain an associated node vector corresponding to each knowledge node, and merges all associated node vectors to obtain a content feature vector.
[0114] In the embodiment of the present application, by determining the associated nodes of each knowledge node, the content of the browsing history can be extended, and the recommended content can be expanded based on the existing browsing content, thereby increasing the content scope of the recommended content and realizing the prediction of the content of interest.
[0115] Figure 9 FIG6 shows a specific implementation flow chart of a method S106 for generating a recommendation list provided in the sixth embodiment of the present application. Figure 9 , relative to Figures 1 to 8 In any of the above embodiments, the method for generating a recommendation list provided in this embodiment, step S106 includes: S901 to S904, which are described in detail as follows:
[0116] Furthermore, determining recommended documents based on the user feature vector and the text feature vector and generating a recommendation list includes:
[0117] In S901 , the user feature vector and the text feature vector are fused to generate a fused feature vector of the candidate document.
[0118] In this embodiment, the terminal device can determine the content features that match between the target user and the candidate text based on the user feature vector and the text feature vector, and generate a fused feature vector based on the matched content features. The feature fusion method can use a feature fusion algorithm to introduce the two vectors into the feature fusion algorithm to generate the above-mentioned content and feature vector.
[0119] In one possible implementation, the specific process of feature fusion can be: respectively calculating the parameter differences between each first parameter of the text feature vector and each second parameter of the user feature vector, selecting the second parameter with the smallest parameter difference in the user feature vector as the associated parameter of the above-mentioned first parameter, and generating a fused feature vector based on the parameter differences between the first parameters and the associated parameters of all text feature vectors.
[0120] In S902, the fused feature vector is imported into interaction prediction models corresponding to multiple interaction operation types, and the interaction probability of the candidate document corresponding to each interaction operation type is calculated.
[0121] In this embodiment, since the fused feature vector can determine the degree of association between the candidate document and the target user, the fused feature vector can be imported into interaction prediction models corresponding to different interaction operation types to calculate the interaction probability corresponding to each interaction operation type. Interaction operation types include, but are not limited to, viewing, commenting, forwarding, recommending, or liking. Because different interaction operations have different focus points, to improve the accuracy of interaction probabilities, corresponding interaction prediction models can be configured for different interaction operation types.
[0122] In S903 , the recommendation coefficient of the candidate document is calculated based on each of the interaction probabilities.
[0123] In this embodiment, the terminal device may perform weighted summation of the interaction probabilities according to preset weight values for different interaction operation types, thereby obtaining a recommendation coefficient for the candidate document.
[0124] In S904 , recommended documents are selected based on the recommendation coefficients of all candidate documents.
[0125] In this embodiment, the terminal device can select candidate documents whose recommendation coefficients are greater than a preset recommendation threshold as recommended documents for the target user, or it can arrange them from large to small according to the recommendation coefficients and select the top N candidate documents as recommended documents, where the value of N is the preset maximum number of recommendations.
[0126] In an embodiment of the present application, by performing feature fusion on the above two vectors and calculating the interaction probability of each interactive operation type of the fused feature vector, the recommendation coefficient is determined, and the candidate document with the highest interaction probability is selected as the recommended document, thereby improving the accuracy of the recommended document.
[0127] Figure 10 The following is a flowchart showing a specific implementation of a method for generating a recommendation list provided in the seventh embodiment of the present application. Figure 10 , relative to Figures 1 to 8In any of the above embodiments, the method for generating a recommendation list provided in this embodiment further includes, after determining the recommended documents based on the user feature vector and the text feature vector and generating the recommendation list, steps S1001 to S1004, which are described in detail as follows:
[0128] In S1001, based on the interactive operation performed by the target user on the recommendation list, an accuracy parameter corresponding to the recommendation list is calculated.
[0129] In this embodiment, the accuracy parameter can be used to indicate whether each recommended document in the recommendation list meets the browsing needs of the user, wherein the accuracy rate and the recall rate can be used to characterize whether the recommendation list meets the browsing needs. The accuracy rate refers to the ratio of the number of recommended documents that the user actually interacts with to the number of all recommended documents; and the recall rate refers to the ratio of the number of recommended documents that the user actually interacts with to the number of all interactive documents of the user (since the user's interactive operations are not limited to the recommended documents in the recommendation list, they can be documents obtained by precise search through keywords). The terminal device can use the accuracy rate or the recall rate as the accuracy parameter.
[0130] In a possible implementation, the accuracy parameter can be calculated using the following formula: F1 = 2(precision*recall) / (precision+recall), where precision is the correct rate; recall is the recall rate, and is the accuracy parameter of F1.
[0131] In S1002 , the document coverage of the recommendation list is calculated according to the total number of the recommended documents and the number of documents included in the document database.
[0132] In this embodiment, the terminal device may use the ratio of the total number of recommended documents to the total number of existing documents included in the document database as the document coverage of the recommendation list.
[0133] In S1003 , the number of the recommended documents that are the same between the recommendation list and the reference list is identified, and the recommendation diversity of the recommendation list is determined.
[0134] In this embodiment, the terminal device may calculate the number of recommended documents that are identical between the recommendation list and the reference list to determine the recommendation diversity of the recommendation list. The recommendation diversity may be calculated using the Hamming distance calculation method. The specific formula is as follows:
[0135]
[0136] Among them, Q ut(L) is the number of the recommended documents that are the same between the recommended list and the reference list; H ut (L) is the recommendation diversity mentioned above; L is the total number of recommended documents in the recommendation list.
[0137] In S1004, the recommendation model is adjusted according to the accuracy parameter, the document coverage, and the recommendation diversity.
[0138] In this embodiment, the terminal device can adjust the recommendation model based on the above three parameters and can identify whether the above three parameters are within the preset valid range. If so, there is no need to adjust the above recommendation model. On the contrary, if it exceeds the valid range, the parameters in the recommendation model can be adjusted, and the recommendation model can be trained and learned through the preset training samples, the current recommendation list and interactive operations to obtain the adjusted recommendation model.
[0139] In the embodiment of the present application, by collecting the interactive operations of the target user based on the recommendation list and adjusting the recommendation model, the recommendation model can be optimized a posteriori, thereby improving the accuracy of the recommendation model.
[0140] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0141] Figure 11 The structure block diagram of a device for generating a recommendation list provided by an embodiment of the present application is shown. The device for generating a recommendation list includes various units for executing Figure 1 Each step in the corresponding embodiment. Please refer to Figure 11 and Figure 1 For the sake of convenience, only the parts related to this embodiment are shown.
[0142] See also Figure 11 , the recommendation list generating device includes:
[0143] The candidate document acquisition unit 111 is configured to extract candidate documents associated with the target user information from a document database based on the target user's user information; the user information includes the target user's browsing history;
[0144] The text feature vector generating unit 112 is used to determine the legal entities contained in each of the candidate documents based on a preset legal knowledge graph, and generate text feature vectors of all the legal entities;
[0145] The content feature vector generating unit 113 is configured to obtain a user knowledge graph of the target user and generate a content feature vector corresponding to each browsing record of the target user through the user knowledge graph;
[0146] A user attribute vector generating unit 114 is configured to output a user attribute vector corresponding to the target user based on the user information of the target user;
[0147] A user feature vector generating unit 115 is configured to generate a user feature vector of the target user based on the content feature vectors and the user attribute vectors of all the browsing records;
[0148] The recommendation list generating unit 116 is configured to determine recommended documents based on the user feature vector and the text feature vector, and generate a recommendation list.
[0149] Optionally, the candidate document obtaining unit 111 includes:
[0150] A legal category label acquisition unit, configured to acquire the legal category label of each existing document in the document database;
[0151] A legal document relationship tree generating unit, configured to generate a legal document relationship tree corresponding to the document database based on the cascade relationship between each of the legal category tags; the legal document relationship tree comprises a plurality of tag nodes; each tag node is associated with at least one of the existing documents;
[0152] an associated label node identification unit, configured to select the label node associated with the target user from the legal document relationship tree based on the user labels corresponding to the browsing contents of all the browsing records;
[0153] The first candidate document selection unit is configured to select the existing document in the associated tag node as the candidate document for the target user.
[0154] Optionally, the candidate document obtaining unit 111 includes:
[0155] A task feature vector generating unit, configured to generate a task feature vector corresponding to the target user according to the task to be processed;
[0156] a legal entity determination unit, configured to perform semantic analysis on each existing document in the document database, and respectively determine the legal entity contained in each existing document;
[0157] a legal entity vector generating unit, configured to construct a legal entity vector for each of the existing documents based on the legal entity;
[0158] The second candidate document selection unit is configured to calculate the similarity between the task feature vector and the legal entity vector, and select the existing document whose similarity is greater than a preset similarity threshold as the candidate document.
[0159] Optionally, the content feature vector generating unit 113 includes:
[0160] a content entity recognition unit, configured to perform semantic analysis on the browsing content corresponding to the browsing record and extract content entities contained in the browsing content;
[0161] A knowledge node marking unit, configured to identify knowledge nodes matching the content entity from the user knowledge graph;
[0162] A browsing knowledge path generating unit, configured to determine a subpath connecting each of the knowledge nodes in the user knowledge graph, and merge all of the subpaths to obtain a browsing knowledge path;
[0163] The content feature vector construction unit is configured to generate a content feature vector corresponding to the browsing record based on the browsing knowledge path.
[0164] Optionally, the content feature vector construction unit includes:
[0165] an associated node identification unit, configured to determine associated nodes of the knowledge nodes included in the browsing knowledge path in the user knowledge graph;
[0166] The associated node vector generating unit is configured to generate an associated node vector corresponding to the knowledge node based on the associated node; the function for calculating the associated node vector is specifically:
[0167]
[0168] Among them, Link i is the key node vector of the i-th knowledge node; content(E i ) is the number of associated nodes contained in the i-th knowledge node; E ij is the word vector of the jth associated node corresponding to the i-th knowledge node;
[0169] The associated node vector merging unit is used to merge the associated node vectors of all the knowledge nodes to obtain the content feature vector.
[0170] Optionally, the recommendation list generating unit 116 includes:
[0171] a fused feature vector generating unit, configured to fuse the user feature vector and the text feature vector to generate a fused feature vector of the candidate document;
[0172] an interaction probability calculation unit, configured to import the fused feature vector into interaction prediction models corresponding to a plurality of interaction operation types, and calculate the interaction probability of the candidate document corresponding to each of the interaction operation types;
[0173] A recommendation coefficient calculation unit, configured to calculate the recommendation coefficient of the candidate document based on each of the interaction probabilities;
[0174] The recommended document selection unit is used to select recommended documents based on the recommendation coefficients of all candidate documents.
[0175] Optionally, the device for generating the recommendation list further includes:
[0176] an accuracy parameter calculation unit, configured to calculate an accuracy parameter corresponding to the recommendation list based on an interactive operation performed by the target user on the recommendation list;
[0177] a document coverage calculation unit, configured to calculate the document coverage of the recommendation list according to the total number of recommended documents and the number of documents contained in the document database;
[0178] a recommendation diversity calculation unit, configured to identify the number of the recommended documents that are identical between the recommendation list and a reference list, and determine the recommendation diversity of the recommendation list;
[0179] A recommendation model adjustment unit is used to adjust the recommendation model according to the accuracy parameter, the document coverage and the recommendation diversity.
[0180] Therefore, the recommendation list generation device provided in the embodiment of the present application also does not require the user to manually input keywords, but can automatically extract candidate documents from the document database through the user's browsing history, and generate corresponding document feature vectors based on the document content, and configure the user feature vector according to the user's browsing habits and content of interest. Based on the matching degree between the above two vectors, it is determined whether the content of the candidate document is the content of interest to the user, and the recommended document is selected and a recommendation list is generated, which improves the accuracy of the recommended document selection and reduces the time spent by the user in searching for documents of interest.
[0181] Figure 12 This is a schematic diagram of a terminal device provided by another embodiment of the present application. Figure 12 As shown, the terminal device 12 of this embodiment includes: a processor 120, a memory 121, and a computer program 122 stored in the memory 121 and executable on the processor 120, such as a program for generating a recommendation list. When the processor 120 executes the computer program 122, the steps of the above-mentioned methods for generating a recommendation list are implemented, such as Figure 1 Alternatively, when the processor 120 executes the computer program 122, the functions of the units in the above-mentioned device embodiments are realized, for example, Figure 11 The functions of modules 111 to 116 are shown.
[0182] Exemplarily, the computer program 122 can be divided into one or more units, and the one or more units are stored in the memory 121 and executed by the processor 120 to complete the present application. The one or more units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program 122 in the terminal device 12. For example, the computer program 122 can be divided into a candidate document acquisition unit, a text feature vector generation unit, a content feature vector generation unit, a user attribute vector generation unit, a user feature vector generation unit, and a recommendation list generation unit, and the specific functions of each unit are as described above.
[0183] The terminal device 12 can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device can include, but is not limited to, a processor 120 and a memory 121. Those skilled in the art will understand that Figure 12 It is merely an example of the terminal device 12 and does not constitute a limitation on the terminal device 12. The terminal device may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0184] The processor 120 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0185] The memory 121 may be an internal storage unit of the terminal device 12, such as a hard disk or memory of the terminal device 12. The memory 121 may also be an external storage device of the terminal device 12, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 12. Furthermore, the memory 121 may include both an internal storage unit of the terminal device 12 and an external storage device. The memory 121 is used to store the computer program and other programs and data required by the terminal device. The memory 121 may also be used to temporarily store data that has been output or is about to be output.
[0186] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or 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.
[0187] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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 application, and should all be included in the scope of protection of the present application.
Claims
1. A method for generating a recommendation list, characterized in that: include: Based on user information of a target user, extracting candidate documents associated with the user information from a document database, wherein the user information includes browsing history of the target user; The method of extracting candidate documents associated with the user information of the target user from the document database based on the user information of the target user includes: obtaining legal category labels of each existing document in the document database; generating a legal document relationship tree corresponding to the document database based on the cascade relationship between each legal category label; the legal document relationship tree includes a plurality of label nodes; each label node is associated with at least one existing document; based on the user labels corresponding to the browsing content of all the browsing records, selecting the label node associated with the target user from the legal document relationship tree; and using the existing document in the associated label node as the candidate document for the target user; Based on a preset legal knowledge graph, determining the legal entities contained in each of the candidate documents, and obtaining text feature vectors of all the legal entities; Obtaining a user knowledge graph of the target user, and generating content feature vectors corresponding to each browsing record of the target user through the user knowledge graph; Outputting a user attribute vector corresponding to the target user according to the user information of the target user; generating a user feature vector of the target user based on the content feature vectors and the user attribute vectors of all the browsing records; Determine recommended documents based on the user feature vector and the text feature vector, and generate a recommendation list.
2. The generation method according to claim 1, characterized in that The user information includes the to-be-processed tasks of the target user, and the step of extracting candidate documents associated with the user information from the document database based on the user information of the target user includes: Generating a task feature vector corresponding to the target user according to the task to be processed; Performing semantic analysis on each existing document in the document database to determine the legal entity contained in each existing document; Based on the legal entity, constructing a legal entity vector for each of the existing documents; The similarity between the task feature vector and the legal entity vector is calculated, and the existing document whose similarity is greater than a preset similarity threshold is selected as the candidate document.
3. The generation method according to claim 1, characterized in that The acquiring the user knowledge graph of the target user and generating content feature vectors corresponding to each browsing record of the target user through the user knowledge graph includes: Performing semantic analysis on the browsing content corresponding to the browsing record to extract content entities contained in the browsing content; Identifying knowledge nodes matching the content entities from the user knowledge graph respectively; Determining subpaths connecting each of the knowledge nodes in the user knowledge graph, and merging all of the subpaths to obtain a browsing knowledge path; Based on the browsing knowledge path, a content feature vector corresponding to the browsing record is generated.
4. The generation method according to claim 3, characterized in that Generating a content feature vector corresponding to the browsing record based on the browsing knowledge path includes: Determining associated nodes of the knowledge nodes included in the browsing knowledge path in the user knowledge graph; Generate an associated node vector corresponding to the knowledge node based on the associated node; the function for calculating the associated node vector is specifically: Among them, Link i is the key node vector of the i-th knowledge node; content(E i ) is the number of associated nodes contained in the i-th knowledge node; E ij is the word vector of the jth associated node corresponding to the i-th knowledge node; The associated node vectors of all the knowledge nodes are merged to obtain the content feature vector.
5. The generation method according to any one of claims 1 to 4, characterized in that: The step of determining recommended documents based on the user feature vector and the text feature vector and generating a recommendation list includes: Performing feature fusion on the user feature vector and the text feature vector to generate a fused feature vector of the candidate document; Importing the fused feature vector into interaction prediction models corresponding to multiple interaction operation types, and calculating the interaction probability of the candidate document corresponding to each interaction operation type; Calculating a recommendation coefficient of the candidate document based on each of the interaction probabilities; Recommended documents are selected based on the recommendation coefficients of all candidate documents.
6. The generation method according to any one of claims 1 to 4, characterized in that: After determining the recommended documents according to the user feature vector and the text feature vector and generating a recommendation list, the method further includes: Calculating an accuracy parameter corresponding to the recommendation list based on the interactive operation performed by the target user on the recommendation list; Calculating the document coverage of the recommendation list according to the total number of the recommended documents and the number of documents included in the document database; Identifying the number of the recommended documents that are identical between the recommendation list and a reference list, and determining the recommendation diversity of the recommendation list; The recommendation model is adjusted according to the accuracy parameter, the document coverage, and the recommendation diversity.
7. A device for generating a recommendation list, characterized in that: include: A candidate document acquisition unit, configured to extract candidate documents associated with the target user information from a document database based on the target user's user information; The user information includes the browsing history of the target user; the candidate document acquisition unit includes: a legal category label acquisition unit, which is used to obtain the legal category labels of each existing document in the document database; a legal document relationship tree generation unit, which is used to generate a legal document relationship tree corresponding to the document database based on the cascade relationship between each of the legal category labels; the legal document relationship tree includes multiple label nodes; each label node is associated with at least one of the existing documents; an associated label node identification unit, which is used to select the label node associated with the target user from the legal document relationship tree based on the user labels corresponding to the browsing content of all the browsing records; a first candidate document selection unit, which is used to use the existing document in the associated label node as the candidate document of the target user; A text feature vector generating unit, configured to determine the legal entities contained in each of the candidate documents based on a preset legal knowledge graph, and obtain text feature vectors of all the legal entities; A content feature vector generating unit, configured to obtain a user knowledge graph of the target user and generate a content feature vector corresponding to each browsing record of the target user through the user knowledge graph; A user attribute vector generating unit, configured to output a user attribute vector corresponding to the target user based on the user information of the target user; A user feature vector generating unit, configured to generate a user feature vector of the target user based on the content feature vectors and the user attribute vectors of all the browsing records; The recommendation list generating unit is configured to determine the recommended documents based on the user feature vector and the text feature vector, and generate a recommendation list.
8. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are applied.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Question and answer method and device based on intelligent robot, storage medium and intelligent equipment
CN110765246A
Content recommendation method and device, equipment and readable storage medium
CN111008336A