Constraint content determination method and device for hidden danger, equipment, medium and product
Through the pre-trained matching model screening and calculating similarity, the hidden danger description information and regulatory content are automatically matched, which solves the problem of insufficient accuracy caused by relying on manual experience, and achieves rapid and accurate matching of hidden danger content and regulatory provisions.
Patent Information
- Application Number
- CN202510405237.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the accuracy of matching the content of hidden dangers and the content of regulations depends on the experience of inspectors, resulting in insufficient accuracy.
Using a pre-trained matching model, by determining the hidden danger vector and hidden danger category identification of the hidden danger description information, the corresponding combination of constraint clause vectors to be matched is selected, the similarity is calculated and the content of the target constraint clause is displayed.
It improves the accuracy of matching the content of hidden dangers and the content of the binding clauses, and significantly speeds up the determination of the content of the target binding clauses.
Smart Images

Figure CN120277410A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data search, and in particular, to a method, apparatus, device, medium, and product for determining constraint content for potential hazards. Background Art
[0002] In order to ensure the normal operation of all aspects of society, countries and regions have introduced regulations for all aspects of society. To ensure that everyone acts in accordance with the law, inspection personnel are usually dispatched for regular or irregular inspections. During the inspection process, the inspection personnel usually determine whether there are any violations on-site based on experience, as well as the corresponding regulatory content for the violation.
[0003] Therefore, the accuracy of the matching between the existing potential hazard content and the regulatory content depends on the experience of the inspection personnel. Summary of the Invention
[0004] The present invention provides a method, apparatus, device, medium, and product for determining constraint content for potential hazards, so as to improve the accuracy of the matching between the potential hazard content and the constraint clause content.
[0005] According to one aspect of the present invention, there is provided a method for determining constraint content for potential hazards, including:
[0006] Inputting the potential hazard description information into a pre-trained matching model to obtain the target constraint clause content corresponding to the potential hazard description information, where the pre-trained matching model is configured to: determine the potential hazard vector and the corresponding potential hazard category identifier of the potential hazard description information, and screen out the combination of candidate constraint clause vectors corresponding to the potential hazard category identifier from a pre-determined set of constraint clause vectors; determine the similarity between the potential hazard vector and each of the candidate constraint clause vectors in the combination of candidate constraint clause vectors to obtain a similarity result combination; and use the constraint clause content corresponding to the similarity result that meets the similarity condition in the similarity result combination as the target constraint clause content for the potential hazard description information, where the potential hazard category identifier is at least one of an equipment potential hazard identifier, a behavior potential hazard identifier, and a regional potential hazard identifier;
[0007] Displaying the target constraint clause content in a visualization interface.
[0008] According to another aspect of the present invention, there is provided a device for determining constraint content for potential hazards, where the device includes:
[0009] A processing module, configured to input the hidden danger description information into a pre-trained matching model to obtain target constraint clause content corresponding to the hidden danger description information. The pre-trained matching model is configured to: determine a hidden danger vector and a corresponding hidden danger category identifier of the hidden danger description information, and screen out a combination of to-be-matched constraint clause vectors corresponding to the hidden danger category identifier from a pre-determined set of constraint clause vectors; determine similarities between the hidden danger vector and each of the to-be-matched constraint clause vectors in the combination of to-be-matched constraint clause vectors to obtain a combination of similarity results; use, as the target constraint clause content for the hidden danger description information, the constraint clause content corresponding to the similarity results that meet the similarity condition in the combination of similarity results. The hidden danger category identifier is at least one of an equipment hidden danger identifier, a behavior hidden danger identifier, and a regional hidden danger identifier.
[0010] A display module, configured to display the target constraint clause content in a visualization interface.
[0011] According to another aspect of the present invention, there is provided an electronic device, including:
[0012] at least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the method for determining constraint content for hidden dangers according to any embodiment of the present invention.
[0015] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for enabling a processor to execute the method for determining constraint content for hidden dangers according to any embodiment of the present invention when executed.
[0016] According to another aspect of the present invention, there is provided a computer program product including a computer program that, when executed by a processor, implements the method for determining constraint content for hidden dangers according to any embodiment.
[0017] In the technical solution provided by the embodiment of the present invention, the pre-trained matching model is configured to determine the hidden danger vector of the hidden danger description information and the corresponding hidden danger category identifier, and then screen out the combination of to-be-matched constraint clause vectors corresponding to the hidden danger category identifier from the pre-determined set of constraint clause vectors; since the hidden danger category identifier is at least one of the equipment hidden danger identifier, the behavior hidden danger identifier, and the area hidden danger identifier, before vector matching, the constraint clause vectors are screened based on the hidden danger category identifier, which can significantly reduce the number of to-be-matched constraint clause vectors, that is, the number of constraint clause vectors included in the combination of to-be-matched constraint clause vectors is significantly smaller than the number of constraint clause vectors included in the set of constraint clause vectors, so that the number of hidden danger vector matching objects can be reduced, the determination speed of the similarity result combination can be improved, and thus the determination speed of the target constraint clause content can be improved; it realizes the classification, screening, and matching of the constraint clause vectors based on the model at the same time, which not only ensures the accuracy of the determined target constraint clause content, but also greatly improves the determination speed of the target constraint clause content.
[0018] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0020] Figure 1 is a flowchart of a method for determining constraint content for hidden dangers provided by an embodiment of the present invention;
[0021] Figure 2 is another flowchart of a method for determining constraint content for hidden dangers provided by an embodiment of the present invention;
[0022] Figure 3A is a schematic structural diagram of a device for determining constraint content for hidden dangers provided by an embodiment of the present invention;
[0023] Figure 3B is a schematic structural diagram of a device for determining constraint content for hidden dangers provided by an embodiment of the present invention;
[0024] Figure 3C is a schematic structural diagram of a device for determining constraint content for hidden dangers provided by an embodiment of the present invention;
[0025] Figure 4It is a schematic structural diagram of an electronic device for implementing the method for determining constraint content for potential hazards provided by the embodiments of the present invention. Detailed implementation manners
[0026] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0027] It should be noted that the terms "target" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0028] Figure 1 The embodiment of the present invention provides a flowchart of a method for determining constraint content for potential hazards. This embodiment is applicable to the situation of automatically matching the regulatory content corresponding to the potential hazard description content. This method can be executed by a device for determining constraint content for potential hazards, and the device for determining constraint content for potential hazards can be implemented in the form of hardware and / or software. The device for determining constraint content for potential hazards can be configured in the processor of an electronic device. As Figure 1 shown, the method includes:
[0029] S110. Input the potential hazard description information into a pre-trained matching model to obtain the target constraint clause content corresponding to the potential hazard description information. The pre-trained matching model is configured to: determine the potential hazard vector of the potential hazard description information and the corresponding potential hazard category identifier, and screen out the combination of constraint clause vectors corresponding to the potential hazard category identifier from a pre-determined set of constraint clause vectors; determine the similarity between the potential hazard vector and each constraint clause vector in the combination of constraint clause vectors to obtain a combination of similarity results; use the constraint clause content corresponding to the similarity result that meets the similarity condition in the combination of similarity results as the target constraint clause content for the potential hazard description information. The potential hazard category identifier is at least one of a device potential hazard identifier, a behavior potential hazard identifier, and a regional potential hazard identifier.
[0030] Constraint terms can be legal terms or regulatory terms. Legal terms, also known as legal articles, are specific parts of legal texts used to describe, prescribe, or regulate specific legal matters, rights, obligations, or rules; regulations include administrative regulations and local regulations.
[0031] The matching model can be an embedding model such as the BERT (Bidirectional Encoder Representations from Transformers) model, etc., which is used to convert the target text content into high-dimensional vectors to capture semantic information. The BERT model, also known as a pre-trained language model based on the Transformer architecture, can utilize left-right, up-down information simultaneously to capture the complete semantics of words.
[0032] The hidden danger description information is used to describe the content of the hidden danger. For example, "The elevator at location A is malfunctioning", "The garbage sorting at location B is not thorough", etc.
[0033] The content of the target constraint term is the content of the constraint term violated by the hidden danger corresponding to the hidden danger description information.
[0034] Input the hidden danger description information into the pre-trained matching model. The pre-trained matching model first removes the useless characters in the hidden danger description information, such as spaces, punctuation marks, special characters, etc., to obtain the hidden danger description information after character removal; then uses Chinese word segmentation tools such as Jieba to segment the hidden danger description information after character removal to obtain the word segmentation result, and then uses the tokenizer to convert the word segmentation result into token ids (word segmentation IDs) and pad it to a fixed length to obtain the text encoding result; then determine the feature vector corresponding to the text encoding result, and this feature vector is the hidden danger vector. The word segmentation ID refers to the unique integer number corresponding to each word segment in the model's vocabulary.
[0035] In one embodiment, before inputting the hidden danger description information into the pre-trained matching model to obtain the content of the target constraint term corresponding to the hidden danger description information, it further includes: inputting at least one predetermined regulatory text and / or legal text into the pre-trained matching model to obtain a set of constraint term vectors, and the set of constraint term vectors includes the constraint term vectors of all constraint terms in the at least one regulatory text and the hidden danger category identifiers corresponding to each of the constraint term vectors.
[0036] Specifically, at least one predetermined regulatory text and / or at least one legal text are input into a pre-trained matching model. The pre-trained matching model extracts each constraint clause information from each regulatory text in the at least one regulatory text, and determines a constraint clause vector corresponding to each constraint clause information, thereby obtaining a set of constraint clause vectors. While determining the constraint clause vectors corresponding to each constraint clause, the pre-trained matching model also determines the potential hazard category identifier corresponding to each constraint clause. The set of constraint clause vectors includes the constraint clause vectors and potential hazard category identifiers corresponding to all the constraint clauses included in each constraint text among all the constraint texts. The constraint text is a general term for regulations and laws.
[0037] For the convenience of introducing the technical solution, the regulatory text is taken as an example of the constraint text to elaborate the technical solution.
[0038] In one embodiment, while determining the constraint clause vectors and potential hazard category identifiers corresponding to each constraint clause, the regulatory text identifier of the regulation where it is located is also recorded. In this way, the set of constraint clause vectors includes the constraint clause vectors, potential hazard category identifiers, and regulatory text identifiers of the regulations where they are located corresponding to all the constraint clauses included in each regulatory text in the at least one regulatory text. In this embodiment, the set of constraint clause vectors includes the sources of the constraint clauses corresponding to each constraint clause vector.
[0039] After the potential hazard feature vector and its corresponding potential hazard category identifier are determined, all the constraint clauses corresponding to the potential hazard category identifier are screened out from the set of constraint clause vectors, and the combination of all these constraint clauses is the combination of constraint clauses to be matched. Using the potential hazard category identifier to screen the combination of constraint clause vectors to be matched from the set of constraint clause vectors can reduce the number of constraint clause vectors to be matched, thereby improving the speed of constraint clause matching.
[0040] After the combination of constraint clause vectors to be matched is determined, the potential hazard vector is matched with each constraint clause vector in the combination of constraint clause vectors to be matched to obtain the similarity between the potential hazard vector and each constraint clause vector to be matched; the aggregated result of all the similarities is used as the similarity combination.
[0041] In one embodiment, based on the cosine similarity, the similarity between the potential hazard vector and each constraint clause vector in the combination of constraint clause vectors to be matched is determined to obtain a combination of similarity results.
[0042] Among them, the similarity between the potential hazard text vector and each constraint clause vector in the combination of constraint clause vectors to be matched can be expressed as:
[0043]
[0044] Among them, A is the hidden danger text vector, and B is the constraint clause vector to be matched. If the similarity between the hidden danger text vector and the constraint clause vector to be matched is closer to 1, the higher the similarity between the hidden danger text vector and the constraint clause vector to be matched.
[0045] It can be understood that in the similarity combination, the higher the similarity value, the higher the matching degree between the corresponding constraint clause vector to be matched and the hidden danger vector; the lower the similarity value, the lower the matching degree between the corresponding constraint clause vector to be matched and the hidden danger vector.
[0046] Therefore, in one embodiment, if the highest similarity in the similarity combination is greater than or equal to a predetermined similarity threshold, it is determined that the highest similarity meets the similarity condition, and at the same time, the hidden danger corresponding to the hidden danger description information belongs to a violation event, and the content of the constraint clause corresponding to the highest similarity is used as the target constraint clause content for the hidden danger description information; if the highest similarity in the similarity combination is less than the predetermined similarity threshold, it is determined that the highest similarity does not meet the similarity condition, and at the same time, it is determined that the hidden danger content corresponding to the hidden danger description information does not belong to a violation event. This embodiment can simply and quickly determine whether the hidden danger description information belongs to a violation event; if it belongs to a violation event, what is the content of the target constraint clause it violates.
[0047] In another embodiment, if the similarity combination includes multiple similarities higher than the predetermined similarity threshold, the multiple constraint clause vectors corresponding to the multiple similarities higher than the predetermined similarity threshold are used as target constraint clause vectors, and then the content of the constraint clause corresponding to each target constraint clause vector is determined, that is, the target constraint clause content. This embodiment can simultaneously determine all the content of the constraint clauses violated by the hidden danger description information.
[0048] In one embodiment, if each similarity in the similarity combination is lower than the predetermined similarity threshold, a prompt message for indicating manual review is output. This embodiment provides a fallback solution for the constraint clause matching of complex hidden danger description information and also ensures the accuracy of all output target constraint clause content.
[0049] In one example, if the target hidden danger description information includes hidden danger description information for at least two hidden dangers. The target hidden danger description information is input into a pre-trained matching model, and the pre-trained matching module analyzes the target hidden danger description information to obtain hidden danger vectors corresponding to each of the at least two hidden dangers respectively; then the content of the target constraint clause corresponding to each hidden danger vector is determined respectively. This embodiment can automatically determine the hidden danger description information for different hidden dangers in the target hidden danger description information and the content of the target constraint clause corresponding to each hidden danger description information, without the user manually inputting each hidden danger description information into the pre-trained matching model, improving the processing speed of the hidden danger description information.
[0050] The potential hazard category identifier in this embodiment is determined based on the potential hazard content. Specifically, the potential hazard corresponding to the equipment potential hazard identifier refers to the potential hazard in terms of equipment; the potential hazard corresponding to the behavior potential hazard identifier refers to the potential hazard in terms of human behavior; and the area potential hazard identifier refers to the potential hazard in terms of area planning. This classification method enables the pre-trained matching model to more easily complete potential hazard classification and restraint clause classification, and based on the potential hazard classification result and the restraint clause classification result, screening the vectors of the restraint clauses to be matched can significantly reduce the data processing volume in the vector matching process, thereby improving the determination speed of the target restraint clause content.
[0051] In this embodiment, the matching model is a pre-trained BERT model (such as bert-base-chinese, i.e., the Chinese BERT model). This pre-trained BERT model has been trained on a large-scale Chinese corpus and can thus better understand the context information of the text.
[0052] In this embodiment, it is necessary to fine-tune the pre-trained BERT model so that it can determine the potential hazard vector and potential hazard classification identifier corresponding to the potential hazard description information. Specifically, a fully connected layer is added behind the pre-trained BERT model to be used to determine the potential hazard classification identifier corresponding to each potential hazard description information and the potential hazard classification identifier corresponding to each restraint clause. During the fine-tuning process, the sample labels used are manually labeled potential hazard classification identifiers. During the fine-tuning process, the cross-entropy loss function is used to optimize the output, and the model is trained to minimize the loss function.
[0053] Exemplarily, regarding the potential hazard classification identifier of the training samples. The potential hazard description information 1 is: "When a fault occurs in the elevator equipment, use should be stopped immediately, and the elevator lines and motors should be checked", and its corresponding potential hazard classification identifier is the equipment potential hazard identifier; the potential hazard description information 2 is: "On a construction site, it is necessary to wear a safety helmet to prevent injury caused by falling objects", and its corresponding potential hazard classification identifier is the behavior potential hazard identifier; the potential hazard description information 3 is: "In mountainous areas, avoid having too high a building density to avoid causing a fire hazard", and its corresponding potential hazard classification identifier is the area potential hazard.
[0054] S120. Display the content of the target restraint clause in the visualization interface.
[0055] After the content of the target restraint clause is determined, display the content of the target restraint clause in the visualization interface so that the user can view the content of the target restraint clause corresponding to the potential hazard description content.
[0056] In one embodiment, after the content of the target constraint clause is determined, at least one of the regulation identifier of the regulation to which the target constraint clause belongs and the hazard category identifier corresponding to the hazard description information, as well as the content of the target constraint clause, are simultaneously displayed in the visualization interface. In this way, the user can directly read the content of the target constraint clause and other additional information.
[0057] In one embodiment, when the content of the target constraint clause is displayed in the visualization target interface, in response to an additional information trigger operation, the regulation identifier of the regulation to which the content of the target constraint clause belongs and the hazard category identifier corresponding to the hazard description information are displayed in the visualization interface. This embodiment allows the user to determine whether to display the regulation identifier of the regulation to which the content of the target constraint clause belongs and / or the hazard category identifier corresponding to the hazard description information according to the actual situation, improving the flexibility of information display.
[0058] In the technical solution provided by the embodiments of the present invention, the pre-trained matching model is configured to determine the hazard vector of the hazard description information and the corresponding hazard category identifier, and then screen out the combination of constraint clause vectors corresponding to the hazard category identifier from the pre-determined set of constraint clause vectors; since the hazard category identifier is at least one of the equipment hazard identifier, the behavior hazard identifier, and the area hazard identifier, therefore, before vector matching, the constraint clause vectors are screened based on the hazard category identifier, which can significantly reduce the number of constraint clause vectors to be matched, that is, the number of constraint clause vectors included in the combination of constraint clause vectors to be matched is significantly less than the number of constraint clause vectors included in the set of constraint clause vectors, thereby reducing the number of hazard vector matching objects and improving the determination speed of the similarity result combination, and thus improving the determination speed of the content of the target constraint clause; it realizes the classification, screening, and matching of the constraint clause vectors based on the model at the same time, ensuring both the accuracy of the determined content of the target constraint clause and significantly improving the determination speed of the content of the target constraint clause.
[0059] Figure 2 It is another flowchart of the method for determining the constraint content for hazards provided by the embodiments of the present invention. In this embodiment, a summary step is added on the basis of the foregoing embodiment. As Figure 2 shown, the method includes:
[0060] S201. In response to a scene description request, display a scene identifier input interface.
[0061] Among them, the scene identifier can be understood as inspection object information. For example, if an inspector wants to inspect a certain factory, then the factory identifier can be used as the scene identifier. Another example is that if an inspector wants to inspect a certain mountainous area, then the mountainous area can be used as the scene identifier.
[0062] In one embodiment, the scene information input interface displays geographical location information automatically obtained by a positioning device and a prompt message, and the prompt message is used to prompt whether to use the geographical location information as a scene representation; in response to a click or touch operation on the confirmation option, the geographical location information is used as a scene identifier. This embodiment improves the convenience of scene identifier input.
[0063] When it is detected that the current location of the terminal has changed, a scene switching interface is output. The scene switching interface displays scene switching prompt information for prompting the user whether to input a new scene identifier; in response to a click or touch operation on the confirmation option, a new scene identifier input interface is displayed; in response to a click or touch operation on the negative option, the scene switching interface is exited. This embodiment aims to remind the user to input a new scene identifier in a timely manner.
[0064] S202. Receive a scene identifier based on the scene identifier input interface.
[0065] This step aims to receive a scene identifier through the scene information input interface, and then under the current scene, all the hidden danger description information and the content of the target constraint clause corresponding to each hidden danger description information are included under this scene identifier.
[0066] S210. Input the hidden danger description information into a pre-trained matching model to obtain the content of the target constraint clause corresponding to the hidden danger description information. The pre-trained matching model is configured to: determine the hidden danger vector of the hidden danger description information and the corresponding hidden danger category identifier, and screen out the combination of candidate constraint clause vectors corresponding to the hidden danger category identifier from the pre-determined set of constraint clause vectors; determine the similarity between the hidden danger vector and each candidate constraint clause vector in the combination of candidate constraint clause vectors to obtain a similarity result combination; use the content of the constraint clause corresponding to the similarity result that meets the similarity condition in the similarity result combination as the content of the target constraint clause for the hidden danger description information, and the hidden danger category identifier is at least one of the equipment hidden danger identifier, the behavior hidden danger identifier, and the area hidden danger identifier.
[0067] S220. Display the content of the target constraint clause in the visualization interface.
[0068] S230. In response to a summary request for the scene identifier and the target time period, display all the hidden danger description information of the scene identifier in the target time period, as well as the content of the target constraint clause corresponding to each hidden danger description information in all the hidden danger description information, the regulation identifier of the affiliated regulation, and the hidden danger classification identifier in the visualization interface.
[0069] After the inspection is completed, the user can summarize all the hidden danger description information and the corresponding target constraint clauses under the target scene through the summary function.
[0070] Specifically, in response to a summary trigger request, a summary element interface is displayed. The summary element interface includes a scenario selection area and a time selection area. Among them, the scenario selection area displays scenario information available for the user to select, that is, the scenario information entered by the user. The time selection area displays a start time selection item and an end time selection item. In response to the scenario information selection result and the time selection result, a summary scenario and a summary period are determined. Then, all the hidden danger description information assigned to the scenario identifier during the summary period is filtered out from all the stored hidden danger description information, that is, all the target hidden danger description information. Then, each target hidden danger description information, the content of the target constraint clause corresponding to each target hidden danger description information, the regulation identifier of the regulation to which the content of the target constraint clause belongs, and the hidden danger classification identifier are displayed in the visualization interface.
[0071] The technical solution provided by the embodiment of the present invention facilitates the user to summarize the required hidden danger description information and the content of the target constraint clause corresponding to the hidden danger description information based on the scenario identifier and the summary time, so as to simplify the user's work process.
[0072] Figure 3A It is a schematic structural diagram of a device for determining the constraint content of hidden dangers provided by an embodiment of the present invention. As Figure 3A shown, the device includes:
[0073] A processing module 31, configured to input the hidden danger description information into a pre-trained matching model to obtain the content of the target constraint clause corresponding to the hidden danger description information. The pre-trained matching model is configured to: determine the hidden danger vector of the hidden danger description information and the corresponding hidden danger category identifier, and filter out a combination of to-be-matched constraint clause vectors corresponding to the hidden danger category identifier from a pre-determined set of constraint clause vectors; determine the similarity between the hidden danger vector and each of the to-be-matched constraint clause vectors in the combination of to-be-matched constraint clause vectors to obtain a combination of similarity results; use the content of the constraint clause corresponding to the similarity result that meets the similarity condition in the combination of similarity results as the content of the target constraint clause for the hidden danger description information. The hidden danger category identifier is at least one of an equipment hidden danger identifier, a behavior hidden danger identifier, and a regional hidden danger identifier;
[0074] A display module 32, configured to display the content of the target constraint clause in a visualization interface.
[0075] In one embodiment, the processing module 31 is further configured to input at least one predetermined regulation text into the pre-trained matching model to obtain a set of constraint clause vectors, where the set of constraint clause vectors includes the constraint clause vectors of all the constraint clauses in the at least one regulation text and the hidden danger category identifier corresponding to each of the constraint clause vectors.
[0076] In one embodiment, the display module 32 is further configured to:
[0077] Display the hidden danger category identifier corresponding to the content of the target constraint clause in the visualization interface.
[0078] In one embodiment, the set of constraint clause vectors includes the constraint clause vectors of all constraint clauses in the at least one regulation text, the hidden danger category identifiers corresponding to the respective constraint clause vectors, and the regulation identifiers of the regulations to which the respective constraint clause vectors belong;
[0079] As Figure 3B shown, the device further includes an additional information module 33, and the additional information module 33 is configured to:
[0080] In response to an additional information trigger operation, display the regulation identifier of the regulation to which the content of the target constraint clause belongs and / or the hidden danger category identifier corresponding to the hidden danger description information in the visualization interface.
[0081] In one embodiment, specifically, the processing module 31 determines the similarity between the hidden danger vector and each of the to-be-matched constraint clause vectors in the to-be-matched constraint clause vector combination based on the cosine similarity, and obtains a similarity result combination.
[0082] In one embodiment, the processing module 31 is configured to:
[0083] Use the similarity results in the similarity result combination that are greater than a predetermined similarity threshold as target similarity results;
[0084] Use the constraint clause content corresponding to the target similarity result as the target constraint clause content for the hidden danger description information.
[0085] In one embodiment, as Figure 3C shown, the device further includes a scenario identifier module 30, and the scenario identifier module 30 is configured to:
[0086] In response to a scenario description request, display a scenario identifier input interface;
[0087] Receive a scenario identifier based on the scenario identifier input interface;
[0088] The device further includes a summary module 34, and the summary module 34 is configured to:
[0089] In response to a summary request for a scenario identifier and a summary period, select all target hidden danger description information corresponding to the scenario identifier and the summary period from all stored hidden danger description information, and display, in the visualization interface, the target constraint clause content corresponding to each of the target hidden danger description information, the regulation identifier of the regulation to which the target constraint clause belongs, and the hidden danger classification identifier.
[0090] In the technical solution provided by the embodiment of the present invention, the pre-trained matching model is configured to determine the potential hazard vector of the potential hazard description information and the corresponding potential hazard category identifier, and then screen out the combination of constraint clause vectors corresponding to the potential hazard category identifier from the pre-determined set of constraint clause vectors; since the potential hazard category identifier is at least one of an equipment potential hazard identifier, a behavior potential hazard identifier, and a regional potential hazard identifier, before vector matching, the constraint clause vectors are screened based on the potential hazard category identifier, which can significantly reduce the number of constraint clause vectors to be matched, that is, the number of constraint clause vectors included in the combination of constraint clause vectors to be matched is significantly less than the number of constraint clause vectors included in the set of constraint clause vectors, so that the number of potential hazard vector matching objects can be reduced, the determination speed of the similarity result combination can be improved, and thus the determination speed of the target constraint clause content can be improved; it realizes the classification, screening, and matching of the constraint clause vectors based on the model at the same time, which not only ensures the accuracy of the determined target constraint clause content but also greatly improves the determination speed of the target constraint clause content.
[0091] The device for determining constraint content for potential hazards provided by the embodiment of the present invention can execute the method for determining constraint content for potential hazards provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0092] Figure 4 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0093] As Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0094] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0095] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for determining constraint content for potential hazards.
[0096] In some embodiments, the method for determining constraint content for potential hazards can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for determining constraint content for potential hazards described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for determining constraint content for potential hazards by any other appropriate means (e.g., by means of firmware).
[0097] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0098] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.
[0099] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0100] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0101] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0102] The computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship between the client and the server is created by computer programs that run on the respective computers and have a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0103] An embodiment of the present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the method for determining the constraint content for potential hazards provided in any embodiment of the present application.
[0104] In the process of implementing the computer program product, computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or, alternatively, can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).
[0105] It should be understood that the various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0106] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for determining constraint content for potential hazards, characterized in that, Including: Input the potential hazard description information into a pre-trained matching model to obtain the target constraint clause content corresponding to the potential hazard description information. The pre-trained matching model is configured to: determine the potential hazard vector and the corresponding potential hazard category identifier of the potential hazard description information, and screen out the combination of to-be-matched constraint clause vectors corresponding to the potential hazard category identifier from a pre-determined set of constraint clause vectors; determine the similarity between the potential hazard vector and each of the to-be-matched constraint clause vectors in the combination of to-be-matched constraint clause vectors to obtain a combination of similarity results; use the constraint clause content corresponding to the similarity result that meets the similarity condition in the combination of similarity results as the target constraint clause content for the potential hazard description information. The potential hazard category identifier is at least one of an equipment potential hazard identifier, a behavior potential hazard identifier, and a regional potential hazard identifier. Display the target constraint clause content in a visualization interface.
2. The method according to claim 1, wherein Before inputting the potential hazard description information into the pre-trained matching model to obtain the target constraint clause content corresponding to the potential hazard description information, it further includes: Input at least one predetermined regulation text into the pre-trained matching model to obtain a set of constraint clause vectors, where the set of constraint clause vectors includes the constraint clause vectors of all constraint clauses in the at least one regulation text and the potential hazard category identifiers corresponding to each of the constraint clause vectors.
3. The method according to claim 1, characterized in that, When displaying the target constraint clause content in the visualization interface, it further includes: Display the potential hazard category identifier corresponding to the target constraint clause content in the visualization interface.
4. The method according to claim 1, wherein The set of constraint clause vectors includes the constraint clause vectors of all constraint clauses in the at least one regulation text, the potential hazard category identifiers corresponding to each of the constraint clause vectors, and the regulation identifiers of the regulations to which each of the constraint clause vectors belongs. After displaying the target constraint clause content in the visualization interface, it further includes: In response to an additional information trigger operation, display the regulation identifier of the regulation to which the target constraint clause content belongs and / or the potential hazard category identifier corresponding to the potential hazard description information in the visualization interface.
5. The method according to claim 1, wherein The combination of similarity results is determined through the following steps: Based on cosine similarity, determine the similarity between the potential hazard vector and each of the to-be-matched constraint clause vectors in the combination of to-be-matched constraint clause vectors to obtain a combination of similarity results.
6. The method according to claim 1, wherein Using the constraint clause content corresponding to the similarity result that meets the similarity condition in the combination of similarity results as the target constraint clause content for the potential hazard description information includes: Use the similarity results greater than a predetermined similarity threshold in the combination of similarity results as the target similarity results; Use the constraint clause content corresponding to the target similarity results as the target constraint clause content for the potential hazard description information.
7. The method according to claim 1, characterized in that, Before inputting the potential hazard description information into the pre-trained matching model to obtain the target constraint clause content corresponding to the potential hazard description information, it further includes: In response to a scene description request, display a scene identifier input interface; Receive a scene identifier based on the scene identifier input interface. After presenting the content of the target constraint clause in the visualization interface, the method further includes: In response to a summary request for a scenario identifier and a summary period, all target hidden danger description information corresponding to the scenario identifier and the summary period is selected from all the stored hidden danger description information, and the content of the target constraint clause corresponding to each piece of the target hidden danger description information, the regulation identifier of the regulation to which the target constraint clause belongs, and the hidden danger classification identifier are presented in the visualization interface.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the method for determining the constraint content for hidden dangers according to any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to implement the method for determining the constraint content for hidden dangers according to any one of claims 1-7 when executed.
10. A computer program product, characterized in that, The computer program product includes a computer program which, when executed by a processor, implements the method for determining the constraint content for hidden dangers according to any one of claims 1-7.