A hidden danger rectification closed loop auditing method and device and a storage medium

By using feature encoding and dual attention encoding of hazard, standard, and rectification texts, combined with a joint extraction model, the inconsistency and untraceability issues caused by manual review in existing technologies are resolved, achieving automation and traceability of closed-loop review for hazard rectification.

CN123180170APending Publication Date: 2026-11-27CHINA WUZHOU ENG GRP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611676853.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-28
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

The existing closed-loop audit method for hazard rectification relies on manual review, which leads to inconsistent audit standards, difficulty in achieving full coverage, and lack of traceability.

Method used

By performing digital indexing and word embedding mapping on the texts containing potential hazards, standard texts, and rectification texts, features are generated and then subjected to dual attention encoding. A joint extraction model is used for entity recognition, relationship determination, and compliance verification, and structured triples are output to achieve automated review.

Benefits of technology

It achieves semantic binding between potential risks and standard texts, automatic matching of non-compliant standards, and compliance verification of rectification texts, realizing a standardized, automated, and traceable audit process throughout the entire process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180170A_ABST
    Figure CN123180170A_ABST
Patent Text Reader

Abstract

The application discloses a hidden danger rectification closed-loop auditing method and device and a storage medium, and relates to the technical field of hidden danger investigation. The method comprises the following steps: carrying out digital index coding and word embedding mapping on hidden danger text, standard text and rectification text, and respectively generating corresponding hidden danger text features, standard text features and rectification text features; performing first double attention coding on the hidden danger text features and the standard text features to generate first fusion features; inputting the first fusion features into a joint extraction model to determine whether the hidden danger violates the provisions of the standard text; in the case that the hidden danger violates the provisions of the standard text, performing second double attention coding on the first fusion features and the rectification text features to determine second fusion features; and inputting the second fusion features into the joint extraction model to determine whether the rectification text meets the provisions of the standard text. Thus, the application realizes the full-process standardization, automation and traceable processing of hidden danger violation determination and rectification closed-loop verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hazard identification technology, and in particular to a method, apparatus and storage medium for closed-loop auditing of hazard rectification. Background Technology

[0002] Closed-loop auditing of hazard rectification is a key control link in the industrial safety hazard management system. Its essence is to address various safety hazards discovered during inspections. It utilizes standardized procedures, relevant experience, and requirements to establish a traceable, end-to-end review and control mechanism that encompasses the entire process from hazard violation determination, rectification task implementation, rectification effectiveness verification, and issue archiving and closure. The core objective of this review and control mechanism is to ensure that all safety hazards are traceable, rectification is justifiable, and problems are completely eliminated, preventing loopholes such as hazard recurrence, false rectification, and partial rectification. It is a crucial means to achieve proactive prevention and standardized management of safety hazards throughout the entire process.

[0003] For example, the invention with publication number CN115994187A, entitled "A Method and System for Full-Lifecycle Safety Management of Hazards Based on Distributed Collaboration," includes the following steps: S1, constructing a comprehensive hazard database and partitioning it; S2, collecting historical hazard data and real-time hazard information and uploading them to the comprehensive hazard database; S3, the server retrieves real-time hazard information and historical hazard data according to the type of real-time hazard information, performs data analysis, and visualizes the analyzed data; S4, the analyzed data is manually reviewed and classified, and the real-time hazard information is stored in the database according to the classification results; S5, the hazard information is pushed to the maintenance personnel according to their work tasks and the severity of the real-time hazard information.

[0004] For example, the invention with publication number CN113157783A, entitled "An Engineering Rectification Service System and Method," includes a data processing module, an acceptance equipment terminal, an inspection client, a rectification client, an acceptance database, a specialist database, a standard hazard database, a real-time hazard database, and a management client. The inspection client, the acceptance equipment terminal, the rectification client, and the management client are each connected to the communication port group of the data processing module via a wireless module. The storage port group of the data processing module is connected to the standard hazard database, the real-time hazard database, the acceptance database, and the specialist database.

[0005] However, most enterprises still rely heavily on manual review of safety regulations and experience to verify the effectiveness of rectification in their closed-loop hazard audits. This reveals three prominent problems in practice. First, manual review is highly subjective; different auditors often have different standards for judging similar hazards, leading to inconsistent audit criteria and even omissions or lenient approvals. Second, the mapping between hazards and corresponding safety regulations relies heavily on personal experience, lacking systematic and precise benchmarking, and failing to cover all potential compliance requirements. Third, the rectification verification process lacks standardized, traceable, and intelligent verification methods. Relying solely on subjective manual judgment of rectification adequacy cannot achieve standardized closed-loop management of the entire hazard management process.

[0006] There are currently no effective solutions to the technical problems in the existing closed-loop audit methods for addressing potential hazards, which rely heavily on manual audits, resulting in inconsistent audit standards, difficulty in achieving full audit coverage, and a lack of traceability in the verification process. Summary of the Invention

[0007] The embodiments of this disclosure provide a method, apparatus, and storage medium for closed-loop auditing of hazard rectification, which at least solves the technical problems in the prior art where existing closed-loop auditing methods for hazard rectification rely heavily on manual auditing, resulting in inconsistent audit standards, difficulty in achieving full audit coverage, and a lack of traceable verification processes.

[0008] According to one aspect of the present disclosure, a closed-loop audit method for hazard rectification is provided, comprising: performing digital index encoding and word embedding mapping on hazard text, standard text, and rectification text corresponding to each hazard to generate corresponding hazard text features, standard text features, and rectification text features respectively; performing first dual attention encoding on the hazard text features and standard text features to generate a first fusion feature corresponding to the standard text features, wherein the first fusion feature contains the semantics of the hazard text and the standard text; inputting the first fusion feature into a joint extraction model for detecting non-compliance relationships to determine whether the hazard violates the provisions of the standard text; if the hazard violates the provisions of the standard text, performing second dual attention encoding on the first fusion feature and rectification text features to determine a second fusion feature corresponding to the standard text, wherein the second fusion feature contains the semantics of the hazard text, the standard text, and the rectification text; and inputting the second fusion feature into the joint extraction model to determine whether the rectification text meets the provisions of the standard text.

[0009] According to another aspect of the present disclosure, a storage medium is also provided, the storage medium including a stored program, wherein, when the program is executed, a processor performs any of the methods described above.

[0010] According to another aspect of the present disclosure, a closed-loop audit device for hazard rectification is also provided, comprising: an encoding mapping module, used to perform digital index encoding and word embedding mapping on the hazard text, standard text, and rectification text corresponding to each hazard, respectively generating corresponding hazard text features, standard text features, and rectification text features; a first fusion feature generation module, used to perform a first dual attention encoding on the hazard text features and standard text features, generating a first fusion feature corresponding to the standard text features, wherein the first fusion feature contains the semantics of the hazard text and the standard text; a first determination module, used to input the first fusion feature into a joint extraction model for detecting non-compliance relationships, and determine whether the hazard violates the provisions of the standard text; a second fusion feature determination module, used to perform a second dual attention encoding on the first fusion feature and rectification text features when the hazard violates the provisions of the standard text, determining a second fusion feature corresponding to the standard text, wherein the second fusion feature contains the semantics of the hazard text, the standard text, and the rectification text; and a second determination module, used to input the second fusion feature into the joint extraction model, and determine whether the rectification text meets the provisions of the standard text.

[0011] According to another aspect of the present disclosure, a closed-loop audit device for hazard rectification is also provided, comprising: a processor; and a memory connected to the processor, configured to provide the processor with instructions for processing the following steps: performing digital index encoding and word embedding mapping on hazard text, standard text, and rectification text corresponding to each hazard to generate corresponding hazard text features, standard text features, and rectification text features respectively; performing first dual attention encoding on the hazard text features and standard text features to generate a first fusion feature corresponding to the standard text features, wherein the first fusion feature contains the semantics of the hazard text and the standard text; inputting the first fusion feature into a joint extraction model for detecting non-compliance relationships to determine whether the hazard violates the provisions of the standard text; if the hazard violates the provisions of the standard text, performing second dual attention encoding on the first fusion feature and rectification text features to determine a second fusion feature corresponding to the standard text, wherein the second fusion feature contains the semantics of the hazard text, the standard text, and the rectification text; and inputting the second fusion feature into the joint extraction model to determine whether the rectification text meets the provisions of the standard text.

[0012] This application first performs digital index encoding and word embedding mapping on the hazard text, standard text, and rectification text, respectively, to generate dimensionally unified hazard text features, standard text features, and rectification text features. Then, a first dual attention encoding is applied to the hazard text features and standard text features to achieve fine-grained semantic binding between the standard text and the hazard description, generating a first fusion feature corresponding to the standard text features. Further, this first fusion feature is input into a joint extraction model to simultaneously complete entity recognition, relationship determination, and prediction of the first compliance three-class label, outputting a first structured triplet. Subsequently, based on the value of the first compliance three-class label, it is determined whether the current standard text is the violation standard text corresponding to the hazard.

[0013] Given that the current potential hazard violates the standard text, a second dual-attention encoding is applied to the first fusion feature and the rectification text feature to generate a second fusion feature containing the semantics of the hazard text, the standard text, and the rectification text. Next, this second fusion feature is input into the joint extraction model, which simultaneously performs entity recognition, relationship determination, and prediction of the second compliance three-class label, outputting a second structured triplet. Thus, based on the value of the second compliance three-class label, it can be determined whether the current rectification text meets the requirements of the standard text.

[0014] This application achieves semantic binding between hidden danger text features, standard text features, and rectification text features through dual attention encoding, enabling automatic matching of violation standards and compliance verification between rectification text and violation standards. Simultaneously, a joint extraction model completes entity recognition, relationship determination, and compliance three-class label prediction, outputting traceable structured triples and judgment results. Thus, this application achieves standardized, automated, and traceable processing of the entire process of hidden danger violation judgment and rectification closed-loop verification. This solves the technical problems of existing hidden danger rectification closed-loop audit methods that rely heavily on manual review, resulting in inconsistent audit standards, difficulty in achieving full audit coverage, and a lack of traceability in the verification process. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this application, illustrate exemplary embodiments of this disclosure and are used to explain this disclosure, but do not constitute an undue limitation of this disclosure. In the drawings: Figure 1 This is a hardware structure block diagram of a computing device for implementing the method according to Embodiment 1 of this disclosure; Figure 2 This is a flowchart illustrating the closed-loop audit method for hazard rectification according to Embodiment 1 of this disclosure; Figure 3 This is a schematic diagram of text feature generation according to the method described in Embodiment 1 of this disclosure; Figure 4 This is a schematic flowchart of the first joint extraction according to the method described in Embodiment 1 of this disclosure; Figure 5 This is a flowchart illustrating the first dual attention encoding method according to Embodiment 1 of this disclosure; Figure 6 This is a schematic flowchart of the second joint extraction according to the method described in Embodiment 1 of this disclosure; Figure 7 This is a flowchart illustrating the second dual attention encoding method according to Embodiment 1 of this disclosure; Figure 8 This is a schematic diagram of the closed-loop audit device for hazard rectification according to Embodiment 2 of this disclosure; Figure 9 This is a schematic diagram of the closed-loop audit device for hazard rectification according to Embodiment 3 of this disclosure. Detailed Implementation

[0016] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this disclosure.

[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure 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 this disclosure 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 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.

[0018] Example 1

[0019] According to this embodiment, a method embodiment for closed-loop audit of hidden danger rectification 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. 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.

[0020] The method embodiments provided in this example can be executed on mobile terminals, computer terminals, servers, or similar computing devices. Figure 1 A hardware structure block diagram of a computing device for implementing a closed-loop audit method for hazard rectification is shown. Figure 1 As shown, a computing device may include one or more processors (processors may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory for storing data, a transmission device for communication functions, and an input / output interface. The memory, transmission device, and input / output interface are connected to the processor via a bus. In addition, it may also include a display, keyboard, and cursor control device connected to the input / output interface. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, a computing device may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0021] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element in a computing device. As involved in the embodiments of this disclosure, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0022] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the closed-loop audit method for hazard rectification in the embodiments of this disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned closed-loop audit method for hazard rectification of the application. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the computing device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0023] The transmission device is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the computing device's communication provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0024] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows users to interact with the user interface of the computing device.

[0025] It should be noted here that, in some optional embodiments, the above... Figure 1 The computing device shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computing devices.

[0026] Under the aforementioned operating environment, according to the first aspect of this embodiment, a closed-loop audit method for hazard rectification is provided. This method comprises... Figure 1 The computing device shown is implemented. Figure 2 A flowchart illustrating the method is shown below. (Refer to...) Figure 2 As shown, the method includes: S202: Perform digital index encoding and word embedding mapping on the hazard text, standard text and rectification text corresponding to each hazard to generate corresponding hazard text features, standard text features and rectification text features respectively; S204: Perform a first dual attention encoding on the hidden danger text features and the standard text features to generate a first fusion feature corresponding to the standard text features, and the first fusion feature contains the semantics of the hidden danger text and the standard text; S206: Input the first fusion feature into the joint extraction model used to detect non-compliant relationships, and determine whether the potential risk violates the provisions of the standard text; S208: When a potential hazard violates the provisions of the standard text, a second dual attention encoding is performed on the first fusion feature and the rectification text feature to determine the second fusion feature corresponding to the standard text, and the second fusion feature contains the semantics of the potential hazard text, the standard text, and the rectification text; S210: Input the second fusion feature into the joint extraction model to determine whether the rectified text meets the requirements of the standard text.

[0027] Specifically, in combination Figure 3 As shown, the computing device will associate the hazard text with each hazard. Standard text and rectification text Input the digital encoding layer for digital index encoding.

[0028] Each hidden danger corresponds to a specific hidden danger text. The word sequence is represented as: n represents the hidden danger text. The length of the word sequence. Meanwhile, the standard text corresponding to each potential hazard. ( The word sequence (for standard clause numbers) is represented as follows: , For the first The standard text corresponding to each standard clause The length of the word sequence. In addition, the rectification text corresponding to each hidden danger. The word sequence is represented as: t is the word sequence length of the text Z to be rectified.

[0029] Next, the computing device performs word embedding mapping on the input word embedding layer of the digitally indexed hazard text, standard text, and rectification text, generating hazard text features with uniform dimensions. Standard text features and rectification text features (Corresponding to step S202).

[0030] Further, refer to Figure 4 and Figure 5 As shown, the computing device detects the text features of potential hazards. Features of Standard Text A first dual-attention encoding is performed. This first dual-attention encoding employs a bidirectional cross-attention mechanism, including a first cross-attention encoding and a first self-attention encoding. The first cross-attention encoding is used to achieve fine-grained semantic binding between the standard text and the hazard description. The first self-attention encoding is used to generate features related to the standard text. The corresponding first fusion feature The first fusion feature Includes hazard text X and standard text The semantics are used to accurately filter out the non-compliant standard texts corresponding to potential risks (corresponding to step S204).

[0031] Next, the computing device will use the first fusion feature Input the trained joint extraction model, simultaneously perform entity recognition, relationship determination, and prediction of the first compliant three-class labels, and output the first set of structured triples: ; in, Indicates the first entity. Let represent the first tail entity, and both belong to the set of hidden entity E; The first entity and the first tail entity are connected by a relationship type that belongs to the entity relationship set; L represents the first compliance three-category label, which is used to characterize the category of the entity relationship described by the first structured triplet set at the security compliance level.

[0032] Taking the field of safety hazards as an example, the computing device can set the set of hazard entities E into the following categories: 1. Physical sources of ignition and hazardous equipment: aging electrical wires, short-circuited circuits, high-power electrical appliances, temporary hot work equipment, and distribution boxes; 2. Combustible materials and hazardous chemicals: textiles, cardboard boxes, plastic consumables, combustible boards, drums of flammable solvents, and hazardous chemical materials; 3. Safety facilities and components: fire doors, fire extinguishers, leakage alarms, residual current devices, evacuation routes, and isolation and protection facilities; 4. Entities involved in safety management: warehouse inspection, on-site verification, equipment maintenance, hazard control, and record management.

[0033] At the same time, the computing device can set the entity relationship set as follows: 1. Non-compliant relationships: close proximity, missing equipment, blocked passageways, expired equipment, failure to conduct on-site inspections, damaged facilities not replaced, and inadequate performance of duties; 2. Compliance: Spacing is compliant, on-time inspections are conducted, routine maintenance is performed, passageways are unobstructed, equipment is complete and in good working order, and on-site verification is thorough; 3. Neutral and irrelevant relationships: routine equipment storage, daily office operations, and non-scenario matching behaviors.

[0034] In addition, computing devices will be subject to the first compliance three-category label. Defined as: L=1, in compliance with regulations: This indicates that the entity and its behavior meet the requirements of safety standards and specifications, there are no compliance risks, and the rectification status is up to standard; L=2, not in compliance with regulations: This indicates that the entity and its behavior violate safety standards and regulations, constitute a safety hazard, and the rectification status has not met the requirements; L=3, irrelevant: This indicates that there is no correlation between the entity and its behavior and the current standard text and hazard description, and the rectification measures do not cover the corresponding compliance requirements.

[0035] Thus, the computing device can output the first compliant three-classification label based on the first structured triplet set. The value of is used to determine whether the current standard text is the non-compliant standard text corresponding to the hidden danger (corresponding to step S206), that is: When L=2, the computing device determines that the current standard text is the non-compliant standard text that the current hidden danger violates, and includes the standard text in the non-compliant standard text set; When L=1 or L=3, the computing device determines that there is no violation association between the current standard text and the current hidden danger, and removes the corresponding first compliance three-category label, which is not used as the basis for violation determination.

[0036] Subsequently, reference Figure 6 and Figure 7 As shown, under the premise that the computing device has determined that the current hidden danger violates the standard text provisions, that is, when the first compliance three-category label L=2, the computing device applies the first fusion feature. and rectification text features A second dual-attention encoding is performed. This dual-attention encoding employs a bidirectional cross-attention mechanism, including a second cross-attention encoding and a second self-attention encoding. The second cross-attention encoding is used to implement the first fused feature. Fine-grained semantic binding with rectification measures. The second self-attention encoding is used to generate text containing potential hazards. Standard text and rectification text Second fusion feature of semantics (Corresponding to step S208).

[0037] Furthermore, the computing device encodes the second dual attention to generate a second fusion feature. Input the joint extraction model. This joint extraction model simultaneously performs entity recognition, relationship determination, and prediction of the second compliant three-class labels, and outputs the second structured triplet, which takes the following form: ; in, This refers to the second entity in the rectification text. This represents the second-to-last entity in the rectification text, both of which belong to the set of hidden danger entities E; This indicates the type of relationship connecting the second-head entity and the second-tail entity, and belongs to the entity relationship set. The second compliance three-category label is used to characterize the category of the entity relationship described by the second structured triplet set at the rectification compliance level.

[0038] Among them, computing devices will be categorized under the second compliance category. Defined as: =1, in compliance with regulations: the rectification measures meet the compliance requirements of the corresponding standard text; =2, not in compliance with regulations: the rectification measures did not meet the compliance requirements of the corresponding standard text, and potential risks still exist; =3, Irrelevant: There is no correlation between the rectification measures and the corresponding standard text and hazard description, and the rectification does not cover the compliance requirement.

[0039] Therefore, the computing device can be classified according to the second compliance three-category label. The value of is used to determine whether the current rectification text meets the requirements of the standard text (corresponding to step S210). That is: If all the non-compliant standard texts corresponding to the current hidden danger are output as "compliant" after the second joint extraction by the joint extraction model, then the calculation device determines that the rectification text meets the requirements of all standard texts, the hidden danger has been completely eliminated, and the closed-loop audit is passed.

[0040] If any non-compliant standard text corresponds to a second compliance category label of "non-compliant" or "irrelevant", the computing device will determine that the rectification text fails to meet the requirements of all standard texts, the closed-loop audit will fail, the rectification task will be rejected, and a detailed list of non-compliance with the corresponding standards will be output.

[0041] As described in the background section, most enterprises currently rely primarily on manual review of safety regulations and experience-based verification of rectification effectiveness for closed-loop hazard audits. This practice reveals three prominent problems: First, manual review is highly subjective; different auditors often have different standards for judging similar hazards, leading to inconsistent audit criteria and even omissions or lenient approvals. Second, the mapping between hazards and corresponding safety regulations relies heavily on personal experience, lacking systematic and precise benchmarking, and failing to cover all potential compliance requirements. Third, the rectification verification process lacks standardized, traceable, and intelligent verification methods. Relying solely on subjective manual judgment of rectification adequacy cannot achieve standardized closed-loop management of the entire hazard management process.

[0042] In view of this, this application first performs digital index encoding and word embedding mapping on the hazard text, standard text, and rectification text respectively, generating dimensionally unified hazard text features, standard text features, and rectification text features. Then, the hazard text features and standard text features are subjected to a first dual attention encoding to achieve fine-grained semantic binding between the standard text and the hazard description, generating a first fusion feature corresponding to the standard text features. Further, this first fusion feature is input into a joint extraction model to simultaneously complete entity recognition, relationship determination, and prediction of the first compliance three-class label, outputting a first structured triplet. Subsequently, based on the value of the first compliance three-class label, it is determined whether the current standard text is the violation standard text corresponding to the hazard.

[0043] Given that the current potential hazard violates the standard text, a second dual-attention encoding is applied to the first fusion feature and the rectification text feature to generate a second fusion feature containing the semantics of the hazard text, the standard text, and the rectification text. Next, this second fusion feature is input into the joint extraction model, which simultaneously performs entity recognition, relationship determination, and prediction of the second compliance three-class label, outputting a second structured triplet. Thus, based on the value of the second compliance three-class label, it can be determined whether the current rectification text meets the requirements of the standard text.

[0044] This application achieves semantic binding between hidden danger text features, standard text features, and rectification text features through dual attention encoding, enabling automatic matching of violation standards and compliance verification between rectification text and violation standards. Simultaneously, a joint extraction model completes entity recognition, relationship determination, and compliance three-class label prediction, outputting traceable structured triples and judgment results. Thus, this application achieves standardized, automated, and traceable processing of the entire process of hidden danger violation judgment and rectification closed-loop verification. This solves the technical problems of existing hidden danger rectification closed-loop audit methods that rely heavily on manual review, resulting in inconsistent audit standards, difficulty in achieving full audit coverage, and a lack of traceability in the verification process.

[0045] Optionally, the first dual attention encoding includes a first cross-attention encoding and a first self-attention encoding, and the operation of performing the first dual attention encoding on the potential danger text features and the standard text features to generate a first fusion feature corresponding to the standard text features includes: performing the first cross-attention encoding on the potential danger text features and the standard text features to generate a third fusion feature corresponding to the standard text features, the third fusion feature being used to realize the semantic fusion of the potential danger text and the standard text; and performing the first self-attention encoding on the third fusion feature to generate the first fusion feature.

[0046] Specifically, computing devices use standard text features As a query vector, using the text features of potential risks The key and value vectors are used for the first cross-attention encoding. Then, the computing device uses a learnable weight matrix to encode the standard text features. Mapped to the first query matrix, the hidden danger text features are... The mapping is performed using a first key matrix and a first value matrix, thereby generating standard text features through a first cross-attention encoding. The corresponding third fusion feature. This third fusion feature, while preserving the original semantics of the standard text, incorporates hazard descriptions related to the standard text, achieving semantic fusion between the hazard text and the standard text, and establishing a fine-grained semantic correspondence between the hazard description and the standard text.

[0047] Next, the computing device performs a first self-attention encoding on the third fused feature to generate a first fused feature. This first self-attention encoding operation, based on the semantics of the introduced third fusion feature, further enhances the long-distance dependency between entities within the third fusion feature and the violation relationship, thus strengthening the representation of potential compliance features closely related to violation determination.

[0048] Thus, through the above methods, the first cross-attention encoding achieves semantic fusion between the hidden danger text and the standard text, and the first self-attention encoding achieves feature enhancement based on the fused semantics. Together, they constitute the complete first dual attention encoding operation.

[0049] Optionally, the operation of performing a first cross-attention encoding on the hidden danger text features and the standard text features to generate a third fusion feature corresponding to the standard text features includes: defining a first key weight matrix corresponding to the hidden danger text features, and generating a first key matrix corresponding to the hidden danger text features based on the first key weight matrix and the hidden danger text features; defining a first value weight matrix corresponding to the hidden danger text features, and generating a first value matrix corresponding to the hidden danger text features based on the first value weight matrix and the hidden danger text features; defining a first query weight matrix corresponding to the standard text features, and generating a first query matrix corresponding to the standard text features based on the first query weight matrix and the standard text features; and determining the third fusion feature based on the first key matrix, the first value matrix, and the first query matrix through the first cross-attention encoding.

[0050] Specifically, refer to Figure 5 As shown, the computing device detects the text features of potential hazards. and standard text features The steps for performing the first cross-attention encoding to generate the third fusion feature corresponding to the standard text features are as follows: First, the definition of computing devices and the textual characteristics of potential hazards. The corresponding first key weight matrix Thus, the computing device can be based on the first key weight matrix. and hidden danger text features Generate the first key matrix corresponding to the text features of potential hazards. The specific calculation formula is as follows: (1) In addition, the definition of computing devices and the textual characteristics of potential hazards The corresponding first-value weight matrix Thus, the computing device can calculate based on the first value weight matrix. and hidden danger text features Generate and identify potential hazards in textual features. The corresponding first-value matrix The specific calculation formula is as follows: (2) Meanwhile, the definition of computing devices and standard text features The corresponding first query weight matrix And based on the first query weight matrix and standard text features Generate features similar to standard text. The corresponding first query matrix The specific calculation formula is as follows: (3) Thus, the computing device can be based on the first key matrix. First-value matrix and the first query matrix The third fusion feature is determined through the first cross-attention encoding. .Right now: (4) Among them, the computing device is based on the first query matrix With the first key matrix Calculate the first dot product similarity, after scaling factor After normalization, a first attention weight distribution is generated using the softmax function, and then this first attention weight distribution is applied to the first value matrix. Weighted aggregation yields features similar to standard text. The corresponding third fusion feature .

[0051] Thus, the third fusion feature generated in the above way retains the original semantics of the standard text while incorporating the contextual information related to the standard text in the hazard description, thereby achieving semantic fusion between the hazard text and the standard text.

[0052] Optionally, the operation of generating the first fusion feature by performing a first self-attention encoding on the third fusion feature includes: defining a second key weight matrix, a second value weight matrix, and a second query weight matrix corresponding to the third fusion feature; determining the second key matrix based on the third fusion feature and the second key weight matrix; determining the second value matrix based on the third fusion feature and the second value weight matrix; determining the second query matrix based on the third fusion feature and the second query weight matrix; and determining the first fusion feature by first self-attention encoding based on the second key matrix, the second value matrix, and the second query matrix.

[0053] Specifically, please refer to Figure 5 As shown, the computing device encodes the third fusion feature generated after the first cross-attention encoding. Perform the first self-attention encoding.

[0054] Specifically, computing devices first define the third fusion feature. The corresponding second bond weight matrix Second-value weight matrix Second query weight matrix .

[0055] Then the computing device calculates based on the third fusion feature. Second bond weight matrix Determine the second bond matrix The specific calculation formula is as follows: (5) Next, the computing device, based on the third fusion feature Second-value weight matrix Determine the second value matrix The specific calculation formula is as follows: (6) Furthermore, the computing device is based on the third fusion feature Second query weight matrix Determine the second query matrix The specific calculation formula is as follows: (7) Finally, the computing device uses the second key matrix. Second-value matrix Second query matrix The first fusion feature is determined through the first self-attention encoding. The specific calculation formula is as follows: (8) The computing device uses the second query matrix. With the second bond matrix Calculate the second dot product similarity, after scaling factor. After normalization, a second attention weight distribution is generated using the softmax function, and then this second attention weight distribution is applied to the second value matrix. Weighted aggregation yields features similar to standard text. The corresponding first fusion feature .

[0056] Thus, the first fusion feature containing the semantics of both the potential danger text and the standard text can be identified through the above methods, and can then be used to screen the non-compliant standard text corresponding to the potential danger.

[0057] Optionally, the second dual attention encoding includes a second cross-attention encoding and a second self-attention encoding. The operation of performing second dual attention encoding on the first fusion feature and the rectification text feature to determine the second fusion feature corresponding to the standard text when the potential hazard violates the standard text includes: performing second cross-attention encoding on the first fusion feature and the rectification text feature to generate a fourth fusion feature corresponding to the standard text feature, the fourth fusion feature being used to achieve semantic fusion between the rectification text and the standard text; and performing second self-attention encoding on the fourth fusion feature to generate the second fusion feature.

[0058] Specifically, if the computing device has been determined to have a hidden danger that violates the standard text, the computing device shall use the first fusion feature. As a query vector, to rectify text features The key vector and value vector are used for the second cross-attention encoding.

[0059] Then, the computing device uses a learnable weight matrix to refine the text features. The mapping is to a third key matrix and a third value matrix, while the third query matrix no longer undergoes weight matrix transformation, but instead uses the first fusion feature. Thus, the computing device can generate a fourth fused feature through the second cross-attention encoding. Among them, the fourth fusion feature First fusion feature Based on this, further information on rectification measures related to the current violation determination was incorporated into the rectification text, achieving a fusion feature between the rectification text and the first feature. Semantic fusion was used to establish a fine-grained semantic correspondence between rectification measures and non-compliance standards.

[0060] Furthermore, computing devices support the fourth fusion feature. Perform a second self-attention encoding to generate a second fusion feature. The second self-attention encoding operation introduces rectification and first fusion features. Based on this, further explore the first fusion feature The long-distance dependencies between internal semantics strengthen the feature representations that are closely related to rectification and compliance judgments, and filter out invalid semantic noise.

[0061] Thus, through the above methods, the second cross-attention encoding achieves semantic fusion between the rectification text and the first fusion feature under the condition that the hidden danger violates the standard text. The second self-attention encoding achieves feature enhancement based on the fused semantics, and thus the two together constitute a complete second dual attention encoding operation.

[0062] Optionally, the operation of performing a second cross-attention encoding on the first fused feature and the rectified text feature to generate a fourth fused feature corresponding to the standard text feature includes: using the first fused feature as a third query matrix; defining a third key weight matrix and a third value weight matrix corresponding to the rectified text feature; determining the third key matrix based on the rectified text feature and the third key weight matrix; determining the third value matrix based on the rectified text feature and the third value weight matrix; and determining the fourth fused feature through the second cross-attention encoding based on the third key matrix, the third value matrix, and the third query matrix.

[0063] Specifically, refer to Figure 7 As shown, the computing device will integrate the first fusion feature. and rectification text features The input is processed through a second cross-attention layer for second cross-attention encoding, thereby generating features similar to those in standard text. The operation for the corresponding fourth fusion feature is as follows: First, the computing device will integrate the first feature. As the third query matrix ,Right now: (9) Next, the characteristics of the computing device definition and rectification text. The corresponding third bond weight matrix and the third-value weight matrix .

[0064] Then, the computing device analyzes the characteristics of the rectification text. and the third bond weight matrix Determine the third bond matrix The specific calculation formula is as follows: (10) Furthermore, the computing device, based on the characteristics of the rectification text... and the third-value weight matrix Determine the third value matrix The specific calculation formula is as follows: (11) Finally, the computing device calculates based on the third key matrix. Third-value matrix and the third query matrix The fourth fusion feature is determined through the second cross-attention encoding. .Right now: (12) Among them, the computing device is based on the third query matrix With the third bond matrix Calculate the third dot product similarity, after scaling factor. After normalization, a third attention weight distribution is generated using the softmax function, and then this third attention weight distribution is applied to the third value matrix. The fourth fusion feature is obtained by weighted aggregation.

[0065] Thus, through the above methods, semantic fusion between the rectification text and the first fusion feature was achieved, and a fine-grained semantic correspondence between rectification measures and violation standards was established.

[0066] Optionally, the operation of generating a second fusion feature by performing a second self-attention encoding on the fourth fusion feature includes: defining a fourth key weight matrix, a fourth value weight matrix, and a third query weight matrix corresponding to the fourth fusion feature; determining a fourth key matrix based on the fourth fusion feature and the fourth key weight matrix; determining a fourth value matrix based on the fourth fusion feature and the fourth value weight matrix; determining a fourth query matrix based on the fourth fusion feature and the third query weight matrix; and determining the second fusion feature by using the second self-attention encoding based on the fourth key matrix, the fourth value matrix, and the fourth query matrix.

[0067] Specifically, please refer to Figure 7 As shown, the computing device encodes the fourth fusion feature through the second cross-attention encoding. Perform a second self-attention encoding to generate a second fusion feature. .

[0068] Specifically, the computing device first defines the fourth fusion feature. The corresponding fourth bond weight matrix Fourth-value weight matrix and the third query weight matrix .

[0069] Then the computing device calculates based on the fourth fusion feature. and the fourth bond weight matrix Determine the fourth bond matrix The specific calculation formula is as follows: (13) Then the computing device uses the fourth fusion feature and the fourth-value weight matrix Determine the fourth value matrix The specific calculation formula is as follows: (14) Furthermore, the computing device is based on the fourth fusion feature and the third query weight matrix Determine the fourth query matrix The specific calculation formula is as follows: (15) Finally, the computing device calculates based on the fourth key matrix. Fourth-value matrix and the fourth query matrix The second fusion feature is determined through a second self-attention encoding. That is: (16) Among them, the computing device uses the fourth query matrix With the fourth bond matrix Calculate the fourth dot product similarity, after scaling factor After normalization, a fourth attention weight distribution is generated using the softmax function, and then this fourth attention weight distribution is applied to the fourth value matrix. The weighted aggregation yields the second fusion feature. .

[0070] Thus, the first fusion feature is obtained through the above methods. By performing a second self-attention encoding, feature enhancement based on semantic fusion is achieved.

[0071] In a specific embodiment of this application, the following example is provided to illustrate the technical solution of this application.

[0072] (a) Input data: a. The hazard report states: "In the No. 2 hazardous chemicals warehouse, a large number of drums of flammable solvents are stacked close to the electrical distribution box; all four dry powder fire extinguishers in the warehouse have expired by three months; the monthly inspection of the warehouse only fills in paper records and does not conduct on-site verification of the safety status of the storage area, indicating inadequate performance of inspection duties." b. The standard text corresponding to this potential hazard text includes the following three clauses: Standard 1: "The minimum safe distance between flammable and explosive hazardous chemicals and electrical distribution boxes shall not be less than 1.5m. It is forbidden to stack them close to electrical equipment to eliminate the risk of ignition at high temperatures." Standard 2: "Fire extinguishing equipment in hazardous chemical warehouses must be inspected and replaced regularly. Expired or ineffective fire extinguishers must not be put into use. Equipment must be kept in good working order at all times." Standard 3: "Monthly safety inspections of hazardous chemical warehouses must include on-site verification within the storage area. Mere paper-based record keeping without on-site verification constitutes non-compliance in the performance of inspection duties." c. The rectification text corresponding to these three standard texts is: "All flammable solvent barrels in the warehouse have been transferred to a dedicated isolated storage area, and the distance between them and the power distribution box has been adjusted to 2 meters; all new qualified dry powder fire extinguishers have been replaced, and the equipment is in good condition; starting next month, the on-site inspection system for entering the warehouse will be strictly implemented to eliminate the problem of inspection by proxy." (ii) First Dual Attention Encoding The computing device uses the standard text features of three standard texts as query vectors and the hidden danger text features as key and value vectors, respectively. It then performs a first dual-attention encoding to generate a first fused feature corresponding to the standard text features. This first fused feature is then input into a joint extraction model for joint entity relation extraction, outputting the first compliant three-class label and the first structured triplet for each standard text. The results are as follows: The result of the standard 1 matching is: (Flammable solvent in drums, stacked close together, electrical box) - does not meet the requirements; The matching result for Standard 2 is: (Dry powder fire extinguisher in warehouse, expired and ineffective, hazardous chemical warehouse) - does not comply with regulations; The standard 3 matching result is: (Monthly warehouse inspection, ledger inspection without on-site verification, storage area) - does not meet the requirements.

[0073] Based on the above output, the computing device categorizes all three standard texts into the set of non-compliant standard texts.

[0074] (ii) Second Dual Attention Encoding The computing device uses the first fusion feature output from the first round as the query vector, and the rectification text features as the key and value vectors, and performs a second dual-attention encoding to generate a second fusion feature corresponding to the standard text features. Then, the computing device inputs this second fusion feature into the joint extraction model to perform joint entity relation extraction again, outputting the second compliance three-class label corresponding to each violation standard text at the rectification compliance level. The results are as follows: The rectification and verification results for Standard 1 are as follows: (Flammable solvents in drums, compliant spacing and isolation, electrical distribution box) - compliant with regulations; The rectification and verification results of Standard 2 are as follows: (Fire extinguishers in the warehouse, all replaced with brand new equipment, hazardous chemical warehouse) - compliant with regulations; The standard 3 rectification and verification result is: (Monthly warehouse inspection, on-site inspection to be carried out next month, storage area) - irrelevant.

[0075] (II) Final Judgment and Output In summary, the rectification measures have effectively addressed the two issues of insufficient distance between barrelled flammable solvents and electrical distribution boxes, and expired or ineffective fire extinguishers. The corresponding second compliance category labels for both Standard 1 and Standard 2 are now "compliant".

[0076] However, regarding the requirement in Standard 3 that "on-site verification must be carried out during the current inspection," the rectification document only states "strictly implemented starting next month," which is a commitment to future actions. It does not provide substantive evidence of completed on-site verification for the current inspection's failure to fulfill its duties in the current inspection corresponding to this hidden danger. Therefore, the verification label of Standard 3 is judged to be "irrelevant."

[0077] Meanwhile, according to the model's judgment rules, if any rectification side has a compliance label of "irrelevant" or "non-compliant" for any violation standard, the computing device is considered to have failed to meet all the requirements of the violation standard, the closed-loop audit will not pass, and the rectification task will be rejected.

[0078] Then the calculation equipment synchronously outputs the details of non-compliance, prompting the following: It is necessary to supplement the warehouse on-site inspection record corresponding to this hidden danger, and resubmit the closed-loop review after completing the on-site verification and rectification of the current period.

[0079] In addition, refer to Figure 1 As shown, according to a second aspect of this embodiment, a storage medium is provided. The storage medium includes a stored program, wherein, when the program is executed, a processor performs any of the methods described above.

[0080] Therefore, according to this embodiment, this application achieves semantic binding between hidden danger text features, standard text features, and rectification text features through dual attention encoding, realizing automatic matching of violation standards, and compliance verification between rectification text and violation standards. Simultaneously, the joint extraction model synchronously completes entity recognition, relationship determination, and compliance three-class label prediction, outputting traceable structured triples and judgment results. Thus, this application achieves standardized, automated, and traceable processing of the entire process of hidden danger violation judgment and rectification closed-loop verification. This solves the technical problems of existing hidden danger rectification closed-loop audit methods that rely heavily on manual review, resulting in inconsistent audit standards, difficulty in achieving full audit coverage, and a lack of traceability in the verification process.

[0081] 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.

[0082] 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 described in the various embodiments of the present invention.

[0083] Example 2

[0084] Figure 8 A closed-loop audit device for hazard rectification according to this embodiment is shown, which corresponds to the method described in Embodiment 1. (Reference) Figure 8 As shown, the device includes: an encoding mapping module 810, used to perform digital index encoding and word embedding mapping on the hazard text, standard text, and rectification text corresponding to each hazard, generating corresponding hazard text features, standard text features, and rectification text features respectively; a first fusion feature generation module 820, used to perform a first dual attention encoding on the hazard text features and standard text features, generating a first fusion feature corresponding to the standard text features, and the first fusion feature contains the semantics of the hazard text and standard text; a first determination module 830, used to input the first fusion feature into a joint extraction model for detecting non-compliance relationships, determining whether the hazard violates the provisions of the standard text; a second fusion feature determination module 840, used to perform a second dual attention encoding on the first fusion feature and rectification text features when the hazard violates the provisions of the standard text, determining a second fusion feature corresponding to the standard text, and the second fusion feature contains the semantics of the hazard text, standard text, and rectification text; and a second determination module 850, used to input the second fusion feature into the joint extraction model, determining whether the rectification text meets the provisions of the standard text.

[0085] Optionally, the first dual attention encoding includes a first cross-attention encoding and a first self-attention encoding, and the operation of performing the first dual attention encoding on the potential danger text features and the standard text features to generate a first fusion feature corresponding to the standard text features includes: performing the first cross-attention encoding on the potential danger text features and the standard text features to generate a third fusion feature corresponding to the standard text features, the third fusion feature being used to realize the semantic fusion of the potential danger text and the standard text; and performing the first self-attention encoding on the third fusion feature to generate the first fusion feature.

[0086] Optionally, the operation of performing a first cross-attention encoding on the hidden danger text features and the standard text features to generate a third fusion feature corresponding to the standard text features includes: defining a first key weight matrix corresponding to the hidden danger text features, and generating a first key matrix corresponding to the hidden danger text features based on the first key weight matrix and the hidden danger text features; defining a first value weight matrix corresponding to the hidden danger text features, and generating a first value matrix corresponding to the hidden danger text features based on the first value weight matrix and the hidden danger text features; defining a first query weight matrix corresponding to the standard text features, and generating a first query matrix corresponding to the standard text features based on the first query weight matrix and the standard text features; and determining the third fusion feature based on the first key matrix, the first value matrix, and the first query matrix through the first cross-attention encoding.

[0087] Optionally, the operation of generating the first fusion feature by performing a first self-attention encoding on the third fusion feature includes: defining a second key weight matrix, a second value weight matrix, and a second query weight matrix corresponding to the third fusion feature; determining the second key matrix based on the third fusion feature and the second key weight matrix; determining the second value matrix based on the third fusion feature and the second value weight matrix; determining the second query matrix based on the third fusion feature and the second query weight matrix; and determining the first fusion feature by first self-attention encoding based on the second key matrix, the second value matrix, and the second query matrix.

[0088] Optionally, the second dual attention encoding includes a second cross-attention encoding and a second self-attention encoding. The operation of performing second dual attention encoding on the first fusion feature and the rectification text feature to determine the second fusion feature corresponding to the standard text when the potential hazard violates the standard text includes: performing second cross-attention encoding on the first fusion feature and the rectification text feature to generate a fourth fusion feature corresponding to the standard text feature, the fourth fusion feature being used to achieve semantic fusion between the rectification text and the standard text; and performing second self-attention encoding on the fourth fusion feature to generate the second fusion feature.

[0089] Optionally, the operation of performing a second cross-attention encoding on the first fused feature and the rectified text feature to generate a fourth fused feature corresponding to the standard text feature includes: using the first fused feature as a third query matrix; defining a third key weight matrix and a third value weight matrix corresponding to the rectified text feature; determining the third key matrix based on the rectified text feature and the third key weight matrix; determining the third value matrix based on the rectified text feature and the third value weight matrix; and determining the fourth fused feature through the second cross-attention encoding based on the third key matrix, the third value matrix, and the third query matrix.

[0090] Optionally, the operation of generating a second fusion feature by performing a second self-attention encoding on the fourth fusion feature includes: defining a fourth key weight matrix, a fourth value weight matrix, and a third query weight matrix corresponding to the fourth fusion feature; determining a fourth key matrix based on the fourth fusion feature and the fourth key weight matrix; determining a fourth value matrix based on the fourth fusion feature and the fourth value weight matrix; determining a fourth query matrix based on the fourth fusion feature and the third query weight matrix; and determining the second fusion feature by using the second self-attention encoding based on the fourth key matrix, the fourth value matrix, and the fourth query matrix.

[0091] Therefore, according to this embodiment, this application achieves semantic binding between hidden danger text features, standard text features, and rectification text features through dual attention encoding, realizing automatic matching of violation standards, and compliance verification between rectification text and violation standards. Simultaneously, the joint extraction model synchronously completes entity recognition, relationship determination, and compliance three-class label prediction, outputting traceable structured triples and judgment results. Thus, this application achieves standardized, automated, and traceable processing of the entire process of hidden danger violation judgment and rectification closed-loop verification. This solves the technical problems of existing hidden danger rectification closed-loop audit methods that rely heavily on manual review, resulting in inconsistent audit standards, difficulty in achieving full audit coverage, and a lack of traceability in the verification process.

[0092] Example 3

[0093] Figure 9 A closed-loop audit device for hazard rectification according to this embodiment is shown, which corresponds to the method described in Embodiment 1. (Reference) Figure 9 As shown, the device includes: a processor 910; and a memory 920 connected to the processor 910, used to provide the processor 910 with instructions to process the following steps: performing digital index encoding and word embedding mapping on the hazard text, standard text, and rectification text corresponding to each hazard, generating corresponding hazard text features, standard text features, and rectification text features respectively; performing a first dual attention encoding on the hazard text features and standard text features to generate a first fusion feature corresponding to the standard text features, and the first fusion feature contains the semantics of the hazard text and standard text; inputting the first fusion feature into a joint extraction model for detecting non-compliance relationships to determine whether the hazard violates the provisions of the standard text; if the hazard violates the provisions of the standard text, performing a second dual attention encoding on the first fusion feature and rectification text features to determine a second fusion feature corresponding to the standard text, and the second fusion feature contains the semantics of the hazard text, standard text, and rectification text; and inputting the second fusion feature into the joint extraction model to determine whether the rectification text meets the provisions of the standard text.

[0094] Optionally, the first dual attention encoding includes a first cross-attention encoding and a first self-attention encoding, and the operation of performing the first dual attention encoding on the hidden danger text features and the standard text features to generate a first fusion feature corresponding to the standard text features includes: performing the first cross-attention encoding on the hidden danger text features and the standard text features to generate a third fusion feature corresponding to the standard text features, the third fusion feature being used to realize the semantic fusion of the hidden danger text and the standard text; and performing the first self-attention encoding on the third fusion feature to generate the first fusion feature.

[0095] Optionally, the operation of performing a first cross-attention encoding on the hidden danger text features and the standard text features to generate a third fusion feature corresponding to the standard text features includes: defining a first key weight matrix corresponding to the hidden danger text features, and generating a first key matrix corresponding to the hidden danger text features based on the first key weight matrix and the hidden danger text features; defining a first value weight matrix corresponding to the hidden danger text features, and generating a first value matrix corresponding to the hidden danger text features based on the first value weight matrix and the hidden danger text features; defining a first query weight matrix corresponding to the standard text features, and generating a first query matrix corresponding to the standard text features based on the first query weight matrix and the standard text features; and determining the third fusion feature based on the first key matrix, the first value matrix, and the first query matrix through the first cross-attention encoding.

[0096] Optionally, the operation of generating the first fusion feature by performing a first self-attention encoding on the third fusion feature includes: defining a second key weight matrix, a second value weight matrix, and a second query weight matrix corresponding to the third fusion feature; determining the second key matrix based on the third fusion feature and the second key weight matrix; determining the second value matrix based on the third fusion feature and the second value weight matrix; determining the second query matrix based on the third fusion feature and the second query weight matrix; and determining the first fusion feature by first self-attention encoding based on the second key matrix, the second value matrix, and the second query matrix.

[0097] Optionally, the second dual attention encoding includes a second cross-attention encoding and a second self-attention encoding. The operation of performing second dual attention encoding on the first fusion feature and the rectification text feature to determine the second fusion feature corresponding to the standard text when the potential hazard violates the standard text includes: performing second cross-attention encoding on the first fusion feature and the rectification text feature to generate a fourth fusion feature corresponding to the standard text feature, the fourth fusion feature being used to achieve semantic fusion between the rectification text and the standard text; and performing second self-attention encoding on the fourth fusion feature to generate the second fusion feature.

[0098] Optionally, the operation of performing a second cross-attention encoding on the first fused feature and the rectified text feature to generate a fourth fused feature corresponding to the standard text feature includes: using the first fused feature as a third query matrix; defining a third key weight matrix and a third value weight matrix corresponding to the rectified text feature; determining the third key matrix based on the rectified text feature and the third key weight matrix; determining the third value matrix based on the rectified text feature and the third value weight matrix; and determining the fourth fused feature through the second cross-attention encoding based on the third key matrix, the third value matrix, and the third query matrix.

[0099] Optionally, the operation of generating a second fusion feature by performing a second self-attention encoding on the fourth fusion feature includes: defining a fourth key weight matrix, a fourth value weight matrix, and a third query weight matrix corresponding to the fourth fusion feature; determining a fourth key matrix based on the fourth fusion feature and the fourth key weight matrix; determining a fourth value matrix based on the fourth fusion feature and the fourth value weight matrix; determining a fourth query matrix based on the fourth fusion feature and the third query weight matrix; and determining the second fusion feature by using the second self-attention encoding based on the fourth key matrix, the fourth value matrix, and the fourth query matrix.

[0100] Therefore, according to this embodiment, this application achieves semantic binding between hidden danger text features, standard text features, and rectification text features through dual attention encoding, realizing automatic matching of violation standards, and compliance verification between rectification text and violation standards. Simultaneously, the joint extraction model synchronously completes entity recognition, relationship determination, and compliance three-class label prediction, outputting traceable structured triples and judgment results. Thus, this application achieves standardized, automated, and traceable processing of the entire process of hidden danger violation judgment and rectification closed-loop verification. This solves the technical problems of existing hidden danger rectification closed-loop audit methods that rely heavily on manual review, resulting in inconsistent audit standards, difficulty in achieving full audit coverage, and a lack of traceability in the verification process.

[0101] 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.

[0102] 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.

[0103] 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 is only a logical functional division, and in actual implementation, there may be other division methods. For example, 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.

[0104] 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0105] 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.

[0106] 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.

[0107] 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 closed-loop audit method for hazard rectification, characterized in that, include: The hazard text, standard text, and rectification text corresponding to each hazard are digitally indexed, encoded, and word-embedded, generating corresponding hazard text features, standard text features, and rectification text features, respectively. The potential danger text features and the standard text features are subjected to a first dual attention encoding to generate a first fusion feature corresponding to the standard text features, and the first fusion feature contains the semantics of the potential danger text and the standard text; The first fusion feature is input into a joint extraction model used to detect non-compliant relationships to determine whether the potential risk violates the provisions of the standard text. In the case where the potential hazard violates the provisions of the standard text, a second dual attention encoding is performed on the first fusion feature and the rectification text feature to determine a second fusion feature corresponding to the standard text, and the second fusion feature contains the semantics of the potential hazard text, the standard text, and the rectification text; as well as The second fusion feature is input into the joint extraction model to determine whether the rectified text meets the requirements of the standard text.

2. The method according to claim 1, characterized in that, The first dual attention encoding includes a first cross-attention encoding and a first self-attention encoding, and the operation of performing the first dual attention encoding on the hidden danger text features and the standard text features to generate a first fusion feature corresponding to the standard text features includes: The first cross-attention encoding is performed on the potential hazard text features and the standard text features to generate a third fusion feature corresponding to the standard text features. This third fusion feature is used to achieve semantic fusion between the potential hazard text and the standard text. The first self-attention encoding is performed on the third fusion feature to generate the first fusion feature.

3. The method according to claim 2, characterized in that, The operation of performing the first cross-attention encoding on the hidden danger text features and the standard text features to generate a third fusion feature corresponding to the standard text features includes: Define a first key weight matrix corresponding to the hidden danger text feature, and generate a first key matrix corresponding to the hidden danger text feature based on the first key weight matrix and the hidden danger text feature; Define a first value weight matrix corresponding to the hidden danger text feature, and generate a first value matrix corresponding to the hidden danger text feature based on the first value weight matrix and the hidden danger text feature; Define a first query weight matrix corresponding to the standard text features, and generate a first query matrix corresponding to the standard text features based on the first query weight matrix and the standard text features; and The third fusion feature is determined by the first cross-attention encoding based on the first key matrix, the first value matrix, and the first query matrix.

4. The method according to claim 2, characterized in that, The operation of performing the first self-attention encoding on the third fusion feature to generate the first fusion feature includes: Define a second key weight matrix, a second value weight matrix, and a second query weight matrix corresponding to the third fusion feature; The second key matrix is ​​determined based on the third fusion feature and the second key weight matrix; The second value matrix is ​​determined based on the third fusion feature and the second value weight matrix; The second query matrix is ​​determined based on the third fusion feature and the second query weight matrix; and The first fusion feature is determined by the first self-attention encoding based on the second key matrix, the second value matrix, and the second query matrix.

5. The method according to claim 1, characterized in that, The second dual attention encoding includes a second cross-attention encoding and a second self-attention encoding, and wherein, in the case that the hidden danger violates the provisions of the standard text, the operation of performing second dual attention encoding on the first fusion feature and the rectification text feature to determine the second fusion feature corresponding to the standard text includes: When the potential hazard violates the provisions of the standard text, the first fusion feature and the rectification text feature are subjected to the second cross-attention encoding to generate a fourth fusion feature corresponding to the standard text feature. This fourth fusion feature is used to achieve semantic fusion between the rectification text and the standard text. The second self-attention encoding is performed on the fourth fusion feature to generate the second fusion feature.

6. The method according to claim 5, characterized in that, The operation of performing the second cross-attention encoding on the first fused feature and the rectified text feature to generate a fourth fused feature corresponding to the standard text feature includes: Use the first fusion feature as the third query matrix; Define the third key weight matrix and the third value weight matrix corresponding to the features of the rectified text; The third key matrix is ​​determined based on the rectification text features and the third key weight matrix; The third-value matrix is ​​determined based on the rectification text features and the third-value weight matrix; and The fourth fusion feature is determined by the second cross-attention encoding based on the third key matrix, the third value matrix, and the third query matrix.

7. The method according to claim 5, characterized in that, The operation of performing the second self-attention encoding on the fourth fusion feature to generate the second fusion feature includes: Define the fourth key weight matrix, the fourth value weight matrix, and the third query weight matrix corresponding to the fourth fusion feature; The fourth key matrix is ​​determined based on the fourth fusion feature and the fourth key weight matrix; The fourth value matrix is ​​determined based on the fourth fusion feature and the fourth value weight matrix; The fourth query matrix is ​​determined based on the fourth fusion feature and the third query weight matrix; and The second fusion feature is determined by the second self-attention encoding based on the fourth key matrix, the fourth value matrix, and the fourth query matrix.

8. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, the method described in any one of claims 1 to 7 is performed by a processor.

9. A closed-loop audit device for hazard rectification, characterized in that, include: The encoding and mapping module is used to perform digital index encoding and word embedding mapping on the hazard text, standard text and rectification text corresponding to each hazard, and generate the corresponding hazard text features, standard text features and rectification text features respectively. The first fusion feature generation module is used to perform a first dual attention encoding on the hidden danger text feature and the standard text feature to generate a first fusion feature corresponding to the standard text feature, and the first fusion feature contains the semantics of the hidden danger text and the standard text; The first determination module is used to input the first fusion feature into a joint extraction model for detecting non-compliant relationships, and determine whether the potential danger violates the provisions of the standard text. The second fusion feature determination module is used to perform second dual attention encoding on the first fusion feature and the rectification text feature when the hidden danger violates the provisions of the standard text, to determine the second fusion feature corresponding to the standard text, and the second fusion feature includes the semantics of the hidden danger text, the standard text and the rectification text; as well as The second determination module is used to input the second fusion feature into the joint extraction model and determine whether the rectification text meets the requirements of the standard text.

10. A closed-loop audit device for hazard rectification, characterized in that, include: processor; as well as A memory, connected to the processor, for providing the processor with instructions to perform the following processing steps: The hazard text, standard text, and rectification text corresponding to each hazard are digitally indexed, encoded, and word-embedded, generating corresponding hazard text features, standard text features, and rectification text features, respectively. The potential danger text features and the standard text features are subjected to a first dual attention encoding to generate a first fusion feature corresponding to the standard text features, and the first fusion feature contains the semantics of the potential danger text and the standard text; The first fusion feature is input into a joint extraction model used to detect non-compliant relationships to determine whether the potential risk violates the provisions of the standard text. In the case where the potential hazard violates the provisions of the standard text, a second dual attention encoding is performed on the first fusion feature and the rectification text feature to determine a second fusion feature corresponding to the standard text, and the second fusion feature contains the semantics of the potential hazard text, the standard text, and the rectification text; as well as The second fusion feature is input into the joint extraction model to determine whether the rectified text meets the requirements of the standard text.

Citation Information

Patent Citations

  • Engineering rectification service system and method

    CN113157783A

  • Hidden danger link type full-period safety management method and system based on distributed cooperation

    CN115994187A