A document examination and approval opinion recommendation method based on semantic matching and role perception

By constructing a historical document vector database and a structured meta-database, and utilizing a semantic embedding model and job matching score calculation, the semantic understanding and personalized recommendation problems of the document approval system were solved, achieving efficient and accurate recommendation of approval opinions.

CN122087097APending Publication Date: 2026-05-26QIMING INFORMATION TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QIMING INFORMATION TECH
Filing Date
2026-01-27
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing official document approval systems lack semantic understanding capabilities, cannot automatically understand document content, rely on manual pre-configuration, have weak generalization capabilities, low personalization, and cannot recommend personalized opinions for different approvers.

Method used

We construct a historical document vector database and a structured meta-database, understand the document content through a semantic embedding model, calculate matching scores by combining job information, and recommend the most similar approval opinions.

Benefits of technology

It enables personalized and precise approval recommendations, improves approval efficiency by 80%, ensures the standardization and professionalism of opinions, and reduces the learning cost for new employees.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087097A_ABST
    Figure CN122087097A_ABST
Patent Text Reader

Abstract

This invention discloses a method for recommending official document approval opinions based on semantic matching and role awareness, comprising the following steps: S1. Constructing a historical document vector database and a structured metadata database; S2. Obtaining documents to be approved and performing feature extraction and preliminary screening; S3. Performing text block-level similarity retrieval on the documents and aggregating them; S4. Calculating job matching scores based on job information; S5. Calculating the final recommendation score and sorting the documents in descending order based on the final recommendation score, outputting the top 5 with the highest scores as the recommended results. This invention improves recommendation accuracy by using a pre-trained semantic embedding model to understand the deep semantics of document content. Furthermore, through job matching score calculation and approval node position alignment mechanisms, it deeply binds the recommended approval opinions to specific approval positions and approval process positions, achieving personalized recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, specifically to a method for recommending official document approval opinions based on semantic matching and role perception. Background Technology

[0002] In the internal management of enterprises and institutions, the approval and circulation of official documents is a crucial link. Approver (such as department heads, legal personnel, and finance personnel) needs to provide their approval opinions on the circulating drafts. Currently, the following pain points exist: drafting opinions is time-consuming and laborious, requiring approvers to conceive opinions from scratch based on personal experience and document content, resulting in low efficiency; the utilization rate of historical experience is low, with a large number of valuable historical approval opinions accumulating in the system, lacking effective means of mining and utilizing them, and making it difficult for newcomers to quickly learn from the experience of their predecessors.

[0003] To improve approval efficiency, existing official document systems generally introduce approval opinion assistance functions. Patent CN112184159A discloses a "method for setting approval opinions based on domestic CPUs," which pre-sets a batch of default opinions based on static categories such as role, process, and document type, sorts the user's historical opinions by usage frequency, and simply merges them with the default opinions for the user to choose from. This method achieves opinion reuse and process guidance to a certain extent. However, such rule-driven solutions still have the following fundamental limitations: lack of semantic understanding capabilities, its recommendation logic relies entirely on predefined category tags and historical usage frequency, and cannot understand the specific content of the document to be approved; reliance on manual pre-configuration, resulting in weak generalization ability, all default opinions, keywords, and mapping relationships need to be predefined by the administrator, and the system cannot adaptively generate effective suggestions when faced with new documents, temporary processes, or uncovered scenarios; low personalization, unable to recommend opinions used by different approvers under the same role when handling similar documents in their history, lacking true personalization. Existing technologies treat approval opinions as an enumerable set of rules, rather than an intelligent product dynamically generated based on the semantics of document content and organizational role context. With official documents becoming increasingly complex and approval roles becoming increasingly specialized, there is an urgent need for an intelligent method that can automatically understand the semantics of official documents, mine high-quality historical opinions, and make personalized recommendations based on the current approver's job characteristics.

[0004] Therefore, this invention proposes an approval opinion recommendation mechanism based on multi-dimensional semantic matching and approval role perception, aiming to overcome the shortcomings of existing rule configuration methods such as staticity, low generalization and insufficient role adaptation, and to achieve more intelligent, accurate and efficient approval opinion recommendation. Summary of the Invention

[0005] To address the aforementioned issues, this invention provides a method for recommending official document approval opinions based on semantic matching and role awareness, comprising the following steps: S1. Constructing a historical document vector database and a structured metadata database; S2. Obtaining documents to be approved and performing feature extraction and preliminary screening on these documents; S3. Performing text block-level similarity retrieval on the documents and aggregating them; S4. Calculating job matching scores based on job information; S5. Calculating the final recommendation score, sorting the documents in descending order based on the final recommendation score, and outputting the top 5 documents with the highest scores as the recommended results.

[0006] Furthermore, step S1 specifically includes the following sub-steps: S11. Obtain the historical approval document data set; S12. Divide the main text of each document into natural paragraphs, and concatenate the continuous paragraphs into text blocks, and number the generated text blocks; S13. Construct and train a semantic embedding model, and vectorize each text block through the semantic embedding model to generate the corresponding semantic vector; S14. Store the official document data, the corresponding semantic vector, and the corresponding text block number into the vector database to form a historical official document vector database; S15. Store the historical approval data of each official document in a relational database to form a structured meta-database; Each document in the historical approval document data set contains: document title, body text, document type, and unique document ID; the character length in the text block does not exceed 1200 characters.

[0007] Furthermore, the document data in step S14 specifically includes: document title and unique document ID.

[0008] Furthermore, the historical approval data in step S15 specifically includes: the historical approval opinions of the document at each approval node, the name of the approval post at the corresponding approval node, the name of the approver, and the post level information.

[0009] Furthermore, step S2 specifically includes the following sub-steps: S21. Obtain the title, body content, and job information corresponding to the current approval stage of the document pending approval; S22. Extract keywords from the main text and perform semantic similarity calculation and document type mapping in conjunction with the title; S23. Conduct preliminary screening in the historical document vector database and divide the documents to be approved into text blocks.

[0010] Furthermore, step S3 specifically includes the following sub-steps: S31. Calculate the similarity between each text block of the document to be approved and the text blocks in the historical document vector database, and select the n most similar blocks; S32. Record the historical document ID and its similarity score corresponding to each matching block; S33. Aggregate the similarity of all text blocks according to the historical document ID, and calculate the comprehensive similarity score for each document.

[0011] Furthermore, step S33 specifically includes the following steps: S331. Count the number of times each document ID appears in the search, and normalize it according to the total number of blocks of the document to calculate the normalized frequency score; S332. Perform weighted aggregation on all similarity scores corresponding to the same document ID, and calculate the aggregated similarity score; S333. The normalized frequency score and the aggregated similarity score are fused according to the weighting coefficients to obtain a comprehensive score; For documents with a total number of blocks that is much greater than the average number of blocks for all documents, a length penalty factor is calculated. The comprehensive similarity score of the document is calculated as the comprehensive score of the document multiplied by the length penalty factor.

[0012] Furthermore, the normalized frequency score is calculated as follows: Normalized frequency score = (Number of times the document ID appears / Total number of blocks in the new document) × (Standard block count / Total number of blocks in the historical document), where the standard block count is the average number of blocks or a fixed value. The formula for calculating the aggregated similarity score is: Aggregated similarity score = Σ(single block similarity score × position weight) / total number of matching blocks in the document, where the position weight is assigned based on the similarity ranking, with higher rankings having higher weights, and using exponential or linear decay. The formula for calculating the comprehensive score is: Comprehensive score = α × Normalized frequency score + β × Aggregated similarity score + γ × Coverage score, where α, β, and γ are weighting coefficients and α + β + γ = 1; the coverage score represents the proportion of the number of blocks matched for the historical document to the total number of blocks. The formula for calculating the length penalty factor is: Length penalty factor = 1 / (1 + k × log(number of blocks in the document / average number of blocks)), where k is the penalty intensity coefficient.

[0013] Furthermore, step S4 specifically includes the following sub-steps: S41. Job Information Extraction: Query the job name and job attributes of the current approval node from the structured metadata database, and at the same time query the job information of all historical approval nodes for each candidate document; S42. Job Matching Score Calculation: For each candidate document, determine whether there is a job in its historical approval process that is the same as or similar to the current approval job, and calculate the job matching score. S43. Job Matching Weighting: For approval nodes that are in the same or similar positions in the approval process, their job matching scores are given additional weighting: historical approval opinions that correspond to the process position and match the job are given priority recommendation.

[0014] Furthermore, the calculation of the job matching score is as follows: Perform an exact string match between the current approval job title and the job titles in the historical approval nodes. If there are identical job titles, the job match score is 1.0. If no exact match is found, a similarity score is calculated based on the textual similarity of the job titles, with a value ranging from 0 to 0.9. If the text similarity is greater than the set threshold, it is judged as a similar job, and the job matching score = 0.5 + 0.4 × text similarity, with a value range of 0.5~0.9; if the text similarity is lower than the threshold, a base score of 0.1~0.3 is given.

[0015] Furthermore, the formula for calculating the final recommendation score in step S5 is: Final recommendation score = λ × (Comprehensive score × Length penalty factor) + μ × Job matching score, where λ and μ are fusion weight coefficients and λ+μ=1.

[0016] This invention provides a method for recommending official document approval opinions based on semantic matching and role awareness, which has the following beneficial effects: This invention utilizes a pre-trained semantic embedding model to understand the deep semantics of official documents, improving recommendation accuracy. Simultaneously, through job-matching score calculation and approval node alignment mechanisms, it deeply binds approval opinion recommendations to specific approval positions and approval process locations, achieving personalized recommendations. By accurately recommending historically high-quality approval opinions, it shortens the average time for approvers to draft opinions, increasing approval efficiency by 80%, while ensuring the standardization and professionalism of approval opinions and reducing the learning cost for new employees. Compared to existing technologies, this invention overcomes the shortcomings of existing rule configuration methods, such as staticity, low generalization, and insufficient role adaptation, achieving more intelligent, accurate, and efficient approval opinion recommendations. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0018] Figure 1 The method flowchart provided by the present invention. Detailed Implementation

[0019] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0020] The following detailed description of the implementation method of the present invention is in conjunction with the accompanying drawings. The description only covers some embodiments and not all embodiments. For clarity, representations and descriptions unrelated to the present invention have been omitted from the drawings and description.

[0021] To provide a clearer understanding of the technical features, objectives, and beneficial effects of this invention, the following detailed description of the technical solution is provided. Obviously, the described embodiments are only a portion of the embodiments of this invention, not all of them, and should not be construed as limiting the scope of implementation of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the protection scope of this invention.

[0022] like Figure 1 As shown, this invention provides a method for recommending official document approval opinions based on semantic matching and role awareness, including the following steps: S1. Construct a historical document vector library and a structured metadata database: S11. Obtain a collection of historical approval documents, where each document contains: document title, body text, document type, and unique document ID.

[0023] S12. Divide the main text of each document into natural paragraphs, and concatenate the continuous paragraphs into text blocks. Number the generated text blocks, and the character length in the text block shall not exceed 1200 characters.

[0024] S13. Construct and train a semantic embedding model (such as BGE), and vectorize each text block using the semantic embedding model to generate the corresponding semantic vector.

[0025] S14. Store the official document data (document title, unique document ID), the corresponding semantic vector, and the corresponding text block number into the vector database to form a historical document vector database.

[0026] S15. Store the historical approval data of each document (historical approval opinions of the document at each approval node, the name of the approval post at the corresponding approval node, the name of the approver, and the post level information) into a relational database (such as PostgreSQL) to form a structured meta-database.

[0027] S2. Obtain the documents to be approved and perform feature extraction and preliminary screening: S21. Obtain the title, body content and job information corresponding to the current approval node of the documents to be approved.

[0028] S22. Extract keywords from the main text and perform semantic similarity calculation and document type mapping based on the title. Vectorize each text using a semantic embedding model, and calculate the cosine of the angle between the title vector of the document to be approved and the title vector of historical documents in the multidimensional semantic space using the cosine similarity algorithm. .

[0029] S23. Conduct preliminary screening in the historical document vector database and divide the documents to be approved into text blocks.

[0030] S3. Perform text block-level similarity retrieval on official documents and aggregate them: S31. Calculate the similarity between each text block of the document to be approved and the text blocks in the historical document vector library, and select the n most similar blocks.

[0031] S32. Record the historical document ID and its similarity score corresponding to each matching block.

[0032] S33. Aggregate the similarity of all text blocks according to the historical document ID, and calculate the comprehensive similarity score for each document: S331. Count the number of times each document ID appears in the search, and normalize it according to the total number of blocks of the document to calculate the normalized frequency score: Normalized frequency score = (number of times the document ID appears / total number of blocks of new documents) × (standard block number benchmark / total number of blocks of historical documents), where the standard block number benchmark is the average number of blocks or a fixed value set.

[0033] S332. Calculate the aggregated similarity score by weighting and aggregating all similarity scores corresponding to the same document ID: Aggregated similarity score = Σ(single block similarity score × position weight) / total number of matching blocks in the document, where the position weight is assigned based on the similarity ranking, with higher rankings having higher weights, using exponential or linear decay.

[0034] S333. The normalized frequency score and the aggregated similarity score are fused according to the weight coefficients to obtain the comprehensive score: Comprehensive score = α × Normalized frequency score + β × Aggregated similarity score + γ × Coverage score, where α, β, and γ are weight coefficients and α + β + γ = 1; the coverage score represents the proportion of the number of blocks matched for the historical document to the total number of blocks.

[0035] For documents with a total number of blocks that is much greater than the average number of blocks for all documents, a length penalty factor is calculated. The comprehensive similarity score of the document is calculated by multiplying the comprehensive score of the document by the length penalty factor. The formula for calculating the length penalty factor is: Length penalty factor = 1 / (1 + k × log(number of blocks in the document / average number of blocks)), where k is the penalty intensity coefficient.

[0036] Penalty intensity coefficient It is adaptively generated based on statistical features from historical databases. The calculation formula is as follows: .in The standard deviation of the number of historical document chunks. This is the average value. : is the adjustment factor, usually set to An empirical constant is used to control the baseline magnitude of the overall penalty. This design means that if the document lengths in the historical database vary significantly (large standard deviation), the system will automatically increase the penalty. This value allows for stricter penalties on long articles with significantly more blocks than the average, preventing them from having an artificially high hit rate simply because they have a lot of words, thus significantly improving the fairness and accuracy of recommendations.

[0037] S4. Calculate job matching score based on job information: S41. Job Information Extraction: Query the job name and job attributes of the current approval node from the structured metadata database, and at the same time query the job information of all historical approval nodes for each candidate document.

[0038] S42. Job Matching Score Calculation: For each candidate document, determine whether there is a job in its historical approval process that is the same as or similar to the current approval job, and calculate the job matching score: Perform an exact string match between the current approval job title and the job titles in the historical approval nodes. If there are identical job titles, the job match score is 1.0. If no exact match is found, a similarity score is calculated based on the textual similarity of the job titles (such as edit distance, Jaccard similarity, or cosine similarity), with a value ranging from 0 to 0.9. If the text similarity is greater than the set threshold, it is judged as a similar job, and the job matching score = 0.5 + 0.4 × text similarity, with a value range of 0.5~0.9; if the text similarity is lower than the threshold, a base score of 0.1~0.3 is given.

[0039] If the text similarity is lower than the set threshold, but the job level (such as section chief or department chief) field is completely matched, a level correction coefficient will be given (such as corrected similarity = original similarity + 0.25).

[0040] S43. Job Matching Weighting: For approval nodes that are in the same or similar positions in the approval process, their job matching scores are given additional weighting: historical approval opinions that correspond to the process position and match the job are given priority recommendation.

[0041] S5. Calculate the final recommendation score, sort the results in descending order based on the final recommendation score, and output the top 5 results with the highest scores as the recommended results. The formula for calculating the final recommendation score is: Final Recommendation Score = λ × (Overall Score × Length Penalty Factor) + μ × Job Matching Score, where λ and μ are the fusion weight coefficients and λ + μ = 1.

[0042] Example: Step S1: Construct a historical document vector database and a structured metadata database Suppose a unit has accumulated 5,000 historical approval documents and needs to store them in a vector library and a database.

[0043] 1.1. Obtain a collection of historical approval documents. Each document includes a title, body, document type (such as request, report, notice, etc.), and a unique document ID (such as DOC_2025_001 to DOC_2025_5000).

[0044] 1.2. The main body of each official document is segmented into natural paragraphs. For example, a document about a project budget application has a main body of 3600 words and contains 8 paragraphs. The system segments it into 3 text blocks: Part 1: Paragraphs 1-3, totaling 1150 words; Part 2: Paragraphs 4-6, totaling 1200 words; Part 3: Paragraphs 7-8, totaling 1190 words.

[0045] During the segmentation process, the system strictly ensures that no individual paragraphs are cut off, thus guaranteeing the semantic integrity of each text block.

[0046] 1.3. The pre-trained semantic embedding model BGE-large-zh is used to vectorize each text block. Taking the first block as an example, with 1150 characters of text as input, the model outputs a 1024-dimensional semantic vector representation. After segmenting 5000 official documents, approximately 18000 text blocks are generated, each block corresponding to a 1024-dimensional semantic vector.

[0047] 1.4. Store the title, semantic vector, associated document ID, and text block number together in the vector database Milvus. The specific storage structure is shown in Table 1 below: Table 1 1.5. Simultaneously, the historical approval comments for each document at each approval node, the corresponding approval position name, approver name, and position level information are stored in a PostgreSQL database using the document ID as the primary key. Taking DOC_2024_001 as an example, its approval process includes 4 nodes, as shown in Table 2 below: Table 2 After the above steps, the vectorized storage of 5,000 historical documents and approximately 18,000 semantic blocks was completed, as well as the structured storage of 5,000 documents and approximately 20,000 approval records.

[0048] Step S2: Extract features and perform preliminary screening of documents to be approved. 2.1. A new document awaiting approval has entered the system. The title is "Request for Additional Funding for Project YYY". The document contains 2,400 words and is currently at the second approval stage. The current approval position is "Head of Finance Department".

[0049] 2.2. The system first performs semantic vectorization on the title "Request for Additional Funding for Project YYY" and calculates its similarity with 18,000 text block titles in the vector library. Based on title similarity (threshold set above 0.6), keyword matching (such as "project", "funding", "budget", "application", etc.), and document type (request type), the system initially filters out 300 candidate text blocks, corresponding to 120 candidate documents.

[0050] 2.3. Adopt the same block-based strategy as historical documents for this new document, dividing the main text into two text blocks by paragraph: Part 1: Paragraphs 1-4, totaling 1182 characters; Part 2: Paragraphs 5-7, totaling 1055 characters.

[0051] Step S3: Semantic block-level similarity retrieval and document-level aggregation 3.1. For the first semantic block (1182 characters) of the new official document, the system vectorizes it and calculates its similarity with 18,000 historical semantic blocks in the vector library, retrieving the top 20 blocks with the highest similarity (n=20). Assume the retrieval results are shown in Table 3 below (partial display): Table 3 Similarly, by searching the second semantic block of the new document, the top 20 most similar historical blocks are obtained.

[0052] 3.2. Summarize the search results of the two blocks, totaling 40 matching records. Record the historical document ID and similarity score corresponding to each matching block.

[0053] 3.3. Aggregate statistics by document ID. Assume that after aggregation, the following is found: DOC_2024_089 appeared 3 times, with similarities of 0.92, 0.87, and 0.78 respectively; DOC_2024_156 appeared twice, with similarities of 0.89 and 0.82 respectively; DOC_2024_223 appeared once, with a similarity of 0.85; The same word appears 1-2 times in other official documents.

[0054] 3.4. To avoid long documents having a statistical advantage due to their large number of blocks, this invention introduces a block number normalization and weighting mechanism during aggregation: a) Frequency statistics normalization: Taking DOC_2024_089 as an example, this document appears 3 times in the search results, and the total number of new document chunks is 2. Querying the database reveals that the total number of chunks for DOC_2024_089 is 5, and the standard chunk count is set to 3 (the average number of chunks for all historical documents).

[0055] Normalized frequency score = (3 / 2) × (3 / 5) = 1.5 × 0.6 = 0.9 b) Similarity score aggregation: For the three matches of DOC_2024_089, a linearly decaying position weight was used (1st place weight 1.0, 2nd place weight 0.9, 3rd place weight 0.8...): Aggregate similarity score = (0.92×1.0 + 0.87×0.9 + 0.78×0.8) / 3 = (0.92 +0.783 + 0.624) / 3 = 0.776 c) Calculation of overall score: Set the weighting coefficients to α=0.3, β=0.5, and γ=0.2.

[0056] Coverage score = 3 / 5 = 0.6 (This historical document was matched to 3 blocks, out of a total of 5 blocks) Semantic matching score = 0.3 × 0.9 + 0.5 × 0.776 + 0.2 × 0.6 = 0.27 + 0.388 + 0.12 = 0.778 d) Length penalty factor: The DOC_2024_089 has 5 blocks, an average of 3 blocks, and k=0.5.

[0057] Length penalty factor = 1 / (1 + 0.5 × log(5 / 3)) = 1 / (1 + 0.5 × 0.22) = 1 / 1.11 = 0.90 The final adjusted semantic matching score for this document is 0.778 × 0.90 = 0.700. The semantic matching scores of all candidate documents were calculated using the same method, and the ranking results are shown in Table 4 below (partial display): Table 4 Step S4: Personalized opinion recommendations based on the approval role's perception 4.1. Job Information Extraction: The current approval node position is "Head of Finance Department". The system queries the PostgreSQL database for all historical approval node position information for the aforementioned candidate documents.

[0058] Taking DOC_2024_156 as an example, the query results show that its approval process includes 4 nodes: Finance Department Clerk → Finance Department Head → Office Director → Unit Leader.

[0059] 4.2. Job Matching Score Calculation: For DOC_2024_156: The job title in the second approval node is "Head of Finance Department". A string match is performed between the current approval job title "Head of Finance Department" and the match is successful. Job matching score = 1.0.

[0060] Regarding DOC_2024_089: The approval process includes: Project Leader → Head of Finance Department → Office Director → Unit Leader; The second node, "Head of Finance Department," is not exactly the same as the current position, "Head of Finance Section." Using Jaccard similarity calculation: the intersection of {"Finance", "Department", "Section Chief"} and {"Finance", "Section", "Section Chief"} is {"Finance", "Section Chief"}, and the union is {"Finance", "Department", "Section", "Section Chief"}. The Jaccard similarity is 2 / 4 = 0.5, but considering that the "section chief" level is the same, the overall text similarity is 0.75. Since 0.75 > 0.6 (the set threshold), it is determined to be a similar job position; Job matching score = 0.5 + 0.4 × 0.75 = 0.5 + 0.3 = 0.8.

[0061] For DOC_2024_223: Its approval process includes: Personnel Department Clerk → Personnel Department Head → Office Director → Unit Leader; Although there is a "section chief" position, the text similarity between "personnel section chief" and "finance section chief" is 0.5. Since 0.5 < 0.6, the requirements for similar positions are not met; A base score of 0.2 is given.

[0062] 4.3. Job Matching Weighted Calculation: The current approval node is node 2. Check the approval node positions in each candidate document that match the current position: DOC_2024_156: The matched job is in the second node, and the position difference = |2-2| = 0; DOC_2024_089: The matched job is at the 2nd node, and the position difference = |2-2| = 0.

[0063] The formula for calculating the position weighting coefficient is set as δ=0.2: Position weighting coefficient = 1 + 0.2 × exp(-0) = 1 + 0.2 = 1.2 Weighted job matching score: DOC_2024_156: 1.0 × 1.2 = 1.2 (the part exceeding 1.0 is treated as 1.0, and the final value is 1.0). DOC_2024_089: 0.8 × 1.2 = 0.96; DOC_2024_223: The matched job is in the second node but the similarity is low, 0.2 × 1.0 = 0.24.

[0064] Step S5: Final Sorting and Recommendation The semantic matching score and the job matching score were combined, and λ=0.6 and μ=0.4 were set.

[0065] The final recommendation score is calculated, as shown in Table 5 below: Table 5 Based on the final recommended scores, the documents are sorted in descending order, and the top 5 historical documents with the highest scores are selected. The system then extracts the historical approval comments for these 5 documents from the PostgreSQL database for the "Head of Finance" job title node. Recommendation result: DOC_2024_156 (Score 0.895) Approval Opinion: After review, the reasons for the additional funding for this project are sufficient, the budget details are clear, and it complies with financial management regulations. Approval is recommended, but further supervision of the use of funds is necessary.

[0066] DOC_2024_089 (Score 0.804) Approval opinion: The additional funding is approved, but it must be strictly adhered to in accordance with the budget to avoid overspending. It is recommended that the project team submit a detailed plan for the use of funds.

[0067] DOC_2024_178 (Score 0.747) Approval opinion: Approved in principle, but further explanation is needed regarding the specific purpose and performance targets of the additional funding, along with relevant supporting materials.

[0068] DOC_2024_312 (Score 0.732) Approval opinion: Agreed. It is recommended that the project leader strengthen cost control and regularly report on the use of funds.

[0069] DOC_2024_223 (Score: 0.489) Approval opinion: It is recommended to strictly review the application and further demonstrate the necessity of the additional funding.

[0070] The system pushes these 5 historical approval comments to the current finance department head as a reference, helping them to quickly formulate approval opinions and significantly improving approval efficiency and quality.

[0071] This embodiment fully demonstrates that the present invention achieves accurate, efficient, and personalized historical approval opinion recommendations by combining multi-dimensional semantic matching with approval role perception, which has good practical value and promotion prospects.

[0072] This invention utilizes a pre-trained semantic embedding model to understand the deep semantics of official documents, improving recommendation accuracy. Simultaneously, through job-matching score calculation and approval node alignment mechanisms, it deeply binds approval opinion recommendations to specific approval positions and approval process locations, achieving personalized recommendations. By accurately recommending historically high-quality approval opinions, it shortens the average time for approvers to draft opinions, increasing approval efficiency by 80%, while ensuring the standardization and professionalism of approval opinions and reducing the learning cost for new employees. Compared to existing technologies, this invention overcomes the shortcomings of existing rule configuration methods, such as staticity, low generalization, and insufficient role adaptation, achieving more intelligent, accurate, and efficient approval opinion recommendations.

[0073] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A method for recommending official document approval opinions based on semantic matching and role perception, characterized in that, Includes the following steps: S1. Construct a vector database and a structured meta-database for historical official documents; S2. Obtain the documents to be approved, and perform feature extraction and preliminary screening on the documents to be approved; S3. Perform text block-level similarity retrieval on official documents and then aggregate them; S4. Calculate the job matching score based on job information; S5. Calculate the final recommendation score, sort the results in descending order based on the final recommendation score, and output the top 5 with the highest scores as the recommended results.

2. The document approval opinion recommendation method based on semantic matching and role awareness according to claim 1, characterized in that, Step S1 specifically includes the following sub-steps: S11. Obtain the historical approval document data set; S12. Divide the main text of each document into natural paragraphs, and concatenate the continuous paragraphs into text blocks, and number the generated text blocks; S13. Construct and train a semantic embedding model, and vectorize each text block through the semantic embedding model to generate the corresponding semantic vector; S14. Store the official document data, the corresponding semantic vector, and the corresponding text block number into the vector database to form a historical official document vector database; S15. Store the historical approval data of each official document in a relational database to form a structured meta-database; Each document in the historical approval document data set contains: document title, body text, document type, and unique document ID; the character length in the text block does not exceed 1200 characters.

3. The document approval opinion recommendation method based on semantic matching and role perception according to claim 2, characterized in that, The document data in step S14 specifically includes: document title and unique document ID.

4. The document approval opinion recommendation method based on semantic matching and role perception according to claim 2, characterized in that, The historical approval data in step S15 specifically includes: the historical approval opinions of the document at each approval node, the name of the approval post at the corresponding approval node, the name of the approver, and the post level information.

5. The document approval opinion recommendation method based on semantic matching and role perception according to claim 1, characterized in that, Step S2 specifically includes the following sub-steps: S21. Obtain the title, body content, and job information corresponding to the current approval stage of the document pending approval; S22. Extract keywords from the main text and perform semantic similarity calculation and document type mapping in conjunction with the title; S23. Conduct preliminary screening in the historical document vector database and divide the documents to be approved into text blocks.

6. The document approval opinion recommendation method based on semantic matching and role perception according to claim 1, characterized in that, Step S3 specifically includes the following sub-steps: S31. Calculate the similarity between each text block of the document to be approved and the text blocks in the historical document vector database, and select the n most similar blocks; S32. Record the historical document ID and its similarity score corresponding to each matching block; S33. Aggregate the similarity of all text blocks according to the historical document ID, and calculate the comprehensive similarity score for each document.

7. The document approval opinion recommendation method based on semantic matching and role perception according to claim 6, characterized in that, Step S33 specifically includes the following steps: S331. Count the number of times each document ID appears in the search, and normalize it according to the total number of blocks of the document to calculate the normalized frequency score; S332. Perform weighted aggregation on all similarity scores corresponding to the same document ID, and calculate the aggregated similarity score; S333. The normalized frequency score and the aggregated similarity score are fused according to the weighting coefficients to obtain a comprehensive score; For documents with a total number of blocks that is much greater than the average number of blocks for all documents, a length penalty factor is calculated. The comprehensive similarity score of the document is calculated as the comprehensive score of the document multiplied by the length penalty factor.

8. The document approval opinion recommendation method based on semantic matching and role perception according to claim 7, characterized in that, The formula for calculating the normalized frequency score is: Normalized frequency score = (Number of times the document ID appears / Total number of blocks in the new document) × (Standard block count / Total number of blocks in the historical document), where the standard block count is the average number of blocks or a fixed value. The formula for calculating the aggregated similarity score is: Aggregated similarity score = Σ(single block similarity score × position weight) / total number of matching blocks in the document, where the position weight is assigned based on the similarity ranking, with higher rankings having higher weights, and using exponential or linear decay. The formula for calculating the comprehensive score is: Comprehensive score = α × Normalized frequency score + β × Aggregated similarity score + γ × Coverage score, where α, β, and γ are weighting coefficients and α + β + γ = 1; the coverage score represents the proportion of the number of blocks matched for the historical document to the total number of blocks. The formula for calculating the length penalty factor is: Length penalty factor = 1 / (1 + k × log(number of blocks in the document / average number of blocks)), where k is the penalty intensity coefficient.

9. The document approval opinion recommendation method based on semantic matching and role awareness according to claim 1, characterized in that, Step S4 specifically includes the following sub-steps: S41. Job Information Extraction: Query the job name and job attributes of the current approval node from the structured metadata database, and at the same time query the job information of all historical approval nodes for each candidate document; S42. Job Matching Score Calculation: For each candidate document, determine whether there is a job in its historical approval process that is the same as or similar to the current approval job, and calculate the job matching score. S43. Job Matching Weighting: For approval nodes that are in the same or similar positions in the approval process, their job matching scores are given additional weighting: historical approval opinions that correspond to the process position and match the job are given priority recommendation.

10. The document approval opinion recommendation method based on semantic matching and role awareness according to claim 9, characterized in that, The job matching score is calculated as follows: Perform an exact string match between the current approval job title and the job titles in the historical approval nodes. If there are identical job titles, the job match score is 1.

0. If no exact match is found, a similarity score is calculated based on the textual similarity of the job titles, with a value ranging from 0 to 0.

9. If the text similarity is greater than the set threshold, it is judged as a similar job, and the job matching score = 0.5 + 0.4 × text similarity, with a value range of 0.5~0.9; if the text similarity is lower than the threshold, a base score of 0.1~0.3 is given.

11. The document approval opinion recommendation method based on semantic matching and role perception according to claim 7 or 9, characterized in that, The formula for calculating the final recommendation score in step S5 is: Final recommendation score = λ × (overall score × length penalty factor) + μ × job matching score, where λ and μ are fusion weight coefficients and λ+μ=1.

Citation Information

Patent Citations

  • Examination and approval opinion setting method and device based on domestic CPU and medium

    CN112184159A