Steel structure file retrieval system based on semantic understanding

Through the steel structure archive retrieval system based on semantic understanding, the document text is read sentence by sentence and matched with the sensitive information ontology dictionary. The hierarchical visual retrieval results are generated by combining user roles and search keywords, which solves the problem of sensitive information exposure in engineering archives and realizes safe hierarchical retrieval and dynamic desensitizing display.

CN120744146AInactive Publication Date: 2025-10-03YANTAI TIANHANG STEEL STRUCTURE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510923465.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies make it difficult to achieve sensitivity labeling and hierarchical control of data when processing engineering archives, which leads to the easy exposure of sensitive information. In addition, there is a lack of a hierarchical retrieval mechanism that meets security requirements, posing information security risks.

Method used

A steel structure archive retrieval system based on semantic understanding is adopted. The semantic index construction module reads the document text sentence by sentence, matches the sensitive information ontology dictionary, and establishes a security index. Combined with user roles and search keywords, it generates an access permission list and rewrites the content, dynamically replaces sensitive information, and generates hierarchical visual retrieval results.

Benefits of technology

It realizes the identification of sensitive information from the source, ensures that the search results are limited to the scope of authority, prevents unauthorized access, improves information security protection capabilities and visualization effects, and meets the complex retrieval needs of engineering archives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744146A_ABST
    Figure CN120744146A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of semantic understanding, in particular to a steel structure archive retrieval system based on semantic understanding, which comprises a semantic index construction module for reading a document text sentence by sentence based on an original document of a steel structure archive, matching a preset sensitive information ontology dictionary and establishing a steel structure archive security index. According to the method, the original document text of the steel structure archive is read sentence by sentence and matched with the preset sensitive information ontology dictionary to realize the identification of the special node construction and the sensitive information in the document, so that the document content can complete the effective labeling of the safe sensitive information in the index stage, and the safe grading of the archive data is realized from the source. According to the method, document identifiers and sensitive concept categories are aggregated in combination with role identifiers and retrieval keywords in user retrieval requests, document lists meeting conditions are screened out, document access permissions are compared with preset rules item by item, a content rewriting trigger instruction is formed through combination, and it is effectively ensured that user query results are strictly limited by the permission range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of semantic understanding, and in particular to a steel structure archive retrieval system based on semantic understanding. Background Art

[0002] The field of semantic understanding technology mainly studies how to enable computers to understand, interpret and reason about semantic information in natural language like humans. Its core lies in extracting the true meaning hidden behind the surface of language through in-depth analysis of word meaning, grammatical structure and context in words, phrases, sentences and even entire documents.

[0003] In the process of understanding, interpreting and reasoning semantic information in natural language, existing technologies mainly focus on extracting semantic relationships and inferring implicit meanings between words, phrases, sentences and contexts, and lack structured identification methods for sensitive information in professional field data, especially engineering data such as steel structure archives. Existing technologies have difficulty in implementing data sensitivity annotation at the indexing stage when processing engineering archives, resulting in a lack of a hierarchical control mechanism based on security requirements in subsequent retrieval, and the risk of sensitive information that should not be disclosed being mixed into query results. In addition, existing technologies do not have the ability to hierarchically desensitize and dynamically rewrite output data in the information output link, making sensitive information easily exposed due to static display. For example, raw data containing sensitive fields such as engineering cost and material strength are displayed on the public search page, which can easily lead to information security risks and compliance pressure on data users. Therefore, improvements are needed. Summary of the Invention

[0004] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a steel structure archive retrieval system based on semantic understanding.

[0005] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solution: a steel structure archive retrieval system based on semantic understanding includes: The semantic index construction module is based on the original document of the steel structure archive, reads the document text sentence by sentence, matches the preset sensitive information ontology dictionary, and establishes a security index for the steel structure archive; The access policy parsing module filters a list of documents associated with the search keywords from the steel structure archive security index based on the user role identifier and the search keywords in the user search request, obtains a list of access rights for the searched documents, compares the list of access rights for the searched documents with the preset role access policy rules item by item, and combines the results into a content rewriting trigger instruction; The dynamic content rewriting module obtains the original steel structure archive document pointed to by the content rewriting trigger instruction based on the content rewriting trigger instruction, generates a desensitized text replacement segment based on the rewriting operation in the instruction, updates the corresponding position of the original document with all the desensitized text replacement segments, and generates a user view document stream; The search result presentation module parses the document structure and text content based on the user view document flow, highlights the search keywords, renders the placeholders and prompts according to the preset style, generates formatted front-end page elements, and then organizes all the formatted front-end page elements according to the original document layout, integrates them into a complete page, and obtains hierarchical visual search results.

[0006] Preferably, the steps for obtaining the steel structure archive security index are: Based on the original document of the steel structure archive, the text content in the document is read sentence by sentence, and the document text content is compared one by one with the preset sensitive information ontology dictionary. The sensitive terms that successfully match in each sentence are marked one by one, and the category of the marked sensitive terms and the position of the terms in the original document are recorded to form a sensitive term mark set; Based on the sensitive term tag set, all tagged sensitive terms are traversed, the text context of the sensitive terms is parsed, sensitive concepts belonging to the two categories of proprietary node structures and supplier directories are identified, and a correspondence between the document identifier in the original document and the proprietary node structure and supplier directory concepts is established to form a document identifier sensitive concept correspondence set; Based on the corresponding set of sensitive concepts of the document identifier, the occurrence frequency of the proprietary node structure and supplier list concept corresponding to each document identifier is counted one by one, and the sensitive concept category label corresponding to each document identifier is determined according to the frequency. The concept category with the highest frequency is used as the category label, and a category label is generated for each document to form a steel structure archive security index.

[0007] Preferably, the steps of obtaining the retrieved document access permission list are: Based on the user role identifier and search keywords in the user search request, the character sequence of the user role identifier is segmented and parsed hierarchically to extract the user role authorization level value. The search keyword is extracted according to the phrase boundary to extract the complete keyword set. The complete keyword set is used to match the category label of each document in the steel structure archive security index one by one and calculate the matching word frequency. The word frequency is combined to generate a keyword relevance score set for each document. Calculating a final adaptation score for each document based on the keyword relevance score set; Based on the final adaptation score of each document, each document in the document collection is screened, and documents with a final adaptation score greater than the preset adaptation score threshold are retained. A list of access rights for retrieved documents is formed in combination with the user role authorization level.

[0008] Preferably, the steps of obtaining the content rewriting trigger instruction are: Based on the retrieved document access permission list and the preset role access policy rules, each document identifier in the retrieved document access permission list is compared with each policy rule number in the preset role access policy rules, and whether the policy condition is hit is identified and a value of 1 is assigned to the hit item and a value of 0 is assigned to the miss item, thereby generating a policy trigger state matrix corresponding to each document; Calculating an operation trigger score for each document based on the policy trigger state matrix; Based on the operation trigger score of each document, the operation trigger score is compared with the preset trigger threshold item by item to determine whether a content rewriting trigger instruction is generated for each document.

[0009] Preferably, the steps of obtaining the desensitized text replacement segment are: Based on the content rewriting trigger instruction, the document identifiers contained in the content rewriting trigger instruction are parsed one by one, and the corresponding steel structure archive original documents are read one by one from the document storage location according to the document identifiers. All the obtained steel structure archive original documents are loaded into the memory one by one and indexed to form a set of original documents to be processed; Based on the set of original documents to be processed, the type of rewrite operation indicated in the content rewrite trigger instruction is determined, and each original document of the steel structure archive in the set of original documents to be processed is traversed one by one. The numerical field of the project cost or the description paragraph of the material yield strength in the original document of the steel structure archive is located and extracted, and the numerical field of the project cost is replaced by a preset placeholder, and the description paragraph of the material yield strength is replaced by a prompt, and desensitized text replacement fragments are generated item by item.

[0010] Preferably, the steps of obtaining the user view document stream are: Based on the desensitized text replacement segment, all replacement segments in the desensitized text replacement segment are updated one by one to the designated position of the corresponding steel structure archive original document according to the replacement position recorded in the desensitized text replacement segment, and user view document streams are generated one by one.

[0011] Preferably, the steps of obtaining the formatted front-end page elements are: Based on the user view document stream, parsing the structural layout information of each user view document in the user view document stream one by one, identifying the structural elements in the user view document, extracting the position information and hierarchical information corresponding to each element, and generating structured document layout information; Based on the structured document layout information, the text paragraphs in the document in the user view document flow are traversed one by one, the search keywords, placeholders and prompts in the paragraphs are identified one by one, color background rendering is added to the search keywords according to the preset highlighting rules, the placeholders and prompts are replaced with corresponding front-end HTML elements according to the preset placeholder and prompt style rules, and a formatted rendered text fragment is generated; Based on the formatted rendered text segments, combined with the position information and level information of each element in the structured document layout information, the formatted rendered text segments are reassembled one by one at their original positions to generate formatted front-end page elements.

[0012] Preferably, the steps of obtaining the hierarchical visual search results are: Based on the formatted front-end page elements, extracting position boundary values ​​and size values ​​of the formatted front-end page elements one by one, associating each position boundary value and size value of the formatted front-end page elements with the hierarchical identifier and position information of the original document layout, and sequentially organizing and generating a page organization mapping set; Calculating a page layout conflict score based on the page organization mapping set; Based on the page layout conflict score, the page layout conflict score is compared with the preset layout conflict threshold item by item. If the page layout conflict score is less than the preset layout conflict threshold, the page organization mapping set is directly integrated to generate a complete page to obtain a hierarchical visual retrieval result.

[0013] Compared with the prior art, the advantages and positive effects of the present invention are: In the present invention, the original document text of the steel structure archive is read sentence by sentence and matched with the preset sensitive information ontology dictionary to realize the identification of the proprietary node structure and sensitive information in the document, which can complete the effective labeling of security sensitive information in the document content during the indexing stage, and realize the security classification of the archive data from the source. The document identifier and the sensitive concept category are aggregated in combination with the role identification and search keywords in the user's search request to filter out a list of documents that meet the conditions. The document access rights are then compared with the preset rules item by item and combined into a content rewrite trigger instruction, which effectively ensures that the user's query results are strictly limited to the scope of authority and prevents unauthorized access. Based on the trigger instruction, a desensitized text replacement fragment is generated and the sensitive position in the document is dynamically updated to display the data in real time. The placeholder content is rendered and the complete page is reconstructed by combining the highlighted search keywords and prompts to improve the information security protection capability and visualization effect. The closed-loop logic from data identification, permission comparison, desensitization processing to visual output is gradually constructed, which not only ensures data accuracy and integrity during the processing process, but also forms hierarchical and controllable visual search results at the information output level to meet the complex retrieval requirements of engineering archives. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a system flow chart of the present invention. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0016] See also Figure 1 The present invention provides a technical solution: a steel structure archive retrieval system based on semantic understanding includes: The semantic index construction module is based on the original document of the steel structure archive, reads the document text sentence by sentence, matches the preset sensitive information ontology dictionary, and establishes a security index for the steel structure archive; The access policy parsing module, based on the user role identifier and search keywords in the user search request, filters the document list associated with the search keywords from the steel structure archive security index, obtains the search document access permission list, compares the search document access permission list with the preset role access policy rules item by item, and combines them into a content rewrite trigger instruction; The dynamic content rewriting module, based on the content rewriting trigger instruction, obtains the original document of the steel structure archive pointed to by the instruction, generates a desensitized text replacement segment based on the rewriting operation in the instruction, and updates the corresponding position of the original document with all the desensitized text replacement segments to generate the user view document flow; The search result presentation module parses the document structure and text content based on the user view document flow, highlights the search keywords, renders the placeholders and prompts according to the preset style, generates formatted front-end page elements, and then organizes all formatted front-end page elements according to the original document layout, integrates them into a complete page, and obtains hierarchical visual search results.

[0017] The steps to obtain the steel structure archive security index are: Based on the original document of the steel structure archive, the text content in the document is read sentence by sentence, and the document text content is compared one by one with the preset sensitive information ontology dictionary. The sensitive terms that successfully match in each sentence are marked one by one, and the category of the marked sensitive terms and the position of the terms in the original document are recorded to form a sensitive term mark set; Based on the sensitive term tag set, all tagged sensitive terms are traversed, the text context of the sensitive terms is parsed, and sensitive concepts belonging to the two categories of proprietary node structures and supplier directories are identified. The correspondence between the document identifier in the original document and the proprietary node structure and supplier directory concepts is established to form a document identifier sensitive concept correspondence set; Based on the corresponding set of sensitive concepts of document identifiers, the occurrence frequency of proprietary node structures and supplier directory concepts corresponding to each document identifier is counted one by one. The sensitive concept category label corresponding to each document identifier is determined according to the frequency. The concept category with the highest frequency is used as the category label. A category label is generated for each document to form a steel structure archive security index.

[0018] Specifically, based on the original document of the steel structure archive, the preset sensitive information ontology dictionary is first loaded. The dictionary is constructed by at least three experts in the field with more than ten years of experience in steel structure design based on the national building standard design drawings, steel structure design specifications, and technical data and supplier lists of core enterprises in the industry. The dictionary entries are stored in the form of key-value pairs. For example, the key is "proprietary node structure", and its value includes specific technical terms such as "rigid connection node between box column and H-shaped steel beam", "cast steel universal node", and "intersecting node reinforcement ring". The key is "supplier list", and its value includes the full name or abbreviation of the company such as "Shanghai Baoye Group Co., Ltd." and "China Construction Steel Structure Co., Ltd.". When the system starts, the dictionary is loaded into the memory to form a hash lookup table. Subsequently, the text content in the document is read sentence by sentence. For each sentence, the AC automaton (Aho-Corasickautomat On) algorithm and the in-memory hash lookup table perform multi-pattern matching. This algorithm can simultaneously search for sensitive terms in all dictionaries in a single text traversal. When a dictionary term is matched in a sentence, it is immediately marked and its detailed metadata is recorded. The record includes the term's pre-defined category in the dictionary (such as "proprietary node structure") and the term's precise location in the original document. This location is uniquely identified by a quintuple (document identifier, paragraph number, sentence number, starting character index, and ending character index). For example, if "cast steel node KZJ-01" is identified in the document "Construction Plan for a Gymnasium Roof," its category is recorded as "proprietary node structure" and its location is recorded as ("SG-2023-045", 12, 3, 25, 36). All marked sensitive terms and their metadata in all documents are aggregated to form a sensitive term tag set.

[0019] Based on the sensitive term tag set, in order to accurately analyze the real concepts of sensitive terms in specific contexts and avoid misjudging common technical terms as proprietary sensitive concepts, a pre-trained named entity recognition model based on bidirectional long short-term memory network and conditional random field (Bi-LSTM-CRF) is used for contextual analysis. The training process of the model is as follows: First, a labeled dataset containing at least 500 different types of steel structure files (such as design drawings, construction organization designs, and material procurement lists) is manually constructed. The entities related to "proprietary node structures" and "supplier lists" are manually labeled using the BIOES (Begin, Inside, Outside, End, Single) label system. Then, a pre-trained named entity recognition model based on bidirectional long short-term memory network and conditional random field (Bi-LSTM-CRF) is used for contextual analysis. The training process of the model is as follows: First, a labeled dataset containing at least 500 different types of steel structure files (such as design drawings, construction organization designs, and material procurement lists) is manually constructed. The entities related to "proprietary node structures" and "supplier lists" are manually labeled using the BIOES (Begin, Inside, Outside, End, Single) label system. Build the model architecture. The input layer receives word vectors preprocessed by the BERT (Bidirectional Encoder Representations from Transformers) model. Each word is converted into a 768-dimensional vector to fully capture its deep semantic information. The middle layer is a bidirectional LSTM layer with 256 hidden units. This layer learns the contextual dependencies of each word in the sentence from both the forward and reverse directions. The output layer is a fully connected layer, and finally connected to a CRF layer. The CRF layer learns the constraints between labels (for example, an "I-supplier" label must be preceded by a "B-supplier" or "I-supplier" label). During training, the Adam optimizer is used and the learning rate is set to The loss function is the negative log-likelihood loss of the CRF layer. The training is repeated for 20 rounds. When applied, each item in the sensitive term tag set is traversed, and the complete sentence containing the term is extracted. The sentence is input into the trained Bi-LSTM-CRF model for inference. The model outputs the BIOES label sequence of each word in the sentence. According to the sensitive term position index, the corresponding label is extracted. If the label is "B-proprietary node structure" or "S-proprietary node structure", it is identified as the concept of "proprietary node structure". If it is "B-supplier list" or "S-supplier list", it is identified as the concept of "supplier list". For each original document, a mapping list is established between its document identifier and all the "proprietary node structures" and "supplier list" concepts identified in the document. Finally, the mapping lists of all documents are aggregated to form a corresponding set of document identifier sensitive concepts.

[0020] Based on the corresponding set of sensitive concepts of document identifiers, a unique sensitive concept category label is determined for each document. First, each document identifier in the set is traversed. For each document identifier, a local counter is initialized. The counter is a dictionary containing two keys ("proprietary node structure" and "supplier directory") and the initial value is 0. Then, all sensitive concepts associated with the current document identifier are retrieved and compared one by one. If the concept is "proprietary node structure", the value of the corresponding key in the counter is increased by 1; if it is "supplier directory", the corresponding value is increased by 1. After completing the statistics of all concepts of a single document, a validity judgment is performed and a minimum concept frequency threshold is set. The threshold is set after statistical analysis of 100 sample files, and the tenth digit of the total number of non-zero concepts is taken. For example, the threshold is calculated to be 3. If the total number of sensitive concepts identified in a document (i.e., the sum of the frequency of "proprietary node structure" and the frequency of "supplier directory") is less than the threshold, it is considered that its sensitive feature is not significant and is not assigned. Instead of a specific sensitive category label, a default label of "general document" is assigned. If the total is greater than or equal to the threshold, the frequency of occurrence of "proprietary node structure" and "supplier directory" is compared, and the concept category with higher frequency is used as the category label of the document. For example, in document A, "proprietary node structure" appears 8 times and "supplier directory" appears 3 times, so its category label is "proprietary node structure". If the frequency of occurrence is equal and not zero, it is adjudicated according to the preset priority rule. The rule sets the confidentiality value of "proprietary node structure" to be higher than that of "supplier directory". Therefore, in this case, the category label is determined to be "proprietary node structure". Finally, the processing results of all documents are integrated to generate a record for each document containing a document identifier, a finalized category label, and a security confidentiality level value mapped according to the label (for example, "proprietary node structure" corresponds to level 4, "supplier directory" corresponds to level 3, and "general document" corresponds to level 1). These records together constitute a complete steel structure archive security index.

[0021] The steps to retrieve the document access permission list are: Based on the user role identifier and search keywords in the user search request, the character sequence of the user role identifier is segmented and parsed hierarchically to extract the user role authorization level value. The search keyword is extracted according to the phrase boundary to extract the complete keyword set. The complete keyword set is used to match the category label of each document in the steel structure archive security index one by one and calculate the matching word frequency. The word frequency is combined to generate a keyword relevance score set for each document. Based on the keyword relevance score set, the final adaptation score of each document is calculated using the following formula: , , in, For the The final adaptation score of the document is For the The keyword relevance score of each document, The value of the user role authorization level. For the The security level value of each document, is the authority differentiation coefficient value, is the value of the unauthorized access penalty factor; Based on the final adaptation score of each document, each document in the document collection is screened, and documents with a final adaptation score greater than the preset adaptation score threshold are retained. A list of access rights for retrieved documents is formed in combination with the user role authorization level.

[0022] Specifically, based on the user role identifier and search keywords in the user search request, the system first parses the character sequence of the user role identifier. The identifier adopts a predefined hierarchical structure separated by hyphens. For example, "Chief Engineer-Bridge Division-Chief Designer", the system splits it into three levels of "Chief Engineer", "Bridge Division", and "Chief Designer" according to the separator, and queries a preset role authorization level mapping table. The mapping table is configured by the system administrator according to the enterprise organizational structure and data confidentiality regulations, and quantifies different role combinations into specific values. For example, "Project Intern" corresponds to level 1, "Structural Designer" corresponds to level 3, "Chief Designer" corresponds to level 4, and "Chief Engineer" corresponds to level 5. Through table lookup and hierarchical weighted calculation, the identifier "Chief Engineer-Bridge Division-Chief Designer" is finally parsed into a user role authorization level value of 5. At the same time, the system uses a method based on the Jieba word segmentation database and combined with a custom dictionary in the steel structure field to accurately segment the search keywords entered by the user. Word processing is performed to identify complete technical phrases. For example, for the input "cast steel node supplier of the Bird's Nest Stadium", the system will split it into three complete keywords: "Bird's Nest Stadium", "cast steel node", and "supplier" to form a complete keyword set. Subsequently, the system uses this complete keyword set to traverse each record in the steel structure archive security index generated in the previous step, and accurately matches the keyword with the category label of each document (such as "proprietary node structure" or "supplier list"), and accumulates the number of times each document hits the keyword to obtain the original matching word frequency. To reflect the importance of different keywords, the system will further combine the pre-calculated inverse document frequency (IDF) value of each keyword and weight the word frequency. The calculation formula is: the relevance score is equal to the word frequency multiplied by the IDF value. The higher the IDF value, the rarer and more distinctive the keyword is in the entire archive. Finally, a weighted keyword relevance score is generated for each document, and the scores of all documents are aggregated to generate a keyword relevance score set for each document.

[0023] formula: , The benefit of the formula is that it nonlinearly integrates the keyword relevance of the document with the user's access permission level, replacing the traditional Boolean permission judgment logic. The core advantage of this formula is the "softening" processing of permission control. When the user's permission level Document security and confidentiality levels When there are differences, the final adaptation score Instead of returning to zero directly, the score decays smoothly. This design is more in line with the actual application scenario, that is, allowing high-level users with lower adaptation scores to view low-relevance, high-level documents, or restricting low-level users from viewing high-relevance, high-level documents. By introducing an unauthorized access penalty factor , the formula can detect unauthorized access behavior ( ) imposes permissions different than normal ( ) Greater penalties, thereby effectively curbing the risk of information leakage, while ensuring a balance between the availability and security of search results; For the The keyword relevance score of each document is directly derived from the keyword relevance score set generated after the processing of "user role identification and retrieval keywords in user retrieval requests" in the previous stage. It quantifies the degree of match between the document content and the user's query intention. It is a floating point number between 0 and 1. The acquisition process is: in the previous stage, it is calculated by matching the user's retrieval keywords with the category labels of the documents and combining the inverse document frequency (IDF) weight of the keywords. For example, for the document "SG-2023-007", the keyword relevance score calculated in the previous stage is 0.85. In this step, the document's The value is 0.85.

[0024] The value of the user role authorization level. This parameter also comes from the parsing result of the user role identifier in the previous stage. It represents the access permission level of the user who currently initiates the search request. It is a positive integer. The acquisition process is as follows: the system parses the user's role identifier string, such as "Project Manager-Construction Group 1", and searches for the corresponding basic level (Project Manager is 4) in the preset role authorization level mapping table. It is then combined with the department weight (Construction Group 1 is +0.2) to finally obtain the quantified value. For example, a user with the role of "Senior Engineer" has his role identifier parsed and the obtained value is The value is 4.

[0025] For the The security and confidentiality level value of each document comes from the level label assigned to each document when constructing the steel structure archive security index. It reflects the sensitivity and confidentiality requirements of the document content. It is a predetermined positive integer. The acquisition process is as follows: During the index construction phase, the system assigns a security and confidentiality level to each document based on the frequency and category of sensitive concepts contained in the document (such as "proprietary node structure" and "supplier list"). For example, documents containing a large number of "proprietary node structures" are rated as level 4, documents containing "supplier lists" are rated as level 3, and conventional technical documents are rated as level 1. For example, the document "SG-2023-007" is marked with a security and confidentiality level of 5 in the security index.

[0026] is the authority discrimination coefficient value, which is used to adjust the influence of authority differences on the final adaptation score, that is, to control the steepness of the Sigmoid function curve. The larger the value, the more dramatic changes in the adaptation score will be caused by a slight difference between the user's permissions and the document's confidentiality level, making the permission boundary more "steep" and vice versa. The setting of this value is based on the statistical analysis of the system's historical access logs. The specific steps are: collect all the user's search access records in the last three months, a total of 10,000 records, each record contains the authorization level value of the user role that initiated the access and the security and confidentiality level value of the accessed document, and calculate the level difference of each record. Then, a logistic regression model is fitted using the maximum likelihood estimation method. The model is used to predict the probability of successful access based on the level difference. The coefficient multiplied by the level difference term extracted from the fitted model is the permission discrimination coefficient. The initial value of, for example, after calculation and analysis, we get The value is 0.6.

[0027] is the value of the unauthorized access penalty factor, which is specifically used to enhance the suppression of unauthorized access behavior. When a user attempts to access a document above his or her permission level ( ), this factor will amplify the negative impact of differences in permissions. Its value is determined by the enterprise information security management committee based on the value of data assets and the results of the leakage risk assessment. The assessment process is as follows: the file types are divided into three categories: "core technical secrets", "important business information", and "internal reference materials". The economic losses, reputational impact and legal risks that may be caused by their leakage are assessed respectively, and the comprehensive scores are mapped to The value range is [2, 10]. For example, for the core technical secrets involving "proprietary node construction", its risk assessment score is the highest and the corresponding penalty factor is also the highest. After evaluation, a global unauthorized access penalty factor is set. is 4.0.

[0028] Calculation process: The authorization level value of a user role Users, retrieve a keyword relevance score , security and confidentiality level value 's documentation.

[0029] According to the above parameter settings, the value of the authority differentiation coefficient , unauthorized access penalty factor value .

[0030] First, determine the permission conditions. , which is an unauthorized access, so The second branch of Calculate: ; Next, Substitute the calculated results into the final adaptation score In the calculation formula: ; get ,but: ; The results show that although the document is highly relevant to the user's search keywords ( ), but due to insufficient user permissions, its final adaptation score is greatly attenuated to 0.0707, which is much lower than its original relevance score. Through this calculation, documents with mismatched permissions are effectively placed at a lower position in the ranking results.

[0031] Based on the final fitness score of each document, the system starts a screening program, traverses all documents in the document collection, and compares the final fitness score of each document with a dynamically calculated preset fitness score threshold. The setting of this threshold is intended to ensure the quality of the results returned to the user. Its calculation method does not use a fixed value, but is dynamically determined based on the statistical characteristics of the final fitness score set of all documents returned by the current query. Specifically, the system first calculates the average and standard deviation of the final fitness scores of all documents in this query, and then sets the preset fitness score threshold to the average plus 0.2 times the standard deviation. For example, a query returns five documents, and their final fitness scores are {0.82, 0.75, 0.68, 0.15, 0.11}, their average is 0.502, and the standard deviation is about 0.33. The fitness score threshold for this query is This dynamic threshold can adapt to the score distribution of results returned by different queries. When the results generally have high scores, the threshold will be increased accordingly, and vice versa. Only documents whose final adaptation score is greater than this dynamic threshold will be retained. In the above example, three documents with scores of 0.82, 0.75, and 0.68 will be retained, while the other two documents with scores lower than 0.568 will be screened out. For all documents that pass the screening, the system will integrate the three pieces of information, namely, the document identifier, the security level value of the document, and the authorization level value of the user role that initiated the request, into a structured data record. Finally, the data records corresponding to all documents that pass the screening are collected to form a list of access rights for retrieved documents.

[0032] The steps to obtain the content rewriting trigger instruction are: Based on the retrieved document access rights list and the preset role access policy rules, each document ID in the retrieved document access rights list is compared with each policy rule number in the preset role access policy rules, and whether the policy conditions are hit is identified and a value of 1 is assigned to the hit items and a value of 0 is assigned to the miss items, thereby generating a policy trigger status matrix corresponding to each document; Based on the policy trigger state matrix, calculate the operation trigger score of each document. The calculation formula is: ; in, For the The operation trigger points of each document are: For the The importance of the policy rule is preset. For the Document No. The trigger status value of the policy rule, a value of 1 indicates a hit, a value of 0 indicates a miss, The value of the user role authorization level. For the The value of the security level of a document, is the value of the authority tolerance coefficient, The total number of role access policy rules; Based on the operation trigger score of each document, the operation trigger score is compared with the preset trigger threshold item by item to determine whether a content rewriting trigger instruction is generated for each document.

[0033] Specifically, based on the retrieval document access permission list and the preset role access policy rules, the system first loads the preset role access policy rule base configured by the data security administrator when the system is initialized. The rule base is stored in XML or JSON format, which contains a series of structured policy rules. Each rule consists of a unique policy rule number, a trigger condition, and a corresponding rewrite operation. For example, a rule can be defined as: {"Rule number": "RR001", "Trigger condition": {"User role authorization level value": "less than 3", "Document security confidentiality level value": "greater than or equal to 4"}, "Rewrite operation": "Desensitized engineering cost"}, and another rule is: {"Rule number": "RR002", "Trigger condition": {"Document category label": "Proprietary node structure", "User role authorization level value": "less than or equal to 4"}, "Rewrite operation": "Hide material yield strength"}. The system then processes each document entry in the retrieval document access permission list one by one. Each entry contains a document identifier, the security confidentiality level value of the document, and the role authorization level value of the current user. For the first entry in the list, documents, the system will traverse all the preset role access policy rule bases rule, and compare its document attributes and user attributes with the The trigger conditions of the rules are logically compared. For example, for the document "SG-D0087", its security level is 5, and the current user role authorization level is 2. When it is matched to the rule "RR001", because the user level 2 is less than 3 and the document level 5 is greater than or equal to 4, the conditions are completely matched, so it is judged as a hit. After all the rules are compared, the system will generate a length of One-dimensional binary vector, the first The element is the document's The hit status of the rule is 1 if it is a hit and 0 if it is a miss. The binary vectors generated by all documents are stacked row by row to finally generate a The matrix of To retrieve the total number of documents in the document access permission list, the matrix is ​​the policy trigger status matrix corresponding to each document.

[0034] formula: , the usefulness of the formula is that the importance of the policy rule ( ), the actual hit status of the policy rule ( ) and the relative relationship between user permissions and document classification (exponential decay term ), the exponential decay term introduced as a permission regulator can smoothly reduce the probability of triggering the rewrite operation based on the degree to which the user's permissions exceed the document's confidentiality level. Even if the user's behavior hits a certain policy rule, if their permissions are high enough, the operation trigger score will be significantly suppressed. Conversely, when the user's permissions are lower than the document's confidentiality level, the term will amplify the trigger effect. This design achieves a shift from "whether to rewrite" to "how much to rewrite", making access control more intelligent and flexible. It can adaptively adjust the confidentiality strength of content presentation according to specific situations, while ensuring information security and minimizing excessive information shielding for high-privilege users. For the The importance of each policy rule is preset, which reflects the contribution or priority of different content rewriting operations to maintaining information security. The specific steps for obtaining the value are as follows: First, three experts from the enterprise information security committee identify the key criteria for evaluating the importance of the policy, such as the risk of economic loss caused by leakage, the impact on the core competitiveness of the enterprise, and the risk of violating relevant laws and regulations. Then, the experts evaluate all the key criteria. For each strategy rule, pairwise comparisons are performed based on the above criteria, and the judgment matrix is ​​filled in using the 1-9 scaling method. For example, for the "desensitized engineering cost" rule and the "hidden material yield strength" rule, under the "economic loss risk" criterion, the expert gives 3 points, indicating that the former is slightly more important than the latter. After the system collects the judgment matrices of all experts, it calculates the maximum eigenvalue of each matrix and its corresponding eigenvector, and performs a consistency test (the consistency ratio must be less than 0.1). After the test, the eigenvector is normalized to obtain the weight of each rule under a single criterion. Finally, according to the importance weight of each criterion itself, the weight of the single criterion is weighted and summed to obtain the final comprehensive importance value of each strategy rule. , whose value range is between 0 and 1. For example, after calculation, the importance preset value of rule "RR001" (desensitized engineering cost) is 0.8, Rule "RR002" (hidden material yield strength) is 0.6.

[0035] For the Document No. The trigger status value of the policy rule is directly derived from the policy trigger status matrix corresponding to each document generated in the previous step. Each item in the matrix clearly records the matching result between the document and the rule. Its value is binary 1 or 0. Direct query and read operations are performed when this step processes the policy rule. When a document is generated, the system extracts the first The line contains [ ], where 1 means the The situation of the document hits The trigger condition of the policy rule, the weighted score of the rule will be included in the total score. If it is 0, it means it is not hit, and the contribution of the rule item in the sum calculation is zero. For example, for the document "SG-D0087", the trigger state vector obtained in the previous link is [1, 1, 0, ...]. When calculating its operation trigger score, , , .

[0036] The value of the user role authorization level. This parameter represents the permission level of the user currently performing the search operation. Its value is obtained in the "Access Policy Parsing Module" by parsing the user role identifier and querying the preset role authorization level mapping table. For example, a user with the role of "Chief Designer" has the user role authorization level value parsed and assigned in the previous step. is 4.

[0037] For the The value of the security level of each document, which identifies the sensitivity of the document content. It is a static attribute given to each document in the "Semantic Index Construction Module" based on the analysis of the sensitive concepts of the document content and stored in the steel structure archive security index. This step is used to process the first When a document is retrieved, the security level value corresponding to the document will be directly obtained from the steel structure archive security index or the retrieval document access permission list passed from the previous step. It is also a positive integer. The larger the value, the more confidential the document. For example, the design document of a core connection point is assigned a security level value in the security index. is 5.

[0038] is the value of the permission tolerance coefficient, which is used to adjust the inhibitory or enhancing effect of permission differences on the operation trigger points and controls the sensitivity of the exponential decay term. The larger the value, the more intense the system's reaction to the difference in permissions, and the stronger the permission suppression effect. Conversely, the more "tolerant" it is. The setting of this coefficient is related to the company's overall security strategy and risk preference. It is obtained by reviewing and analyzing 50 data access violation incidents that occurred in the past year, and counting the difference between the visitor's permissions and the document classification in each incident, as well as the actual loss caused by the incident (quantified as a score of 0-1). By performing exponential regression fitting on these data points, the fitted exponential coefficient is used as the The reference benchmark is finally approved by the Safety Committee. For example, based on regression analysis, it is found that there is a significant exponential relationship between authority differences and risk losses, and the authority tolerance coefficient is set accordingly. It is a more stringent value of 0.3.

[0039] The total number of role access policy rules. This is a static count value that represents the total number of rule entries defined in the preset role access policy rule base. Its value is determined when the system loads the rule base. For example, if the administrator defines 10 different content rewriting policies in the rule base, then The value of is 10.

[0040] Calculation process: The authorization level value of a user role The user is accessing a security level value The document "SG-D0087" has the following definitions: policy rules. After matching in the previous stage, the document hits two of them. The trigger state value vector , ,the remaining are both 0, and the preset values ​​of the importance of the two hit rules are and , set the permission tolerance coefficient .

[0041] Substituting the above parameters into the formula: ; Since only and hour is not 0, the sum can be simplified to: ; Substitute specific values: ; ; ; Look up a math table or use a calculator to get ,but: ; The result shows that the operation trigger score of the document "SG-D0087" is 1.8898. This score comprehensively reflects the importance of the policy rules triggered when the user accesses this high-level document and the fact that his authority is insufficient. It will serve as the direct basis for determining whether to generate a content rewrite instruction in the next step.

[0042] Based on the operation trigger score of each document, the system will compare the score of each document with a preset trigger threshold one by one. The threshold setting process is to strike a balance between maximizing the protection of sensitive information and minimizing interference with normal user access. The specific setting method is as follows: the system administrator first selects a test set containing 500 typical steel structure files and 100 users with different roles, simulates 10,000 random document access requests, and calculates the operation trigger score of each access. At the same time, three information security experts are invited to independently manually annotate these 10,000 access results to determine whether content rewriting should be performed, and the experts' "yes" are marked as 1, "No" is marked as 0, and the consensus result of the three experts is taken as the gold standard. Then, the operation trigger is divided into predictive variables and the expert label is the target variable. The receiver operating characteristic (ROC) curve is drawn, the area under the curve (AUC) is calculated, and the operation trigger score with the largest Youden's index (Youden's index = sensitivity + specificity - 1) is found, and it is used as the optimal preset trigger threshold. For example, through analysis, when the threshold is set to 1.5, the Youden index reaches a peak of 0.88. At this time, the consistency between the system decision and the expert judgment is the highest. Therefore, the preset trigger threshold is set to 1.5. In actual operation, the system will document Operation trigger points Compared with 1.5, if If the score is greater than 1.5, it is determined that the content of the document needs to be rewritten. The system will immediately generate a content rewrite trigger instruction. The instruction is a structured data containing a document identifier and a list of specific rewrite operations that need to be performed. The operation list is based on the rewrite operations defined by the policy rules hit in the previous step. For example, for the document "SG-D0087" with an operation trigger score of 1.8898, since its score is greater than 1.5, the system will determine to generate a content rewrite trigger instruction for it.

[0043] The steps to obtain the desensitized text replacement fragment are: Based on the content rewriting trigger instruction, the document identifier contained in the content rewriting trigger instruction is parsed one by one, and the corresponding steel structure archive original documents are read one by one from the document storage location according to the document identifier. All the obtained steel structure archive original documents are loaded into the memory one by one and indexed to form a collection of original documents to be processed; Based on the set of original documents to be processed, the type of rewrite operation indicated in the content rewrite trigger instruction is determined, and each original document of the steel structure archive in the set of original documents to be processed is traversed one by one. The numerical field of the project cost or the description paragraph of the material yield strength in the original document of the steel structure archive is located and extracted, and the numerical field of the project cost is replaced by the preset placeholder, and the description paragraph of the material yield strength is replaced by the prompt, and the desensitized text replacement fragments are generated item by item.

[0044] Specifically, based on the content rewrite trigger instruction, the system first processes each instruction in the instruction queue in sequence according to the first-in-first-out (FIFO) principle. Each instruction is a JSON object containing a list of "document identifier" and "rewrite operation judgment type". For example, an instruction is {"document identifier": "TJ-Bridge-2022-Design-Final", "rewrite operation judgment type": ["Desensitized engineering cost", "Hidden material yield strength"]}. After the system parses the document identifier "TJ-Bridge-2022-Design-Final", it initiates a retrieval request to the configured document repository. The repository is an enterprise-level document management center based on a distributed file system. Its metadata index database (for example, built using Elasticsearch) maps the document identifier to the specific physical path or logical address of the file in the storage cluster. After obtaining the file path, the system The system calls the corresponding text extraction library (for example, using the Apache Tika tool suite, which can automatically identify file types and extract plain text content) according to the document extension (such as .docx, .pdf, .txt), and converts the binary content of the original steel structure archive document into a unified UTF-8 encoded plain text string. Subsequently, in order to quickly access and operate these document contents in subsequent steps, the system encapsulates each successfully extracted text string together with its original document identifier, file type and other metadata into an in-memory document object, and stores this object in a hash map (HashMap) structure with the document identifier as the key and the document object as the value. This hash map is the memory index. In this way, all the original steel structure archive documents specified in the content rewriting trigger instruction are efficiently loaded into the memory and organized into a collection of unprocessed original documents that can be directly accessed and modified by subsequent modules.

[0045] Based on the set of original documents to be processed, the system traverses the in-memory text copies of each original steel structure file document in the set according to the rewrite operation determination types clearly listed in the content rewrite trigger instruction. For documents containing "desensitized project cost" in the instruction, the system applies a predefined set of regular expression rules to locate numerical fields related to project cost. This rule set is jointly developed by experts in the finance and engineering fields and includes multiple patterns. For example, Pattern 1: / (total contract price|project budget|winning bid amount|cost)\s*[::]?\s*([1-9]\d{0,2}(,\d{3})*(\.\d{1,2})?)\s*(ten thousand? yuan) / , which is used to match explicit amount descriptions; Pattern 2: / ¥\s*[1-9]\d{0,2}(,\d{3})*(\.\d{1,2})? / , which is used to match amounts starting with a currency symbol. Once a pattern successfully matches, the system records the complete text fragment (such as "total contract price: 1,234.56 ten thousand yuan") and its start and end character indices in the document text. For documents containing "hide material yield strength" in the instruction, the system adopts a composite positioning method based on keyword and syntactic analysis. First, it scans the document through a keyword list (such as "yield strength", "fy", "tensile strength", "Q345B", "Q420C") to locate sentences containing these keywords. Then, it performs dependency syntactic analysis on the located sentences to identify the verb-object or subject-verb-object structure with the material grade as the subject and the strength value as the object, thereby accurately extracting the core paragraphs describing material properties. For example, "The main stressed members use Q345B steel, and its standard yield strength is 345 MPa". After locating the sensitive content, the system selects the corresponding text from a preset replacement text configuration library according to the rewrite operation type. For example, it replaces the project cost numerical field with the placeholder "[Core project cost data has been shielded. Please apply for a higher permission to view]", and replaces the description paragraph of the material yield strength with the prompt "[Key material performance parameters are proprietary technical information and are not displayed]". Finally, the system encapsulates the position information, original text content, and the placeholder or prompt used for replacement of each located sensitive fragment into a structured data unit, and generates desensitized text replacement fragments item by item.

[0046] The steps to obtain the user view document flow are as follows: Based on the desensitized text replacement fragments, at the replacement positions recorded in the desensitized text replacement fragments, the system updates all the replacement fragments in the desensitized text replacement fragments item by item to the specified positions of the corresponding original steel structure file documents, and generates the user view document flow one by one.

[0047] Specifically, based on the anonymized text replacement fragments, the system first groups these fragments according to the document identifiers to which they belong. For each document that needs to be updated, the system will obtain its text copy in memory and the corresponding anonymized text replacement fragment list. In order to prevent the position index of subsequent fragments from becoming invalid due to changes in text length during the replacement process, the system adopts a back-to-front replacement strategy, that is, first sort all the anonymized text replacement fragments of the document in descending order according to their starting position index recorded in the original document. Then, the system starts from the end of the sorted list and processes each replacement fragment one by one. For a replacement fragment, the system accurately slices the document text string in memory according to its recorded starting and ending position indexes, and replaces it with the replacement text specified in the fragment (that is, placeholder or prompt). ) replaces the original sensitive content part. Since the operation starts from the end of the document and moves forward, each replacement only affects the content before the current position, and will not change the index validity of other sensitive fragments that have not been processed and are located earlier. For example, there are two replacement points in a document, at index 100-120 and index 500-550 respectively. The system will process the replacement of 500-550 first, and then process the replacement of 100-120 after completion. This can ensure the accuracy of index 100. After all replacement fragments of a document are applied, its text copy in memory is converted into a desensitized version that can be safely viewed by the current user. The system encapsulates the modified document content together with its document identifier into a data stream object, and generates user view document streams one by one.

[0048] The steps to obtain the formatted front-end page elements are: Based on the user view document stream, the structural layout information of each user view document in the user view document stream is parsed one by one, the structural elements in the user view document are identified, the position information and hierarchical information corresponding to each element are extracted, and the structured document layout information is generated; Based on the structured document layout information, the system traverses the text paragraphs in the document flow in the user's view, identifies the search keywords, placeholders, and prompts in the paragraphs one by one, adds color background rendering to the search keywords according to the preset highlighting rules, replaces the placeholders and prompts with the corresponding front-end HTML elements according to the preset placeholder and prompt style rules, and generates formatted and rendered text fragments; Based on the formatted rendered text fragments, combined with the position information and hierarchical information of each element in the structured document layout information, the formatted rendered text fragments are reassembled one by one according to the original position to generate formatted front-end page elements.

[0049] Specifically, based on the user view document flow, the system first processes the data flow of each user view document in the queue, and calls different structure parsing engines according to its original file type (such as .docx, .pdf, .txt). For .docx type documents, the system uses the OfficeOpenXML (OOXML) parsing library to directly traverse the XML tree structure of the document and convert it into<w:p> (paragraph),<w:tbl> (sheet),<w:h1> to<w:h6> Tags such as (titles at all levels) are identified as independent structural elements. For .pdf type documents, due to their lack of inherent logical structure, the system adopts a coordinate-based layout analysis method. By calling the PDFBox or PyMuPDF library, the system extracts the precise bounding box coordinates (x, y, width, height) and font information (size, thickness) of each text block on the page, and then applies a series of heuristic rules to reconstruct the document structure. For example, if a text block has a font size 1.5 times larger than the average font size of the surrounding text blocks and is located at the top of the page or column, it is identified as a title, and multiple text blocks that are closely adjacent in space, aligned in lines and have the same font size are combined and identified as one. For .txt plain text documents, the system divides paragraphs based on consecutive blank lines and identifies list items based on the indentation at the beginning of the line or specific marks (such as "1.", "-"). After identifying each structural element, the system assigns a unique identifier to the element and records its type (such as "Heading 1", "Body Paragraph", "Table Cell"), as well as its absolute position information in the original document page (upper left corner coordinates and size in pixels) and hierarchical information. The hierarchical information is determined by tracing back to the parent element to which it belongs. For example, the parent of a paragraph is the title before it. All this information is integrated into a JSON object, and finally a complete structured document layout information is generated for each user view document.

[0050] Based on the structured document layout information, the system processes the text content of each structured element recorded therein one by one, and combines the complete keyword set obtained from the initial user search request to mark and convert the text. The system first traverses the text string of a structured element and uses the AC automaton (Aho-Corasickautomaton) algorithm to match all search keywords, predefined placeholders (for example, a string starting with "[" and ending with "]") and prompts in one traversal. The algorithm can efficiently find the starting and ending positions of all target substrings in the text. For each matched search keyword, the system encapsulates it into HTML according to the preset highlighting rules. <mark>In the label, this rule is defined in the global CSS style sheet at the front end of the system. For example, if.search-highlight{background-color:#FFFF00;}, then the keyword "steel joint" will be converted to <mark class="search-highlight">steel joint< / mark>For the matched placeholder, such as "[Core cost data has been blocked, please apply for higher permissions to view]", the system will replace it with an HTML with a specific CSS class and prompt information according to the preset placeholder style rules. element, for example, Core cost data has been masked. Please apply for a higher permission to view , where the .placeholder-desensitized class defines a dotted border, a gray background, and italic font style. For matching prompts, the system performs similar operations but applies different style rules. For example, the .prompt-info class is used to define a style with an information icon and a blue border. After performing the above search and replace operations on the entire text content of a structural element, the original plain text is converted into a rich text string containing HTML tags, which is the formatted rendered text fragment.

[0051] Based on the formatted rendered text fragments, the system finally integrates these text fragments that already contain HTML styles with the previously generated structured document layout information. The system traverses each formatted rendered text fragment and uses its associated unique identifier to find the corresponding position information (i.e., bounding box coordinates) and hierarchy information (i.e., z-index value) of the element from the structured document layout information. Then, the system creates an HTML for each formatted rendered text fragment. container, and use the fragment as this The system then converts the position information into CSS absolute positioning styles and applies them to the inner HTML content of On the container, for example, the position information of an element is {x: 50, y: 100, width: 600, height: 80}, and the level information is 0, then its corresponding The style attribute of the container will be set to position: absolute; left: 50px; top: 100px; width: 600px; height: 80px; z-index: 0;. In this way, each paragraph, title or table can be placed accurately at the corresponding position on the front-end page, thus completely reproducing the layout of the original document. The system will perform this operation for all structural elements in a user view document, generating a set of absolutely positioned and styled Elements, this group A collection of elements that together form formatted front-end page elements that can be rendered directly in the browser.

[0052] The steps to obtain hierarchical visual retrieval results are: Based on the formatted front-end page elements, extracting the position boundary values ​​and size values ​​of the formatted front-end page elements one by one, associating each position boundary value and size value of the formatted front-end page elements with the hierarchical identifier and position information of the original document layout, and organizing them in sequence to generate a page organization mapping set; Based on the page organization mapping set, calculate the page layout conflict score. The calculation formula is: ; in, For the The layout conflicts of each page are divided into For the The page element and The overlap detection function of the page elements takes 1 if the boundaries of the two elements overlap, otherwise it takes 0. For the The page element and The overlapping area of ​​the page elements, For the The area of ​​the page element, For the The area of ​​the page element, For the The importance value of each page element, For the The importance value of each page element, The total number of front-end page elements formatted within the page; Based on the page layout conflict score, the page layout conflict score is compared with the preset layout conflict threshold item by item. If the page layout conflict score is less than the preset layout conflict threshold, the page organization mapping set is directly integrated to generate a complete page to obtain a hierarchical visual retrieval result.

[0053] Specifically, based on the formatting of the front-end page elements, the system processes these absolutely positioned HTML elements one by one. Elements of the object, first, the system traverses each Element, and by parsing its style attribute, accurately extract its position boundary value, that is, the left and top attribute values, and its size value, that is, the width and height attribute values, these values ​​are all in pixels. The system integrates these geometric information into a bounding box record, such as {x: 50, y: 100, width: 600, height: 80}. At the same time, the system reads the unique identifier, element type (such as "Title 1", "Body Paragraph") and hierarchical information (z-index value) assigned in the previous stage from the attributes of the element. Then, the system associates these newly extracted geometric information with the existing logical and hierarchical information to create a bounding box record for each formatted front-end. A comprehensive mapping entry is created for each page element. This entry is a structured JSON object that contains the element's unique identifier, element type, level, bounding box coordinates and dimensions, and the element's complete HTML content. Finally, to ensure the orderliness of subsequent conflict detection, the system collects all mapping entries belonging to the same page and sorts them primarily by level identifier (in ascending z-index order). Within the same level, they are then sorted in top-to-bottom and left-to-right reading order. This secondary sorting is achieved by calculating a sort key (sort key = top value * total page width + left value). The sorted list of mapping entries constitutes the page organization mapping set for the page.

[0054] formula: The benefit of the formula is that it not only determines whether there is overlap between elements, but also comprehensively considers the severity of overlap and the importance of the overlapping elements themselves, replacing the simple binary conflict detection. The ratio of the overlapping area to the total area in the formula It is a normalized index similar to the Jaccard index, which can objectively reflect the ratio of the overlapping area to the size of the element itself, thereby distinguishing between slight touch and severe occlusion. More importantly, by introducing the element importance value This formula correlates layout conflict with content value, so that the obstruction of key elements such as titles, keywords, or desensitized placeholders will generate a much higher conflict score than the overlap of ordinary text paragraphs. This weighted mechanism guides the system to prioritize and address those layout issues that pose the greatest obstacles to user understanding and information acquisition, thereby intelligently maintaining page readability and accessibility of core information after dynamic content rewriting; For the Page elements and Overlap detection function for page elements. This is a Boolean function used to determine whether the bounding boxes of two elements have a geometric intersection. Its calculation is based on the axis-aligned bounding box (AABB) collision detection algorithm. and the lower right corner coordinates Two rectangle elements defined and , if and only if not(x1_{2}<x2_{1}orx1_{1}> x2_{2}ory1_{2}<y2_{1}ory1_{1}> When the condition y2_{2}) is true, the two rectangles overlap, and the function The value is 1, otherwise the value is 0. The input parameters of this function come directly from the position boundary value and size value of each element recorded in the page organization mapping set.

[0055] For the Page elements and The overlapping area of ​​the page elements, the value is The calculation is performed only when it is 1. It quantifies the size of the area where the two elements occlude each other. The calculation method is: first determine the boundaries of the overlapping rectangle, the left boundary is max(Ex_left, Ej_left), the right boundary is min(Ex_right, Ej_right), the upper boundary is max(Ex_top, Ej_top), and the lower boundary is min(Ex_bottom, Ej_bottom). The width of the overlapping area is the right boundary - the left boundary, and the height is the lower boundary - the upper boundary. The overlapping area is the product of this width and height. If the calculated width or height is negative or zero, the overlapping area is 0. For example, the element The bounding box of the element is {x: 50, y: 100, width: 200, height: 50}. The bounding box is {x: 200, y: 120, width: 100, height: 60}, then the width of the overlapping area is min(250, 300)-max(50, 200)=250-200=50, and the height is min(150, 180)-max(100, 120)=150-120=30, so the overlapping area is 50*30=1500 square pixels.

[0056] and Respectively Page elements and The area of ​​a page element. These two parameters are obtained directly from the page organization mapping collection. Their values ​​are the product of the width and height attribute values ​​of the element. For example, for an element with a bounding box of {x: 50, y: 100, width: 200, height: 50} , its area Square pixels.

[0057] and Respectively Page elements and The importance value of a page element is a comprehensive evaluation of the content value and visual prominence of the element on the page. The calculation formula is: ,in It is divided into element types, mapped according to the element's HTML tag. For example, H1 title is 1.0, H2 is 0.9, ordinary paragraph P is 0.5, table TABLE is 0.8, It is the content feature point, and its value is contained in the element <mark>(Highlight keywords), (placeholder or prompt) The number of labels is normalized by 5 (capped at 1.0), The size score is the ratio of the element area to the total page area. After normalization from 0 to 1, the weight coefficients of 0.5, 0.3, and 0.2 are based on the relationship between the user's gaze time and the three variables through multiple linear regression analysis after an eye tracking experiment on 50 users. For example, an H2 title element with an area of ​​5% of the page and two highlighted keywords inside has an importance value of It is 0.5*0.9+0.3*(2 / 5)+0.2*0.05=0.45+0.12+0.01=0.58.

[0058] The total number of formatted front-end page elements in the page. This parameter is the total number of entries in the page organization mapping set. For example, if a page contains 35 independent formatted front-end page elements after parsing, then The value of is 35.

[0059] Calculation process: This formula aims to obtain the total layout conflict score of the entire page by comparing all pairs of elements on the page and accumulating their weighted conflict values. ) page as an example for calculation.

[0060] element (Title): Bounding box {x: 10, y: 10, w: 300, h: 40}, type H1, no special content, .area .

[0061] element (Paragraph): Bounding box {x:20, y:60, w:280, h:100}, type P, has 3 highlighted words, .area .

[0062] element (Desensitized placeholder): bounding box {x: 250, y: 40, w: 150, h: 30}, type DIV, has 1 placeholder, .area .

[0063] The calculation process needs to check three pairs of combinations: (E1, E2), (E1, E3), (E2, E3).

[0064] Combination (E1, E2): no overlap, , the contribution is 0.

[0065] Combination (E1, E3): Overlap. Overlap area .

[0066] Contribution value = .

[0067] Combination (E2, E3): no overlap, , the contribution is 0.

[0068] Total conflict score .

[0069] The result shows that the layout conflict score of this page is 0.02965. This value reflects that there is a slight overlap between the title element and a desensitized placeholder element on the page. The low score indicates that the severity of the conflict and the importance of the affected elements are not high.

[0070] Based on the page layout conflict score, the system compares the calculated score for each page, such as 0.02965, with a preset layout conflict threshold. This threshold is not fixed. Instead, it is determined by automatically rendering and calculating the conflict score for 1,000 document pages of varying complexity. Five senior UI designers then assign binary labels to the visual effects of these pages as "acceptable" or "unacceptable." A logistic regression classification model is then constructed to determine the threshold. The model input is the page layout conflict score, and the output is the probability of "acceptable." The conflict score that maximizes the model's classification accuracy and minimizes false negatives (misclassifying unacceptable as acceptable) is selected as the preset layout conflict threshold. For example, after analysis, the threshold is set to 0.1. If the current page's layout conflict score of 0.02965 is less than 0.1, the system determines that the current layout quality is within the acceptable range and no automatic adjustment is required. At this point, the system directly reorganizes all formatted front-end page elements (i.e., HTML with styles and positioning) in the previously organized page organization mapping set. element), integrated into a complete HTML document structure, which contains standard,, and tags, and all necessary CSS style sheet files are linked in, and finally a page string that can be fully rendered by the browser is generated to obtain a hierarchical visual retrieval result. < / mark>

Claims

1. The steel structure archive retrieval system based on semantic understanding is characterized by: The system comprises: The semantic index construction module is based on the original document of the steel structure archive, reads the document text sentence by sentence, matches the preset sensitive information ontology dictionary, and establishes a security index for the steel structure archive; The access policy parsing module filters a list of documents associated with the search keywords from the steel structure archive security index based on the user role identifier and the search keywords in the user search request, obtains a list of access rights for the searched documents, compares the list of access rights for the searched documents with the preset role access policy rules item by item, and combines the results into a content rewriting trigger instruction; The dynamic content rewriting module obtains the original steel structure archive document pointed to by the content rewriting trigger instruction based on the content rewriting trigger instruction, generates a desensitized text replacement segment based on the rewriting operation in the instruction, updates the corresponding position of the original document with all the desensitized text replacement segments, and generates a user view document stream; The search result presentation module parses the document structure and text content based on the user view document flow, highlights the search keywords, renders the placeholders and prompts according to the preset style, generates formatted front-end page elements, and then organizes all the formatted front-end page elements according to the original document layout, integrates them into a complete page, and obtains hierarchical visual search results.

2. The steel structure archive retrieval system based on semantic understanding according to claim 1 is characterized in that: The steps for obtaining the steel structure archive security index are as follows: Based on the original document of the steel structure archive, the text content in the document is read sentence by sentence, and the document text content is compared one by one with the preset sensitive information ontology dictionary. The sensitive terms that successfully match in each sentence are marked one by one, and the category of the marked sensitive terms and the position of the terms in the original document are recorded to form a sensitive term mark set; Based on the sensitive term tag set, all tagged sensitive terms are traversed, the text context of the sensitive terms is parsed, sensitive concepts belonging to the two categories of proprietary node structures and supplier directories are identified, and a correspondence between the document identifier in the original document and the proprietary node structure and supplier directory concepts is established to form a document identifier sensitive concept correspondence set; Based on the corresponding set of sensitive concepts of the document identifier, the occurrence frequency of the proprietary node structure and supplier list concept corresponding to each document identifier is counted one by one, and the sensitive concept category label corresponding to each document identifier is determined according to the frequency. The concept category with the highest frequency is used as the category label, and a category label is generated for each document to form a steel structure archive security index.

3. The steel structure archive retrieval system based on semantic understanding according to claim 1 is characterized in that: The steps for obtaining the retrieved document access permission list are: Based on the user role identifier and search keywords in the user search request, the character sequence of the user role identifier is segmented and parsed hierarchically to extract the user role authorization level value. The search keyword is extracted according to the phrase boundary to extract the complete keyword set. The complete keyword set is used to match the category label of each document in the steel structure archive security index one by one and calculate the matching word frequency. The word frequency is combined to generate a keyword relevance score set for each document. Calculating a final adaptation score for each document based on the keyword relevance score set; Based on the final adaptation score of each document, each document in the document collection is screened, and documents with a final adaptation score greater than the preset adaptation score threshold are retained. A list of access rights for retrieved documents is formed in combination with the user role authorization level.

4. The steel structure archive retrieval system based on semantic understanding according to claim 1 is characterized in that: The steps for obtaining the content rewriting trigger instruction are: Based on the retrieved document access permission list and the preset role access policy rules, each document identifier in the retrieved document access permission list is compared with each policy rule number in the preset role access policy rules, and whether the policy condition is hit is identified and a value of 1 is assigned to the hit item and a value of 0 is assigned to the miss item, thereby generating a policy trigger state matrix corresponding to each document; Calculating an operation trigger score for each document based on the policy trigger state matrix; Based on the operation trigger score of each document, the operation trigger score is compared with the preset trigger threshold item by item to determine whether a content rewriting trigger instruction is generated for each document.

5. The steel structure archive retrieval system based on semantic understanding according to claim 1 is characterized in that: The steps for obtaining the desensitized text replacement fragment are: Based on the content rewriting trigger instruction, the document identifiers contained in the content rewriting trigger instruction are parsed one by one, and the corresponding steel structure archive original documents are read one by one from the document storage location according to the document identifiers. All the obtained steel structure archive original documents are loaded into the memory one by one and indexed to form a set of original documents to be processed; Based on the set of original documents to be processed, the type of rewrite operation indicated in the content rewrite trigger instruction is determined, and each original document of the steel structure archive in the set of original documents to be processed is traversed one by one. The numerical field of the project cost or the description paragraph of the material yield strength in the original document of the steel structure archive is located and extracted, and the numerical field of the project cost is replaced by a preset placeholder, and the description paragraph of the material yield strength is replaced by a prompt, and desensitized text replacement fragments are generated item by item.

6. The steel structure archive retrieval system based on semantic understanding according to claim 1 is characterized in that: The steps for obtaining the user view document stream are: Based on the desensitized text replacement segment, all replacement segments in the desensitized text replacement segment are updated one by one to the designated position of the corresponding steel structure archive original document according to the replacement position recorded in the desensitized text replacement segment, and user view document streams are generated one by one.

7. The steel structure archive retrieval system based on semantic understanding according to claim 1 is characterized in that: The steps for obtaining the formatted front-end page elements are as follows: Based on the user view document stream, parsing the structural layout information of each user view document in the user view document stream one by one, identifying the structural elements in the user view document, extracting the position information and hierarchical information corresponding to each element, and generating structured document layout information; Based on the structured document layout information, the text paragraphs in the document in the user view document flow are traversed one by one, the search keywords, placeholders and prompts in the paragraphs are identified one by one, color background rendering is added to the search keywords according to the preset highlighting rules, the placeholders and prompts are replaced with corresponding front-end HTML elements according to the preset placeholder and prompt style rules, and a formatted rendered text fragment is generated; Based on the formatted rendered text segments, combined with the position information and level information of each element in the structured document layout information, the formatted rendered text segments are reassembled one by one at their original positions to generate formatted front-end page elements.

8. The steel structure archive retrieval system based on semantic understanding according to claim 1 is characterized in that: The steps for obtaining the hierarchical visual search results are: Based on the formatted front-end page elements, extracting position boundary values ​​and size values ​​of the formatted front-end page elements one by one, associating each position boundary value and size value of the formatted front-end page elements with the hierarchical identifier and position information of the original document layout, and sequentially organizing and generating a page organization mapping set; Calculating a page layout conflict score based on the page organization mapping set; Based on the page layout conflict score, the page layout conflict score is compared with the preset layout conflict threshold item by item. If the page layout conflict score is less than the preset layout conflict threshold, the page organization mapping set is directly integrated to generate a complete page to obtain a hierarchical visual retrieval result.

Citation Information

Cited By

  • Authority control method for supporting RBAC + ABAC of AI knowledge base

    CN121786865A

  • An AI knowledge base supporting RBAC+ABAC permission control method

    CN121786865B