Intelligent procurement system review method and system and electronic equipment
By employing an intelligent procurement system review method that utilizes document parsing and hybrid retrieval technologies to generate the smallest review unit, and combining it with a large language model for intelligent judgment, the problem of inconsistent standards and low efficiency in the review of procurement systems in large group enterprises has been solved, resulting in efficient and accurate review results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-13
- Publication Date
- 2026-04-10
AI Technical Summary
The procurement system review of large group enterprises suffers from problems such as inconsistent standards, easy omissions and misjudgments, low efficiency and low knowledge reuse rate. Existing technologies are difficult to achieve standardized, automated and highly accurate review.
An intelligent procurement system review method is adopted, which generates the smallest review unit through document parsing, hybrid retrieval, large language model and structured prompt words. Combining vector similarity and keyword retrieval, dynamic weight fusion is used to construct dynamic context, and intelligent judgment is performed using large language model to output structured conclusions.
It has achieved standardization and automation of procurement system review, significantly improved review efficiency and accuracy, reduced reliance on professional personnel, and is adapted to the large-scale compliance review needs of large groups.
Smart Images

Figure CN121835928A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent management of enterprises, in particular to an intelligent procurement system review method, system and electronic device. BACKGROUND
[0002] The procurement system review of large group enterprises is a core link of compliance management, and is directly related to the legality and standardization of enterprise operation. The technical implementation in this field relies on key technologies such as document analysis, information retrieval, large language model and knowledge base construction, and needs to process procurement system documents in multiple formats such as DOCX, PDF and pictures, and needs to accurately match the review basis from the upper system such as national laws and regulations and group rules and regulations.
[0003] At present, the mainstream procurement system review method in the industry is the traditional manual review mode, which needs to form a review team composed of personnel with professional backgrounds such as law, procurement and compliance, and manually read the documents to be reviewed sentence by sentence, find the upper system basis by experience, subjectively judge the compliance of the clauses and write a review report.
[0004] However, the traditional manual review mode has the following defects: first, the review quality is highly dependent on the individual experience and cognitive level of the personnel, and the judgment of different review personnel on the same problem is easy to differ, there is no unified standard, and the consistency of the review results is difficult to guarantee; second, in the face of long and complex system documents, manual review is easy to miss important clauses or misjudge the compliance due to fatigue, distraction and other factors; third, there are many subordinate units under large groups, and the review demand of a large number of system files far exceeds the processing capacity of manual, the review efficiency is low, and it is difficult to realize large-scale processing; fourth, the experience of expert review is tacit knowledge, which cannot be systematically deposited and inherited, and expert resources need to be mobilized repeatedly for each review, and the knowledge reuse rate is low.
[0005] Therefore, the existing technology cannot meet the needs of large group enterprises for standardized, automated and high-accuracy procurement system review, and it is urgent to build an efficient, accurate and reusable intelligent review scheme combining artificial intelligence technology to solve the inherent drawbacks of the traditional mode. SUMMARY
[0006] In order to solve the problems of non-uniform standard, easy to miss and misjudge, low efficiency and low knowledge reuse rate in traditional manual procurement system review, the present application provides an intelligent procurement system review method, system and electronic device, which realizes the standardization, automation and high accuracy of procurement system review by integrating document analysis, hybrid retrieval, large language model and structured prompt words, and accurately disassembles complex system documents, efficiently recalls upper system basis and converts expert experience into machine executable review logic.
[0007] In a first aspect, the present application provides an intelligent procurement system review method, comprising: segmenting the procurement system document under review to generate minimum review units containing clause texts and metadata; Based on the minimum review units, a hybrid retrieval strategy is adopted to perform vector similarity retrieval and keyword retrieval in parallel from a pre-constructed superior system knowledge base, and the two-way retrieval results are dynamically weighted and reordered to recall relevant superior system clauses as review basis; Based on the minimum review units, the recalled relevant superior system clauses and the pre-set review prompt word templates, a dynamic context is constructed to form a complete prompt word containing review tasks, review basis and logical constraints; The complete prompt word is input into a large language model for intelligent judgment, and a structured review conclusion is output.
[0008] The intelligent procurement system review method provided by the embodiment of the application can ensure that each clause can be accurately focused on review by disassembling complex documents into standardized minimum review units. The hybrid retrieval strategy combines vector semantic matching and keyword exact matching to ensure the comprehensiveness and accuracy of the superior system basis recall. The dynamic context construction systematically integrates review tasks, basis and rules to provide clear guidance for the large language model. The intelligent judgment outputs a structured conclusion to realize the standardized presentation of the review results. The overall process realizes the transformation of procurement system review from artificial dominance to intelligent automation. The review efficiency is improved by tens of times compared with the traditional mode, the review accuracy and result consistency are significantly improved, the dependence on professional review personnel is reduced, the labor cost is greatly saved, and the large-scale compliance review demand of a large group enterprise with multiple subsidiaries and massive system documents is perfectly adapted.
[0009] In an optional implementation, the segmenting the procurement system document under review to generate minimum review units containing clause texts and metadata comprises: performing format recognition on the procurement system document under review, and performing text analysis according to different analysis strategies according to the document format type; performing intelligent clause segmentation on the analyzed text to identify and extract structured information of each clause; encapsulating each clause as a minimum review unit, and associating the system, chapter level, clause serial number and text content thereof.
[0010] The embodiment of the application first performs document format recognition, and then adopts a suitable analysis strategy, so that the text information of different format documents can be extracted completely; the intelligent clause segmentation focuses on clause boundary identification and integrity verification, so that the situation of clause breaking, mis-disassembly or missing disassembly is avoided; and the finally encapsulated minimum review unit not only contains the core clause text, but also associates the key metadata such as the system to which the clause belongs, the chapter level and the clause serial number, so as to form a standardized review input unit. The design converts the originally disordered system document into a structured and traceable review object, ensures that each clause can be independently and comprehensively reviewed, provides accurate search targets for subsequent mixed search, lays a foundation for the traceability and review of the review results, and significantly improves the fine and standardization level of the whole review process.
[0011] In an optional embodiment, the intelligent clause segmentation on the parsed text comprises: using a regular expression to identify the clause boundary from the original text stream to extract a preliminary clause list; performing semantic verification on the preliminary clause list by a large language model to determine whether each clause is a complete single clause; if the passing rate of semantic verification is lower than a preset threshold, enabling the large language model to perform bottom-up segmentation, dividing the full-text text into a plurality of text blocks according to a fixed length, and using the large language model to perform structured clause transcription on each text block, and performing deduplication and merging on the clauses obtained by the bottom-up segmentation to form a final clause list; in the segmentation process, recursively extracting and binding the chapter level metadata of each clause.
[0012] The embodiment of the application can quickly locate the clause boundary through regular expression recognition, realize efficient preliminary segmentation, and guarantee the segmentation efficiency; the large language model semantic verification performs secondary verification on the preliminary segmentation result, accurately judges the completeness of the clause, filters the mis-disassembled and incomplete clauses, and improves the segmentation accuracy; when the verification passing rate is not up to standard, the large model is enabled for bottom-up segmentation, the text blocks are divided and structured transcription is performed, the clause breaking is avoided by combining the overlapping area design, and the result completeness is ensured through deduplication and merging. At the same time, the chapter level metadata is recursively extracted, so that the structure of each clause is clearly traceable. The scheme not only takes into account the segmentation efficiency of the regular format document, but also can cope with special scenarios such as long text, format disorder and complex clause expression, so that all procurement system documents can be disassembled into independent, complete and structured clauses, and provides core support for the accurate implementation of subsequent review work.
[0013] In an alternative embodiment, based on the minimum review unit, a hybrid retrieval strategy is adopted to perform vector similarity retrieval and keyword retrieval from the pre-constructed upper system knowledge base in parallel, and the two-way retrieval results are dynamically weighted and reordered to recall relevant upper system clauses as review basis, including: An upper system knowledge base is constructed, and the upper system documents are cut according to the clause granularity, and vector index and keyword index are established; Vector retrieval and keyword retrieval are performed on the minimum review unit, and the retrieval results of semantic similarity and keyword matching degree are obtained respectively; The two-way retrieval results are normalized and dynamically weighted, the weight coefficient is adjusted according to the sparsity, and the comprehensive sorting result of recalling relevant upper system clauses is generated.
[0014] The upper system knowledge base of the embodiment of the application adopts clause-level cutting and double-index construction, converts the dispersed upper system into structured and quickly retrievable knowledge resources, lays a foundation for efficient retrieval, and performs vector similarity retrieval and keyword retrieval in parallel, respectively, to play the advantages of semantic understanding and accurate matching. Vector retrieval can identify clauses with different wording but similar semantics, and keyword retrieval can quickly locate the basis containing specific terms, avoiding the "blind area" of single retrieval method. Dynamic weight fusion and reordering optimize the results according to the actual situation of retrieval, ensure that the most relevant upper system clauses are recalled first, avoid review misjudgment caused by lack of basis or matching deviation, and provide a solid and reliable support for compliance determination.
[0015] In an alternative embodiment, the two-way retrieval results are normalized and dynamically weighted, the weight coefficient is adjusted according to the sparsity, and the comprehensive sorting result of recalling relevant upper system clauses is generated, including: The first score of the vector retrieval result and the second score of the keyword retrieval result are normalized respectively; According to the effective number of keyword retrieval results and whether the metadata reference is hit, the sparsity parameter is determined; Based on the sparsity parameter, the weight coefficient of the first score and the second score is dynamically adjusted; According to the adjusted weight coefficient, the normalized first score and the second score are weighted and summed to obtain a comprehensive score, and the top K retrieval results are selected as effective review basis in descending order of comprehensive score.
[0016] The application provides unified mapping of original scores of two-way retrieval to the same interval through fractional normalization processing, eliminates unfairness caused by dimensional difference, and provides a unified benchmark for subsequent fusion; the introduction of the sparsity parameter can accurately reflect the recall quality of keyword retrieval, and the weight adjustment has a basis; dynamic weight adjustment optimizes the proportion of two-way scores in real time according to retrieval quality, so that the advantages of the two retrieval methods are fully utilized, and the disadvantages are mutually compensated, which not only realizes the fair fusion of results, but also adapts to the quality fluctuation of different retrieval scenes, and significantly improves the accuracy, stability and reliability of the review basis recall.
[0017] In an optional embodiment, the sparsity parameter is determined by the following method: The number of results n actually returned by retrieval and the number of results n_valid satisfying a preset relevance threshold are obtained; It is judged whether the metadata reference identifier cite_hit is hit; According to the values of n, n_valid and cite_hit, the sparsity is calculated according to a preset segmentation rule: If n=0, the sparsity is a first value; If cite_hit=1 and n_valid>=1, the sparsity is a second value; If n_valid=0, the sparsity is a third value; If n_valid=1, the sparsity is a fourth value; If n_valid=2, the sparsity is a fifth value; If n_valid>=3, the sparsity is a sixth value; Among them, the second value and the sixth value are less than the fourth value and the fifth value, and the fourth value and the fifth value are less than the first value and the third value.
[0018] The embodiment of the application comprehensively considers the actual return number n of keyword retrieval, the effective number n_valid satisfying the relevance threshold, and whether the metadata reference cite_hit is hit, three core indexes, and fully reflects the recall quantity and quality of keyword retrieval. By presetting the sparsity values corresponding to different scenes, the quantification logic that the fewer the results, the lower the effective proportion, and the higher the sparsity is clear, and the high and low levels of sparsity are reasonably divided to ensure that the sparsity can accurately depict the retrieval quality. The design changes the sparsity calculation from a fuzzy judgment to a standardized and reproducible quantification process, avoids the bias of manual evaluation, provides a precise and reliable quantification basis for the dynamic adjustment of the weight coefficient, ensures that the fusion result of the mixed retrieval is always adapted to the retrieval quality, and improves the stability and reliability of the entire retrieval process.
[0019] In an optional embodiment, the weight coefficient is dynamically adjusted according to the following formula: alpha = A + (B - alpha_min) * sparsity wherein sparsity is the sparsity of the keyword search result, alpha is the weight coefficient adjusted according to the sparsity, alpha_min is a preset minimum reference value of alpha, and A and B are both preset fixed parameters; The comprehensive score is calculated by the following formula: Comprehensive score = alpha * first score + (1 - alpha) * second score.
[0020] The embodiment of the application converts the dynamic weight fusion from qualitative logic to quantitative executable algorithm through formula design, ensures the consistency and reproducibility of weight adjustment and score calculation under different review tasks and different search scenarios, avoids the deviation caused by manual intervention or ambiguous rules, and significantly improves the fairness, accuracy and maintainability of the mixed search result.
[0021] In a second aspect, the embodiment of the application provides an intelligent procurement system review system, comprising: A minimum review unit division module is configured to split the procurement system document to be reviewed to generate minimum review units containing clause texts and metadata. A search module is configured to perform vector similarity search and keyword search in parallel from a pre-constructed superior system knowledge base based on the minimum review units by using a mixed search strategy, and to perform dynamic weight fusion and reordering on the two-way search results to recall relevant superior system clauses as review basis. A prompt word generation module is configured to construct a dynamic context based on the minimum review units, the recalled relevant superior system clauses and a preset review prompt word template, and to form complete prompt words containing review tasks, recalled basis and logical constraints. A review conclusion output module is configured to input the complete prompt words into a large language model for intelligent judgment and output structured review conclusions.
[0022] In a third aspect, the application provides an electronic device, comprising a memory and a processor, which are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the intelligent procurement system review method of the first aspect or any of the corresponding embodiments thereof.
[0023] In a fourth aspect, the application provides a computer readable storage medium, which stores computer instructions for causing a computer to execute the intelligent procurement system review method of the first aspect or any of the corresponding embodiments thereof.
[0024] In a fifth aspect, the present application provides a computer program product comprising computer instructions for causing a computer to execute the intelligent procurement system review method of the first aspect above or any of its corresponding embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0025] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings required to be used in the specific embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0026] Figure 1 is a flowchart of an intelligent procurement system review method according to an embodiment of the present application; Figure 2 is a flowchart of another intelligent procurement system review method according to an embodiment of the present application; Figure 3 is a structural block diagram of an intelligent procurement system review system according to an embodiment of the present application; Figure 4 is a hardware structure schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0028] It can be understood that before using the technical solutions disclosed in the embodiments of the present application, the type, use range, use scenario, etc. of the personal information involved in the present application should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.
[0029] Procurement system review is an important part of enterprise compliance management. The existing compliance review generally forms a professional review team composed of personnel with legal, procurement, compliance and other professional backgrounds, resulting in strong subjectivity, non-uniform standards, low efficiency, difficulty in scaling and difficulty in reusing the review experience of experts. Each review needs to mobilize expert resources again, and it is difficult to form reusable knowledge assets.
[0030] Based on this, the embodiment of the application provides a kind of intelligent procurement system review method embodiment, realizes automatic examination using artificial intelligence technology, realizes standardization examination by structured prompt word, can quickly process a large number of documents.It needs to be explained, the steps shown in the flowchart of the drawing can be executed in computer system, such as a group of computer executable instructions, and although logical order is shown in flowchart, in some cases, the steps shown or described can be executed in different order from here. Figure 1 It is the flowchart of the intelligent procurement system review method according to the embodiment of the application, as Figure 1 Shown, the process includes the following steps: Step S101, the procurement system document to be reviewed is segmented, and the minimum review unit containing clause text and metadata is generated.
[0031] Specifically, segmentation is the basic link of procurement system automated review, and the purpose is to disassemble complex and lengthy procurement system documents (such as DOCX, PDF, picture format) into independent and accurately reviewable minimum review units, which contain the sub-company / unit of the system, chapter name and serial number, clause serial number, clause text, etc., to ensure that each clause can be analyzed separately, and at the same time, the key metadata is bound to provide standardized input for subsequent basis retrieval and intelligent judgment, to avoid review omissions and judgment deviations caused by complex document structure or clause association.
[0032] Step S102, based on the minimum review unit, a hybrid retrieval strategy is used to perform vector similarity retrieval and keyword retrieval from the pre-constructed upper system knowledge base in parallel, and the two-way retrieval results are dynamically weighted and reordered to recall relevant upper system clauses.
[0033] The hybrid retrieval strategy provided by the embodiment of the application takes the minimum review unit as the retrieval core, performs vector similarity retrieval and keyword retrieval in parallel, and reorders the results by combining dynamic weight fusion algorithm to accurately recall the most relevant upper basis from the pre-constructed upper system knowledge base, which solves the problem of keyword retrieval semantic blind area and makes up for the defects of vector retrieval precision matching. Vector similarity retrieval: convert the clause to be reviewed into vector representation, recall the upper system clause with the most relevant semantics from the knowledge base by calculating the vector cosine similarity, which can identify clauses with similar semantics but different wording.
[0034] Key word search: Based on key word and metadata matching, pay special attention to the accurate matching of legal terms, professional terms and other key information, and quickly locate the clauses containing specific terms. For example, the BM25 (Best Matching 25) algorithm is a classic key word relevance sorting algorithm in the field of information retrieval, which quantifies the "matching closeness between search key words and target documents (or clauses)", and is widely used in precise search scenarios.
[0035] In an example, the pre-built higher system knowledge base stores higher documents such as "Group Procurement Management Measures", which are processed in the form of clause-level segmentation combined with metadata binding, and vector index and key word inverted index are constructed. Among them, vector similarity search: calculate the cosine similarity between the to-be-reviewed clause vector and all clause vectors in the knowledge base, recall clauses with similar semantics, for example: Result: Article 10 of "Group Procurement Management Measures" "If the single procurement amount of an enterprise exceeds 5 million yuan, it must be reviewed by the superior decision-making agency" (similarity 0.92).
[0036] Key word search: Based on "procurement amount, 5 million yuan, board of directors, review and approval", precise matching is recalled, for example: Result 1: Article 10 of "Group Procurement Management Measures" "If the single procurement amount of an enterprise exceeds 5 million yuan, it must be reviewed by the superior decision-making agency" (BM25 score 28.6); Result 2: Article 12 of "Group Procurement Management Measures" "Purchasing project review and approval process needs to be reported to the board of directors for the record" (BM25 score 22.3).
[0037] Further, the dynamic weight fusion and reordering of the two search results are carried out, and through this hybrid search strategy, the system can not only utilize the semantic understanding ability of vector search, but also take advantage of the precise matching of key word search, significantly improving the accuracy and integrity of the recall.
[0038] Step S103, based on the minimum review unit, the recalled higher system clauses related to the recall, and the pre-set review prompt word template, a dynamic context is constructed to form a complete prompt word containing the review task, the basis for the recall and the logical constraints.
[0039] In an example, the pre-set review prompt word template includes the following parts: First part: general review principles 1.1 Basic concepts Higher system… To-be-reviewed system… Review target… 1.2 Compliance judgment logic In line with the higher system Violations of the Upper System Need special attention Second Part: Domain Knowledge and Judgment Reference The following is the background knowledge in the system review field, which you can refer to when performing:… Third Part: Key Review Points (Highest Priority) "{custom_rules}" Fourth Part: Content to be reviewed The sub-company system clause to be reviewed "{clause}" Retrieved relevant upper system clauses The following are the upper system clauses that may be related to the target clause (sorted by relevance): "{upper_clause}" Fifth Part: Review Execution Rules Priority System Please strictly follow the following priority to perform the review: Priority P0 (highest): Key review points… Priority P1: Domain knowledge reference… Priority P2: General review principles… Conflict Handling Principles When the key review points conflict with the system-provided domain knowledge or general review principles, the key review points are given priority Special case handling… Sixth Part: Output Requirements Strictly return a legal JSON, do not output any additional text, comments, markdown code block markers or other content. The JSON contains the following fields: 1. is_ok (Boolean): whether the review passes; 2. reason (string): detailed explanation of the review result; 3. referenced_upper_clauses (number array): referenced upper system clause serial numbers; For each unit to be reviewed, call the pre-set structured prompt word template and fill in the following parts of the template: 1. Review task: clearly state the target clause that needs to be reviewed (i.e. the content of the smallest review unit); 2. Review basis: contains the top-K relevant clause fragments recalled from the upper system knowledge base; 3. Logic constraint: specific review rule point list, combing into clear review logic point, including review judgment precondition, verification rule and negative index or mark, etc., which are derived from historical system files, review details and review reports, or refined from business experts' experience.
[0040] After assembly, a prompt word containing complete context information is formed, which provides both the background knowledge required for review and the logic rules of review, ensuring that the large language model can make accurate compliance judgment.
[0041] Step S104, input the complete prompt word into the large language model for intelligent judgment, and output the structured review conclusion. Specifically, the following processes are included: 1. Logical reasoning: the large language model performs deep semantic understanding and logical reasoning based on the review task, basis and logic constraint in the input prompt word, to determine whether the to-be-reviewed clause meets the requirements of the upper-level system; wherein the large language model (LLM) can be based on a deep learning natural language processing model, and has strong language understanding and generation capabilities, such as DeepSeek and Qianwen.
[0042] 2. Result generation: the model outputs a structured review conclusion, including a clear judgment of whether to pass and a detailed explanation of the reasons for not passing; for the clauses that do not pass, the system points out the specific conflict points, cited upper-level system basis and modification suggestions; 3. Result summary: the system summarizes the review results of all minimum review units to generate a complete review report, including problem statistics table, detailed problem explanation, rectification suggestion, etc., to facilitate users to quickly understand the overall compliance situation.
[0043] The intelligent procurement system review method provided by the embodiment of the present application, as shown in Figure 2 , includes: Step S201, dividing the to-be-reviewed procurement system document to generate minimum review units containing clause text and metadata.
[0044] The purpose of this step is to disassemble the procurement system document into minimum review units for subsequent accurate review. The specific division process includes the following steps: S2011, performing format recognition on the to-be-reviewed procurement system document, and performing text analysis according to different analysis strategies according to the document format type.
[0045] Specifically, first, identify the file format and content characteristics of the uploaded document: DOCX: the document format is.docx, it is also a zip container and word / document.xml exists; PDF: The document format is.pdf, and the PDF file header is detected; Picture: Format is jpg / png / tiff, etc. For PDF files, detect the number of extractable real text layers per page text_chars_per_page, and if the number of pages with text_chars_per_page>200 is more than 50%, it is considered as an electronic version PDF, otherwise it is considered as a picture scan.
[0046] Further, different parsing strategies are adopted according to the document format type for text parsing: 1. If the document is in DOCX format, directly extract text and format information based on XML structure; 2. If the document is in electronic PDF format, call a deep document parsing model combined with OCR technology to extract text and layout information; 3. If the document is in picture format or scanned PDF format, call a multi-modal large language model to convert the image into text data. This method has stronger adaptability to complex layout and handwritten content.
[0047] The embodiment of the application designs different parsing strategies for different formats of documents, solving the problem of poor compatibility of traditional parsing methods for multi-format documents: DOCX format directly reads XML to ensure information integrity, electronic PDF combines deep parsing and OCR to extract layout information, and picture / scan PDF converts text through a multi-modal large model. This design covers various procurement system carriers in actual work, including old scanned documents, handwritten documents and other non-standard formats, which not only improves the coverage of document parsing, but also ensures the accurate extraction of text and structural information under different formats, laying a foundation for subsequent clause segmentation.
[0048] S2012, intelligent clause segmentation is performed on the parsed text, and structured information of each clause is recognized and extracted; In the embodiment of the application, the process of intelligent clause segmentation of the parsed text is: using regular expressions to recognize clause boundaries, and using a large language model to verify the semantic of the recognition result, if the verification rate is lower than the preset threshold, a large language model is used for bottom-up segmentation to re-transcribe the clause in a structured way. Specifically: 1. Regular expression recognition: use a pre-set regular expression to identify clause boundaries from the original text stream, extract a preliminary clause list, such as chapter number markers like "Article X", "X.X", etc. An example of the regular expression is:
[0049] It filters irrelevant format interference by identifying Markdown-formatted chapter titles; extracts two key pieces of information: chapter number (Chinese / Arabic numerals), chapter name (optional); compatible with various format deviations (indentation, extra, space, etc.), improving the robustness of document parsing. The extracted provisions will be stored as a structured list containing chapter numbers as the initial provision list.
[0050] 2, Large model semantic verification: The initial provision list is verified by a large language model to determine whether each provision is a complete single provision. The provisions will be executed in batches, and each k provision (depending on the upper limit of the LLM context window used) will be called once by the LLM, and the validity of each provision will be summarized.
[0051] 3, Large model bottom: If the pass rate of semantic verification is lower than the preset threshold, enable large language model bottom segmentation, divide the full text into multiple text blocks according to a fixed length, and use a large language model to structure the provision transcription of each text block. The provisions obtained by the bottom segmentation are de-duplicated and merged to form the final provision list.
[0052] In an example, if the effectiveness verification pass rate is lower than p (default 90%), enable large model bottom segmentation path to re-segment the provisions: divide the document parsing system full text into multiple chunks (each chunk length depends on the upper limit of the LLM context window used) according to a fixed length, and call LLM for structured transcription of single provisions. The chunk has a certain overlap (default 1024) to avoid the problem of a provision being cut in half. Finally, all chunk-transcribed provisions are de-duplicated and summarized according to the chapter number to form the final provision list.
[0053] 4, Recursive hierarchical parsing: The system extracts and binds chapter-level metadata, including chapter name, chapter number, and provision number, while segmenting, to form complete structured information.
[0054] The embodiment of the application realizes fast preliminary segmentation through regular recognition, large model semantic verification guarantees provision integrity, and bottom segmentation supplements through large model transcription when verification is not up to standard, while recursively extracting chapter metadata. This scheme not only considers segmentation efficiency, but also improves the robustness of segmentation through multiple verification and bottom-up mechanisms, ensuring that complex documents (such as long texts and format-chaotic documents) can also be divided into independent and complete provisions, avoiding errors caused by segmentation that lead to subsequent review bias.
[0055] S2013, encapsulate each provision as the smallest review unit and associate it with its corresponding system, chapter level, provision number, and text content.
[0056] After the above processing, each single clause becomes an independent minimum review unit, which contains the clause content, the name of the system to which it belongs, the chapter level (chapter, section, etc.), the clause number, and other metadata. This segmentation lays the foundation for subsequent accurate retrieval and review.
[0057] Step S202, based on the minimum review unit, a hybrid retrieval strategy including vector retrieval and keyword retrieval is used to recall relevant higher-level system clauses from the higher-level system knowledge base. Specifically, the following steps are included: S2021, construct a higher-level system knowledge base, cut the higher-level system documents by clause granularity, and establish vector index and keyword index.
[0058] The embodiment of the application pre-processes the higher-level system documents (such as national laws and regulations, industry standards, group systems, etc.): 1. Clause-level granularity segmentation: physically cut by single clause (Chapter X-Section X), form independent knowledge fragments, and follow the clause-by-clause cutting logic in step S201; 2. Metadata enhancement binding: for each knowledge fragment, automatically extract and bind structured metadata, including the name of the system to which it belongs, the chapter level index (including chapter number and chapter name), and the specific clause number, etc. 3. Hybrid index construction: store the knowledge fragments carrying metadata into a vector database, and construct a vector index (for semantic retrieval) and a keyword inverted index (for accurate retrieval) at the same time, supporting the use of metadata for range filtering.
[0059] S2022, perform vector retrieval and keyword retrieval on the minimum review unit, and obtain the retrieval results of semantic similarity and keyword matching degree respectively; S2023, score normalization and dynamic weight fusion are performed on the two-way retrieval results, the weight coefficient is adjusted according to the sparsity, and the comprehensive ranking result of the recalled relevant higher-level system clauses is generated.
[0060] In order to solve the problem of inconsistent dimensions and fluctuation of recall quality of the two retrieval methods, the embodiment of the application performs score normalization and dynamic weight fusion on the two-way retrieval results, and the specific process is as follows: 1. Score normalization: the first score of the vector retrieval result and the second score of the keyword retrieval result are normalized respectively; in an example, the original scores of the vector retrieval and the keyword retrieval are respectively processed by Min-Max normalization, and the two-way scores are mapped to the same [0, 1] interval; 2. Dynamic weight adjustment based on sparsity: determine the sparsity parameter according to the effective number of keyword retrieval results and whether the metadata reference is hit.
[0061] The sparsity parameter reflects the keyword search quality, the dynamic weight adjustment adapts to different recall scenes, the weighted summation and sorting output effective basis, the embodiment of the application obtains the result number n actually returned by keyword search and the result number n_valid meeting the preset relevance threshold, and judges whether the metadata reference identifier cite_hit is hit; according to the values of n, n_valid and cite_hit, the sparsity is calculated according to the preset segmentation rule, in an example, a segmentation function is designed to realize: If n=0, the sparsity is a first value; If cite_hit=1 and n_valid>=1, the sparsity is a second value; If n_valid=0, the sparsity is a third value; If n_valid=1, the sparsity is a fourth value; If n_valid=2, the sparsity is a fifth value; If n_valid>=3, the sparsity is a sixth value; Among them, the second value and the sixth value are less than the fourth value and the fifth value, and the fourth value and the fifth value are less than the first value and the third value.
[0062] The embodiment of the application comprehensively considers three core indexes of the actual return number n of keyword search, the effective number n_valid meeting the relevance threshold, and whether the metadata reference cite_hit is hit, and comprehensively reflects the recall number and quality of keyword search. By presetting the sparsity values corresponding to different scenes, the quantitative logic that the less the results are, the lower the effective proportion is, and the higher the sparsity is is clear, and the high and low levels of sparsity are reasonably divided, so that the sparsity can accurately describe the search quality.
[0063] In a specific example, if n=0: sparsity=1.0; Otherwise, if cite_hit=1 and n_valid>=1: sparsity=0.2; Otherwise, if n_valid=0: sparsity=1.0; Otherwise, if n_valid=1: sparsity=0.7; Otherwise, if n_valid=2: sparsity=0.4; Otherwise (n_valid>=3): sparsity=0.2.
[0064] The above process divides different scenes and corresponds to the sparsity value based on the number of keyword search results, the effective number, the metadata reference situation, and clearly shows the logic that the fewer the results, the higher the sparsity. The design makes the sparsity accurately reflect the recall quality of keyword search, provides a quantitative basis for subsequent dynamic weight adjustment, avoids the subjectivity of weight adjustment, ensures that the fusion result of mixed search always adapts to the actual recall situation, and improves the stability of the search result.
[0065] 3. Dynamic weight adjustment: dynamically adjusting the weight coefficient of the first score and the second score based on the sparsity parameter; In actual application, by monitoring the number of recall results of keyword search in real time, if the effective results of keyword search recall are lower than a preset threshold (for example, less than 3), the system automatically reduces the keyword weight and increases the vector weight to rely on the semantic understanding ability to supplement the recall; if the recall result contains an explicit metadata reference, the keyword weight is automatically increased.
[0066] In an example, the weight coefficient is dynamically adjusted according to the following formula: α=A+(B-α_min)×sparsity Wherein, sparsity is the sparsity of keyword search results, alpha is the weight coefficient adjusted according to the sparsity, alpha_min is the preset minimum reference value of alpha, A and B are both preset fixed parameters; for example, A is 0.25, B is 0.85, which is only an example, not limited thereto.
[0067] 4. Weighted merging and reordering: weighted sum of the normalized first score and the second score according to the adjusted weight coefficient, to obtain a comprehensive score, and sorting in descending order of the comprehensive score, and selecting the top K search results as the effective review basis.
[0068] Specifically, the comprehensive score is calculated by the following formula: Comprehensive score = alpha * first score + (1-alpha) * second score Further, arrange in descending order of the comprehensive score, and intercept the top-K segments as the effective review basis, and the value of K is reasonably set according to actual application.
[0069] The embodiment of the application realizes the fair fusion of the two kinds of search results by weighted sum, and improves the accuracy and reliability of the recall by dynamically adjusting the weight to adapt to the fluctuation of the search quality (such as strengthening semantic matching when the keyword result is less), avoids the missing of the basis due to the defect of single search. Through the formula design, the dynamic weight fusion is converted from qualitative logic to quantitative executable algorithm, ensuring the consistency and reproducibility of weight adjustment and score calculation in different review tasks and different search scenes, improving the fairness, accuracy and maintainability of the mixed search result.
[0070] Step S203, based on the minimum review unit, the recalled relevant superior system clause and the preset review prompt word template, a dynamic context is constructed to form a complete prompt word containing review tasks, review basis and logical constraints. For details, see step S103, which will not be repeated here.
[0071] Step S204, the complete prompt word is input into the large language model for intelligent judgment, and the structured review conclusion is output. For details, see step S104, which will not be repeated here.
[0072] The embodiment of the application also provides an intelligent procurement system review system, as shown in the figure, comprising: Figure 3 A minimum review unit division module 31 is used for splitting the procurement system document to be reviewed to generate a minimum review unit containing clause text and metadata. The retrieval module 32 is used for parallel vector similarity retrieval and keyword retrieval from the pre-constructed superior system knowledge base based on the minimum review unit, and the two-way retrieval results are dynamically weighted and reordered to recall relevant superior system clauses as review basis. The prompt word generation module 33 is used for constructing a dynamic context based on the minimum review unit, the recalled relevant superior system clause and the preset review prompt word template to form a complete prompt word containing review tasks, recalled basis and logical constraints. The review conclusion output module 34 is used for inputting the complete prompt word into the large language model for intelligent judgment, and outputting the structured review conclusion.
[0073] In an optional embodiment, the minimum review unit division module 31 comprises: A document recognition and analysis unit is used for format recognition of the procurement system document to be reviewed, and different analysis strategies are used for text analysis according to the document format type. A structured information extraction unit is used for intelligent clause division of the analyzed text, and structured information of each clause is identified and extracted. A minimum review unit encapsulation machine data association unit is used for encapsulating each clause as a minimum review unit and associating its belonging system, chapter level, clause serial number and text content.
[0074] In an optional embodiment, the structured information extraction unit specifically comprises: A clause list extraction subunit is used for identifying clause boundaries from the original text stream using regular expressions to extract a preliminary clause list. A semantic verification subunit is used for semantic verification of the preliminary clause list by a large language model to determine whether each clause is a complete single clause. A final clause list generation unit is configured to, if the semantic verification pass rate is lower than a preset threshold, enable a large language model fallback segmentation, divide the full-text document into a plurality of text blocks according to a fixed length, use a large language model to perform structured clause transcription on each text block, and perform deduplication and merging on the clauses obtained through the fallback segmentation to form a final clause list. A metadata binding unit is configured to, in the segmentation process, recursively extract and bind chapter-level metadata of each clause.
[0075] In an optional embodiment, the retrieval module 32 includes: A knowledge base construction subunit is configured to construct a superior system knowledge base, divide a superior system document according to a clause granularity, and establish a vector index and a keyword index; A hybrid retrieval subunit is configured to perform vector retrieval and keyword retrieval on the minimum review unit, and obtain retrieval results of semantic similarity and keyword matching degree, respectively. A weight fusion subunit is configured to perform score normalization and dynamic weight fusion on the two-way retrieval results, adjust a weight coefficient according to sparsity, and generate a comprehensive ranking result of superior system clauses related to recall.
[0076] In an optional embodiment, the weight fusion subunit includes: A normalization processing subunit is configured to perform normalization processing on a first score of the vector retrieval result and a second score of the keyword retrieval result, respectively. A sparsity parameter calculation subunit is configured to determine a sparsity parameter according to an effective number of the keyword retrieval result and whether a metadata reference is hit. A dynamic adjustment subunit is configured to dynamically adjust a weight coefficient of the first score and the second score based on the sparsity parameter. A comprehensive score calculation and ranking unit is configured to perform weighted summation on the normalized first score and the second score according to the adjusted weight coefficient, obtain a comprehensive score, and sort in descending order of the comprehensive score, and select the top K retrieval results as effective review basis.
[0077] In an optional embodiment, the sparsity parameter is determined in the following manner: An actual number n of results returned by keyword retrieval and a number n valid of results satisfying a preset relevance threshold are obtained. It is determined whether a metadata reference identifier cite hit is hit. According to the values of n, n valid and cite hit, a sparsity is calculated according to a preset segmentation rule: If n = 0, the sparsity is a first value. If cite hit = 1 and n valid ≥ 1, the sparsity is a second value. If n_valid=0, the sparsity is a third value; If n_valid=1, the sparsity is a fourth value; If n_valid=2, the sparsity is a fifth value; If n_valid≥3, the sparsity is a sixth value; The second value and the sixth value are less than the fourth value and the fifth value, and the fourth value and the fifth value are less than the first value and the third value.
[0078] In an optional embodiment, the weight coefficient is dynamically adjusted according to the following formula: α=A+(B-α_min)×sparsity Wherein, sparsity is the sparsity of the keyword search result, α is the weight coefficient adjusted according to the sparsity, α_min is the preset minimum reference value of α, and A and B are both preset fixed parameters. The comprehensive score is calculated by the following formula: Comprehensive score=α×first score+(1-α)×second score.
[0079] The intelligent procurement system provided by the embodiments of the present application can execute the intelligent procurement system review method provided by any embodiment of the present application, and has the corresponding function modules and beneficial effects of the execution method. The further function description of the above-mentioned various modules and units is the same as that of the corresponding embodiment, and will not be repeated here.
[0080] Figure 4 A structural schematic diagram of an electronic device provided by an embodiment of the present application.
[0081] The following will be specifically described with reference to Figure 4 which shows a structural schematic diagram of an electronic device suitable for being used to implement the electronic device in the embodiments of the present application. The electronic device can include a processor (such as a central processor, a graphics processor, etc.) 401, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 402 or programs loaded from a storage 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device are also stored. The processor 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0082] Generally, the following devices can be connected to the I / O interface 405: input devices 406, including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; output devices 407, including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; storage devices 408, including, for example, a magnetic tape, a hard disk, and the like; and communication devices 409. The communication devices 409 can allow the electronic device to communicate wirelessly or through a wire with other devices to exchange data. Although Figure 4 An electronic device having various devices is illustrated, but it is understood that all of the illustrated devices are not required, and more or less devices can be implemented instead.
[0083] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 409, or installed from the storage devices 408, or installed from the ROM 402. When the computer program is executed by the processor 401, the above-described functions defined in the intelligent procurement system review method of embodiments of the present application are performed.
[0084] Figure 4 The electronic device illustrated is merely an example, and should not impose any limitation on the functions and the range of use of embodiments of the present application.
[0085] Embodiments of the present application also provide a computer-readable storage medium, the above-mentioned method according to embodiments of the present application can be implemented in hardware, firmware, or as computer code that can be recorded on a storage medium, or as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and will be stored in a local storage medium through network download, so that the method described herein can be processed by such software stored on a storage medium using a general-purpose computer, a special-purpose processor, or programmable or special-purpose hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc.; further, the storage medium can also include a combination of the above-mentioned types of storage. It can be understood that the computer, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code, which, when accessed and executed by the computer, processor or hardware, implements the intelligent procurement system review method illustrated in the above embodiments.
[0086] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, can invoke or provide the method and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source files, executable files, installation package files and the like, and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0087] Although the embodiments of the present application are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A method for reviewing an intelligent procurement system, characterized in that, include: The procurement policy documents to be reviewed are segmented to generate the smallest review unit containing the clause text and metadata; Based on the minimum review unit, a hybrid retrieval strategy is adopted to perform vector similarity retrieval and keyword retrieval in parallel from the pre-constructed superior system knowledge base, and the two retrieval results are dynamically weighted and reordered to recall relevant superior system clauses as the basis for review. Based on the minimum review unit, the recall-related higher-level system provisions, and the preset review prompt word template, a dynamic context is constructed to form a complete prompt word containing review tasks, review basis, and logical constraints; The complete prompt words are input into a large language model for intelligent judgment, and a structured review conclusion is output.
2. The method according to claim 1, characterized in that, The procurement policy document to be reviewed is segmented to generate the smallest review unit containing the clause text and metadata, including: The procurement policy documents to be reviewed are formatted, and different parsing strategies are used to parse the text according to the document format type. The parsed text is intelligently segmented into clauses to identify and extract the structured information of each clause; Each clause is packaged into the smallest review unit and associated with its respective system, chapter level, clause number, and main text content.
3. The method according to claim 2, characterized in that, The intelligent clause segmentation of the parsed text includes: Regular expressions are used to identify clause boundaries from the raw text stream and extract a preliminary list of clauses. The preliminary list of terms is semantically validated using a large language model to determine whether each term is a complete single term. If the pass rate of semantic verification is lower than the preset threshold, the large language model is used for fallback segmentation. The full text is divided into multiple text blocks of fixed length, and the large language model is used to perform structured clause transcription on each text block. The clauses obtained from the fallback segmentation are deduplicated and merged to form the final clause list. During the segmentation process, the chapter-level metadata of each clause is recursively extracted and bound.
4. The method according to claim 1, characterized in that, Based on the minimum review unit, a hybrid retrieval strategy is employed to perform vector similarity retrieval and keyword retrieval in parallel from a pre-constructed higher-level institutional knowledge base. The two retrieval results are then dynamically weighted and reordered to recall relevant higher-level institutional provisions as the basis for review, including: Construct a knowledge base of higher-level regulations, segment higher-level regulations documents by clause granularity, and establish vector indexes and keyword indexes; Vector retrieval and keyword retrieval are performed on the smallest review unit to obtain retrieval results for semantic similarity and keyword matching degree, respectively; The two search results are normalized by score and dynamically weighted. The weight coefficients are adjusted according to the sparsity to generate a comprehensive ranking result of the recall-related higher-level institutional provisions.
5. The method according to claim 4, characterized in that, The process of normalizing scores and dynamically weighting the two search results, adjusting weight coefficients based on sparsity, and generating a comprehensive ranking result for recall-related higher-level regulatory provisions includes: The first score of the vector retrieval results and the second score of the keyword retrieval results are normalized respectively. The sparsity parameter is determined based on the number of valid keyword search results and whether metadata references are hit. The weighting coefficients of the first and second scores are dynamically adjusted based on the sparsity parameters. The first and second scores after normalization are weighted and summed according to the adjusted weight coefficients to obtain the comprehensive score. The comprehensive scores are then sorted in descending order, and the top K search results are selected as valid review criteria.
6. The method according to claim 5, characterized in that, The sparsity parameter is determined in the following way: Obtain the actual number of results returned by the search, n, and the number of results that meet the preset relevance threshold, n_valid; Determine if the metadata reference identifier cite_hit is hit; Based on the values of n, n_valid, and cite_hit, the sparsity is calculated according to the preset segmentation rules: If n=0, then the sparsity is the first value; If cite_hit=1 and n_valid≥1, then the sparsity is the second value; If n_valid=0, then the sparsity is the third value; If n_valid=1, then the sparsity is the fourth value; If n_valid=2, then the sparsity is the fifth value; If n_valid≥3, then the sparsity is the sixth value; The second and sixth values are less than the fourth and fifth values, and the fourth and fifth values are less than the first and third values.
7. The method according to claim 6, characterized in that, The weighting coefficients are dynamically adjusted according to the following formula: α = A + (B - α_min) × sparsity Where sparsity is the sparsity of keyword search results, α is the weight coefficient adjusted according to sparsity, α_min is the preset minimum benchmark value of α, and A and B are preset fixed parameters. The overall score is calculated using the following formula: Overall score = α × first score + (1-α) × second score.
8. An intelligent procurement system review system, characterized in that, include: The minimum review unit segmentation module is used to segment the procurement policy documents to be reviewed and generate the minimum review units containing the clause text and metadata. The retrieval module is used to perform vector similarity retrieval and keyword retrieval in parallel from the pre-built superior system knowledge base based on the minimum review unit and adopt a hybrid retrieval strategy. The two retrieval results are dynamically weighted and reordered to recall relevant superior system clauses as the basis for review. The prompt word generation module is used to construct a dynamic context based on the minimum review unit, the recall-related superior system provisions, and the preset review prompt word template, and form a complete prompt word that includes the review task, the basis for the recall, and logical constraints. The review conclusion output module is used to input the complete prompt words into a large language model for intelligent judgment and output a structured review conclusion.
9. An electronic device, characterized in that, include: A memory and a processor are interconnected, the memory stores computer instructions, and the processor executes the intelligent procurement system review method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the intelligent procurement system review method according to any one of claims 1 to 7.
11. A computer program product, characterized in that, Includes computer instructions for causing a computer to execute the intelligent procurement system review method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent self-service contract review method based on large language model
CN118379165A
Legal provision matching method and device, equipment and storage medium
CN119513287A
AI-based large-model-driven contract review and law and regulation interpretation method and system
CN121480511A