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

By constructing a co-occurrence matrix and a content transition matrix, the content recommendation method is optimized, which solves the problem of insufficient transmission of important information in existing technologies, achieves more accurate and efficient content recommendation, and improves the work efficiency in scenarios such as arbitration hearings and investigations.

CN120448533BActive Publication Date: 2026-07-21NEUSOFT CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEUSOFT CORP
Filing Date
2025-05-16
Publication Date
2026-07-21

Smart Images

  • Figure CN120448533B_ABST
    Figure CN120448533B_ABST
Patent Text Reader

Abstract

The application discloses a content recommendation method, device and equipment based on co-occurrence matrix optimization. Firstly, the keywords and the word frequency of the keywords in the target text material are used to generate a scoring result vector by using a pre-constructed co-occurrence matrix. In addition, a content transfer matrix is constructed based on the co-occurrence of the content of each pair of target types in each historical text material. A content co-occurrence graph with corresponding content as the vertex and the transfer probability as the edge weight is constructed based on the content involved in the co-occurrence matrix and the content transfer matrix. In the content co-occurrence graph, the semantic weighted score in the scoring result vector is used as the initial weight of the corresponding vertex, and the weight of the vertex in the content co-occurrence graph is iterated by using the content transfer matrix. The content recommendation list of the target text material is generated by combining the weight of each vertex after multiple iterations and the semantic weighted score of each content. The above steps realize effective transmission of important information, improve the accuracy of content recommendation and the utility of recommended content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This 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 Technology

[0002] In recent years, with the rapid 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 find valuable, meaningful, or interesting content from a vast amount of diverse information.

[0003] Currently, one approach to content recommendation is to use co-occurrence matrices. Co-occurrence matrices typically reflect the frequency or probability of words co-occurring within a given context window. While co-occurrence matrices are commonly used in natural language processing, they fail to consider the global influence of diverse recommendable content within the co-occurrence network. This leads to a lack of importance propagation, impacting the accuracy and utility of content recommendations. Summary of the Invention

[0004] To address the aforementioned issues, this application provides a content recommendation method, apparatus, and device based on co-occurrence matrix optimization. The aim is to enhance the transmission of important information when using 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] The first aspect of this application provides a content recommendation method based on co-occurrence matrix optimization, the method comprising:

[0007] A scoring result vector is generated using keywords and keyword frequencies of the target text material, as well as a pre-constructed co-occurrence matrix. The scoring result vector contains a semantically weighted score of the content of each target type 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 a historical text material set. The target type is the type of content to be recommended in the content recommendation scenario in which the co-occurrence matrix is ​​applied. The co-occurrence matrix is ​​a two-dimensional matrix, where the first dimension represents the content of the target type and the second dimension represents keywords.

[0008] Based on the co-occurrence of each pair of target type content in each historical text material, a content transition matrix is ​​constructed; in the content transition matrix, the first dimension and the second dimension both represent the content of the target type; the content corresponding to the row where the element on the diagonal of the content transition matrix is ​​located is the same as the content corresponding to the column where the element is located; the value of the element in the i-th row and j-th column of the content transition matrix represents the transition probability 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, a content co-occurrence graph is constructed with the content involved in the co-occurrence matrix as vertices and the transition probabilities as edge weights.

[0010] The initial weights of each vertex in the content co-occurrence graph are determined based on the scoring result vector.

[0011] The initial weights of each vertex in the content co-occurrence graph are iteratively optimized using the content transition matrix to obtain the weights of each vertex after multiple iterations.

[0012] By utilizing the weights of each vertex after multiple iterations and the semantic weighted score of the content of each target type involved in the co-occurrence matrix, a content recommendation list for the target text material is generated.

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

[0014] A generation module is used to generate a scoring result vector by utilizing the keywords and word frequencies of the target text material, as well as a pre-constructed co-occurrence matrix. The scoring result vector contains a semantically weighted score of the content of each target type 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 set. The target type is the type of content to be recommended in the content recommendation scenario in which the co-occurrence matrix is ​​applied. The co-occurrence matrix is ​​a two-dimensional matrix, where the first dimension represents the content of the target type and the second dimension represents the keywords.

[0015] The first construction module is used to construct a content transition matrix based on the co-occurrence of pairs of content of the target type in each of the historical text materials; in the content transition matrix, the first dimension and the second dimension both represent the content of the target type; the content corresponding to the row where the element on the diagonal of the content transition matrix is ​​located is the same as the content corresponding to the column where the element is located; the value of the element in the i-th row and j-th column of the content transition matrix represents the transition probability from the i-th content to the j-th content;

[0016] The second construction module is used to construct a content co-occurrence graph with the content involved in the co-occurrence matrix as vertices and the transition probabilities as edge weights, based on the content involved in the co-occurrence matrix and the content transition matrix.

[0017] An initial weight determination module is used to determine the initial weights of each vertex in the content co-occurrence graph based on the scoring result vector.

[0018] The weight update module is used to iteratively optimize the initial weights of each vertex in the content co-occurrence graph using the content transition matrix, and obtain the weights of each vertex after multiple iterations.

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

[0020] A third aspect of this 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, performs the steps of the content recommendation method based on co-occurrence matrix optimization as described in the first aspect.

[0023] Compared with the prior art, this application has the following beneficial effects:

[0024] This application proposes a content recommendation method based on co-occurrence matrix optimization. It uses target text materials as triggers for content recommendations, making targeted recommendations based on these materials. First, it utilizes keywords and their frequencies from the target text materials to generate a scoring result vector using a pre-constructed co-occurrence matrix. This co-occurrence matrix, constructed from keywords and target type content from historical text materials in a historical text set, possesses the function of keyword-assisted recommendation of target type content. The generated scoring result vector contains the semantically weighted score of each target type content involved in the co-occurrence matrix. Furthermore, this application constructs a content transition matrix based on the co-occurrence of each pair of target type content in each historical text material. The numerical values ​​of the elements in the content transition matrix represent the transition probabilities between the corresponding two pieces of content. Based on the content involved in the co-occurrence matrix and the aforementioned content transition matrix, a content co-occurrence graph is constructed with corresponding content as vertices and transition probabilities as edge weights. In the content co-occurrence graph, the semantically weighted score from the scoring result vector is used as the initial weight of the corresponding vertex, and the weights of the vertices in the content co-occurrence graph are iteratively adjusted using the content transition matrix. Finally, by combining the weights of each vertex after multiple iterations and the semantic weighted score of each content, a content recommendation list for the target text material is generated by ranking the content. In this application, the transition probability is used as the edge weight between vertices to increase the attention to co-occurrence features between content and enhance the semantic association strength between content; in addition, the semantic weighted score of the content is used as the initial weight of the vertex to improve the utilization rate of the co-occurrence matrix. Through multiple iterations of the vertex weights of the content co-occurrence graph, the importance of the content is continuously updated. By combining the semantic weighted score and the weights after multiple iterations to rank and recommend content, the effective transmission of important information is achieved, thereby improving the accuracy of content recommendation and the utility of the recommended content. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A flowchart illustrating a content recommendation method based on co-occurrence matrix optimization provided in this application embodiment;

[0027] Figure 2 An architecture diagram of a content recommendation method based on co-occurrence matrix optimization provided in this application embodiment;

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

[0029] Figure 4 This is a flowchart illustrating the data preparation stage prior to co-occurrence matrix construction in an embodiment of this application.

[0030] Figure 5 This is a schematic diagram illustrating the construction of a co-occurrence matrix provided in an embodiment of this application;

[0031] Figure 6 This is a schematic diagram of a content recommendation device based on co-occurrence matrix optimization provided in an embodiment of this application. Detailed Implementation

[0032] Content recommendation plays a vital role in people's daily entertainment. For example, short video platforms recommend videos and information that users might be interested in based on their interests. Furthermore, content recommendation can also help improve work efficiency. Specifically, in scenarios such as project management, market research and analysis, policy formulation and evaluation, community building and management, and arbitration, people often need to carefully study materials and extract the questions to be asked. Taking arbitration as an example, arbitrators need to extract the core issues that have a substantial impact on the award from several written materials and ask them questions. This places high demands on the arbitrators' personal abilities and work experience. Currently, the number of senior arbitrators is insufficient to meet the growing demand for arbitration, and manually extracting questions has certain limitations. Therefore, manually completing the arbitration hearing investigation phase generally presents challenges in terms of efficiency, accuracy, and cost.

[0033] Co-occurrence matrices, reflecting the frequency or probability of co-occurrence between words, are currently used in content recommendation scenarios. However, when using co-occurrence matrices for content recommendation, the transmission of important information is often lacking, leading to inaccurate recommendations or even failing to achieve their intended effectiveness. Optimizing content recommendation schemes based on contribution matrices to effectively convey important information is currently of paramount importance for improving content recommendation performance.

[0034] In view of the above problems, the inventors have proposed a content recommendation method, apparatus, and device based on co-occurrence matrix optimization. In this application's technical solution, a scoring result vector is generated using the keywords and word frequencies of the target text material, as well as a pre-constructed co-occurrence matrix. A content transition matrix is ​​constructed based on the co-occurrence of each pair of target types of content in each historical text material. A content co-occurrence graph is constructed based on the content involved in the co-occurrence matrix and the content transition matrix, with the content involved in the co-occurrence matrix as vertices and the transition probability as edge weights. The initial weights of each vertex in the content co-occurrence graph are determined according to the scoring result vector. The initial weights of each vertex in the content co-occurrence graph are iteratively optimized using the content transition matrix to obtain the weights of each vertex after multiple iterations. A content recommendation list for the target text material is generated using the weights 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 edge weights, the semantic association strength between content can be reflected through the edge weight values ​​in the content co-occurrence graph. Furthermore, using the semantic weighted score of each content as the initial weight of a vertex in the content co-occurrence graph improves the utilization of the co-occurrence matrix, helping frequently co-occurring content to obtain higher initial weights and continuously influence the results during iterations. Finally, the semantic weighted score and the weights after multiple iterations are combined to rank and recommend content, achieving effective transmission of important information and thus improving the accuracy and utility of content recommendations. This technical solution is of great significance for content recommendation scenarios based on materials, such as arbitration hearing investigations, and can significantly improve work efficiency and the accuracy of recommended content.

[0035] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0036] See Figure 1 and Figure 2 , Figure 1 A flowchart illustrating a content recommendation method based on co-occurrence matrix optimization provided in this application embodiment. Figure 2 This is an architecture diagram of a content recommendation method based on co-occurrence matrix optimization provided in an embodiment of this application. Wherein, Figure 1 The recommendation process is presented from top to bottom, showing a sequential relationship. Figure 2 The implementation architecture for generating a content recommendation list from the target text material is then displayed from left to right.

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

[0038] S101. Using the keywords and word frequencies of the target text material, as well as the pre-constructed co-occurrence matrix, generate a scoring result vector.

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

[0040] Taking the implementation scenario of the arbitration hearing investigation stage, which requires the recommendation of questions to assist the arbitrator in asking questions, as an example, the target text material mentioned in this step can be a newly received hearing transcript (hereinafter referred to as: target hearing transcript). In this implementation scenario, it is necessary to recommend questions for the target hearing transcript. Therefore, the recommended target type of 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 word frequency of each keyword. Keywords can be understood as textual terms.

[0042] In the specific implementation of this step, as the first optional approach, a pre-built keyword library can be used to extract words matching the keyword library from the target text material and add them to the keyword set of the target text material. In the second optional approach, considering the potential semantic similarity between words with different expressions, a mapping relationship between similar words and their representative words can be further constructed when pre-building the keyword library. Based on the keyword library and the above mapping relationship, a representative word library corresponding to the keyword library can be further derived. When executing this step, combining the mapping relationship between similar words and representative words, and the specific words in the representative word library, matching representative words are queried for the target text material in the representative word library, 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 this embodiment, instead of using the number of times a keyword appears as the term frequency, the term frequency of a keyword in the target text material is calculated as the ratio of the number of times a keyword appears in the target text material to the sum of the number of times all keywords appear in that target text material. This ratio is then used to obtain the term frequency of each keyword in the keyword set of the target text material. This standardized processing method reduces the impact of the number of words in the text material on the application of term frequency. Similarly, this calculation method can be used when calculating term frequency during the co-occurrence matrix construction stage. Thus, through standardization, the problem of keyword frequencies being highlighted due to the overall small number of words in different historical text materials, resulting in the short historical text material contributing more to the co-occurrence matrix construction than other historical text materials with more words, is avoided.

[0045] Considering the potential semantic similarities between words in different expressions, the second approach to obtaining the keyword set involves using the sum of the occurrences of similar words in the target text that have a mapping relationship with a representative word, along with the representative word itself, as the numerator for standardizing the representative word's frequency. This numerator is then used to obtain the keyword's frequency through division. Thus, by employing this approach and leveraging the mapping relationship between similar words and representative words, the frequency of each representative word in the keyword set of the target text can be obtained.

[0046] To facilitate understanding of the overall process of generating a scoring result vector using keywords and keyword frequencies from the target text material, as well as a 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 keywords and target type content from various historical text materials in a historical text collection. The co-occurrence matrix is ​​a two-dimensional matrix, where the first dimension represents the target type content and the second dimension represents the keywords. The first and second dimensions are used to distinguish the two different dimensions of the co-occurrence matrix: rows and columns. For example, if the first dimension is the rows of the matrix and the second dimension is the columns, then each row of the co-occurrence matrix corresponds to one target type of content, and each column corresponds to one keyword. In another example, if the first dimension is the columns of the matrix and the second dimension is the rows, then each column of the co-occurrence matrix corresponds to one target type of content, and each row corresponds to one keyword. In the embodiments described below, for ease of understanding and description, an example where the first dimension is the rows and the second dimension is the columns will be used. It is understood that the technical concept described in this application remains applicable even when the first dimension is the columns and the second dimension is the rows.

[0048] The target type refers to the type of content to be recommended in the content recommendation scenario where the co-occurrence matrix is ​​applied. Taking the implementation scenario of the arbitration trial investigation stage as an example, the target type of content specifically refers to the question in this scenario. Therefore, in this scenario, as an example, the first dimension of the co-occurrence matrix represents the question, and the second dimension represents the keywords.

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

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

[0051] The historical text materials set includes multiple historical text materials. Taking court transcripts as an example, the historical text materials set can be a dataset of historical court transcripts, and the historical text materials can be historical court transcripts. For example, the historical court transcript dataset includes 4,900 historical court transcripts from arbitrations in a certain region.

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

[0053] Taking historical court 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 questions. For example, the prompt might be: "[Instruction] The materials contain the applicant's application, the respondent's response, and the examination of evidence in a court transcript. Please find keywords that are important for subsequent court investigation questions. For example, if the question involves 'whether the applicant's nursing care expenses should be paid?' and the materials contain the term 'nursing care expenses,' then it is considered a keyword. [Materials]... [Court Investigation Questions]...". This constructs the keyword set corresponding to that historical court transcript. After deduplicating and merging the keyword sets of each historical court transcript, a keyword library is formed.

[0054] From the investigation section of each historical court hearing transcript, all questions asked by the arbitrator to the applicant and respondent are extracted. These questions are then segmented, stop words are removed, and only the core semantics are retained. This step can also be achieved by designing prompts and applying a large language model to each historical court hearing transcript. The prompt is: "[Instruction] I want to convert the question list into a vector format, but I need you to preprocess the questions, including removing stop words and irrelevant information such as time, location, names, and amounts. If the text is empty, please output 'None'."

Requirements

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

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

[0057]

[0058]

[0059]

[0060] When constructing the co-occurrence matrix, it is also necessary 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 avoids the diversification of content with similar semantics and the diversification of keywords with similar semantics, 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 flowchart illustrating the data preparation stage prior to co-occurrence matrix construction in an embodiment of this application. From... Figure 4As can be seen, keywords can be extracted from the applicant's application, the respondent's response, and the arbitral tribunal's cross-examination in the court transcripts to form a keyword database; questions can be extracted from the arbitrators' questions during the court investigation to form a question database. For keywords, the keyword database can be vectorized, and then K-means clustering analysis can be used: all similar word sets are clustered, and the optimal number of clusters K is determined using the elbow rule, ultimately obtaining each cluster and its center, thus constructing a mapping relationship between similar words and representative words. For questions, compared to words, sentences have more complex semantics and blurred category boundaries, making forced clustering unsuitable. Therefore, cosine similarity threshold classification can be used for questions, ultimately obtaining the mapping relationship between each representative question and its similar questions through classification. Based on the construction of the above mapping relationships, the aforementioned keyword database can be optimized into a set of representative words corresponding to the historical court transcript dataset, and the aforementioned question database can be optimized into a set of representative questions corresponding to the historical court transcript dataset. Based on the calculated word frequencies, keyword-word frequency pairs corresponding to each historical text material can be obtained.

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

[0063] First, an initial matrix can be pre-constructed, with each content item in the content set as the first-dimensional index and each keyword in the keyword set as the second-dimensional index, and all elements at each position set to 0. Taking the first dimension as the row of the matrix and the second dimension as the column as an example, this constructs an initial matrix with content as the row index and keywords as the column index. Next, each historical text in the historical text material set is traversed, and the elements of the content set and keyword set corresponding to the currently traversed historical text material are determined at the corresponding positions in the current initial matrix. The frequency of the keyword-word frequency pair corresponding to the currently traversed historical text material is then added to the value of the corresponding element in the current initial matrix, completing one update of the initial matrix. Figure 5 This is a schematic diagram of constructing a co-occurrence matrix provided in an embodiment of this application. The following is in conjunction with... Figure 5 The form of the constructed co-occurrence matrix is ​​introduced.

[0064] exist Figure 5 This demonstrates a localized effect during an intermediate stage of co-occurrence matrix construction, showing only the values ​​in the four rows and four columns. Figure 5 The right side displays 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 displays a transcript of a historical court hearing, including questions 2 and 4. Additionally, Figure 5The left side also displays the keyword-frequency pairs of the historical court transcript, including word 1: 0.4 and word 3: 0.6. Figure 5 On the right side, it only shows the matrix effect after traversing the first historical court transcript. Before that, the matrix effect of 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, the word frequencies can be directly superimposed to the corresponding positions in the current initial matrix.

[0065] Through the aforementioned steps, we know that this historical court transcript only involves questions 2 and 4, and keywords 1 and 3. Therefore, we can locate the following positions in the current initial matrix: (2,1) = 0 in the second row, first column; (2,3) = 0 in the second row, third column; (4,1) = 0 in the fourth row, first column; and (4,3) = 0 in the fourth row, third column. For the two positions (2,1) and (4,1) in the first column, since the first column corresponds to keyword 1 and its frequency is 0.4, we add a frequency of 0.4 to these two positions in the current initial matrix. Similarly, for the two positions (2,3) and (4,3) in the third column, since the third column corresponds to keyword 3 and its frequency is 0.6, we add a frequency of 0.6 to these two positions in the current initial matrix. This demonstrates… Figure 5 The matrix effect shown on the right. Each time a document is traversed, the word frequency values ​​are continuously added to the corresponding positions.

[0066] Based on the above scenario examples, in the technical solution of this application, the initial matrix is ​​finally updated after the historical text material set has been traversed. Therefore, the matrix after the last update can be used as a co-occurrence matrix for subsequent retrieval.

[0067] By utilizing the keywords and their frequencies in the target text, along with a pre-constructed co-occurrence matrix, a scoring result vector can be generated. This vector contains a semantically weighted score for each target type of content involved in the co-occurrence matrix. An optional implementation for generating the scoring result vector is described below.

[0068] In this application, multiple feature vectors are retrieved from a co-occurrence matrix based on multiple keywords of the target text material, with each feature vector corresponding one-to-one with a keyword. Based on the constructed co-occurrence matrix, data indexing can be achieved using keywords, i.e., indexing out the feature vectors. For example, if the target text material includes four keywords, four feature vectors can be extracted from the co-occurrence matrix. If the rows of the co-occurrence matrix represent content and the columns represent keywords, then extracting feature vectors can be understood as extracting vectors composed of the elements in the columns corresponding to the keywords.

[0069] Next, feature enhancement processing is performed on the feature vectors corresponding to the keywords using word frequency, resulting in multiple enhanced feature vectors. Here, word frequency specifically refers to the word frequency of keywords in the target text material. Utilizing word frequency to enhance the feature vectors strengthens the crucial role of word frequency in the target text material, making the enhanced feature vectors strongly correlated with the inherent features of the target text material. Therefore, the enhanced feature vectors not only reflect the co-occurrence characteristics of the target type's content and keywords in the historical text material set, but also reflect the significant contribution of keywords in the target text material to content extraction and recommendation. In an optional implementation of this step, feature enhancement can be achieved by multiplying the feature vector corresponding to the keyword by the word frequency of that keyword in the target text material, thereby obtaining the enhanced feature vector for that keyword. For example, if the target text material contains the keyword "nursing fee" with a word frequency of 0.3 and the keyword "work injury insurance" with a word frequency of 0.7, then the columns corresponding to "nursing fee" and "work injury insurance" are extracted from the co-occurrence matrix to construct two feature vectors, which are then multiplied by 0.3 and 0.7 respectively. This step is not limited to the feature enhancement method of directly multiplying the feature vector by the word frequency of the keyword. For example, summation or other operations involving summation, multiplication, or exponentiation can also be used to achieve feature enhancement.

[0070] Subsequently, the enhanced feature vectors are summed, and the result is used as the scoring result vector. Essentially, this step involves accumulating the values ​​of elements at the same positions in these vectors. The purpose is to reflect the overall compatibility between the content of each target type and the target text material, using the numerical values ​​of elements at each position in the scoring result vector. The numerical values ​​of elements at each position in this scoring result vector represent the semantic weighted score of the corresponding content. It can be understood that a higher semantic weighted score better reflects the recommendability of the content from the perspective of the scoring result vector.

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

[0072] See Figure 2 The architecture of the content recommendation method based on co-occurrence matrix optimization, as shown, not only utilizes the co-occurrence matrix to obtain the rating result vector, but also constructs a content transition matrix in this step to reflect the co-occurrence of content. This matrix is ​​constructed using a historical text dataset as its data foundation.

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

[0074] Based on the co-occurrence of each pair of target types in each historical text, a content transition matrix is ​​constructed, which may specifically include:

[0075] The process iterates through the historical text dataset, counting the co-occurrence of target types in each historical text. The counts are then appended to the corresponding symmetrical positions in the first transition matrix, until the iteration is complete and a second transition matrix is ​​obtained. The first transition matrix is ​​an initialized content transition matrix, with all elements set to 0 during initialization. Subsequently, the values ​​of each row in the second transition matrix are normalized to obtain the final content transition matrix.

[0076] Taking the construction of a problem transition matrix as an example, for each pair of co-occurrence problems (q) i , q j In the initialized problem transition matrix, the position (i, j) in the i-th row and j-th column, and the position (j, i) in the j-th row and i-th column, are incremented by 1. This is used to search for co-occurrence relationships between pairs of problems, and the frequency of co-occurrence is reflected by the numerical value of the count. After normalizing the second transition matrix, it is necessary to ensure that the sum of the values ​​in each row is 1. That is, the sum of the transition probabilities from each problem to other problems is 1. Normalizing a row of data is a relatively mature technique in this field, so the specific process of normalization will not be elaborated here.

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

[0078] After constructing the content transition matrix, since the element values ​​in the content transition matrix represent the transition probabilities between two corresponding content items in a row and column, this application proposes using the transition probabilities as the weights of the edges between these two content items, i.e., edge weights. Content items can be used as vertices, thus constructing a content co-occurrence graph with the content items involved in the co-occurrence matrix as vertices and the aforementioned transition probabilities as edge weights. If the target type of content is a question, then this content co-occurrence graph can also be understood as a question co-occurrence graph, where the edges between vertices represent the co-occurrence relationships between questions, and the question transition probabilities are used as the edge weights between each pair of question vertices. As an example, the vertices in the question co-occurrence graph can be the representative questions represented by the first dimension of the co-occurrence matrix. The question co-occurrence graph G constructed in this application is a directed graph, and the edges between two vertices have directional orientation. For example, representing question q... i The vertex pointing to represents the problem q j An edge to a vertex, with edge weight w ij It equals the value of the element at the i-th row and j-th column of the problem transition matrix.

[0079] PageRank is a webpage ranking algorithm used to measure the importance and authority of webpages. It measures importance by iteratively calculating the PageRank value (PR value) of each webpage. Generally, in the initialization phase of the algorithm, an initial PR value is assigned to each webpage, and then the PR value of each webpage is repeatedly updated using a formula until convergence. Finally, the webpages are ranked according to their PR values, with webpages having higher PR values ​​ranking higher in search results. The mechanism of the PageRank algorithm can also be applied to the content recommendation method in the technical solution of this application.

[0080] However, the traditional PageRank edge weights are defined as uniformly distributed (all outgoing edge weights = 1 / out-degree), which ignores domain knowledge that "combinations of certain content require joint recommendation." This approach uses the co-occurrence value (transition probability) between content items as edge weights, automatically strengthening the transition probability of frequently co-occurring content. For scenarios involving arbitration and investigation, this operation ensures that the recommendation question chain conforms to the actual dispute pattern. Thus, it solves the problem that the assumption of uniformly distributed edge weights in traditional methods fails to capture the semantic correlation strength between questions.

[0081] S104. Determine the initial weights of each vertex in the content co-occurrence graph based on the scoring result vector.

[0082] In traditional PageRank, all nodes have the same initial weight (1 / N). However, this application uses the semantic weighted score of each target type's content as the initial weight of the corresponding vertex in the content co-occurrence graph. This helps high-frequency content (such as the points of contention in court transcripts) to obtain higher initial weights, which continuously influence the results during iteration.

[0083] Understandably, the semantically weighted score of each content element is represented by its numerical value at different positions in the scoring result vector. These semantically weighted scores can be normalized, and the normalized values ​​serve as the initial weights for the content at each position—that is, the initial weights of the corresponding vertices in the content co-occurrence graph. The vector containing the initial weights of each content element, i.e., the normalized vector 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 problem co-occurrence graph. The normalization formula is as follows:

[0084]

[0085] In the formula, q i Let s represent the i-th content. i This represents the content q in the rating result vector. i The semantic weighted score, PR0(q) i ) represents the content obtained after normalization q i The initial weights are then calculated. For other target types, the semantic weighted score can be normalized using the above formula to obtain the initial weights of the content vertices. This application employs an iterative optimization method to asynchronously update the weights of each vertex in the problem co-occurrence graph, continuously updating them based on the initial weights. See the description in S105.

[0086] S105. Use the content transition matrix to iteratively optimize the initial weights of each vertex in the content co-occurrence graph to obtain the weights of each vertex after multiple iterations.

[0087] One possible implementation of this step is shown in the formula below:

[0088]

[0089] In the formula, represents the damping coefficient, which can be 0.8; T represents the content transition matrix, obtained after step S102; N represents the total number of vertices in the content problem graph, which can also be understood as the dimension of the first dimension of the co-occurrence matrix and the content transition matrix. t represents the iteration number; when t=0, w (0) The initial weight vector is obtained after step S104. The '1' in the above formula represents a vector with all elements equal to 1. Thus, the sum of two vectors can still be represented as a vector, and the numerical representation on both sides of the equals sign in the above formula remains consistent. Using the above formula, a new weight vector containing the weights of each vertex can be calculated after one iteration. As an example, 100 iterations can be performed to finally obtain vector w. (100) This vector contains the weight of each vertex in the co-occurrence graph after 100 iterations. The number of iterations, t, can be set according to actual needs or determined based on the convergence of the weights of each vertex in the graph during iteration.

[0090] S106. Using the weights of each vertex after multiple iterations and the semantic weighted score of the content of each target type involved in the co-occurrence matrix, generate a content recommendation list for the target text material.

[0091] The following is an example implementation of this step. As mentioned earlier, each vertex in the content co-occurrence graph represents the content represented by the first dimension of the co-occurrence matrix. The first dimension of the co-occurrence matrix has a dimension of N, and the co-occurrence matrix involves content of N target types. Correspondingly, the content co-occurrence graph contains N vertices, which correspond one-to-one with the aforementioned content of the N target types. In this example, the scoring result vector is an N-dimensional vector, which contains the semantic weighted scores of the aforementioned content of the N target types. Therefore, based on the weights of each vertex after multiple iterations and the scoring result vector, for each content of the N target types, two parts of values ​​can be obtained: (1) the semantic weighted score; and (2) the weights 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, leveraging the one-to-one correspondence between each vertex and the content involved in the co-occurrence matrix, the weights of each vertex after multiple iterations are summed with the semantic weighted scores of the corresponding content to obtain the final score for each target type of content in the co-occurrence matrix. The content of each target type in the co-occurrence matrix is ​​then sorted in descending order of its final score to generate a content recommendation list for the target text material. The calculation process is illustrated by the formula below:

[0093]

[0094] For each target type of content involved in the first dimension of the co-occurrence matrix, the final score can be calculated using the above formula. Taking a specific piece of content as an example, PR... x This represents the weight of the content after x iterations, i.e., the weight of the content vertex after x iterations in the content co-occurrence graph. semantic This represents the semantic weighted score of the content. β represents the weight coefficient of this semantic weighted score, and correspondingly, (1-β) represents the weight coefficient of the vertex weights in the graph. The score is calculated from this. final This represents the final score for the problem. For example, β = 0.9. That is, semantically weighted scores have a greater weight, but the score also considers the weight of vertices after multiple iterations.

[0095] Based on the final score obtained after weighted summation, each piece of content is ranked to generate a content recommendation list. This ranking method considers the domain statistical characteristics of the vertices themselves, helping high-frequency content (such as controversial points in court transcripts) to receive higher initial weights, continuously influencing the results during iteration. This completes the transmission of important information. Applying PageRank weighting, the importance of content is iteratively updated through the topology of the co-occurrence network, ensuring that the recommendation results reflect both local co-occurrence characteristics and conform to the global importance distribution, taking into account the global influence of vertices in the network. This makes the ranking of content in the final generated content recommendation list more accurate.

[0096] The content recommendation method based on co-occurrence matrix optimization proposed in this application uses target text materials as triggers for content recommendation, and performs targeted content recommendations for these target text materials. First, a scoring result vector is generated using keywords and their frequencies in the target text materials, along with a pre-constructed co-occurrence matrix. This co-occurrence matrix, constructed based on keywords and target type content from historical text materials in a historical text set, possesses the function of keyword-assisted recommendation of target type content. The generated scoring result vector contains the semantically weighted score of each target type content involved in the co-occurrence matrix. Furthermore, this application also constructs a content transition matrix based on the co-occurrence of each pair of target type content in each historical text material. The numerical values ​​of the elements in the content transition matrix represent the transition probabilities of the corresponding two pieces of content. Based on the content involved in the co-occurrence matrix and the aforementioned content transition matrix, a content co-occurrence graph is constructed with corresponding content as vertices and transition probabilities as edge weights. 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 weights of the vertices in the content co-occurrence graph are iteratively adjusted using the content transition matrix. Finally, by combining the weights of each vertex after multiple iterations and the semantic weighted score of each content, a content recommendation list for the target text material is generated by ranking the content. In this application, the transition probability is used as the edge weight between vertices to increase the attention to co-occurrence features between content and enhance the semantic association strength between content; in addition, the semantic weighted score of the content is used as the initial weight of the vertex to improve the utilization rate of the co-occurrence matrix. Through multiple iterations of the vertex weights of the content co-occurrence graph, the importance of the content is continuously updated. By combining the semantic weighted score and the weights after multiple iterations to rank and recommend content, the effective transmission of important information is achieved, thereby improving the accuracy of content recommendation and the utility of the recommended content.

[0097] In addition to the enhancement of the PageRank mechanism by comprehensively using co-occurrence matrix and content transition matrix as described above, and to assist in achieving more accurate content recommendations, this application also proposes to optimize the co-occurrence matrix, as detailed below.

[0098] The semantics of the constructed co-occurrence matrix may suffer from coarse granularity. Specifically, the co-occurrence matrix is ​​mainly constructed based on word frequency statistics, which may be limited in its ability to capture deep semantic relationships between content and material. To address this issue, this application proposes that, after constructing the co-occurrence matrix, the content recommendation method optimized based on the co-occurrence matrix further includes:

[0099] For each content element involved in the co-occurrence matrix, a content semantic vector is extracted; for each keyword involved in the co-occurrence matrix, a word semantic vector is extracted. The cosine similarity between each extracted word semantic vector and each content semantic vector is calculated. A cosine similarity matrix is ​​constructed based on the calculated cosine similarities. The co-occurrence matrix and the cosine similarity matrix are then merged to obtain the 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 from both content and keywords to represent the semantics of keywords and content in a vector format, facilitating similarity calculation. The technical solution in this application can employ a pre-trained BERT model for vector extraction. For example, a 768-dimensional word semantic vector is extracted for each keyword using the BERT model, and a content semantic vector for each target type of content is also extracted using the BERT model.

[0101] In this embodiment, word semantic vectors and content semantic vectors are compared, and the cosine similarity value reflects the semantic difference between the word and the target type of content. Therefore, the deep semantic relationship between content and textual material can be easily captured from the cosine similarity matrix. Assuming that in the cosine similarity matrix, the first dimension is the row and the second dimension is the column, then the element value s at the i-th row and j-th column of the cosine similarity matrix S... ij It can be calculated using the following formula:

[0102]

[0103] In the formula, q i k represents the semantic vector of the content of the i-th row. j This represents the semantic vector of the keyword in column j.

[0104] Suppose that before optimization, the co-occurrence matrix is ​​represented as M, and the cosine similarity matrix is ​​represented as S. Then, the process of fusing the co-occurrence matrix and the cosine similarity matrix to obtain the first optimized co-occurrence matrix M' can be represented as:

[0105]

[0106] In the formula, This represents the fusion weight coefficient of S, as an example. =0.2. The method described above, which calculates the cosine similarity between the content semantic vector and the word semantic vector, constructs a cosine similarity matrix, and then fuses this matrix with the unoptimized co-occurrence matrix, captures the deep semantic connections between the content and materials of the target type to be recommended. This makes the semantic granularity of the first optimized co-occurrence matrix more refined. Testing revealed that this optimization strategy significantly improves the recall rate for long-tail problems.

[0107] The constructed co-occurrence matrix may contain low-frequency noise interference. Specifically, the co-occurrence matrix may contain a large number of low co-occurrence values ​​(occasional co-occurrence of content and keywords). This low-frequency noise interference dilutes the correlation between keywords and content, increasing the difficulty of accurate content recommendation.

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

[0109] The values ​​of the elements at each position in the first optimized co-occurrence matrix are filtered by a preset threshold. Elements with values ​​lower than the preset threshold are reset to 0, while elements with values ​​higher than or equal to the preset threshold are retained, thus obtaining the second optimized co-occurrence matrix.

[0110] This optimization strategy essentially involves threshold filtering of each element in the first optimized co-occurrence matrix. The preset threshold can be set according to actual needs; for example, a lower threshold can be set if stronger resistance to low-frequency noise interference is required. As an example, a preset threshold of 1 means that elements greater than or equal to 1 are retained, while elements less than 1 are reset to 0. This completes the sparsity processing of the first optimized co-occurrence matrix, effectively eliminating low-frequency noise interference and improving the accuracy of the recommended content.

[0111] Combining the method implementation examples described above and Figure 1 , Figure 2In this application, a co-occurrence matrix is ​​used in step S101. The obtained scoring result vector is derived by vector extraction and computation based on the constructed co-occurrence matrix. Furthermore, the scoring result vector determines the initial weights of the vertices in the content co-occurrence graph. Both the scoring result vector and the content co-occurrence graph influence the generated content recommendation list. Therefore, the importance of optimizing the content co-occurrence matrix is ​​evident. Two specific optimization strategies have been introduced: semantic similarity-based weighting and matrix sparsification. Therefore, under this optimization strategy, the co-occurrence matrix used in this application can 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 one optimization, while the second optimized co-occurrence matrix undergoes two optimizations. The second optimized co-occurrence matrix not only has finer semantic granularity, demonstrating outstanding ability to capture the deep semantics between content and materials, but also weakens low-frequency noise interference, highlighting the strong correlation between keywords and content, thus contributing to more accurate content recommendations. If the co-occurrence matrix is ​​double-optimized, resulting in a second optimized co-occurrence matrix, then a scoring result vector is generated using the keywords and their frequencies in the target text, along with the pre-constructed co-occurrence matrix. Specifically, this involves using the keywords and their frequencies in the target text, along with the second optimized co-occurrence matrix, to generate the scoring result vector. In other words, vector retrieval is performed from the second optimized co-occurrence matrix, and the resulting scoring result vector is then used in subsequent content recommendation processes.

[0112] In the context of arbitration hearing investigation, certain questions often follow a fixed questioning order. For example, "When did the applicant start working at the respondent's company?" and "What work did the applicant do?" are asked sequentially. In the content recommendation method described earlier, the questioning order was not considered during the generation of the content recommendation list (question recommendation list). In this application, to make the question order presented in the question recommendation list more consistent with human questioning habits and language logic, a sequence-aware weighted algorithm is proposed. This algorithm uses subsequence mining to weight sequential elements in the score of the questions in the question recommendation list. Specifically, a set of questions from several historical hearing transcripts can be mapped to a representative question set based on the semantic similarity of the questions. Optionally, these representative question sets can be mined using the PrefixSpan library in Python to obtain subsequences of length 2 with a support greater than 500, thus obtaining high-frequency binary question sequences. The first question in each binary question sequence is called position 0, and the second is called position 1. For each binary question sequence, if both questions are in the question recommendation list generated by this scheme, the element at position 1 is moved after position 0. Furthermore, when there is a competing order between two or more sets of binary question sequences, the sequence with higher support is prioritized. This makes the order of questions in the resulting question recommendation list more consistent with human questioning habits and linguistic logic. Based on the above embodiments, it is easy to see that the method proposed in this application not only facilitates the work of arbitrators by automatically extracting high-value questions from court transcripts, but also adds sequential elements to the recommended question list. This allows for questioning in the order of the recommended question list to take into account both questioning habits and linguistic logic, resulting in better application effects during the court investigation phase.

[0113] Based on the content recommendation method based on co-occurrence matrix optimization described in the foregoing embodiments, this application also provides a content recommendation device based on co-occurrence matrix optimization. Figure 6 This is a schematic diagram of the device. Figure 6 As shown, a content recommendation device based on co-occurrence matrix optimization includes:

[0114] The generation module 61 is used to generate a scoring result vector by utilizing the keywords and word frequencies of the target text material, as well as a pre-constructed co-occurrence matrix; the scoring result vector contains the semantic weighted score of the content of each target type 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 set; the target type is the type of content to be recommended in the content recommendation scenario in which the co-occurrence matrix is ​​applied; the co-occurrence matrix is ​​a two-dimensional matrix, where the first dimension represents the content of the target type and the second dimension represents the keywords;

[0115] The first construction module 62 is used to construct a content transition matrix based on the co-occurrence of pairs of target type content in each of the historical text materials; in the content transition matrix, the first dimension and the second dimension both represent the content of the target type; the content corresponding to the row where the element on the diagonal of the content transition matrix is ​​located is the same as the content corresponding to the column where the element is located; the value of the element in the i-th row and j-th column of the content transition matrix represents the transition probability from the i-th content to the j-th content;

[0116] The second construction module 63 is used to construct a content co-occurrence graph with the content involved in the co-occurrence matrix as vertices and the transition probability as edge weights, based on the content involved in the co-occurrence matrix and the content transition matrix.

[0117] The initial weight determination module 64 is used to determine the initial weight of each vertex in the content co-occurrence graph based on the scoring result vector;

[0118] The weight update module 65 is used to iteratively optimize the initial weights of each vertex in the content co-occurrence graph using the content transition matrix to obtain the weights of each vertex after multiple iterations.

[0119] Recommendation module 66 is used to generate a content recommendation list for the target text material by utilizing the weights of each vertex after multiple iterations and the semantic weighted score of the content of each target type involved in the co-occurrence matrix.

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

[0121] The matrix update unit is used to traverse the historical text material set, count the content of the target type that co-occurs in each pair of the historical text materials, and add the count value to two symmetrical positions in the first transition matrix related to the two co-occurring contents, until the traversal is completed and the second transition matrix is ​​obtained; the first transition matrix is ​​an initialized content transition matrix, and the elements at each position are set to 0 during initialization;

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

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

[0124] The vector extraction module is used to extract content semantic vectors for the content involved in the co-occurrence matrix, and to extract word semantic vectors for the keywords involved in the co-occurrence matrix.

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

[0126] The third construction module is used to construct a cosine similarity matrix based on the calculated cosine similarities; in the cosine similarity matrix, the first dimension represents the content and the second dimension represents the 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] The numerical filtering module is used to filter the numerical values ​​of the elements at each position in the first optimized co-occurrence matrix using a preset threshold. Elements with values ​​lower than the preset threshold are reset to 0, while elements with values ​​higher than or equal to the preset threshold are retained, thereby obtaining the second optimized co-occurrence matrix.

[0130] The generation module 61 is specifically used for:

[0131] Using the keywords and word frequencies of the target text material, as well as the second optimized co-occurrence matrix, a scoring result vector is generated.

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

[0133] A vector retrieval unit is used to retrieve multiple feature vectors from the co-occurrence matrix based on multiple keywords of the target text material; the feature vectors correspond one-to-one with the keywords.

[0134] An enhancement processing unit is used to perform feature enhancement processing on the feature vector corresponding to the keyword using the word frequency, so as to obtain multiple enhanced feature vectors.

[0135] The vector operation unit is used to sum the multiple enhanced feature vectors, and the 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, used to construct a co-occurrence matrix; the fourth construction module 67 specifically includes:

[0137] A material acquisition unit is used to acquire the historical text material set; the historical text material set includes multiple historical text materials.

[0138] The extraction unit is used to extract keywords and target type content from each of the historical text materials, and construct a content set and keyword set corresponding to each of the historical text materials.

[0139] The word frequency statistics unit is used to count the word frequency of each keyword in the keyword set in the corresponding historical text material, and to construct a keyword-word frequency pair for each 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 this device, the co-occurrence matrix construction unit is specifically used for:

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

[0143] Iterate through each historical text in the historical text material set, determine the elements of the content set and keyword set corresponding to the currently iterated historical text material at the corresponding positions in the current initial matrix, and add the word frequency of the keyword-word frequency pair corresponding to the currently iterated historical text material to the value of the element at the corresponding position in the current initial matrix to complete one update of the initial matrix.

[0144] After the historical text material set has been traversed, the initial matrix that has been updated for the last time will be used as the co-occurrence matrix.

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

[0146] The score calculation unit is used to perform a weighted summation operation on the weights of each vertex after multiple iterations and the semantic weighted score of the corresponding content by utilizing the one-to-one correspondence between each vertex and the content involved in the co-occurrence matrix, so as to obtain the final score of each target type of content involved in the co-occurrence matrix.

[0147] The sorting unit is used to sort the content 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 this device, the target text material and each historical text material in the historical text material set are of the type of court transcripts; the first dimension of the co-occurrence matrix represents the content of the target type, which is the question statement extracted from the historical text material set; the second dimension of the co-occurrence matrix represents the keywords, which are the 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 foregoing embodiments, this application also provides a content recommendation device based on co-occurrence matrix optimization, which includes: a memory and a processor;

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

[0151] 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 any of the implementations in the method embodiments.

[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 mutually. Each embodiment focuses on describing 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 description of the method embodiments. The device and equipment embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components indicated as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

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

Claims

1. A content recommendation method based on co-occurrence matrix optimization, characterized in that, include: Using the keywords and word frequencies of the target text material, as well as a pre-constructed co-occurrence matrix, a scoring result vector is generated; The scoring result vector contains a semantically weighted score of the content of each target type involved in the co-occurrence matrix; The co-occurrence matrix is ​​constructed based on keywords and target types in each historical text material in the historical text material set; the target type is the type of content to be recommended in the content recommendation scenario in which the co-occurrence matrix is ​​applied. The co-occurrence matrix is ​​a two-dimensional matrix, where the first dimension represents the content of the target type and the second dimension represents the keywords; Based on the co-occurrence of each pair of target types of content in each of the aforementioned historical text materials, a content transition matrix is ​​constructed; In the content transfer matrix, both the first and second dimensions represent the content of the target type; the content corresponding to the row where the element on the diagonal of the content transfer matrix is ​​located is the same as the content corresponding to the column where the element is located; the value of the element in the i-th row and j-th column of the content transfer matrix represents the transfer probability 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, a content co-occurrence graph is constructed with the content involved in the co-occurrence matrix as vertices and the transition probabilities as edge weights. The initial weights of each vertex in the content co-occurrence graph are determined based on the scoring result vector. The initial weights of each vertex in the content co-occurrence graph are iteratively optimized using the content transition matrix to obtain the weights of each vertex after multiple iterations. By utilizing the weights of each vertex after multiple iterations and the semantic weighted score of the content of each target type involved in the co-occurrence matrix, a content recommendation list for the target text material is generated.

2. The method of claim 1, wherein, The construction of a content transition matrix based on the co-occurrence of each pair of target types of content in each of the historical text materials includes: Traverse the historical text material set, count the content of the target type that co-occurs in each pair of the historical text materials, and add the count value to the two symmetrical positions related to the two co-occurring contents in the first transition matrix until the traversal is completed to obtain the second transition matrix; the first transition matrix is ​​an initialized content transition matrix, and the elements at each position are set to 0 during initialization; The elements of each row of the second transition matrix are numerically normalized to obtain the final content transition matrix.

3. The method of claim 1, wherein, After constructing the co-occurrence matrix, the method further includes: Extract content semantic vectors for each content involved in the co-occurrence matrix, and extract word semantic vectors for each keyword involved in the co-occurrence matrix; Calculate the cosine similarity between the extracted word semantic vector and the content semantic vector; A cosine similarity matrix is ​​constructed based on the calculated cosine similarity scores; in the cosine similarity matrix, the first dimension represents the content and the second dimension represents the keywords. The co-occurrence matrix is ​​fused with the cosine similarity matrix to obtain the first optimized co-occurrence matrix.

4. The method of claim 3, wherein, After obtaining the first optimized co-occurrence matrix, the method further includes: The values ​​of the elements at each position in the first optimized co-occurrence matrix are filtered by 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 the second optimized co-occurrence matrix. The process of generating a scoring result vector using keywords and keyword frequencies from the target text material, along with a pre-constructed co-occurrence matrix, includes: Using the keywords and word frequencies of the target text material, as well as the second optimized co-occurrence matrix, a scoring result vector is generated.

5. The method of claim 1, wherein, The process of generating a scoring result vector using keywords and keyword frequencies from the target text material, along with a pre-constructed co-occurrence matrix, includes: Based on multiple keywords of the target text material, multiple feature vectors are retrieved from the co-occurrence matrix; each feature vector corresponds one-to-one with a keyword. The word frequency is used to perform feature enhancement processing on the feature vectors corresponding to the respective keywords to obtain multiple enhanced feature vectors; The summation operation is performed on the multiple enhanced feature vectors, and the result is used as the scoring result vector.

6. The method of claim 1, wherein, The co-occurrence matrix is ​​constructed in the following ways: Obtain the historical text material set; the historical text material set includes multiple historical text materials; Extract keywords and target type content from each of the historical text materials to construct a content set and keyword set corresponding to each of the historical text materials; Calculate the word frequency of each keyword in the keyword set in the corresponding historical text materials, and construct keyword-word frequency pairs for each historical text material; The co-occurrence matrix is ​​constructed based on the keyword set, the content set, and the keyword-frequency pairs corresponding to each historical text material.

7. The method according to claim 6, characterized in that, The construction of the co-occurrence matrix based on the keyword set, the content set, and the keyword-term frequency pairs corresponding to each historical text material includes: Construct an initial matrix with each content in the content set as the first dimension index and each keyword in the keyword set as the second dimension index, and set each element at each position to 0; Iterate through each historical text in the historical text material set, determine the elements of the content set and keyword set corresponding to the currently iterated historical text material at the corresponding positions in the current initial matrix, and add the word frequency of the keyword-word frequency pair corresponding to the currently iterated historical text material to the value of the element at the corresponding position in the current initial matrix to complete one update of the initial matrix. After the historical text material set has been traversed, the initial matrix that has been updated for the last time will be used as the co-occurrence matrix.

8. The method according to any one of claims 1-7, characterized in that, The process of generating a content recommendation list for the target text material by utilizing the weights of each vertex after multiple iterations and the semantic weighted score of the content of each target type involved in the co-occurrence matrix includes: By utilizing the one-to-one correspondence between each vertex and the content involved in the co-occurrence matrix, a weighted summation 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 the content of each target type 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 of the target text material.

9. The method according to any one of claims 1-7, characterized in that, The target text material and each historical text material in the historical text material set are of the type of court hearing transcripts; the first dimension of the co-occurrence matrix represents the content of the target type, which is the question statement extracted from the historical text material set; the second dimension of the co-occurrence matrix represents the keywords, which are the text keywords extracted from the historical text material set.

10. A content recommendation device based on co-occurrence matrix optimization, characterized in that, include: The generation module is used to generate a scoring result vector by utilizing the keywords and word frequencies of the target text material, as well as a pre-constructed co-occurrence matrix; The scoring result vector contains a semantically weighted score of the content of each target type involved in the co-occurrence matrix; The co-occurrence matrix is ​​constructed based on keywords and target types in each historical text material in the historical text material set; the target type is the type of content to be recommended in the content recommendation scenario in which the co-occurrence matrix is ​​applied. The co-occurrence matrix is ​​a two-dimensional matrix, where the first dimension represents the content of the target type and the second dimension represents the keywords; The first construction module is used to construct a content transition matrix based on the co-occurrence of each pair of target types of content in each of the historical text materials; In the content transfer matrix, both the first and second dimensions represent the content of the target type; the content corresponding to the row where the element on the diagonal of the content transfer matrix is ​​located is the same as the content corresponding to the column where the element is located; the value of the element in the i-th row and j-th column of the content transfer matrix represents the transfer probability from the i-th content to the j-th content. The second construction module is used to construct a content co-occurrence graph with the content involved in the co-occurrence matrix as vertices and the transition probabilities as edge weights, based on the content involved in the co-occurrence matrix and the content transition matrix. An initial weight determination module is used to determine the initial weights of each vertex in the content co-occurrence graph based on the scoring result vector. The weight update module is used to iteratively optimize the initial weights of each vertex in the content co-occurrence graph using the content transition matrix, and obtain the weights of each vertex after multiple iterations. The recommendation module is used to generate a content recommendation list for the target text material by utilizing the weights of each vertex after multiple iterations and the semantic weighted score of the content of each target type 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, which, when running, performs the steps of the content recommendation method based on co-occurrence matrix optimization as described in any one of claims 1-9.