Content recommendation method, device and equipment based on co-occurrence matrix optimization

By constructing a content recommendation method based on co-occurrence matrix, using keywords and word frequency to generate scoring result vectors, combined with iterative optimization of content transfer matrix and co-occurrence graph, the problem of insufficient information transmission of important information in content recommendation is solved, and more accurate and efficient content recommendation is achieved.

CN120448533AActive Publication Date: 2025-08-08NEUSOFT CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510641792.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-08
Estimated Expiration
2045-05-16

AI Technical Summary

Technical Problem

The existing co-occurrence matrix fails to effectively consider the global influence of diversified content in the co-occurrence network in content recommendation, resulting in the lack of important information transmission, affecting the accuracy and utility of recommendations.

Method used

By constructing a scoring result vector based on the keyword and word frequency of the target text material, combining the content transfer matrix and co-occurrence matrix, a content co-occurrence graph is generated, and the vertex weight is iteratively optimized, a content recommendation list is generated, and the semantic correlation between contents and important information transmission is enhanced.

Benefits of technology

The accuracy and effectiveness of content recommendations have been improved, especially in scenarios such as arbitration tribunal investigations, which significantly improves work efficiency and the accuracy of recommended content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448533A_ABST
    Figure CN120448533A_ABST
Patent Text Reader

Abstract

The invention discloses a content recommendation method, device and equipment based on co-occurrence matrix optimization. The method comprises the following steps: firstly, generating a scoring result vector by utilizing keywords and word frequencies of the keywords in a target text material and utilizing a pre-constructed co-occurrence matrix; in addition, a content transfer matrix is constructed based on the co-occurrence condition of the content of every two target types in each historical text material. And constructing a content co-occurrence graph taking the corresponding content as a vertex and taking the transition probability as an edge weight based on the content related to the co-occurrence matrix and the content transition matrix. And taking a semantic weighted score in the scoring result vector as an initial weight of a corresponding vertex in the content co-occurrence graph, and continuously iterating the weight of the vertex in the content co-occurrence graph by using a content transfer matrix. And generating a content recommendation list of the target text material by combining the weight of each reference vertex after multiple iterations and the semantic weighting score of each content. According to the scheme, effective transmission of important information is realized through the steps, and the accuracy of content recommendation and the effectiveness of the recommended content are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a content recommendation method, apparatus, and device based on co-occurrence matrix optimization. Background Art

[0002] In recent years, with the vigorous development of information technology, many technologies have made it easier for people to access information. In many scenarios, it is often necessary to recommend content to users so that they can quickly obtain valuable, meaningful, or interesting content from the vast amount of diverse content.

[0003] Currently, one approach to content recommendation is to use a co-occurrence matrix. A co-occurrence matrix generally reflects the number or probability of co-occurrence of words within a given context window, using its elements. Co-occurrence matrices are commonly used in natural language processing. While these matrices can be used to recommend content to users, they fail to consider the global influence of diverse content within the co-occurrence network. This leads to a lack of importance transfer, impacting both the accuracy of recommendations and the effectiveness of the recommended content. Summary of the Invention

[0004] Based on the above problems, the present application provides a content recommendation method, device and equipment based on co-occurrence matrix optimization, the purpose of which is to enhance the transmission of important information when using the co-occurrence matrix for content recommendation, thereby improving the accuracy of content recommendation and the effectiveness of the recommended content.

[0005] The embodiments of this application disclose the following technical solutions:

[0006] In a first aspect, the present application provides a content recommendation method based on co-occurrence matrix optimization, the method comprising:

[0007] A scoring result vector is generated using the keywords and word frequencies of the target text material and a pre-constructed co-occurrence matrix; the scoring result vector includes a semantically weighted score of each target type of content involved in the co-occurrence matrix; the co-occurrence matrix is constructed based on the keywords and target type content in each historical text material in the historical text material collection; the target type is the type of content to be recommended in the content recommendation scenario to which the co-occurrence matrix is applied; the co-occurrence matrix is a two-dimensional matrix, wherein the first dimension represents the content of the target type and the second dimension represents the keywords;

[0008] Based on the co-occurrence of each pair of target type contents in each piece of the historical text material, a content transfer matrix is constructed; in the content transfer matrix, the first dimension and the second dimension both represent the target type contents; the content corresponding to the row where the elements on the diagonal of the content transfer matrix are located is consistent with the content corresponding to the column where the elements are located; the value of the element in the i-th row and j-th column of the content transfer matrix represents the probability of transition from the i-th content to the j-th content;

[0009] Based on the content involved in the co-occurrence matrix and the content transition matrix, constructing a content co-occurrence graph with the content involved in the co-occurrence matrix as vertices and the transition probability as edge weights;

[0010] Determining the initial weight of each vertex in the content co-occurrence graph according to the scoring result vector;

[0011] Iteratively optimizing the initial weights of each vertex in the content co-occurrence graph using the content transfer matrix to obtain weights of each vertex after multiple iterations;

[0012] A content recommendation list of the target text material is generated by using the weights of each vertex after multiple iterations and the semantic weighted scores of each target type of content involved in the co-occurrence matrix.

[0013] A second aspect of the present application provides a content recommendation device based on co-occurrence matrix optimization, the device comprising:

[0014] A generation module is configured to generate a scoring result vector using keywords and keyword frequencies of target text materials and a pre-constructed co-occurrence matrix; the scoring result vector includes a semantically weighted score for each target type of content involved in the co-occurrence matrix; the co-occurrence matrix is constructed based on keywords and target type content in each historical text material in the historical text material collection; the target type is the type of content to be recommended in the content recommendation scenario to which the co-occurrence matrix is applied; the co-occurrence matrix is a two-dimensional matrix, wherein the first dimension represents the content of the target type and the second dimension represents keywords;

[0015] A first construction module is configured to construct a content transfer matrix based on the co-occurrence of each pair of target type contents in each copy of the historical text material; in the content transfer matrix, the first dimension and the second dimension both represent the target type contents; the content corresponding to the row where the elements on the diagonal of the content transfer matrix are located is consistent with the content corresponding to the column where the elements are located; and the value of the element in the i-th row and j-th column of the content transfer matrix represents the probability of transition from the i-th content to the j-th content;

[0016] A second construction module is configured to construct, based on the content involved in the co-occurrence matrix and the content transition matrix, a content co-occurrence graph having the content involved in the co-occurrence matrix as vertices and the transition probabilities as edge weights;

[0017] An initial weight determination module, configured to determine the initial weight of each vertex in the content co-occurrence graph according to the scoring result vector;

[0018] A weight updating module, configured to iteratively optimize the initial weights of each vertex in the content co-occurrence graph using the content transfer matrix to obtain weights of each vertex after multiple iterations;

[0019] The recommendation module is used to generate a content recommendation list of the target text material by using the weights of each vertex after multiple iterations and the semantic weighted scores of each target type of content involved in the co-occurrence matrix.

[0020] A third aspect of the present application provides a content recommendation device based on co-occurrence matrix optimization, the device comprising: a memory and a processor;

[0021] The memory is used to store computer programs;

[0022] The processor is configured to run the computer program, which, when running, executes the steps of the content recommendation method based on co-occurrence matrix optimization as described in the first aspect.

[0023] Compared with the existing technology, this application has the following beneficial effects:

[0024] This application proposes a content recommendation method based on co-occurrence matrix optimization, using target text materials as triggering material for content recommendation, and making targeted content recommendations for the target text materials. First, using the keywords and keyword frequencies in the target text materials, a pre-constructed co-occurrence matrix is used to generate a scoring result vector. Because this co-occurrence matrix is constructed based on the keywords and target-type content of each historical text material in the historical text material collection, it has the function of keyword-assisted recommendation of target-type content. The generated scoring result vector includes the semantically weighted scores of each target-type content involved in the co-occurrence matrix. Furthermore, this application also constructs a content transfer matrix based on the co-occurrence of each target-type content in each historical text material. The numerical values of the elements in the content transfer matrix represent the transition probability between the two corresponding contents. Based on the content involved in the co-occurrence matrix and the above-mentioned content transfer matrix, a content co-occurrence graph is constructed with the corresponding content as the vertex and the transition probability as the edge weight. In the content co-occurrence graph, the semantically weighted scores in the scoring result vector are used as the initial weights of the corresponding vertices, and the content transfer matrix is used to continuously iterate the weights of the vertices in the content co-occurrence graph. Finally, by referring to the weights of each vertex after multiple iterations and the semantic weighted scores of each content, each content is sorted to generate a content recommendation list for the target text material. In this application, the transition probability is used as the edge weight between vertices, which increases the attention paid to the co-occurrence features between contents and enhances the semantic association strength between contents. In addition, the semantic weighted score of the content is used as the initial weight of the vertex, which improves the utilization rate of the co-occurrence matrix. By iterating the vertex weights of the content co-occurrence graph multiple times, the importance of the content is continuously updated. The content is ranked and recommended based on the comprehensive semantic weighted score and the weight after multiple iterations, which realizes the effective transmission of important information, thereby improving the accuracy of content recommendation and the utility of the recommended content. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0026] Figure 1 A flowchart of a content recommendation method based on co-occurrence matrix optimization provided in an embodiment of the present application;

[0027] Figure 2 This is an architecture diagram of a content recommendation method based on co-occurrence matrix optimization provided in an embodiment of the present application;

[0028] Figure 3A schematic diagram of a process for constructing a co-occurrence matrix provided in an embodiment of the present application;

[0029] Figure 4 This is a flow chart of the data preparation phase in the early stage of co-occurrence matrix construction according to an embodiment of the present application;

[0030] Figure 5 A schematic diagram of constructing a co-occurrence matrix provided in an embodiment of the present application;

[0031] Figure 6 A schematic diagram of the structure of a content recommendation device based on co-occurrence matrix optimization provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] Content recommendation plays an important role in people's daily entertainment lives. For example, short video platforms recommend videos and information that users may be interested in based on their interests. In addition, content recommendation can also help improve office efficiency during people's work. Specifically, in scenarios such as project management, market research and analysis, policy formulation and evaluation, community building and management, and arbitration, people are often required to carefully study the materials and refine the questions that need to be asked. In arbitration scenarios, for example, arbitrators need to combine several written materials to extract core issues that have a substantial impact on the award and ask them questions. This places high demands on the arbitrators' personal abilities and work experience. However, the current number of experienced arbitrators cannot meet the growing demand for arbitration, and manual question extraction has certain limitations. Therefore, manually completing the arbitration hearing investigation stage generally faces challenges in execution efficiency, accuracy, and cost.

[0033] Co-occurrence matrices are currently used in content recommendation scenarios because they reflect the number or probability of co-occurrences between words. However, when using co-occurrence matrices for content recommendation, they often fail to convey important information, resulting in inaccurate recommendations and even ineffective content. Optimizing content recommendation schemes based on contribution matrices to effectively convey important information is currently a top priority for improving content recommendation effectiveness.

[0034] In view of the above problems, the inventors have proposed a content recommendation method, device and equipment based on co-occurrence matrix optimization after research. In the technical solution of this application, the keywords and keyword frequencies of the target text material, as well as the pre-constructed co-occurrence matrix, are used to generate a scoring result vector; based on the co-occurrence of the content of each target type in each historical text material, a content transfer matrix is constructed; based on the content involved in the co-occurrence matrix and the content transfer matrix, a content co-occurrence graph with the content involved in the co-occurrence matrix as the vertex and the transition probability as the edge weight is constructed; the initial weight of each vertex in the content co-occurrence graph is determined according to the scoring result vector; the initial weight of each vertex in the content co-occurrence graph is iteratively optimized using the content transfer matrix to obtain the weight of each vertex after multiple iterations; the content recommendation list of the target text material is generated using the weight of each vertex after multiple iterations and the semantic weighted score of each target type of content involved in the co-occurrence matrix. By using the transition probability as the edge weight, the semantic association strength between the contents can be reflected in the content co-occurrence graph through the edge weight value. In addition, the semantic weighted score of each content is used as the initial weight of the vertex in the content co-occurrence graph, which improves the utilization rate of the co-occurrence matrix, helps high-frequency co-occurrence content obtain a higher initial weight and continuously affects the results during iterations. Finally, the semantic weighted score and the weight after multiple iterations are combined to rank and recommend the content, achieving effective transmission of important information, thereby improving the accuracy of content recommendations and the effectiveness of the recommended content. The technical solution of this application is of great significance for content recommendation scenarios based on material questions, such as arbitration court investigations, and can significantly improve people's work efficiency and improve the accuracy of recommended content.

[0035] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0036] See also Figure 1 and Figure 2 , Figure 1 This is a flowchart of a content recommendation method based on co-occurrence matrix optimization provided in an embodiment of the present application. Figure 2 This is an architecture diagram of a content recommendation method based on co-occurrence matrix optimization provided in an embodiment of the present application. Figure 1 Show the recommendation process with a sequential relationship from top to bottom. Figure 2 The implementation architecture for generating a content recommendation list for the target text material is shown from left to right.

[0037] like Figure 1As shown in FIG, the content recommendation method based on co-occurrence matrix optimization includes the following steps:

[0038] S101. Generate a scoring result vector using the keywords and keyword frequencies of the target text material and a pre-built co-occurrence matrix.

[0039] The target text material can be understood as a text material that triggers the content recommendation of this execution. The purpose of the entire process of executing this solution is to complete the content recommendation for the target text material.

[0040] For example, in the implementation scenario of the arbitration hearing investigation phase, question recommendations are required to assist arbitrators in asking questions. The target text material mentioned in this step can be a newly received trial transcript (referred to as the target trial transcript). In this implementation scenario, question recommendations need to be made for the target trial transcript. Therefore, the recommended target type content in this scenario specifically refers to questions (or can be understood as question statements).

[0041] In this step, key features need to be extracted from the target text material, including keywords and the frequency of each keyword. Among them, keywords can be understood as text keywords.

[0042] When this step is specifically implemented, as a first optional implementation method, it is possible to combine a pre-built keyword library, extract words that match the keyword library from the target text material and add them to the keyword set of the target text material. In the second optional implementation method, taking into account that there may be semantically similar connections between words of different expressions, therefore, when pre-building the keyword library, it is possible to further construct a mapping relationship between similar words and their representative words, and further derive a representative vocabulary library corresponding to the keyword library based on the above mapping relationship. When executing this step, combined with the mapping relationship between similar words and representative words, as well as the specific vocabulary in the representative vocabulary, the representative vocabulary library is searched for matching representative words for the target text material, and the matching representative words are added to the keyword set of the target text material.

[0043] The frequency of keywords can be calculated through data statistics.

[0044] In the embodiment of the present application, the number of occurrences of a keyword is not used as the word frequency, but the ratio of the number of occurrences of a certain keyword in the target text material to the sum of the number of occurrences of all keywords in the target text material is used as the word frequency of the keyword in the target text material. By analogy, the word frequency of each keyword in the target text material in the keyword set of the target text material can be obtained. Through this standardized processing method, the influence of the number of words in the text material on the application of word frequency is weakened. Similarly, when calculating the word frequency in the stage of constructing the co-occurrence matrix, this calculation method can also be used for calculation. In this way, through standardized processing, it is avoided that due to the small number of overall words in different historical text materials, the word frequency of the keyword is highlighted very high, so that the co-occurrence of the historical text material with a small number of words to the construction of the co-occurrence matrix is greater than the contribution of other historical text materials with a large number of words.

[0045] Considering that there may be semantically similar connections between words in different expressions, for the second implementation method of obtaining a keyword set, when calculating the keyword frequency, the sum of the number of occurrences of similar words that have a mapping relationship with a representative word in the target text material and the representative word can be used as the numerator for the standardized calculation of the representative word frequency, and then the keyword frequency is obtained through division. Therefore, through this implementation method, and with the help of the mapping relationship between similar words and representative words, the frequency of each representative word in the keyword set of the target text material can be obtained.

[0046] In order to facilitate understanding of the overall process of generating a scoring result vector using the keywords and keyword frequencies of the target text material and the pre-constructed co-occurrence matrix, it is necessary to explain the constructed co-occurrence matrix below.

[0047] The co-occurrence matrix is constructed based on the keywords and target type content in each historical text material in the historical text material collection. The co-occurrence matrix is a two-dimensional matrix, wherein the first dimension represents the target type content and the second dimension represents the keywords. The first dimension and the second dimension are used to distinguish the two different dimensions of the co-occurrence matrix: rows and columns. As an example, the first dimension is the rows of the matrix and the second dimension is the columns of the matrix. Then, each row of the co-occurrence matrix corresponds to a target type of content, and each column corresponds to a keyword. In another example, the first dimension is the columns of the matrix and the second dimension is the rows of the matrix. Then, each column of the co-occurrence matrix corresponds to a target type of content, and each row corresponds to a keyword. In the embodiments below, in order to facilitate understanding and description, an example in which the first dimension is the rows of the matrix and the second dimension is the columns of the matrix is used for introduction. It can be understood that when the first dimension is the columns of the matrix and the second dimension is the rows of the matrix, the technical concept expressed in the technical solution of this application can still be applied.

[0048] The target type is the type of content to be recommended in the content recommendation scenario in which the co-occurrence matrix is applied. For example, in the implementation scenario of an arbitration hearing investigation, the target type of content in this scenario specifically refers to questions. Therefore, in this scenario, as an example, the first dimension of the co-occurrence matrix represents questions, and the second dimension represents keywords.

[0049] See also Figure 3 , the process of constructing the co-occurrence matrix can specifically include:

[0050] S301. Obtain a collection of historical text materials.

[0051] A historical text material collection includes multiple historical text materials. Taking court trial transcripts as an example, a historical text material collection can be a historical court trial transcript dataset, and historical text materials can be historical court trial transcripts. For example, a historical court trial transcript dataset includes 4,900 historical court trial transcripts from arbitrations in a certain region.

[0052] S302: Extract keywords and target type of content from each historical text material, and construct a content set and keyword set corresponding to each historical text material.

[0053] Taking historical court trial transcripts as an example, questions and keywords can be extracted from each transcript. Specifically, a large language model can be applied to each transcript to extract keywords that are crucial to the question. For example, the prompt might read: "[Instructions] The materials contain the applicant's application, the respondent's defense, and the cross-examination of evidence from a court trial transcript. Please identify keywords that are important to the subsequent court investigation. For example, if the question involves 'Should the applicant's nursing expenses be paid?' and the material contains words related to "nursing expenses," these keywords are identified as keywords. [Materials]... [Court Investigation Questions]..." This constructs the keyword set corresponding to that historical trial transcript. The keyword sets of each historical trial transcript are deduplicated and merged to form a keyword library.

[0054] Extract all the questions the arbitrators asked the applicant and the respondent from the trial investigation section of each historical trial transcript, segment them, remove stop words, and retain only the core semantics. This step can also be achieved by designing prompt words and calling a large language model for each historical trial transcript. The prompt word content is: "[Instruction] I want to convert the question list into vector form, but I need you to help me process the questions in advance, including removing stop words, as well as irrelevant information such as time, place, name and amount. If the text is empty, please output 'none' [Requirements] 1. If a question contains several sub-questions, it must be broken down and refined, and the sub-questions must be complete (for example: When did the applicant resign? Why?: 'Resignation date', 'Reason for resignation'). 2. All questions must be output as a list 3. Do not make up questions out of thin air and do not output extra content besides the list; [Example] Question 1 {When did the applicant start working for the respondent and how did he / she do so?} Question 2 {Did the applicant request compensatory leave for 2018 in 2019?}: ['Joining employment date', 'Joining employment method', 'Request for paid leave'] [Text]...". This constructs the question set corresponding to the historical trial transcript, that is, the content set. Optionally, the question set can be further divided into the applicant's question set and the respondent's question set. After de-duplicating and merging the question sets of each historical trial transcript, a question library is formed, which can be further divided into the applicant's question library and the respondent's question library.

[0055] S303: Count the word frequencies of the keywords in the keyword set in the corresponding historical text materials, and construct keyword-word frequency pairs corresponding to each historical text material.

[0056] The standardized method for calculating word frequency has been introduced previously and will not be repeated here. Please refer to the previous description. The following example demonstrates the process of calculating keyword frequency for a historical text. Suppose a document contains the following keywords: "labor": 3 times; "dispute": 2 times; "arbitration": 1 time. The standardized calculation of word frequency is as follows:

[0057]

[0058]

[0059]

[0060] When constructing the matrix, it's also important to consider the semantic similarity between keywords and between content. By analyzing semantic similarity, we can establish semantic connections between similar content and representative content, and between similar words and representative words. This prevents the diverse presentation of semantically similar content and keywords, which could interfere with the efficient construction of the co-occurrence matrix or increase the complexity of its application.

[0061] Figure 4 This is a flow chart of the data preparation phase in the early stage of building the co-occurrence matrix in the embodiment of the present application. Figure 4As can be seen, keywords can be extracted from the applicant's application, the respondent's defense, and the tribunal's cross-examination in the court transcripts to form a keyword library; questions can be extracted from the arbitrators' questions during the court investigation to form a question library. For keywords, the keyword library can be vectorized and then subjected to K-means clustering analysis: all similar word sets are clustered. The optimal number of clusters, K, is then determined using the elbow rule. Finally, each cluster and its center are obtained, and a mapping relationship between similar words and representative words is constructed. For questions, sentences are more semantically complex than words, and their category boundaries are fuzzy, making them less suitable for forced clustering. Therefore, cosine similarity threshold classification can be used for questions. Finally, a mapping relationship between each representative question and its similar questions is obtained through classification. Based on the above mapping relationships, the keyword library mentioned above can be optimized into a representative word set corresponding to the historical court transcript dataset, and the question library mentioned above can be optimized into a representative question set corresponding to the historical court transcript dataset. Based on the calculated word frequencies, keyword-word frequency pairs corresponding to each piece of historical text can be obtained.

[0062] S304: Construct a co-occurrence matrix based on the keyword set, the content set, and the keyword-frequency pairs corresponding to each piece of historical text material.

[0063] First, an initial matrix can be pre-constructed with each content in the content set as the first dimension index, each keyword in the keyword set as the second dimension index, and the elements at each position set to 0. Taking the first dimension representing the rows of the matrix and the second dimension representing the columns of the matrix as an example, an initial matrix is constructed with the content as the row index and the keyword as the column index. Next, each historical text material in the historical text material collection is traversed to determine the elements at the corresponding positions of the content set and keyword set corresponding to the currently traversed historical text material in the current initial matrix. The word frequency of the keyword-word frequency pair corresponding to the currently traversed historical text material is superimposed with the numerical value of the element at the corresponding position of the current initial matrix to complete an update of the initial matrix. Figure 5 The schematic diagram of constructing the co-occurrence matrix provided in the embodiment of the present application is shown below in combination with Figure 5 Introduce the form of the constructed co-occurrence matrix.

[0064] exist Figure 5 Shows the local effects of the intermediate stages during the construction of the co-occurrence matrix, illustrating only the values of four rows and four columns. Figure 5 The right side shows four different questions: Question 1, Question 2, Question 3, and Question 4; and four different keywords: Word 1, Word 2, Word 3, and Word 4. Figure 5 The left side shows a historical court transcript containing: Question 2 and Question 4. In addition, Figure 5The left side also shows the keyword-word frequency pairs of the historical trial transcript, including word 1: 0.4 and word 3: 0.6. Figure 5 The right side of shows only the matrix effect after traversing the first historical trial transcript. Before that, the matrix effects for Questions 1 to 4 and Words 1 to 4 in the initial matrix should have all elements in the four rows and four columns set to 0. During the traversal process, simply add the word frequency to the corresponding position in the current initial matrix.

[0065] Through the above steps, we know that this historical trial transcript only involves questions 2 and 4 and the key words 1 and 3. Therefore, we can locate the second row and first column position (2,1) = 0, the second row and third column position (2,3) = 0, the fourth row and first column position (4,1) = 0, and the fourth row and third column position (4,3) = 0 from the current initial matrix. For the two positions (2,1) and (4,1) in the first column, since the first column corresponds to word 1 and the word frequency of word 1 is 0.4, the word frequency of 0.4 is superimposed on the two positions (2,1) and (4,1) of the current initial matrix; for the two positions (2,3) and (4,3) in the third column, since the third column corresponds to word 3 and the word frequency of word 3 is 0.6, the word frequency of 0.6 is superimposed on the two positions (2,3) and (4,3) of the current initial matrix. This shows Figure 5 The matrix effect shown on the right: Each time a material is traversed, the word frequency value is added to the corresponding position.

[0066] In conjunction with the above scenario examples, in the technical solution of this application, after the historical text material set is traversed, the final update of the initial matrix is completed. Therefore, the matrix that has completed the last update can be used as the co-occurrence matrix for subsequent retrieval.

[0067] Using the target text's keywords and their frequency, along with a pre-built co-occurrence matrix, we can generate a scoring vector. This scoring vector contains a semantically weighted score for each target type of content mentioned in the co-occurrence matrix. The following describes an optional implementation for generating the scoring vector.

[0068] In this application, based on multiple keywords of the target text material, multiple feature vectors are retrieved from the co-occurrence matrix, and the feature vectors correspond to the keywords one by one. Based on the co-occurrence matrix that has been constructed, data indexing can be achieved based on the keywords, that is, feature vectors are indexed. For example, the target text material includes a total of 4 keywords, and 4 feature vectors can be extracted from the co-occurrence matrix. If the rows of the matrix in the co-occurrence matrix correspond to the content and the columns correspond to the keywords, then extracting the feature vector can be understood as extracting the vector composed of the elements on the column corresponding to the keyword.

[0069] Next, feature enhancement is performed on the feature vectors corresponding to the corresponding keywords using word frequency, obtaining multiple enhanced feature vectors. Here, word frequency specifically refers to the word frequency of the keywords in the target text material. Using word frequency to perform feature enhancement on the feature vectors strengthens the critical role of word frequency in the target text material. Feature enhancement allows the enhanced feature vectors to be strongly correlated with the inherent characteristics of the target text material. Therefore, the enhanced feature vectors not only reflect the co-occurrence characteristics of the target type of content and keywords in the historical text material, but also reflect the important contribution of keywords in the target text material to content extraction and content recommendation. In an optional implementation of this step, feature enhancement can be performed by multiplying the feature vector corresponding to the keyword by the word frequency of the keyword in the target text material to obtain the enhanced feature vector for the keyword. For example, if the target text material contains the keyword "nursing fee" with a word frequency of 0.3 and the keyword "work-related injury insurance" with a word frequency of 0.7, then the columns corresponding to "nursing fee" and "work-related injury insurance" are extracted from the co-occurrence matrix to construct two feature vectors, and the two feature vectors are multiplied by 0.3 and 0.7, respectively. This step is not limited to the above-mentioned feature enhancement processing method of directly multiplying the feature vector and the keyword frequency. For example, the feature enhancement processing can also be achieved by summing or other operations including summing, multiplication or exponential operation.

[0070] Afterwards, the summation operation is performed on multiple enhanced feature vectors, and the result of the operation is obtained as the scoring result vector. The essence of this step is to accumulate the element values at the same position of these vectors. The purpose is to reflect the matching of each target type of content with the target text material horizontally through the element values at each position on the operation result, i.e., the scoring result vector, based on the integrity of the target text material. The element values at each position on the scoring result vector represent the semantic weighted score of the corresponding content. It can be understood that the higher the semantic weighted score, the more it can reflect that the content is worth recommending from the dimension of the scoring result vector.

[0071] S102. Construct a content transfer matrix based on the co-occurrence of content of two target types in each historical text material.

[0072] See also Figure 2 The architecture of the content recommendation method based on co-occurrence matrix optimization shown in the figure uses the co-occurrence matrix to obtain the scoring result vector. In this step, this application also constructs a content transfer matrix to reflect the co-occurrence between contents. The construction of this matrix is based on the data set of historical text materials.

[0073] In the content transfer matrix, both the first and second dimensions represent the target type of content. The content corresponding to the row and column of the diagonal elements of the content transfer matrix is the same. The value of the element in the i-th row and j-th column of the content transfer matrix represents the probability of transitioning from the i-th content to the j-th content. For example, if the target type of content is questions, the content transfer matrix can also be understood as a question transfer matrix. The value of the element in the i-th row and j-th column of the question transfer matrix represents the probability of transitioning from the i-th representative question to the j-th representative question.

[0074] Based on the co-occurrence of each pair of target type content in each historical text material, a content transfer matrix is constructed, which may include:

[0075] The historical text material collection is traversed, and the number of co-occurring target content types in each historical text material is counted. The count values are added to the two symmetrical positions related to the two co-occurring content in the first transfer matrix until the traversal is completed, and the second transfer matrix is obtained. The first transfer matrix is the initialized content transfer matrix, and the elements at each position are set to 0 during the initialization. Subsequently, the numerical normalization processing is performed on each row element of the second transfer matrix to obtain the final content transfer matrix.

[0076] Taking the construction of the question transfer matrix as an example, for each pair of co-occurrence questions (q i , q j ), in the initialized question transition matrix, position (i, j) in row i, column j and position (j, i) in row j, column i are both counted +1. This process searches for co-occurrences between any two questions, using the counts to reflect the frequency of co-occurrences. After numerically normalizing the second transition matrix, ensure that the sum of the values in each row is 1. In other words, the sum of the transition probabilities from each question to any other question is 1. Numerical normalization of a row of data is a well-established technique in this field, so the specific normalization process is not detailed here.

[0077] S103 : Based on the content involved in the co-occurrence matrix and the content transfer matrix, construct a content co-occurrence graph with the content involved in the co-occurrence matrix as vertices and the transfer probability as edge weights.

[0078] After constructing the content transfer matrix, since the numerical values of the elements in the content transfer matrix represent the transfer probability between the two contents corresponding to the rows and columns, this application proposes that the transfer probability can be used as the weight of the edge between the two contents, that is, the edge weight. The content can be used as a fixed point to construct a content co-occurrence graph with the contents involved in the co-occurrence matrix as vertices and the above-mentioned transfer probability as the edge weight. If the target type of content is a question, then the content co-occurrence graph here can also be understood as a problem co-occurrence graph, and the edges between the vertices in the graph represent the co-occurrence connection between the questions, with the problem transfer probability as the edge weight between each two problem vertices. As an example, the vertices in the problem co-occurrence graph can be the representative questions represented by the first dimension in the co-occurrence matrix. The problem co-occurrence graph G constructed in this application is a directed graph, and the edge between two vertices has a directional direction. For example, the representative question q i The vertex points to the representative problem q j The edge of the vertex, its edge weight w ij Equal to the value of the element at the i-th row and j-th column in the problem transfer matrix.

[0079] PageRank is a web page ranking algorithm used to measure the importance and authority of web pages. The importance of each web page is measured by iterating its PageRank value (PR value). Generally speaking, during the initialization phase of the algorithm, an initial PR value is assigned to each web page, and then the PR value of each web page is repeatedly updated using a formula until convergence. Finally, the web pages are sorted according to the PR value, with web pages with higher PR values ranking higher in the search results. The mechanism of the PageRank algorithm can also be applied to the content recommendation method of the technical solution of this application.

[0080] However, traditional PageRank defines edge weights as uniformly distributed (all outgoing edge weights = 1 / out-degree), which ignores domain knowledge that certain content combinations are more likely to be recommended together. This approach, however, uses the co-occurrence value (transition probability) between content as edge weights, automatically emphasizing the transition probability of frequently co-occurring content. For the implementation scenario of arbitration hearings and investigations, this ensures that the recommended question chain aligns with actual dispute patterns. This overcomes the traditional assumption of uniform edge weight distribution, which fails to capture the strength of semantic connections between questions.

[0081] S104 : Determine the initial weight of each vertex in the content co-occurrence graph according to the scoring result vector.

[0082] In traditional PageRank implementations, all nodes have the same initial weight (1 / N). However, this application uses the semantically weighted score of each target type of content as the initial weight for the corresponding vertex in the content co-occurrence graph. This helps high-frequency content (such as controversial points in court transcripts) receive a higher initial weight, which continuously influences the results during iterations.

[0083] It can be understood that the semantic weighted score of each content is represented by the numerical values of elements at different positions in the scoring result vector. Each semantic weighted score can be normalized, and the normalized numerical values can be used as the initial weight of the content corresponding to the corresponding position, that is, the initial weight of the corresponding vertex in the content co-occurrence graph. The vector containing the initial weights of each content, that is, the vector after the numerical normalization of the scoring result vector, can be called the initial weight vector. The initial weight vector includes the initial weights of each vertex in the question co-occurrence graph. The normalization formula is as follows:

[0084]

[0085] Where q i Indicates the i-th content, s i Indicates the content q in the scoring result vector i The semantic weighted score, PR0(q i ) represents the normalized content q i For other target types of content, the semantic weighted scores can be normalized according to the above formula to obtain the initial weights of the content vertices. This application adopts an iterative optimization method to asynchronously update the weights of each vertex in the problem co-occurrence graph so that it is continuously updated based on the initial weights. See the introduction of S105.

[0086] S105 , iteratively optimizing the initial weight of each vertex in the content co-occurrence graph using the content transfer matrix to obtain the weight of each vertex after multiple iterations.

[0087] An optional implementation of this step is shown in the following formula:

[0088]

[0089] Where, represents the damping coefficient, which can be set to 0.8; T represents the content transfer matrix, which is obtained after step S102; N represents the total number of vertices in the content question graph, which can also be understood as the first dimension of the co-occurrence matrix and the content transfer matrix. t represents the number of iterations. When t=0, w (0) Represents the initial weight vector, obtained after executing step S104. The 1 in the above formula represents a vector whose elements are all 1. In this way, the sum of vectors can still be represented by vectors, and the numerical expressions on both sides of the equal sign in the above formula are consistent. Through the above formula, the new weight vector containing the weights of each vertex after one iteration can be calculated. As an example, 100 iterations can be performed to finally obtain the vector w (100) This vector contains the weight of each vertex in the content co-occurrence graph after 100 iterations. The number of iterations t can be set based on actual needs or determined based on the convergence of the weights of each vertex in the graph over time.

[0090] S106 : Generate a content recommendation list of the target text material by using the weights of each vertex after multiple iterations and the semantic weighted scores of each target type of content involved in the co-occurrence matrix.

[0091] An example implementation of this step is described below. As mentioned above, each vertex in the content co-occurrence graph represents each content represented by the first dimension in the co-occurrence matrix. The dimension of the first dimension of the co-occurrence matrix is N. The co-occurrence matrix involves N target types of content. Accordingly, the content co-occurrence graph contains N vertices, which are in a one-to-one correspondence with the aforementioned N target types of content. In this example, the scoring result vector is an N-dimensional vector, which contains the semantic weighted scores of the aforementioned N target types of content. Therefore, based on the weights of each vertex after multiple iterations and the scoring result vector, two parts of values can be obtained for each of the N target types of content: (1) semantic weighted score; (2) weight after multiple iterations. In the technical solution of this application, the above two parts of values are combined to sort each content to generate a content recommendation list for the target text material.

[0092] Specifically, using the one-to-one correspondence between each vertex and the content involved in the co-occurrence matrix, a weighted sum operation is performed on the weights of each vertex after multiple iterations and the semantic weighted scores of the corresponding content to obtain the final score of each target type of content involved in the co-occurrence matrix. The content of each target type involved in the co-occurrence matrix is sorted in descending order according to the numerical value of the final score to generate a content recommendation list for the target text material. The following formula illustrates this calculation process:

[0093]

[0094] For each target type of content involved in the first dimension of the co-occurrence matrix, the above formula can be used to calculate its final score. x Indicates the weight of the content after x iterations, that is, the weight of the content vertex after the content co-occurrence graph is iterated x times. semantic Indicates the semantic weighted score of the content. β represents the weight coefficient of the semantic weighted score. Correspondingly, (1-β) represents the weight coefficient of the vertex weight in the graph. The Score obtained by calculation final represents the final score of the problem. For example, β = 0.9. This means that the semantically weighted score takes a greater weight, but at the same time, the weight of the vertex after multiple iterations is also taken into account in the score.

[0095] Based on the final score obtained after the weighted summation operation, each content item is ranked to generate a content recommendation list. This ranking method takes into account the domain statistical characteristics of the vertex itself, helping high-frequency content (such as controversial issues in court transcripts) receive higher initial weights, which continuously influence the results during iterations. This ensures the transmission of important information. PageRank weighting is applied, and the importance of content is iteratively updated through the topological structure of the co-occurrence network. This ensures that the recommendation results reflect both local co-occurrence characteristics and the global importance distribution, taking into account the global influence of the vertex in the network. This ensures that the content ranking in the final content recommendation list is more accurate.

[0096] The content recommendation method based on co-occurrence matrix optimization proposed in the technical solution of this application uses the target text material as the trigger for content recommendation, making targeted content recommendations for the target text material. First, using the keywords and keyword frequencies in the target text material, a scoring result vector is generated using a pre-constructed co-occurrence matrix. Because this co-occurrence matrix is constructed based on the keywords and target type content of each historical text material in the historical text material collection, it has the function of keyword-assisted recommendation of target type content. The generated scoring result vector includes the semantically weighted score of each target type content involved in the co-occurrence matrix. In addition, this application also constructs a content transfer matrix based on the co-occurrence of each target type content in each historical text material. The numerical value of the elements in the content transfer matrix represents the transition probability between the two corresponding contents. Based on the content involved in the co-occurrence matrix and the above-mentioned content transfer matrix, a content co-occurrence graph is constructed with the corresponding content as the vertex and the transition probability as the edge weight. In the content co-occurrence graph, the semantically weighted score in the scoring result vector is used as the initial weight of the corresponding vertex, and the content transfer matrix is used to continuously iterate the weights of the vertices in the content co-occurrence graph. Finally, by referring to the weights of each vertex after multiple iterations and the semantic weighted scores of each content, each content is sorted to generate a content recommendation list for the target text material. In this application, the transition probability is used as the edge weight between vertices, which increases the attention paid to the co-occurrence features between contents and enhances the semantic association strength between contents. In addition, the semantic weighted score of the content is used as the initial weight of the vertex, which improves the utilization rate of the co-occurrence matrix. By iterating the vertex weights of the content co-occurrence graph multiple times, the importance of the content is continuously updated. The content is ranked and recommended based on the comprehensive semantic weighted score and the weight after multiple iterations, which realizes the effective transmission of important information, thereby improving the accuracy of content recommendation and the utility of the recommended content.

[0097] In addition to the above-mentioned comprehensive use of the co-occurrence matrix and the content transfer matrix to enhance the PageRank mechanism and assist in achieving more accurate content recommendations, this application also proposes that the co-occurrence matrix can be optimized, as detailed below.

[0098] The semantics of the constructed co-occurrence matrix may have a coarse granularity problem. Specifically, the previous co-occurrence matrix is mainly constructed based on word frequency statistics, and is likely to be relatively limited in its ability to capture the deep semantic connections between content and materials. To address this problem, the technical solution of this application proposes that after constructing the co-occurrence matrix, the content recommendation method based on the co-occurrence matrix optimization also includes:

[0099] Extract content semantic vectors for each content item in the co-occurrence matrix, and extract word semantic vectors for each keyword in the co-occurrence matrix; calculate the cosine similarity between each extracted word semantic vector and each content semantic vector; construct a cosine similarity matrix based on the calculated cosine similarities; and fuse the co-occurrence matrix and the cosine similarity matrix to obtain a first optimized co-occurrence matrix. In the cosine similarity matrix, the first dimension represents the content, and the second dimension represents the keywords.

[0100] Semantic vectors are extracted for content and keywords respectively. The purpose is to represent the semantics of keywords and content in a vector manner to facilitate similarity calculation. The technical solution of this application can use a pre-trained BERT model to implement vector extraction. For example, the BERT model is used to extract the 768-dimensional word semantic vector of each keyword, and the BERT model is used to extract the content semantic vector of each target type of content.

[0101] In the embodiment of the present application, the word semantic vector and the content semantic vector are compared with each other, and the cosine similarity value is used to reflect the semantic gap between the word and the target type of content, thereby conveniently capturing the deep semantic association between the content and the text material from the cosine similarity matrix. Assuming that the first dimension of the cosine similarity matrix is the row of the matrix and the second dimension is the column of the matrix, the element value s at the position of the i-th row and the j-th column in the cosine similarity matrix S is ij It can be calculated by the following formula:

[0102]

[0103] Where q i The content semantic vector representing the content of the i-th row, k j Represents the word semantic vector of the keyword in the jth column.

[0104] Assuming that before optimizing the co-occurrence matrix, the co-occurrence matrix is represented as M and the cosine similarity matrix is represented as S, the process of fusing the co-occurrence matrix with the cosine similarity matrix to obtain the first optimized co-occurrence matrix M' can be expressed as:

[0105]

[0106] Where, Indicates the fusion weight coefficient of S, as an example =0.2. By calculating the cosine similarity between the content semantic vector and the word semantic vector described above, and constructing a cosine similarity matrix, and fusing this cosine similarity matrix with the pre-optimized co-occurrence matrix, we can capture the deep semantic connections between the target content and materials to be recommended, thus making the semantic granularity of the first optimized co-occurrence matrix more refined. Testing has shown that this optimization strategy significantly improves the recall rate for long-tail questions.

[0107] The constructed co-occurrence matrix may contain low-frequency noise. Specifically, the co-occurrence matrix may contain a large number of low co-occurrence values (accidental co-occurrences of content and keywords). This low-frequency noise dilutes the relevance between keywords and content, making it more difficult to accurately recommend content.

[0108] To address this issue, the present application further proposes that, after obtaining the first optimized co-occurrence matrix, the content recommendation method based on co-occurrence matrix optimization further includes:

[0109] The values of the elements at each position in the first optimized co-occurrence matrix are numerically filtered using a preset threshold, elements with values lower than the preset threshold are reset to 0, and elements with values higher than or equal to the preset threshold are retained to obtain a second optimized co-occurrence matrix.

[0110] This optimization strategy essentially applies threshold filtering to the elements at each position in the first optimized co-occurrence matrix. The preset threshold can be set based on actual needs. For example, if stronger resistance to low-frequency noise interference is required, a lower threshold can be set. As an example, the preset threshold is set to 1, indicating that elements greater than or equal to 1 are retained, and all other elements less than 1 are reset to 0. In this way, the first optimized co-occurrence matrix is sparsely processed, effectively eliminating low-frequency noise interference and improving the accuracy of recommended content.

[0111] Combined with the method embodiment described above and Figure 1 、 Figure 2In this application, a co-occurrence matrix is used in step S101. The resulting scoring vector is obtained by vector extraction and calculation based on the constructed co-occurrence matrix. In addition, the scoring vector also determines the initial weights of the vertices of the content co-occurrence graph. Moreover, both the scoring vector and the content co-occurrence graph influence the generated content recommendation list. Therefore, the importance of optimizing the content co-occurrence matrix can be seen. Two specific optimization strategies have been introduced above: weighting based on semantic similarity and sparsifying the matrix. Therefore, under this optimization strategy, the co-occurrence matrix used in this application can specifically be an optimized co-occurrence matrix, namely the first optimized co-occurrence matrix or the second optimized co-occurrence matrix. The first optimized co-occurrence matrix undergoes a single optimization; the second optimized co-occurrence matrix undergoes a double optimization. The second optimized co-occurrence matrix not only has finer semantic granularity and is able to excel in capturing the deep semantics between content and materials, but also weakens low-frequency noise interference, highlighting the strong correlation between keywords and content, which is beneficial for achieving more accurate content recommendations. If the co-occurrence matrix is double-optimized, generating a second optimized co-occurrence matrix, the target text's keywords and their frequency, along with the pre-built co-occurrence matrix, are used to generate a scoring result vector. Specifically, the scoring result vector is generated using the target text's keywords and their frequency, along with the second optimized co-occurrence matrix. That is, vector retrieval is performed from the second optimized co-occurrence matrix, ultimately generating a scoring result vector for use in subsequent content recommendation processes.

[0112] In the implementation scenario of an arbitration hearing investigation, certain questions often follow a fixed order. For example, the questions "When did the applicant start working at the respondent organization?" and "What kind of work do you do?" are asked in a sequential order. In the previously described embodiment of the content recommendation method, the order of questions was not considered when generating the content recommendation list (the recommended question list). In this application, to make the order of questions presented in the recommended question list more consistent with human questioning habits and language logic, a sequence-aware weighting algorithm is proposed. This algorithm uses a subsequence mining method to weight the order of questions in the recommended question list. Specifically, a set of questions from several historical trial transcripts can be mapped into a representative set of questions based on their semantic similarity. Optionally, these representative question sets can be mined using the Python PrefixSpan library to identify subsequences of length 2 with a support greater than 500, thereby obtaining high-frequency binary question sequences. The first question in each binary question sequence is referred to as position 0, and the second as position 1. For each binary question sequence, if both questions are in the recommended question list generated by this solution, the element in position 1 is moved after position 0. Furthermore, when there is a competitive order between two or more binary question sequences, the sequence with higher support is given priority. In this way, the order of questions in the formed question recommendation list is more in line with people's questioning habits and language logic. Combined with the introduction of the above embodiments, it is not difficult to know that the method proposed in this application can not only facilitate the work of arbitrators, but also extract high-value questions to be asked based on the trial transcript in an automated manner, and can also add sequential elements to the recommended question list, so that when asking questions in the order in the question recommendation list, it can take into account the questioning habits and language logic, and obtain better application effects in the trial investigation link.

[0113] Based on the content recommendation method based on co-occurrence matrix optimization introduced in the above embodiment, the present application also provides a content recommendation device based on co-occurrence matrix optimization. Figure 6 Figure 2 is a schematic diagram of the structure of the device. Figure 6 As shown, a content recommendation device based on co-occurrence matrix optimization includes:

[0114] A generation module 61 is configured to generate a scoring result vector using keywords and keyword frequencies of target text materials and a pre-constructed co-occurrence matrix; the scoring result vector includes a semantically weighted score for each target type of content involved in the co-occurrence matrix; the co-occurrence matrix is constructed based on keywords and target type content in each historical text material in the historical text material collection; the target type is the type of content to be recommended in the content recommendation scenario to which the co-occurrence matrix is applied; the co-occurrence matrix is a two-dimensional matrix, wherein the first dimension represents the content of the target type and the second dimension represents keywords;

[0115] A first construction module 62 is configured to construct a content transfer matrix based on the co-occurrence of each pair of target type contents in each copy of the historical text material; in the content transfer matrix, the first dimension and the second dimension both represent the target type contents; the content corresponding to the row where the elements on the diagonal of the content transfer matrix are located is consistent with the content corresponding to the column where the elements are located; and the value of the element in the i-th row and j-th column of the content transfer matrix represents the probability of transition from the i-th content to the j-th content;

[0116] A second construction module 63 is configured to construct, based on the content involved in the co-occurrence matrix and the content transition matrix, a content co-occurrence graph having the content involved in the co-occurrence matrix as vertices and the transition probabilities as edge weights;

[0117] An initial weight determination module 64 is configured to determine the initial weight of each vertex in the content co-occurrence graph according to the scoring result vector;

[0118] A weight updating module 65 is configured to iteratively optimize the initial weights of each vertex in the content co-occurrence graph using the content transfer matrix to obtain weights of each vertex after multiple iterations;

[0119] The recommendation module 66 is configured to generate a content recommendation list of the target text material by using the weights of each vertex after multiple iterations and the semantic weighted scores of each target type of content involved in the co-occurrence matrix.

[0120] In an optional implementation of the device, the first building module 62 includes:

[0121] a matrix updating unit configured to traverse the set of historical text materials, count the number of co-occurring target type contents in each set of historical text materials, and enter the count values into two symmetrical positions associated with the two co-occurring contents in a first transfer matrix until the traversal is completed to obtain a second transfer matrix; the first transfer matrix is an initialized content transfer matrix, and elements at each position are set to 0 during initialization;

[0122] A normalization processing unit is used to perform numerical normalization processing on each row element of the second transfer matrix to obtain a final content transfer matrix.

[0123] In an optional implementation of the device, the device further includes:

[0124] A vector extraction module, configured to extract content semantic vectors for the contents involved in the co-occurrence matrix, and to extract word semantic vectors for the keywords involved in the co-occurrence matrix;

[0125] A similarity calculation module is used to calculate the cosine similarity between each extracted word semantic vector and each content semantic vector;

[0126] A third construction module is configured to construct a cosine similarity matrix based on the calculated cosine similarities; in the cosine similarity matrix, the first dimension represents content and the second dimension represents keywords;

[0127] The matrix fusion module is used to fuse the co-occurrence matrix with the cosine similarity matrix to obtain a first optimized co-occurrence matrix.

[0128] In an optional implementation of the device, the device further includes:

[0129] a numerical filtering module, configured to perform numerical filtering on the numerical values of elements at each position in the first optimized co-occurrence matrix using a preset threshold, resetting elements with numerical values lower than the preset threshold to 0, and retaining elements with numerical values higher than or equal to the preset threshold, to obtain a second optimized co-occurrence matrix;

[0130] The generating module 61 is specifically configured to:

[0131] A scoring result vector is generated using the keywords and the word frequencies of the target text material and the second optimized co-occurrence matrix.

[0132] In an optional implementation of the device, the generating module 61 includes:

[0133] A vector retrieval unit, configured to retrieve a plurality of feature vectors from the co-occurrence matrix based on a plurality of keywords in the target text material; the feature vectors correspond one-to-one to the keywords;

[0134] an enhancement processing unit, configured to perform feature enhancement processing on feature vectors corresponding to corresponding keywords using the word frequency to obtain a plurality of enhanced feature vectors;

[0135] The vector operation unit is used to perform a sum operation on the multiple enhanced feature vectors, and the obtained operation result is used as the scoring result vector.

[0136] In an optional implementation of the device, the device further includes: a fourth construction module 67 for constructing a co-occurrence matrix; the fourth construction module 67 specifically includes:

[0137] A material acquisition unit, configured to acquire the historical text material set; the historical text material set includes a plurality of historical text materials;

[0138] An extraction unit, configured to extract keywords and the target type of content from each of the historical text materials, and construct a content set and a keyword set corresponding to each of the historical text materials;

[0139] A word frequency counting unit, configured to count the word frequency of each keyword in the keyword set in the corresponding historical text material, and construct a keyword-word frequency pair corresponding to each copy of the historical text material;

[0140] The co-occurrence matrix construction unit is used to construct the co-occurrence matrix based on the keyword set, the content set and the keyword-word frequency pairs corresponding to each of the historical text materials.

[0141] In an optional implementation of the device, the co-occurrence matrix construction unit is specifically configured to:

[0142] Constructing an initial matrix with each content in the content set as a first dimension index, each keyword in the keyword set as a second dimension index, and with each element at each position set to 0;

[0143] Traversing each of the historical text materials in the historical text material set, determining the elements of the content set and keyword set corresponding to the currently traversed historical text material at corresponding positions in the current initial matrix, and superimposing the word frequencies of the keyword-word frequency pairs corresponding to the currently traversed historical text material with the values of the elements at corresponding positions in the current initial matrix to complete an update of the initial matrix;

[0144] After the historical text material set is traversed, the initial matrix that has completed the last update is used as the co-occurrence matrix.

[0145] In an optional implementation of the device, the recommendation module 66 includes:

[0146] A score calculation unit is configured to utilize a one-to-one correspondence between each vertex and the content involved in the co-occurrence matrix to perform a weighted sum operation on the weight of each vertex after multiple iterations and the semantic weighted score of the corresponding content to obtain a final score for each target type of content involved in the co-occurrence matrix;

[0147] The sorting unit is used to sort the contents of each target type involved in the co-occurrence matrix in descending order according to the numerical value of the final score, and generate a content recommendation list of the target text material.

[0148] In an optional implementation of the device, the target text material and the material types of each historical text material in the historical text material set are court transcripts; the content of the target type represented by the first dimension of the co-occurrence matrix is the question statement extracted from the historical text material set; the keywords represented by the second dimension of the co-occurrence matrix are text keywords extracted from the historical text material set.

[0149] Based on the content recommendation method and apparatus based on co-occurrence matrix optimization described in the aforementioned embodiment, the present application also provides a content recommendation device based on co-occurrence matrix optimization, the device comprising: a memory and a processor;

[0150] The memory is used to store computer programs;

[0151] The processor is configured to run the computer program, and when the computer program is run, the steps of the content recommendation method based on co-occurrence matrix optimization in any implementation manner described in the method embodiment are executed.

[0152] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and equipment embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0153] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A content recommendation method based on co-occurrence matrix optimization, characterized in that: include: Generate a scoring result vector using the keywords and keyword frequencies of the target text material and a pre-built co-occurrence matrix; The scoring result vector includes a semantic weighted score of each target type of content involved in the co-occurrence matrix; The co-occurrence matrix is constructed based on keywords and target type content in each historical text material in the historical text material collection; the target type is the type of content to be recommended in the content recommendation scenario to which the co-occurrence matrix is applied; The co-occurrence matrix is a two-dimensional matrix, wherein the first dimension represents the content of the target type and the second dimension represents keywords; Constructing a content transfer matrix based on the co-occurrence of each pair of target type contents in each piece of the historical text material; In the content transfer matrix, the first dimension and the second dimension both represent the target type of content; the content corresponding to the row where the elements on the diagonal of the content transfer matrix are located is consistent with the content corresponding to the column where the elements are located; the value of the element in the i-th row and j-th column of the content transfer matrix represents the probability of transition from the i-th content to the j-th content; Based on the content involved in the co-occurrence matrix and the content transition matrix, constructing a content co-occurrence graph with the content involved in the co-occurrence matrix as vertices and the transition probability as edge weights; Determining the initial weight of each vertex in the content co-occurrence graph according to the scoring result vector; Iteratively optimizing the initial weights of each vertex in the content co-occurrence graph using the content transfer matrix to obtain weights of each vertex after multiple iterations; A content recommendation list of the target text material is generated by using the weights of each vertex after multiple iterations and the semantic weighted scores of each target type of content involved in the co-occurrence matrix.

2. The method according to claim 1, characterized in that The step of constructing a content transfer matrix based on the co-occurrence of each pair of target type contents in each piece of the historical text material includes: Traversing the historical text material set, counting the number of co-occurring contents of the target type in each of the historical text materials, and adding the count values to two symmetrical positions related to the two co-occurring contents in the first transfer matrix until the traversal is completed to obtain a second transfer matrix; the first transfer matrix is an initialized content transfer matrix, and the elements at each position are set to 0 during the initialization; Perform numerical normalization processing on each row element of the second transfer matrix to obtain a final content transfer matrix.

3. The method according to claim 1, characterized in that After constructing the co-occurrence matrix, the method further includes: Extracting content semantic vectors for the contents involved in the co-occurrence matrix, and extracting word semantic vectors for the keywords involved in the co-occurrence matrix; Calculate the cosine similarity between each extracted word semantic vector and each content semantic vector; Constructing a cosine similarity matrix based on the calculated cosine similarities; in the cosine similarity matrix, the first dimension represents content and the second dimension represents keywords; The co-occurrence matrix is fused with the cosine similarity matrix to obtain a first optimized co-occurrence matrix.

4. The method according to claim 3, characterized in that After obtaining the first optimized co-occurrence matrix, the method further includes: Performing numerical filtering on the values of elements at each position in the first optimized co-occurrence matrix using a preset threshold, resetting elements with values lower than the preset threshold to 0, and retaining elements with values higher than or equal to the preset threshold, to obtain a second optimized co-occurrence matrix; The method of generating a scoring result vector by using the keywords and word frequencies of the target text material and a pre-built co-occurrence matrix includes: A scoring result vector is generated using the keywords and the word frequencies of the target text material and the second optimized co-occurrence matrix.

5. The method according to claim 1, wherein The method of generating a scoring result vector by using the keywords and word frequencies of the target text material and a pre-built co-occurrence matrix includes: Based on the multiple keywords of the target text material, a plurality of feature vectors are retrieved from the co-occurrence matrix; the feature vectors correspond to the keywords one by one; Performing feature enhancement processing on feature vectors corresponding to corresponding keywords using the word frequencies to obtain multiple enhanced feature vectors; A sum operation is performed on the multiple enhanced feature vectors, and the obtained operation result is used as the scoring result vector.

6. The method according to claim 1, characterized in that The co-occurrence matrix is constructed in the following manner: Acquire the historical text material set; the historical text material set includes multiple historical text materials; Extract keywords and the target type of content from each of the historical text materials, and construct a content set and a keyword set corresponding to each of the historical text materials; Counting the word frequency of each keyword in the keyword set in the corresponding historical text material, and constructing a keyword-word frequency pair corresponding to each copy of the historical text material; The co-occurrence matrix is constructed based on the keyword set, the content set, and the keyword-word frequency pairs corresponding to each of the historical text materials.

7. The method according to claim 6, characterized in that The constructing of the co-occurrence matrix based on the keyword set, the content set, and the keyword-frequency pairs corresponding to each of the historical text materials includes: Constructing an initial matrix with each content in the content set as a first dimension index, each keyword in the keyword set as a second dimension index, and with each element at each position set to 0; Traversing each of the historical text materials in the historical text material set, determining the elements of the content set and keyword set corresponding to the currently traversed historical text material at corresponding positions in the current initial matrix, and superimposing the word frequencies of the keyword-word frequency pairs corresponding to the currently traversed historical text material with the values of the elements at corresponding positions in the current initial matrix to complete an update of the initial matrix; After the historical text material set is traversed, the initial matrix that has completed the last update is used as the co-occurrence matrix.

8. The method according to any one of claims 1 to 7, characterized in that The method of generating a content recommendation list of the target text material by using the weights of each vertex after multiple iterations and the semantic weighted scores of each target type of content involved in the co-occurrence matrix includes: Utilizing the one-to-one correspondence between each vertex and the content involved in the co-occurrence matrix, a weighted sum operation is performed on the weights of each vertex after multiple iterations and the semantic weighted scores of the corresponding content to obtain a final score for each target type of content involved in the co-occurrence matrix; The contents of each target type involved in the co-occurrence matrix are arranged in descending order according to the numerical value of the final score, and a content recommendation list of the target text material is generated.

9. The method according to any one of claims 1 to 7, characterized in that The target text material and the historical text materials in the historical text material set are all of court trial transcripts; the content of the target type represented by the first dimension of the co-occurrence matrix is the question statements extracted from the historical text material set; the keywords represented by the second dimension of the co-occurrence matrix are text keywords extracted from the historical text material set.

10. A content recommendation device based on co-occurrence matrix optimization, characterized in that: include: A generation module is used to generate a scoring result vector using the keywords and word frequencies of the target text material and a pre-built co-occurrence matrix; The scoring result vector includes a semantic weighted score of each target type of content involved in the co-occurrence matrix; The co-occurrence matrix is constructed based on keywords and target type content in each historical text material in the historical text material collection; the target type is the type of content to be recommended in the content recommendation scenario to which the co-occurrence matrix is applied; The co-occurrence matrix is a two-dimensional matrix, wherein the first dimension represents the content of the target type and the second dimension represents keywords; A first construction module is configured to construct a content transfer matrix based on the co-occurrence of each pair of target type contents in each piece of the historical text material; In the content transfer matrix, the first dimension and the second dimension both represent the target type of content; the content corresponding to the row where the elements on the diagonal of the content transfer matrix are located is consistent with the content corresponding to the column where the elements are located; the value of the element in the i-th row and j-th column of the content transfer matrix represents the probability of transition from the i-th content to the j-th content; A second construction module is configured to construct, based on the content involved in the co-occurrence matrix and the content transition matrix, a content co-occurrence graph having the content involved in the co-occurrence matrix as vertices and the transition probabilities as edge weights; An initial weight determination module, configured to determine the initial weight of each vertex in the content co-occurrence graph according to the scoring result vector; A weight updating module, configured to iteratively optimize the initial weights of each vertex in the content co-occurrence graph using the content transfer matrix to obtain weights of each vertex after multiple iterations; The recommendation module is used to generate a content recommendation list of the target text material by using the weights of each vertex after multiple iterations and the semantic weighted scores of each target type of content involved in the co-occurrence matrix.

11. A content recommendation device based on co-occurrence matrix optimization, characterized in that: include: memory and processor; The memory is used to store computer programs; The processor is configured to run the computer program, and when the computer program is run, the steps of the content recommendation method based on co-occurrence matrix optimization are performed as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Video recommendation method, device, computer apparatus and storage medium

    CA3132002A1

  • Article recommendation method based on Chinese similarity calculation

    CN110020189A

  • Literature representation method based on word frequency co-occurrence analysis

    CN111259150A

  • Security propaganda and education recommendation method and system based on demand portrait and content label

    CN118797173A

  • Pushing method and apparatus based on re-clustering, and computer device and storage medium

    WO2020073534A1