Content risk detection method and device for project file and electronic equipment
Patent Information
- Application Number
- CN202611279804.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]本发明实施例提供了一种项目文件的内容风险检测方法、装置及电子设备,以至少解决相关技术中,在对项目文件进行内容风险检测时,存在内容风险检测不准确的技术问题
[0174](1)相较于相关技术,本发明通过获取目标项目文件在目标时段内包含规范格式的第一项目数据与非规范格式的第二项目数据的目标文件数据,能够完整覆盖项目文件全部数据载体;依据第一项目数据自身数据形式提取多维度表征文件风险状态的项目特征参数,可充分挖掘结构化数据内置风险特征;把第二项目数据拆分多数据块并提取各数据块对应的内容视觉特征,能够精准定位非结构化文件内有效信息区域;依托各数据块的内容视觉特征提取目标文本,完整还原非结构化数据承载的业务信息;结合结构化来源的项目特征参数与非结构化来源的目标文本综合判定内容风险参数,能够融合结构化与非结构化两类数据全面分析项目文件的内容风险,从而提升项目文件内容风险检测的准确性,进而解决了相关技术中,在对项目文件进行内容风险检测时,存在内容风险检测不准确的技术问题。
Smart Images

Figure CN122987901A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and more specifically, to a method, apparatus, and electronic device for detecting content risks in project documents. Background Technology
[0002] In related technologies, project documents are indispensable throughout the entire lifecycle of project development, delivery, and operation. To ensure the compliance and security of project documents during release, dissemination, or use, it is necessary to detect content risks in project documents. However, related technologies suffer from technical issues regarding inaccurate content risk detection when performing content risk detection on project documents.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This invention provides a method, apparatus, and electronic device for detecting content risks in project documents, in order to at least solve the technical problem of inaccurate content risk detection in related technologies when performing content risk detection on project documents.
[0005] According to one aspect of the present invention, a method for detecting content risk in a project file is provided, comprising: acquiring target file data of a target project file within a target time period, wherein the target file data includes first project data and second project data, the first project data being data in a predetermined format and the second project data being data in a non-predetermined format; extracting multiple project feature parameters from the first project data according to the data format of the first project data, wherein the multiple project feature parameters respectively characterize the file risk status of the target project file from different feature dimensions; dividing the second project data into multiple data blocks and determining the content visual features corresponding to the multiple data blocks respectively; extracting target text from the second project data based on the content visual features corresponding to the multiple data blocks respectively; and determining the content risk parameters of the target project file based on the multiple project feature parameters and the target text.
[0006] Optionally, determining the content risk parameters of the target project file based on the plurality of project feature parameters and the target text includes: determining the feature association relationship between the plurality of project feature parameters; determining the parameter risk status corresponding to each of the plurality of project feature parameters based on the feature association relationship between the plurality of project feature parameters; and determining the content risk parameters of the target project file based on the plurality of project feature parameters, the parameter risk status corresponding to each of the plurality of project feature parameters, and the target text.
[0007] Optionally, determining the feature association relationship among the plurality of project feature parameters includes: determining the target fields corresponding to the plurality of project feature parameters respectively; dividing the plurality of project feature parameters into a plurality of first feature parameters and a plurality of second feature parameters according to the target fields corresponding to the plurality of project feature parameters respectively, wherein the plurality of first feature parameters are project feature parameters whose target fields belong to a first field, and the second feature parameters are project feature parameters whose target fields belong to a second field, the first field is a field used to represent numerical values, and the second field is a field used to represent other text besides numerical values; determining the temporal dependency relationship among the project events corresponding to the plurality of first feature parameters respectively, and the content representation relationship among the text content corresponding to the plurality of second feature parameters respectively; determining the content constraint relationship between the project events corresponding to the plurality of first feature parameters and the text content corresponding to the plurality of second feature parameters respectively; and determining the feature association relationship among the plurality of project feature parameters based on the temporal dependency relationship among the project events corresponding to the plurality of first feature parameters, the content representation relationship among the text content corresponding to the plurality of second feature parameters respectively, and the content constraint relationship between the project events corresponding to the plurality of first feature parameters and the text content corresponding to the plurality of second feature parameters respectively.
[0008] Optionally, the step of extracting target text from the second project data based on the content visual features corresponding to the plurality of data blocks includes: determining the character probability distribution corresponding to the first project data block based on the content visual features of the first project data block according to the first execution order corresponding to the plurality of data blocks; determining the character probability distribution corresponding to the second project data block based on the character probability distribution corresponding to the first project data block and the content visual features of the second project data block, until the plurality of data blocks are executed, obtaining the character probability distribution corresponding to the plurality of data blocks under the first execution order, as the first probability distribution corresponding to the plurality of data blocks respectively; and extracting target text from the second project data based on the first probability distribution corresponding to the plurality of data blocks respectively.
[0009] Optionally, extracting target text from the second item data based on the first probability distributions corresponding to the plurality of data blocks includes: determining the character probability distribution corresponding to the Nth data block based on the content visual features of the Nth data block according to the second execution order corresponding to the plurality of data blocks; determining the character probability distribution corresponding to the (N-1)th data block based on the character probability distribution corresponding to the Nth data block and the content visual features of the (N-1)th data block, until the plurality of data blocks are executed, obtaining the character probability distribution corresponding to the plurality of data blocks under the second execution order, as the second probability distribution corresponding to the plurality of data blocks, wherein the second execution order is the reverse of the first execution order, and N is the total number of the plurality of data blocks; and extracting target text from the second item data based on the first probability distributions corresponding to the plurality of data blocks and the second probability distributions corresponding to the plurality of data blocks.
[0010] Optionally, determining the content risk parameters of the target project file based on the plurality of project feature parameters and the target text includes: determining a plurality of parameter combinations based on the plurality of project feature parameters, wherein each of the plurality of parameter components includes at least two project feature parameters; determining the combined risk patterns corresponding to the parameter combinations and the risk trigger boundaries corresponding to the plurality of project feature parameters; extracting a plurality of risk words from the target text and determining the word association relationships between the plurality of risk words; determining the textual semantic risk corresponding to the target text based on the plurality of risk words and the word association relationships between the plurality of risk words; and determining the content risk parameters of the target project file based on the combined risk patterns corresponding to the parameter combinations, the risk trigger boundaries corresponding to the plurality of project feature parameters, and the textual semantic risk.
[0011] Optionally, based on the plurality of project feature parameters and the target text, the content risk parameters of the target project file are determined, including: determining the reference file data of the reference project file within the reference time period; determining the data deviation characteristics between the reference file data and the target file data; and determining the content risk parameters of the target project file based on the data deviation characteristics, the plurality of project feature parameters, and the target text.
[0012] According to one aspect of the present invention, a content risk detection device for a project file is provided, comprising: a first determining module, configured to acquire target file data of a target project file within a target time period, wherein the target file data includes first project data and second project data, the first project data being data in a predetermined format and the second project data being data in a non-predetermined format; a second determining module, configured to extract a plurality of project feature parameters from the first project data according to the data format of the first project data, wherein the plurality of project feature parameters respectively characterize the file risk status of the target project file from different feature dimensions; a third determining module, configured to divide the second project data into a plurality of data blocks and determine the content visual features corresponding to the plurality of data blocks respectively; a fourth determining module, configured to extract target text from the second project data based on the content visual features corresponding to the plurality of data blocks respectively; and a fifth determining module, configured to determine the content risk parameters of the target project file based on the plurality of project feature parameters and the target text.
[0013] According to one aspect of the present invention, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the content risk detection method for project documents as described in any of the preceding claims.
[0014] According to one aspect of the present invention, a computer-readable storage medium is provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the content risk detection method for project documents described in any of the preceding claims.
[0015] In this embodiment of the invention, the target file data, which includes first project data in a standardized format and second project data in a non-standardized format within a target time period, is obtained, which can completely cover all data carriers of the project file. Based on the data format of the first project data, multi-dimensional project feature parameters characterizing the risk status of the file are extracted, which can fully explore the built-in risk features of structured data. The second project data is split into multiple data blocks, and the corresponding visual features of each data block are extracted, which can accurately locate the effective information areas within the unstructured file. The target text is extracted based on the visual features of each data block, completely restoring the business information carried by the unstructured data. By combining the project feature parameters from structured sources with the target text from unstructured sources to comprehensively determine the content risk parameters, the content risk parameters of the project file can be comprehensively analyzed by integrating both structured and unstructured data, thereby improving the accuracy of content risk detection in project files. This solves the technical problem of inaccurate content risk detection in related technologies when performing content risk detection on project files. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0017] Figure 1 This is a flowchart of a content risk detection method for project documents according to an embodiment of the present invention;
[0018] Figure 2 This is a schematic diagram of the content risk detection framework for project documents in an optional embodiment of the present invention;
[0019] Figure 3 This is a schematic diagram of the content risk detection process for project documents in an optional embodiment of the present invention;
[0020] Figure 4 This is a structural block diagram of a content risk detection device for project documents according to an embodiment of the present invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] Example 1
[0024] According to an embodiment of the present invention, an embodiment of a method for detecting content risks in project documents is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0025] Figure 1 This is a flowchart of a content risk detection method for project documents according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0026] S102, Obtain the target file data of the target project file within the target time period, wherein the target file data includes first project data and second project data, the first project data is data in a predetermined format, and the second project data is data in a predetermined format.
[0027] This involves target project documents, which are project documents generated throughout the entire project lifecycle (including feasibility studies, design and development, online acceptance, operation and maintenance, and offline decommissioning) that require content risk detection.
[0028] This involves the target time period, which is the time interval selected when performing content risk detection on the target project file, and is used to limit the time range of the file data obtained.
[0029] This involves target file data, which is a set of raw data obtained from target project files within a target time period for subsequent content risk detection. For example, the target file data includes first project data and second project data.
[0030] This involves first-item data, which is data in the target file that conforms to a predetermined format; specifically, this first-item data is structured data. For example, this first-item data includes structured data such as project data tables and database records.
[0031] This involves second-project data, which refers to data in the target file that does not conform to the predetermined format; specifically, this second-project data is unstructured data. For example, this second-project data includes unstructured data such as scanned copies of feasibility study reports, design drawings, and acceptance report documents.
[0032] This involves the data format, which is the specific structural form of data in terms of storage and organization, used to distinguish different categories of data. For example, the data format includes structured forms (such as data tables) and unstructured forms (such as scanned images, text documents, etc.).
[0033] This involves a predefined format, which is a pre-set format condition used to determine whether data belongs to structured data. For example, the predefined format includes that the data has clear field names and field types, and can be stored and retrieved in a table structure.
[0034] S104. According to the data format of the first project data, extract multiple project feature parameters from the first project data. The multiple project feature parameters represent the file risk status of the target project file from different feature dimensions.
[0035] This involves project feature parameters, which are feature parameters extracted from the first project data according to the data format of the first project data, and used to characterize the file risk status of the target project file from different feature dimensions.
[0036] This includes the document risk status, which is an overall representation of the degree of risk or abnormality presented by the target project document at the content level. It is used to reflect whether the target project document has risk situations such as missing content, non-standard format, unreasonable parameters, or compliance abnormalities.
[0037] Taking the data from the first project as an example, the data format of the first project data is a relational data table structure with a clear row and column organization method. It includes fixed field names (such as column headers) and field types (such as numeric, character, and date types), and the data is stored according to a predefined format. Correspondingly, the extracted project feature parameters can be key data fields and their specific values extracted from this data table to characterize the file risk status of the target project document from different feature dimensions. For example, multiple project feature parameters include project number (used to uniquely identify the project), construction object (such as company name), design parameters (such as voltage level and capacity configuration), construction schedule (such as planned start date and planned completion date), investment estimate (such as budget amount), acceptance indicators (such as pass rate standards), and operation and maintenance frequency (such as maintenance cycle).
[0038] S106, Divide the second project data into multiple data blocks and determine the content visual features corresponding to each of the multiple data blocks;
[0039] This involves multiple data blocks, which are obtained by dividing the second item data according to a predetermined division rule. For example, taking the second item data as image data (such as document images) as an example, these multiple data blocks are multiple image blocks obtained by dividing the image data into image regions.
[0040] This involves content visual features, which are feature representations in the corresponding data block used to characterize visual information such as text outlines, font features, edge directions, corner points, and lines in the second item data. For example, content visual features include edge features, corner features, line direction features, stroke component features, and character outline features, which can be extracted by a convolutional neural network.
[0041] S108, Based on the visual features of the content corresponding to multiple data blocks, extract the target text from the second project data;
[0042] This involves target text, which is textual content information extracted from the second project data based on the visual features of the content corresponding to multiple data blocks. For example, the target text includes project background descriptions and construction content descriptions extracted from the scanned feasibility study report, acceptance conclusions extracted from the acceptance report, and operation and maintenance feedback information extracted from the scanned operation and maintenance records.
[0043] S110, based on multiple project feature parameters and target text, determines the content risk parameters of the target project file.
[0044] This involves content risk parameters, which are used to characterize the risk status of the target project document's content. For example, these content risk parameters include anomaly diagnosis results and confidence levels, risk levels (such as major anomalies, general anomalies, and no anomalies), risk scores, etc. As the final output of the target project document content risk detection, they are used to reflect whether the target project document has risk situations such as missing content, non-standard format, unreasonable parameters, or compliance anomalies.
[0045] Through the above steps S102-S110, target file data containing standardized first project data and non-standardized second project data within the target time period is obtained, which can completely cover all data carriers of the project file; project feature parameters representing the risk status of the file are extracted based on the data format of the first project data, which can fully explore the built-in risk features of structured data; the second project data is split into multiple data blocks and the corresponding content visual features of each data block are extracted, which can accurately locate the effective information area in the unstructured file; the target text is extracted based on the content visual features of each data block, which can completely restore the business information carried by the unstructured data; the content risk parameters are comprehensively judged by combining the project feature parameters from the structured source and the target text from the unstructured source, which can integrate the two types of data, structured and unstructured, to comprehensively analyze the content risk of the project file, thereby improving the accuracy of content risk detection of the project file, and thus solving the technical problem of inaccurate content risk detection when performing content risk detection on project files in related technologies.
[0046] As an optional embodiment, the content risk parameters of the target project file are determined based on multiple project feature parameters and the target text, including: determining the feature association relationship between the multiple project feature parameters; determining the parameter risk status corresponding to each of the multiple project feature parameters based on the feature association relationship between the multiple project feature parameters; and determining the content risk parameters of the target project file based on the multiple project feature parameters, the parameter risk status corresponding to each of the multiple project feature parameters, and the target text.
[0047] This involves feature association, which is used to characterize the relationship between two corresponding project feature parameters, so as to reflect the interdependence and mutual influence between the two corresponding project feature parameters.
[0048] This includes parameter risk status, which is used to characterize whether the corresponding project characteristic parameters are abnormal or deviate from the normal range. For example, the parameter risk status includes normal parameters and abnormal parameters (such as project delays, parameter exceeding standards, missing content, compliance deviations, etc.).
[0049] In this embodiment, firstly determining the feature correlation between multiple project feature parameters helps to clarify the inherent relationship between each project feature parameter; then, based on the feature correlation, determining the parameter risk status corresponding to each project feature parameter ensures that the risk determination process fully incorporates the logical constraints between parameters, avoids misjudgment caused by isolated analysis of each parameter, and thus helps to further improve the accuracy and reliability of the detection results.
[0050] As an optional embodiment, determining the feature association relationship between multiple project feature parameters includes: determining the target fields corresponding to the multiple project feature parameters respectively; dividing the multiple project feature parameters into multiple first feature parameters and multiple second feature parameters according to the target fields corresponding to the multiple project feature parameters respectively, wherein the multiple first feature parameters are project feature parameters whose target fields belong to the first field, and the second feature parameters are project feature parameters whose target fields belong to the second field, the first field is a field used to represent numerical values, and the second field is a field used to represent other text besides numerical values; determining the temporal dependency relationship between the project events corresponding to the multiple first feature parameters respectively, and the content representation relationship between the text content corresponding to the multiple second feature parameters respectively; determining the content constraint relationship between the project events corresponding to the multiple first feature parameters and the text content corresponding to the multiple second feature parameters respectively; and determining the feature association relationship between the multiple project feature parameters based on the temporal dependency relationship between the project events corresponding to the multiple first feature parameters, the content representation relationship between the text content corresponding to the multiple second feature parameters respectively, and the content constraint relationship between the project events corresponding to the multiple first feature parameters and the text content corresponding to the multiple second feature parameters respectively.
[0051] This involves target fields, which are core fields used to characterize the corresponding project feature parameters. Taking a data table as an example, the target field can be keywords in the data table column name, data attribute identifiers, values, etc.
[0052] This involves a first feature parameter, which is a project feature parameter of the target field belonging to the first field. The first field is a field used to represent numerical values. For example, the first feature parameter includes design parameter values (numerical), investment estimate values (numerical), operation and maintenance frequency values (numerical), construction period in days values (numerical), etc.
[0053] This involves a second feature parameter, which is a project feature parameter of the target field belonging to the second field. The second field is a field used to represent text other than numerical values. For example, the second feature parameter includes project number (character type), construction object (character type), project name (character type), etc.
[0054] This includes project events, which are events that occur throughout the entire lifecycle of a project. For example, project events include the completion of design and development, passing of online acceptance, initiation of operation and maintenance, and decommissioning.
[0055] This involves temporal dependencies, which are the sequential or restrictive relationships between the project events corresponding to the two first feature parameters in terms of time sequence. For example, the temporal dependencies include design and development completion before online acceptance, and online acceptance before operation and maintenance. The main function is to serve as a component in the feature association relationship that reflects the logical order of event execution.
[0056] This involves textual content, which refers to specific information recorded and described in text form in project construction-related documents. For example, the textual content includes descriptions of the project name, construction objects, and construction goals.
[0057] This involves content representation relationships, which are the mutual associations and representational consistency relationships between the text contents corresponding to the two second feature parameters. For example, the content representation relationship includes the semantic correspondence between the description of "construction goal achievement" in the acceptance report and the description of "construction goal" in the feasibility study report. Its main function is to serve as a component reflecting the semantic logic of the text in the feature association relationship.
[0058] This involves content constraint relationships, which are the mutual constraints and limitations between the project event corresponding to the first feature parameter and the text content corresponding to the second feature parameter. For example, the content constraint relationship includes the constraints that should be met between the numerical parameters corresponding to the project event (such as the number of days of construction period) and the textual description of the project event in the text content (such as the progress description), as well as whether the numerical parameters exceed the boundary range defined in the text content.
[0059] In this embodiment, the target fields corresponding to the feature parameters of each project are first determined, and the project feature parameters are divided into numerical first feature parameters and textual second feature parameters, which can match differentiated association analysis paths for different types of parameters. Then, the temporal dependency relationship between the project events corresponding to the first feature parameters is determined, which can capture the logical constraints on the execution order of events. At the same time, the content representation relationship between the text content corresponding to the second feature parameters is determined, which can explore the semantic interrelationships of text descriptions. Furthermore, the content constraint relationship between the project events corresponding to the first feature parameters and the text content corresponding to the second feature parameters is determined, which can establish a cross-category constraint channel between numerical event records and textual description information. Finally, the feature association relationship is determined based on the above three relationships. Since the feature association relationship integrates event temporal logic, textual semantic logic, and cross-category constraint logic, it can ensure that the multidimensional association information between parameters is fully included in the subsequent risk assessment, avoiding misjudgment of risk status due to the severing of the inherent connection between different types of parameters.
[0060] As an optional embodiment, the target text is extracted from the second project data based on the content visual features corresponding to multiple data blocks, including: determining the character probability distribution corresponding to the first project data block based on the content visual features of the first project data block according to the first execution order corresponding to the multiple data blocks; determining the character probability distribution corresponding to the second project data block based on the character probability distribution corresponding to the first project data block and the content visual features of the second project data block, until the multiple data blocks are executed, and obtaining the character probability distribution corresponding to the multiple data blocks under the first execution order, which is used as the first probability distribution corresponding to the multiple data blocks; and extracting the target text from the second project data based on the first probability distribution corresponding to the multiple data blocks.
[0061] This involves a first execution order, which is the order in which multiple data blocks are processed sequentially from front to back according to their arrangement in the second project data. For example, the first execution order is to start from the first data block of the document image and process it sequentially to the last data block.
[0062] This involves a character probability distribution, which characterizes the probability distribution of the occurrence of each possible character in the data block. As a first probability distribution, it provides a forward-order-based basis for extracting target text from the second item data. For example, this character probability distribution includes the occurrence probability values of each character (such as Chinese characters, numbers, punctuation marks, etc.) corresponding to the data block.
[0063] In this embodiment, following the first execution order, the character probability distribution corresponding to the first data block is first determined based on the content visual features of the first data block. Then, the character probability distribution corresponding to the previous data block is combined with the content visual features of the current data block to determine the character probability distribution corresponding to each subsequent data block in turn, until all data blocks are processed, resulting in the first probability distribution corresponding to each of the multiple data blocks. Since the character probability distribution of the previous data block is passed to the current data block as context information during the processing, the sequence dependency relationship between adjacent data blocks can be used to enhance the accuracy of character prediction. Thus, when extracting target text from the second item data based on the first probability distribution, it is ensured that the extracted text has coherence and consistency in the character sequence, avoiding the problem of character misrecognition caused by lack of context information.
[0064] As an optional embodiment, the target text is extracted from the second project data based on the first probability distribution corresponding to each of the multiple data blocks, including: determining the character probability distribution corresponding to the Nth data block based on the content visual features of the Nth data block according to the second execution order corresponding to the multiple data blocks; determining the character probability distribution corresponding to the (N-1)th data block based on the character probability distribution corresponding to the Nth data block and the content visual features of the (N-1)th data block, until the multiple data blocks are executed, and obtaining the character probability distribution corresponding to the multiple data blocks under the second execution order, which is used as the second probability distribution corresponding to the multiple data blocks, wherein the second execution order is the reverse of the first execution order, and N is the total number of multiple data blocks; and extracting the target text from the second project data based on the first probability distribution corresponding to each of the multiple data blocks and the second probability distribution corresponding to the multiple data blocks.
[0065] This involves a second execution order, which is the order in which multiple data blocks are processed sequentially from back to front according to their arrangement in the second project data. This second execution order is the opposite of the first execution order. For example, the second execution order starts from the last data block of the document image and processes sequentially up to the first data block. Its main function is to serve as the processing order for determining the second probability distribution corresponding to multiple data blocks.
[0066] This involves a second probability distribution, which is the character probability distribution corresponding to the data block according to the second execution order. For example, the character probability distribution corresponding to the Nth data block, the character probability distribution corresponding to the N-1th data block, and so on up to the character probability distribution corresponding to the first data block under the second execution order. Its main function is to provide a character probability basis based on the backward order for extracting the target text.
[0067] In this embodiment, following a second execution order that is the reverse of the first execution order, the character probability distribution corresponding to the last data block is first determined based on the content visual features of the last data block. Then, the character probability distribution corresponding to the next data block is combined with the content visual features of the current data block, and the character probability distribution corresponding to each data block is determined sequentially forward until all data blocks are processed, resulting in a second probability distribution corresponding to multiple data blocks. Since both the first probability distribution based on the forward order and the second probability distribution based on the backward order are obtained simultaneously, the contextual dependencies between data blocks can be captured from both directions. Thus, when extracting target text from the second item data by combining the first and second probability distributions, it is ensured that the character prediction of each data block incorporates the contextual information of its preceding and following adjacent data blocks, avoiding character recognition bias caused by relying solely on information from a single direction.
[0068] As an optional embodiment, the content risk parameters of the target project file are determined based on multiple project feature parameters and the target text. This includes: determining multiple parameter combinations based on the multiple project feature parameters, wherein each parameter component includes at least two project feature parameters; determining the combined risk patterns corresponding to the parameter combinations and the risk trigger boundaries corresponding to the multiple project feature parameters; extracting multiple risk words from the target text and determining the word association relationships between the multiple risk words; determining the textual semantic risk corresponding to the target text based on the multiple risk words and the word association relationships between the multiple risk words; and determining the content risk parameters of the target project file based on the combined risk patterns corresponding to the parameter combinations, the risk trigger boundaries corresponding to the multiple project feature parameters, and the textual semantic risk.
[0069] This involves parameter combinations, which are combinations of project characteristic parameters obtained by combining any two or more of multiple project characteristic parameters. For example, parameter pairs or parameter sets are obtained by combining multiple project characteristic parameters in pairs or more. Each parameter combination includes at least two project characteristic parameters. For example, the parameter combination includes "design parameters + investment estimation", "construction period planning + acceptance indicators", etc., which provides a combination basis for determining the combination risk model corresponding to each parameter combination.
[0070] This involves a combined risk model, which is used to characterize the type of joint risk triggered when the project feature parameters within a corresponding combination of parameters simultaneously take corresponding values or states, that is, which feature combinations together will cause problems.
[0071] This involves risk trigger boundaries, which are critical thresholds or condition ranges corresponding to the characteristic parameters of each project, used to determine whether the characteristic parameters of the project trigger risks. For example, the risk trigger boundaries include risk triggered by an investment estimation deviation exceeding 10% or risk triggered by a construction period delay exceeding 15 days, etc., providing a single-parameter-level risk judgment benchmark for determining the content risk parameters of the target project documents.
[0072] This involves risk words, which are keywords or phrases extracted from the target text that are related to the risks in the project document content, such as descriptive words corresponding to abnormal operating parameters of power equipment.
[0073] This involves word association relationships, which are the relationships between multiple risk words in terms of text co-occurrence, semantic similarity, or logical connection.
[0074] This includes textual semantic risk, which is a risk assessment result used to characterize whether the target text contains risky content at the semantic level.
[0075] In this embodiment, multiple parameter combinations are first determined based on multiple project feature parameters, and the combined risk patterns corresponding to each combination are identified. At the same time, the risk trigger boundaries corresponding to each parameter are determined, which can comprehensively cover the risk types in structured data from two levels: single parameter anomaly threshold and parameter joint anomaly patterns. Then, risk words are extracted from the target text and word associations are determined, thereby determining text semantic risks, which can incorporate semantic anomalies in unstructured text into the risk detection system. Finally, the combined risk patterns, risk trigger boundaries, and text semantic risks are integrated to jointly determine content risk parameters. Since three types of information, single parameter boundary risks, parameter combination joint risks, and text semantic risks, are included simultaneously, the risk status of the target project document can be comprehensively characterized from multiple dimensions, thereby ensuring that the content risk detection results have higher accuracy and reliability.
[0076] As an optional embodiment, based on multiple project feature parameters and target text, the content risk parameters of the target project file are determined, including: determining the reference file data of the reference project file within the reference period; determining the data deviation characteristics between the reference file data and the target file data; and determining the content risk parameters of the target project file based on the data deviation characteristics, multiple project feature parameters, and target text.
[0077] This involves reference project files, which serve as the basic reference objects for comparative analysis with target project files. For example, the reference project files include file data from the same project as the target project file but from different time periods (such as the same period in history), or file data from similar projects in the same time period. Their main function is to provide a reference benchmark for determining the characteristics of data deviation.
[0078] This involves a reference time period, which is a specific time interval corresponding to the target time period and used to obtain reference file data for the reference project file. For example, the reference time period can be a historical period before the target time period (such as the previous operation and maintenance cycle), or it can be the same construction phase of similar projects. Its main function is to ensure that the reference file data and the target file data are comparable in the time dimension.
[0079] This includes reference file data, which refers to the project file data of the reference project file within the reference period, including corresponding structured and unstructured data.
[0080] This involves data deviation characteristics, which are quantitative results of the differences between reference file data and target file data in terms of values, structure, and content. For example, these data deviation characteristics include the percentage deviation of investment estimates (e.g., the target deviation is 12% from the reference), the difference in the number of days of construction period (e.g., the target is 20 days longer than the reference), and the semantic difference of text content, etc., providing deviation information input based on reference comparison for determining the content risk parameters of the target project file.
[0081] In this embodiment, the reference file data of the reference project file within the reference time period is first determined, and then the data deviation characteristics between the reference file data and the target file data are determined. This can introduce a priori reference benchmark for the target file data and quantify the degree of difference between the two. Since the historical data or similar project data accumulated by the project file in the long-term operation itself contains a reasonable fluctuation range and inherent laws under normal conditions, the data deviation characteristics can be used as prior knowledge to effectively make up for the lack of information in the time dimension or sample dimension of the current target file data. Therefore, when determining the content risk parameters based on the data deviation characteristics and integrating multiple project feature parameters and target text, the deviation information obtained from the priori reference comparison can be used as the input basis for risk judgment, thereby combining multi-source information to achieve a more comprehensive determination of content risk parameters.
[0082] Based on the above embodiments and optional embodiments, an optional implementation method is provided, which is described in detail below.
[0083] In related technologies, project documents are indispensable throughout the entire lifecycle of project development, delivery, and operation. To ensure the compliance and security of project documents throughout the entire project lifecycle, including their release, dissemination, and use, it is necessary to detect content risks in the project documents. However, related technologies suffer from technical issues regarding inaccurate content risk detection when performing content risk detection on project documents.
[0084] There is currently no effective solution to the above problems.
[0085] In view of this, an optional embodiment of the present invention provides a method for detecting content risks in project documents, which can effectively solve the above-mentioned technical problems.
[0086] For example, in the entire lifecycle of digital projects in the power industry (five stages: feasibility study, design and development, online acceptance, operation and maintenance, and offline decommissioning), the content risk verification of project documents is a core link to ensure project quality and standardize data management. Its accuracy and efficiency directly affect the project construction results and the reliability of subsequent data processing. Figure 2 This is a schematic diagram of the content risk detection framework for project documents in an optional embodiment of the present invention. Figure 3This is a schematic diagram of the content risk detection process for project documents in an optional embodiment of the present invention, such as... Figure 2 and Figure 3 As shown, the entire lifecycle of a digital transformation project in the power industry is used as an example, including data preprocessing, model building, model training, anomaly diagnosis and application, and output of detection results. A detailed description follows.
[0087] S1, obtain the target file data of the target project file within the target time period, wherein the target file data includes the first project data and the second project data, the first project data is data in a predetermined format, and the second project data is data in a predetermined format.
[0088] The target file data refers to the preprocessed file data. Data preprocessing is the foundation of anomaly diagnosis. Its core objective is to transform scattered, heterogeneous, and low-quality data into standardized, high-quality analytical source data suitable for model training and diagnosis. This process encompasses five key stages: data requirements analysis, data acquisition, data quality verification, data cleaning, and data integration. The entire process adheres to the rigid control requirements for basic data in power project documents. Data preprocessing includes:
[0089] Specifically, regarding data requirements analysis and tracing, this involves creating a data requirements table for online identification tools of key data control points, based on rigid data management objectives. The data coverage scope clarifies that this includes all data and documentation from the five major stages of project feasibility study, design and development, online acceptance, operation and maintenance, and decommissioning.
[0090] Clearly define the details of each data item: break down the core data items of each business process one by one, including basic information data (project number, construction object, such as company, etc.), technical data (design parameters, operation and maintenance records, etc.), and document data (feasibility study report, acceptance report, and other unstructured documents), and clarify the business definition, data type, and value range of each data item.
[0091] Data traceability and verification: For each business data item, through business system surveys, interface investigations, and other methods, clarify its source business system, source channel (interface calls, manual input, etc.), corresponding data table and fields, establish a data item association mapping table, verify the integrity and accuracy of the data transmission link, and ensure data traceability.
[0092] Specifically, for data review and verification, quantitative verification indicators and algorithms are designed based on five dimensions: data completeness, standardization, rationality, accuracy, and consistency. A comprehensive quality check is conducted on the acquired detailed data to verify its usability and validity, including:
[0093] Integrity check: Based on algorithms related to field non-empty checks and key data missing rate statistics, the system checks the missing status of each data item.
[0094] Standardization check: Based on preset data format rules (such as date format as "year-month-day", project number as a fixed-length string, and numerical data conforming to the value range), regular expression matching and format validation algorithms are used to check whether the data format meets the requirements and mark data with abnormal format.
[0095] Reasonableness verification: Based on the business rules for digital project construction in the power industry, a reasonableness verification algorithm is designed to verify whether the data logic is reasonable (such as the project completion date must not be earlier than the commencement date, the time interval of operation and maintenance records must comply with industry standards, and the design parameters must comply with relevant power grid standards). Logically abnormal data is marked and early warnings can also be issued.
[0096] Accuracy verification: Using cross-validation and historical comparison algorithms, the records of the same data item in different business systems are compared, and the data are also compared with the data of the same period and similar projects in history. If the deviation exceeds the preset threshold (such as 10%), it is marked as an accuracy anomaly and requires manual review.
[0097] Consistency check: Check the logical consistency between related data items (such as the project name being consistent across all data tables and data encoding conforming to a unified standard). Use the related field matching algorithm to mark inconsistent data and correct it uniformly.
[0098] Specifically, data cleaning involves setting targeted cleaning and transformation rules based on the data quality verification results, removing invalid data, correcting abnormal data, and finally integrating them to form source data for analysis that meets business analysis needs, i.e., target file data.
[0099] S2, according to the data format of the first project data, extract multiple project feature parameters from the first project data, wherein the multiple project feature parameters represent the file risk status of the target project file from different feature dimensions;
[0100] Taking the first project data as structured data (such as a project data table) as an example, obtain the data table structure information corresponding to the first project data. The data table structure information includes field names and field types. Based on the field names and field types, identify multiple project data fields that have a content risk correlation greater than the correlation threshold with the target project, and use them as multiple project feature parameters.
[0101] S3, divide the second project data into multiple data blocks and determine the content visual features corresponding to each of the multiple data blocks;
[0102] Taking the second project data as unstructured data as an example, such as image data like feasibility study reports, scanned copies of design drawings, acceptance reports, and scanned copies of operation and maintenance records, a convolutional neural network (CNN) is used to divide the second project data into multiple data blocks and determine the content visual features corresponding to each data block. This includes using a CNN to perform convolution and pooling processing on the document images: first, sliding convolution operations are performed on the document images through multiple layers of convolution kernels to extract shallow visual features such as edges, corners, and line directions; then, deep convolutions are stacked and combined to form deep semantic features such as stroke components and character outlines; then, pooling layers are used to reduce the dimensionality of the feature map, retaining significant features while reducing the number of parameters; finally, the pooled feature map is divided into multiple image blocks in the horizontal direction, serving as multiple data blocks, with each image block corresponding to a feature vector, thereby determining the content visual features corresponding to each data block.
[0103] S4. Based on the visual features of the content corresponding to multiple data blocks, extract the target text from the second project data;
[0104] For example, using a Long Short-Term Memory (LSTM) network, following a first execution order corresponding to multiple data blocks, the character probability distribution corresponding to the first item data block is determined based on the visual features of the content of the first item data block; based on the character probability distribution corresponding to the first item data block and the visual features of the content of the second item data block, the character probability distribution corresponding to the second item data block is determined, and so on, until all data blocks are executed, obtaining the character probability distributions corresponding to each of the multiple data blocks under the first execution order, which are used as the first probability distributions corresponding to each of the multiple data blocks; based on the first probability distributions corresponding to each of the multiple data blocks, the target text is extracted from the second item data.
[0105] Furthermore, a bidirectional long short-term memory network can be used to extract the target text from the second item data based on the visual features of the content corresponding to multiple data blocks. That is, based on the aforementioned content, according to the second execution order corresponding to multiple data blocks, the character probability distribution corresponding to the Nth data block is determined based on the visual features of the content of the Nth data block; based on the character probability distribution corresponding to the Nth data block and the visual features of the content of the (N-1)th data block, the character probability distribution corresponding to the (N-1)th data block is determined, until multiple data blocks are executed, and the character probability distribution corresponding to the multiple data blocks under the second execution order is obtained, which is used as the second probability distribution corresponding to the multiple data blocks. Here, the second execution order is the reverse of the first execution order, and N is the total number of multiple data blocks; based on the first probability distribution corresponding to the multiple data blocks and the second probability distribution corresponding to the multiple data blocks, the target text is extracted from the second item data.
[0106] For example, the second project data is divided into multiple data blocks, and the visual features corresponding to each data block are determined. Based on these visual features, the target text is extracted from the second project data. This can be achieved using an OCR text extraction model. The core of the model is to automate the entire process of "unstructured data parsing → structured data analysis → key element identification." An OCR text extraction model and an intelligent diagnostic analysis model are built, working together to provide technical support for anomaly diagnosis. Simultaneously, considering business scenario requirements, the model is ensured to adapt to the characteristics of power industry project management, specifically for unstructured documents (such as feasibility study reports, scanned design drawings, acceptance reports, and scanned operation and maintenance records) during the digital project construction process. An efficient and accurate OCR text extraction model is constructed to achieve rapid extraction of text information, specifically including:
[0107] 1) Model Selection: A hybrid network structure of "CNN+LSTM+CTC" is adopted. CNN is used to extract the visual features of the document image, that is, spatial features (such as text outlines and font features). LSTM is used to capture the contextual relationships of text sequences to obtain the first probability distribution and the second probability distribution corresponding to multiple data blocks. CTC is used to solve the text alignment problem. Based on the above hybrid network structure, it can adapt to the document extraction needs of the power industry with multiple fonts, multiple formats (handwritten, printed), and multiple scenarios (blurred, skewed). Compared with traditional OCR models, the recognition accuracy is improved by more than 15%. CTC (Connectionist Temporal Classification) is an algorithm for handling sequence labeling problems and can be used to solve the problem of inconsistent lengths and difficulty in alignment between input and output sequences.
[0108] 2) Adaptation and optimization: For power industry professional terms (such as "operation and maintenance", "design parameters", "rigid control", etc.), a professional term dictionary is built and integrated into the decoding stage of the OCR model to improve the recognition accuracy of professional terms; for tilted and blurry document images, an image preprocessing module (tilt correction, noise reduction, enhancement) is added before inputting to the model, and histogram equalization algorithm is used to enhance image contrast to ensure extraction effect.
[0109] S5 determines the content risk parameters of the target project file based on multiple project feature parameters and the target text.
[0110] For example, using an intelligent diagnostic analysis model, based on multiple project feature parameters, multiple parameter combinations are determined, where each parameter component includes at least two project feature parameters; the combined risk patterns corresponding to each parameter combination are determined, as well as the risk trigger boundaries corresponding to each of the multiple project feature parameters; multiple risk words are extracted from the target text, and the word association relationships between these risk words are determined; based on the multiple risk words and their word association relationships, the textual semantic risks corresponding to the target text are determined; based on the combined risk patterns corresponding to each parameter combination, the risk trigger boundaries corresponding to each of the multiple project feature parameters, and the textual semantic risks, the content risk parameters of the target project file are determined.
[0111] Specifically, in conjunction with the anomaly diagnosis needs of digital projects in the power industry, an intelligent diagnostic analysis model based on machine learning and deep learning is constructed to achieve key control element identification, data annotation, and anomaly prediction. It is divided into two sub-models: a key element identification model and an anomaly diagnosis basic model.
[0112] The key element identification model is used to identify key control elements (such as construction content, data architecture, integration requirements, source data, project duration, design parameters, acceptance indicators, and maintenance frequency) throughout the entire project lifecycle from structured data (detailed wide tables) and text data extracted by OCR. Specifically, it can be constructed using a BERT model combined with a CRF model. The BERT model is a Natural Language Processing (NLP) model used for bidirectional contextual understanding. Specifically, it performs contextual semantic encoding on each character in the input text and outputs a semantic vector sequence that integrates contextual information from both sides. The CRF (Conditional Random Field) model is a probabilistic graphical model used for sequence labeling tasks in Natural Language Processing (NLP), such as Chinese word segmentation, Named Entity Recognition (NER), and part-of-speech tagging.
[0113] Among them, the anomaly diagnosis model is used to construct a multi-algorithm fusion-based anomaly diagnosis model based on identified key control elements, adapting to different types of anomaly scenarios. The anomaly diagnosis model includes:
[0114] The machine learning algorithm module employs a fusion algorithm of Random Forest (RF) and Support Vector Machine (SVM) for anomaly diagnosis of structured data (such as schedule deviations and parameter exceedances). Random Forest (RF) is a machine learning algorithm based on ensemble learning that improves the model's accuracy and robustness by constructing multiple decision trees and combining their prediction results. Support Vector Machine (SVM) is a supervised learning model for binary classification problems; its core idea is to find an optimal hyperplane to separate samples of different categories. Specifically, Random Forest (RF) is used to determine the combined risk patterns corresponding to different parameter combinations, and Support Vector Machine (SVM) is used to determine the risk trigger boundaries corresponding to multiple project feature parameters.
[0115] The deep learning algorithm module employs a CNN+GRU fusion algorithm for anomaly diagnosis in text data (such as non-compliant descriptions in acceptance reports, abnormal feedback in maintenance records, etc.). CNN is used to extract local text features (such as anomalous keywords). The Gated Recurrent Unit (GRU) is a variant of the Recurrent Neural Network (RNN) used to address the vanishing and exploding gradient problems encountered by traditional RNNs when processing long sequences of data. By introducing a gating mechanism, GRU effectively controls the information flow, enabling the model to capture long-distance dependencies. Therefore, GRU is used to capture the contextual logic of the text and identify implicit anomalies (such as descriptions that are not explicitly labeled but have logical problems). Specifically, the CNN+GRU fusion algorithm extracts multiple risk words from the target text and determines the word associations between these risk words. Based on these risk words and their word associations, the semantic risks corresponding to the target text are determined.
[0116] Model fusion: Taking content risk parameters, including anomaly diagnosis results and confidence levels, as an example, a weighted fusion strategy is adopted to fuse the output results of the machine learning module and the deep learning module. That is, the combined risk patterns corresponding to the parameter combinations, the risk trigger boundaries corresponding to multiple project feature parameters, and text semantic risks are fused together. Weights are assigned according to the anomaly type, and the final anomaly diagnosis results and confidence levels are output.
[0117] In addition, model training is included before adopting the above models. The core goal of model training is to optimize the parameters of the OCR text extraction model and the intelligent diagnostic analysis model, improve the model recognition accuracy and anomaly diagnosis precision, and adopt the process of "dataset construction → phased training → parameter optimization → verification testing" to ensure that the model is suitable for the digital project management and control scenarios in the power industry.
[0118] 1) Dataset preparation:
[0119] Dataset Source: Collect all data from digital project construction over the past two years, including structured data (data sources, data dictionaries, etc.) and unstructured documents (covering the five major stages of feasibility study, design and development, online acceptance, operation and maintenance, and offline decommissioning), to ensure the comprehensiveness and representativeness of the dataset.
[0120] Dataset annotation: Accurately annotate datasets, including annotating text content for OCR model datasets (associating document images with corresponding correct text); annotating the categories and specific content of key control elements for key element recognition model datasets; and annotating anomaly types (such as project delays, quality non-compliance, compliance anomalies, etc.), anomaly characteristics, and judgment criteria for anomaly diagnosis model datasets.
[0121] Dataset partitioning: The labeled dataset is divided into a training set (for model training), a validation set (for parameter adjustment during training), and a test set (for model performance testing). At the same time, data augmentation techniques (such as document image rotation, scaling, text synonym replacement, and adding noise to structured data) are used to expand the size of the training set and avoid model overfitting.
[0122] 2) Model training:
[0123] OCR text extraction and recognition model training: First, the document images in the training set are preprocessed (skew correction, denoising, enhancement) and input into the constructed OCR model; the initial learning rate is set to 0.001, the batch size is 32, and the number of epochs is 100; the cross-entropy loss function is used to calculate the error between the model's predicted text and the labeled text, and the model parameters (CNN convolution kernel, number of LSTM hidden layer nodes, etc.) are adjusted through the backpropagation algorithm.
[0124] Training of the intelligent diagnostic analysis model includes:
[0125] Step 1: Training the Key Feature Recognition Model. Input the structured data feature vectors from the training set and the text embedding vectors extracted by OCR into the BERT+CRF model. Set the initial learning rate to 0.0001, the batch size to 16, and the number of iterations to 50. Use the loss function corresponding to CRF to optimize the model parameters and ensure that the key feature recognition accuracy is ≥95%.
[0126] Step 2: Training the Basic Model for Anomaly Diagnosis. The identified key control elements are used as input to a fusion model of machine learning (RF+SVM) and deep learning (CNN+GRU). During RF model training, the number of decision trees is set to 100, and the maximum depth is 10. During SVM model training, a radial basis function (RBF) kernel is used, with a regularization parameter set to 1.0. During CNN+GRU model training, the learning rate is 0.001, and the number of iterations is 60. A cross-entropy loss function is used to optimize the parameters of each sub-model, ensuring the accuracy of the model's anomaly diagnosis.
[0127] Step 3: Model Fusion Training. The training results of the two sub-models are weighted and fused. The weight allocation ratio is adjusted through a validation set to ensure that the anomaly diagnosis accuracy of the fused model is ≥92% and the suspected anomaly identification rate is ≥95%.
[0128] 3) Model parameter optimization:
[0129] A combined optimization method of "grid search + early stopping strategy + cross-validation" is adopted to comprehensively optimize the parameters of the two core models and avoid overfitting and underfitting.
[0130] Grid search: For key parameters of each model (such as the learning rate of the OCR model, the number of CNN convolutional kernels; the number of RF decision trees and SVM kernel function parameters of the anomaly diagnosis model), set multiple sets of parameter combinations, and use grid search to traverse all combinations to select the optimal parameter combination.
[0131] Early stopping strategy: During training, monitor the loss value and performance indicators (identification accuracy, anomaly diagnosis accuracy) of the validation set in real time. When the loss value of the validation set no longer decreases and the performance indicators no longer improve after 10 consecutive iterations, stop training, save the current optimal model parameters, and avoid model overfitting.
[0132] Cross-validation: The 5-fold cross-validation method is adopted, which divides the training set into 5 parts, and uses 4 parts as the training set and 1 part as the validation set in turn. The training is repeated 5 times, and the average value of the 5 training results is taken as the final performance index of the model to ensure the stability and generalization ability of the model.
[0133] 4) Model validation and testing:
[0134] The trained and optimized model is fully validated using a test set, and clear performance evaluation metrics are set to ensure that the model meets business requirements.
[0135] OCR text extraction model: Evaluation metrics are recognition accuracy and extraction speed. The required recognition accuracy is ≥96% (≥98% for technical terms), and the extraction speed for a single document (A4 size) is ≤3 seconds.
[0136] Intelligent diagnostic analysis model: Evaluation indicators include key element identification accuracy, anomaly diagnosis accuracy, suspected anomaly identification rate, and false positive rate. Requirements: key element identification accuracy ≥ 95%, anomaly diagnosis accuracy ≥ 92%, suspected anomaly identification rate ≥ 95%, and false positive rate ≤ 3%.
[0137] Optimization and Adjustment: For performance shortcomings discovered during testing (such as low accuracy in diagnosing certain types of anomalies or large OCR extraction errors in certain types of documents), supplement the corresponding samples and fine-tune the model until the performance requirements are met.
[0138] For example, considering the management characteristics of the five major business stages of digital project construction in the power industry (feasibility study, design and development, online acceptance, operation and maintenance, and offline decommissioning), the trained and optimized OCR model and intelligent diagnostic analysis model are deeply integrated with the management requirements of each business stage. Targeted anomaly diagnosis and identification algorithms are designed to achieve intelligent anomaly diagnosis across all scenarios and processes. The core logic of the algorithm is: "Business rule import → Key element extraction → Anomaly feature matching → Diagnostic result output → Anomaly level determination." This means first, the rigid management rules and anomaly judgment standards for each business stage are imported; then, key management elements in the project data are extracted through the OCR model and key element recognition model; then, anomaly features are matched through the anomaly diagnosis model to output diagnostic results; and finally, the anomaly level is determined based on the scope and severity of the anomaly's impact.
[0139] 1) Importing Business Rules: Import the standards for compiling feasibility study reports and other materials for power projects, as well as the requirements for project feasibility study management. Clarify the core contents that the feasibility study report must include (project background, necessity of construction, construction content, integration requirements, etc.) and the range of values for key parameters (such as the project schedule planning conforming to industry standards).
[0140] 2) Key element extraction: The text content in the feasibility study report and other materials (scanned copies / electronic documents) is extracted by the OCR model, and key control elements such as data architecture and source data are identified by the key element recognition model.
[0141] 3) Anomaly Detection Algorithm: Employing a "rule matching + numerical comparison" algorithm, the extracted key elements are compared with the imported business rules. Anomalies include: Completeness anomalies: A text keyword matching algorithm is used to check whether the feasibility study report and other related documents are missing core content (e.g., missing "data architecture" content is considered a completeness anomaly); Compliance anomalies: The feasibility study report and other related documents are checked to ensure they meet standards (e.g., whether the format is standardized and the terminology is accurate); Parameter inconsistencies: Numerical elements such as construction content, investment estimates, and data sources are compared with preset value ranges. Deviations exceeding a threshold are considered parameter inconsistencies (e.g., investment estimate deviation > 10%).
[0142] 4) Anomaly Level Determination: Major anomalies (such as missing core modules, investment estimation deviation > 20%), general anomalies (such as non-standard format, parameter deviation between 10% and 20%).
[0143] Next, the results will be output and solidified:
[0144] The aforementioned data preprocessing techniques, model building techniques, model training techniques, and diagnostic identification algorithms integrated with business scenarios are solidified into a diagnostic analysis scenario for project construction anomalies in the entire data lifecycle management, achieving reusability and iterability of the technical solution, including:
[0145] 1) Core deliverables solidification: Solidified content includes data architecture (data requirement table, data association mapping table), data classification (structured / unstructured data classification standards), data storage and distribution (wide table of analysis source data, storage scheme for model training dataset), model parameters (optimal model parameter configuration), diagnostic identification algorithms (algorithm logic and rule configuration for various business scenarios), and anomaly judgment criteria (anomaly level classification and judgment threshold).
[0146] 2) Iterative optimization mechanism: Establish a closed-loop iterative mechanism of "data update → model iteration → algorithm optimization", regularly collect new project data and changes in business requirements, supplement the training dataset, retrain the model and optimize parameters; update the anomaly judgment rules and algorithm logic according to the adjustment of business control requirements to ensure that it always adapts to the rigid control requirements of digital project construction in the power industry.
[0147] Specifically, S5 may further include: determining the feature association relationship between multiple project feature parameters; determining the parameter risk status corresponding to each of the multiple project feature parameters based on the feature association relationship between the multiple project feature parameters; and determining the content risk parameters of the target project file based on the multiple project feature parameters, the parameter risk status corresponding to each of the multiple project feature parameters, and the target text.
[0148] Specifically, determining the feature association relationships among multiple project feature parameters includes: identifying the target fields corresponding to each of the multiple project feature parameters; dividing the multiple project feature parameters into multiple first feature parameters and multiple second feature parameters according to the target fields corresponding to each of the multiple project feature parameters, wherein the multiple first feature parameters are project feature parameters whose target fields belong to the first field, and the second feature parameters are project feature parameters whose target fields belong to the second field, the first field is a field used to represent numerical values, and the second field is a field used to represent other text besides numerical values; determining the temporal dependency relationships among the project events corresponding to each of the multiple first feature parameters, and the content representation relationships among the text content corresponding to each of the multiple second feature parameters; determining the content constraint relationships between the project events corresponding to each of the multiple first feature parameters and the text content corresponding to each of the multiple second feature parameters; and determining the feature association relationships among the multiple project feature parameters based on the temporal dependency relationships among the project events corresponding to each of the multiple first feature parameters, the content representation relationships among the text content corresponding to each of the multiple second feature parameters, and the content constraint relationships between the project events corresponding to each of the multiple first feature parameters and the text content corresponding to each of the multiple second feature parameters.
[0149] For example, the system identifies the target fields corresponding to the feature parameters of each project and categorizes these parameters into first and second feature parameters based on whether the target fields are numerical or textual. This allows for the classification of feature parameters according to field type and the matching of differentiated association analysis paths for different parameter types. It determines the temporal dependencies between project events corresponding to the numerical first feature parameters (e.g., if the maintenance start time is earlier than the online acceptance time, a temporal dependency anomaly is triggered, indicating that the maintenance phase began before acceptance was completed, resulting in a disordered project execution order). It can capture logical constraints on the event execution order (e.g., online acceptance can only begin after design and development are completed). It also determines the content representation relationships between the text content corresponding to the textual second feature parameters (e.g., if the description of "construction goal achievement" in the acceptance report and the description of "construction goals" in the feasibility study report have no semantic correspondence, such as if the acceptance goals far exceed or deviate from the feasibility study goals, a content representation anomaly is triggered, indicating that the project goals have deviated during execution without proper explanation). This allows for the discovery of semantic interrelationships in the text descriptions (e.g., semantic consistency between acceptance conclusions and maintenance records). Furthermore, the content constraint relationship between the project event corresponding to the first feature parameter and the text content corresponding to the second feature parameter is determined (e.g., whether the mandatory boundary conditions are met between numerical records and text descriptions, and whether the parameter values meet the specified values). This enables the establishment of cross-category constraint channels between numerical event records and text description information (e.g., consistency constraints between project duration values and progress description text; for example, limiting 35kV ∈ [10kV, 35kV], and triggering a constraint violation if subsequent related data exceeds the range). Finally, the temporal dependency relationship, content representation relationship, and content constraint relationship are all incorporated as components of the feature association relationship. This ensures that when determining the risk status of each project feature parameter based on this feature association relationship, the event logic of numerical features and the semantic logic of text features can be comprehensively considered for a holistic judgment, avoiding misjudgment of risk status due to the separation of the relationship between the two types of data.
[0150] Specifically, S5 may also include: determining the reference file data of the reference project file within the reference period; determining the data deviation characteristics between the reference file data and the target file data; and determining the content risk parameters of the target project file based on the data deviation characteristics, multiple project feature parameters, and the target text.
[0151] Based on the above, the reference file data for the reference project file within the reference period is determined, and the reference file data is compared with the target file data to identify the data deviation characteristics between the two. This introduces an external reference benchmark for the target file data, allowing the current file to be evaluated to be placed in the longitudinal time series or horizontal project dimension of the same or similar projects for difference quantification. Furthermore, based on the data deviation characteristics, multiple project feature parameters, and the target text, the content risk parameters of the target project file are determined. The deviation information provided by the reference data can be used to correct and calibrate the project feature parameters, ensuring that features deviating from the reference benchmark are given higher weight in risk assessment. This avoids omissions or misjudgments caused by relying solely on isolated threshold judgments, thereby further improving the comprehensiveness and accuracy of content risk detection.
[0152] The following description, with specific examples, will further illustrate this point.
[0153] St1, Data Preprocessing;
[0154] It covers key aspects such as data requirements analysis, data quality verification, and data cleaning and processing (including data integration), and fully complies with the rigid control requirements for basic data in power project documents.
[0155] 1) Data requirements analysis and tracing: Based on the rigid data control objectives, a data requirements table for key data control points was compiled, clarifying that the data coverage scope includes all data and documents from the five major stages of project feasibility study, design and development, online acceptance, operation and maintenance, and offline decommissioning.
[0156] 2) Data quality verification: From five dimensions of data integrity, standardization, rationality, accuracy and consistency, quantitative verification indicators and verification algorithms are designed to conduct a comprehensive quality verification of the acquired detailed data and verify the usability and effectiveness of the data.
[0157] 3) Data cleaning and processing: Based on the data quality verification results, set targeted cleaning and transformation rules, remove invalid data, correct abnormal data, and finally integrate them to form analytical source data that meets business analysis needs.
[0158] St2, Model Building;
[0159] The system automates the entire process from unstructured data parsing to structured data analysis to key element identification. It constructs an OCR text extraction model and an intelligent diagnostic analysis model to provide technical support for anomaly diagnosis. At the same time, it combines business scenario requirements to ensure that the model is adapted to the characteristics of power industry project management.
[0160] 1) OCR text extraction model:
[0161] For unstructured documents (such as feasibility study reports, scanned copies of design drawings, acceptance reports, scanned copies of operation and maintenance records, etc.) in the process of digital project construction, we build efficient and accurate OCR text extraction and recognition models, including model selection, adaptation and optimization, to achieve rapid extraction and intelligent recognition of text information, images, tables of contents, etc.
[0162] 2) Intelligent diagnostic analysis model:
[0163] To address the anomaly diagnosis needs of digital projects in the power industry, an intelligent diagnostic analysis model based on machine learning and deep learning is constructed to identify key control elements, label data, and predict anomalies. This model consists of two sub-models: a key element identification model and a basic anomaly diagnosis model, as detailed below:
[0164] For the key element identification model: the core objective is to automatically identify key control elements (such as construction content, data architecture, integration requirements, source data, project duration, design parameters, acceptance indicators, operation and maintenance frequency, etc.) from structured data (detailed wide tables) and text data extracted by OCR, and to build the model using BERT+CRF.
[0165] For anomaly diagnosis models: Based on the identified key control elements, a multi-algorithm fusion anomaly diagnosis basic model is constructed to adapt to different types of anomaly scenarios.
[0166] St3, Model Training;
[0167] Optimize the parameters of the OCR text extraction and recognition model and the intelligent diagnostic analysis model to improve the model recognition accuracy and anomaly diagnosis precision. Adopt the process of "dataset construction → phased training → parameter optimization → verification testing" to ensure that the model is suitable for the digital project management and control scenario of the power industry.
[0168] St4 integrates diagnostic and recognition algorithm verification for business scenarios;
[0169] Combining the management and control characteristics of the five major business stages of digital project construction in the power industry (feasibility study, design and development, online acceptance, operation and maintenance, and offline decommissioning), the trained and optimized OCR model and intelligent diagnostic analysis model are deeply integrated with the management and control requirements of each business stage. Targeted anomaly diagnosis and identification algorithms are designed and verified to achieve intelligent anomaly diagnosis across all scenarios and processes.
[0170] The core logic of the algorithm is: "Business rule import → key element extraction → abnormal feature matching → diagnostic result output → abnormal level determination". That is, first, the rigid control rules and abnormal judgment standards of each business link are imported, then the key control elements in the project data are extracted through the OCR model and key element recognition model, then the abnormal features are matched through the abnormal diagnosis model, the diagnostic results are output, and finally the abnormal level is determined according to the scope and severity of the abnormal impact.
[0171] St5, Output and Consolidation of Results.
[0172] By integrating the above data preprocessing, model building, model training, and business scenario verification testing, a diagnostic analysis scenario for project construction anomalies in data lifecycle management is formed, realizing the reusability and iterability of the technical solution.
[0173] The above optional implementation methods can achieve at least the following beneficial effects:
[0174] (1) Compared with related technologies, the present invention can fully cover all data carriers of the project file by acquiring target file data containing first project data in a standardized format and second project data in a non-standardized format within the target time period; extracting project feature parameters that characterize the risk status of the file based on the data format of the first project data can fully explore the built-in risk features of structured data; splitting the second project data into multiple data blocks and extracting the content visual features corresponding to each data block can accurately locate the effective information area in the unstructured file; extracting the target text based on the content visual features of each data block can fully restore the business information carried by the unstructured data; combining the project feature parameters from the structured source and the target text from the unstructured source to comprehensively determine the content risk parameters can integrate the two types of data, structured and unstructured, to comprehensively analyze the content risk of the project file, thereby improving the accuracy of content risk detection of the project file, and thus solving the technical problem of inaccurate content risk detection in the related technologies when performing content risk detection on project files.
[0175] (2) Compared with related technologies, this invention determines the target fields corresponding to the feature parameters of each project, and divides the feature parameters of the project into numerical first feature parameters and textual second feature parameters accordingly, which can match differentiated association analysis paths for different types of parameters; then, it determines the temporal dependency relationship between the project events corresponding to the first feature parameter, which can capture the logical constraints on the execution order of events, and determines the content representation relationship between the text content corresponding to the second feature parameter, which can explore the semantic interrelationship of text descriptions; further, it determines the content constraint relationship between the project events corresponding to the first feature parameter and the text content corresponding to the second feature parameter, which can establish a cross-category constraint channel between numerical event records and textual description information; finally, it determines the feature association relationship based on the above three relationships. Since the feature association relationship integrates event temporal logic, text semantic logic and cross-category constraint logic, it can ensure that the multidimensional association information between parameters is fully included in the subsequent risk assessment, and avoid misjudgment of risk status due to the separation of the inherent connection between different types of parameters.
[0176] (3) Compared with related technologies, the present invention first determines the character probability distribution corresponding to the last data block based on the content visual features of the last data block according to the second execution order which is opposite to the first execution order. Then, the character probability distribution corresponding to the next data block is combined with the content visual features of the current data block, and the character probability distribution corresponding to each data block is determined sequentially forward until all data blocks are processed, thus obtaining the second probability distribution corresponding to multiple data blocks. Since the first probability distribution based on the forward order and the second probability distribution based on the backward order are obtained at the same time, the contextual dependency relationship between data blocks can be captured from both the forward and backward directions. Thus, when extracting target text from the second item data by combining the first probability distribution and the second probability distribution, it is ensured that the character prediction of each data block incorporates the contextual information of its adjacent data blocks before and after, avoiding character recognition deviation caused by relying only on information from a single direction.
[0177] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0178] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0179] Example 2
[0180] According to embodiments of the present invention, an apparatus for implementing the above-described method for detecting content risks in project documents is also provided. Figure 4 This is a structural block diagram of a content risk detection device for project documents according to an embodiment of the present invention, such as... Figure 4 As shown, the device includes: a first determining module 402, a second determining module 404, a third determining module 406, a fourth determining module 408, and a fifth determining module 410. The device will be described in detail below.
[0181] The first determining module 402 is used to obtain the target file data of the target project file within the target time period. The target file data includes the first project data and the second project data. The first project data is data whose data format conforms to a predetermined format, and the second project data is data whose data format does not conform to the predetermined format.
[0182] The second determining module 404 is connected to the first determining module 402 and is used to extract multiple project feature parameters from the first project data according to the data format of the first project data. The multiple project feature parameters represent the file risk status of the target project file from different feature dimensions.
[0183] The third determining module 406, connected to the second determining module 404, is used to divide the second project data into multiple data blocks and determine the content visual features corresponding to each of the multiple data blocks.
[0184] The fourth determining module 408, connected to the third determining module 406, is used to extract the target text from the second project data based on the content visual features corresponding to multiple data blocks respectively.
[0185] The fifth determination module 410, connected to the fourth determination module 408, is used to determine the content risk parameters of the target project file based on multiple project feature parameters and the target text.
[0186] It should be noted that the first determining module 402, the second determining module 404, the third determining module 406, the fourth determining module 408, and the fifth determining module 410 mentioned above correspond to steps S102 to S110 in the content risk detection method for implementing project documents. The instances and application scenarios implemented by multiple modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiment 1.
[0187] Example 3
[0188] According to another aspect of the present invention, an electronic device is also provided, comprising: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute instructions to implement the content risk detection method for project files of any of the above embodiments.
[0189] Example 4
[0190] According to another aspect of the present invention, a computer-readable storage medium is also provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the content risk detection method for project files described above.
[0191] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0192] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0193] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0194] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0195] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0196] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0197] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for detecting content risks in project documents, characterized in that, include: Obtain target file data of target project files within a target time period, wherein the target file data includes first project data and second project data, the first project data is data in a predetermined format, and the second project data is data in a predetermined format. Based on the data format of the first project data, multiple project feature parameters are extracted from the first project data, wherein the multiple project feature parameters respectively characterize the file risk status of the target project file from different feature dimensions; The second project data is divided into multiple data blocks, and the content visual features corresponding to each of the multiple data blocks are determined. Based on the visual features of the content corresponding to the multiple data blocks, the target text is extracted from the second project data; Based on the multiple project feature parameters and the target text, the content risk parameters of the target project file are determined.
2. The method according to claim 1, characterized in that, The determination of the content risk parameters of the target project file based on the multiple project feature parameters and the target text includes: Determine the feature relationships among the multiple project feature parameters; Based on the feature correlation relationships among the multiple project feature parameters, determine the parameter risk status corresponding to each of the multiple project feature parameters; Based on the multiple project feature parameters, the parameter risk status corresponding to the multiple project feature parameters, and the target text, the content risk parameters of the target project file are determined.
3. The method according to claim 2, characterized in that, Determining the feature correlation between the multiple project feature parameters includes: Determine the target fields corresponding to the multiple project feature parameters respectively; According to the target fields corresponding to the multiple project feature parameters, the multiple project feature parameters are divided into multiple first feature parameters and multiple second feature parameters. The multiple first feature parameters are project feature parameters whose target fields belong to the first field, and the second feature parameters are project feature parameters whose target fields belong to the second field. The first field is a field used to represent numerical values, and the second field is a field used to represent text other than numerical values. Determine the temporal dependencies between the project events corresponding to the plurality of first feature parameters, and the content representation relationships between the text contents corresponding to the plurality of second feature parameters; Determine the content constraint relationship between the project events corresponding to the plurality of first feature parameters and the text content corresponding to the plurality of second feature parameters; Based on the temporal dependency relationship between the project events corresponding to the plurality of first feature parameters, the content representation relationship between the text content corresponding to the plurality of second feature parameters, and the content constraint relationship between the project events corresponding to the plurality of first feature parameters and the text content corresponding to the plurality of second feature parameters, the feature association relationship between the plurality of project feature parameters is determined.
4. The method according to claim 1, characterized in that, The step of extracting target text from the second project data based on the visual features of the content corresponding to the multiple data blocks includes: According to the first execution order corresponding to the plurality of data blocks, based on the content visual features of the first project data block, the character probability distribution corresponding to the first project data block is determined; based on the character probability distribution corresponding to the first project data block and the content visual features of the second project data block, the character probability distribution corresponding to the second project data block is determined, until the plurality of data blocks are executed, and the character probability distribution corresponding to the plurality of data blocks under the first execution order is obtained, which is used as the first probability distribution corresponding to the plurality of data blocks respectively; Based on the first probability distribution corresponding to the multiple data blocks, the target text is extracted from the second project data.
5. The method according to claim 4, characterized in that, The step of extracting target text from the second item data based on the first probability distribution corresponding to the multiple data blocks includes: According to the second execution order corresponding to the plurality of data blocks, based on the content visual features of the Nth data block, the character probability distribution corresponding to the Nth data block is determined; based on the character probability distribution corresponding to the Nth data block and the content visual features of the (N-1)th data block, the character probability distribution corresponding to the (N-1)th data block is determined, until the plurality of data blocks are executed, and the character probability distribution corresponding to the plurality of data blocks under the second execution order is obtained, which is used as the second probability distribution corresponding to the plurality of data blocks, wherein the second execution order is the reverse of the first execution order, and N is the total number of the plurality of data blocks; Based on the first probability distribution corresponding to the plurality of data blocks and the second probability distribution corresponding to the plurality of data blocks, the target text is extracted from the second project data.
6. The method according to claim 1, characterized in that, The determination of the content risk parameters of the target project file based on the multiple project feature parameters and the target text includes: Based on the multiple project feature parameters, multiple parameter combinations are determined, wherein each of the multiple parameter components includes at least two project feature parameters; Determine the combined risk patterns corresponding to the parameter combinations, and the risk trigger boundaries corresponding to the multiple project characteristic parameters; Multiple risk words are extracted from the target text, and the word association relationships between the multiple risk words are determined; Based on the multiple risk words and the word association relationships between the multiple risk words, the text semantic risk corresponding to the target text is determined; Based on the combined risk patterns corresponding to the parameter combinations, the risk trigger boundaries corresponding to the multiple project feature parameters, and the text semantic risk, the content risk parameters of the target project file are determined.
7. The method according to any one of claims 1 to 6, characterized in that, Based on the multiple project feature parameters and the target text, the content risk parameters of the target project file are determined, including: Determine the reference document data for the referenced project documents within the referenced time period; Determine the data deviation characteristics between the reference file data and the target file data; Based on the data deviation characteristics, the multiple project feature parameters, and the target text, the content risk parameters of the target project file are determined.
8. A device for detecting content risks in project documents, characterized in that, include: The first determining module is used to obtain target file data of the target project file within a target time period, wherein the target file data includes first project data and second project data, the first project data is data in a predetermined format, and the second project data is data in a predetermined format. The second determining module is used to extract multiple project feature parameters from the first project data according to the data format of the first project data, wherein the multiple project feature parameters respectively characterize the file risk status of the target project file from different feature dimensions; The third determining module is used to divide the second project data into multiple data blocks and determine the content visual features corresponding to each of the multiple data blocks. The fourth determining module is used to extract the target text from the second project data based on the content visual features corresponding to the multiple data blocks respectively; The fifth determining module is used to determine the content risk parameters of the target project file based on the multiple project feature parameters and the target text.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the content risk detection method for project documents as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the content risk detection method for the project document as described in any one of claims 1 to 7.