Power operation personal risk static assessment method, system and equipment based on comparative learning and meta-learning prompts, and medium

By employing contrastive learning and meta-learning prompts, a unified semantic space for text and numerical modalities is constructed. By introducing meta-learning mechanisms and prompt vectors, the problems of subjectivity and insufficient generalization ability in the assessment of personal risks in power operations are solved, and a risk assessment with high accuracy and interpretability is achieved.

CN121660469APending Publication Date: 2026-03-13YUNNAN POWER GRID CO LTD KUNMING POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In the static assessment of personal risks in power operations, traditional methods are highly subjective, lack deep semantic fusion of multi-source heterogeneous data, and deep learning models have weak generalization ability in high-risk scenarios with small samples, resulting in low assessment accuracy, poor interpretability, and difficulty in practical application.

Method used

We employ a method based on contrastive learning and meta-learning prompts. By constructing a unified semantic space between textual and numerical modalities through contrastive learning pre-training, we introduce a meta-learning mechanism to enhance the cross-task generalization ability of deep learning models. Furthermore, by constructing prompt templates, we reconstruct classification tasks into language modeling tasks and introduce learnable prompt vectors for end-to-end training to achieve risk level prediction and interpretation generation.

Benefits of technology

It improves the accuracy and interpretability of personal risk assessment in power operations, enhances the deep learning model's accuracy in identifying complex risk patterns, achieves highly accurate risk level classification and natural language interpretation generation, and improves the credibility of assessment results and the transparency of the decision-making process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660469A_ABST
    Figure CN121660469A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power operation personal risk static assessment method, system, equipment and medium based on comparative learning and meta-learning prompts.The electric power operation personal risk static assessment method and system based on comparative learning and meta-learning prompts.The electric power operation personal risk static assessment method and system based on comparative learning and meta-learning prompts.The electric power operation personal risk static assessment method and system based on comparative learning and meta-learning prompts.The electric power operation personal risk static assessment method comprises the steps that deep semantic alignment of text and numerical bimodal features is achieved through comparative Introducing a meta-learning mechanism to enable the deep learning model to obtain cross-task generalization ability in a small sample scene; the classification task is reconstructed into a language modeling task through prompt learning, and end-to-end joint optimization is carried out by means of learnable prompt vectors and features. According to the method, an improved comparative learning framework is adopted, and a loss function of cross-modal attention and innovation is utilized, so that deep semantic alignment of text and numerical features in a unified semantic space is realized, and the problem of a shallow layer of traditional multi-modal fusion is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid safety production and operation and maintenance technology, specifically to a static assessment method, system, equipment and medium for personal risk assessment in power operations based on comparative learning and meta-learning prompts. Background Technology

[0002] In the field of power grid safety production and operation maintenance, preventing and controlling personal risks in power operations is the primary task to ensure the safety of employees and the stable operation of the enterprise. Due to factors such as the complex and changeable working environment, high uncertainty in personnel behavior, and inadequate implementation of safety measures, personal injury accidents still occur frequently. Industry statistics show that approximately 65%-70% of power operation accidents stem from insufficient risk identification or omissions in safety measures before the operation, highlighting the importance and urgency of conducting risk assessments during the operation planning stage.

[0003] Currently, power operation risk assessment faces three major technical challenges: First, traditional assessment methods heavily rely on the subjective experience and judgment of safety supervisors and static checklists, resulting in highly subjective assessment results, incomplete coverage of assessment dimensions, and difficulty in achieving precise quantitative analysis. Second, while traditional machine learning methods based on logistic regression and support vector machines have improved the objectivity of assessments, they still have significant limitations. They lack the ability to integrate and utilize multi-source heterogeneous information such as work permits and environmental sensor data, and cannot effectively capture deep semantic relationships and potential risk characteristics between cross-modal data. Furthermore, although deep learning methods demonstrate powerful feature self-learning capabilities, they have some problems in specific application scenarios: serious personal injury accidents are typically low-probability events, leading to an extreme scarcity of "high-risk" positive samples required for model training, making traditional data-driven models severely inadequate in generalizing and recognizing rare risk patterns. Summary of the Invention

[0004] In view of the above-mentioned problems, the present invention provides a method, system, equipment and medium for static assessment of personal risks in power operations based on contrastive learning and meta-learning prompts.

[0005] Therefore, the technical problem solved by this invention is: In the static assessment of personal risks in power grid operations, traditional methods are highly subjective and difficult to quantify, existing machine learning models are insufficient for deep semantic fusion of multi-source heterogeneous data, and deep learning models have weak generalization ability and opaque decision-making in small sample high-risk scenarios, resulting in low assessment accuracy, poor interpretability, and difficulty in practical application.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts, comprising, Obtain textual work order information and structured numerical features for power operations.

[0007] Based on the acquired text work order information and structured numerical features, a unified semantic space between text modalities and numerical modalities is constructed through contrastive learning pre-training.

[0008] Based on a unified semantic space, optimization is achieved through a contrastive learning loss function.

[0009] Based on the feature representation of the unified semantic space, a meta-learning mechanism is introduced to enable deep learning models to acquire cross-task generalization capabilities based on the feature representation.

[0010] By constructing a prompt template, the classification task is reconstructed into a language modeling task. Learnable prompt vectors are introduced, and the prompt vectors are concatenated with the input features. The prompt representation and generation task parameters are simultaneously optimized through end-to-end joint training, thereby achieving risk level prediction and interpretation generation.

[0011] As a preferred embodiment of the static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts described in this invention, wherein: the construction of a unified semantic space between textual and numerical modalities through contrastive learning pre-training includes, An attention-based encoder is used to process the text modality in multimodal data of power operations.

[0012] By using a self-attention mechanism to capture long-distance dependencies in text, semantic features of security risks can be extracted.

[0013] Multilayer perceptrons are used to encode numerical modes and learn the interaction relationships between numerical features.

[0014] As a preferred embodiment of the static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts described in this invention, the optimization using the contrastive learning loss function includes: By using a positive and negative sample pair strategy, semantically similar samples are aggregated and semantically dissimilar samples are separated in the feature space, thereby driving the deep learning model to learn discriminative feature representations.

[0015] Based on discriminative feature representation, deep semantic alignment of bimodal features is achieved.

[0016] As a preferred embodiment of the static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts described in this invention, the introduction of a meta-learning mechanism, enabling the deep model to acquire cross-task generalization capabilities based on the feature representation, includes: A meta-learner based on metric learning is used to achieve few-sample classification by calculating prototype vectors for each category.

[0017] For classifying query samples, the class probability is calculated using the softmax function based on the distance metric between the sample and the prototype vectors of each class.

[0018] As a preferred embodiment of the static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts described in this invention, the step of achieving small-sample classification by calculating prototype vectors for each category includes: Based on the feature extraction function, the sample features are extracted to obtain the prototype vector of the corresponding category.

[0019] The calculation of class probabilities using the softmax function includes... Based on the query samples and prototype vectors, the class probability is derived using a distance function.

[0020] The beneficial effects of this preferred technical solution are that by calculating the category prototype vector, representative anchor points of category semantics in the feature space are constructed, enabling the deep learning model to achieve robust classification based on metric learning even under small sample conditions; at the same time, by combining the softmax function and distance metric, the spatial relationship between the query sample and each prototype is transformed into an intuitive probability output, which not only enhances the transparency and interpretability of classification decisions, but also improves the deep learning model's ability to distinguish minority classes and boundary samples.

[0021] As a preferred embodiment of the static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts described in this invention, the step of reconstructing the classification task into a language modeling task by constructing a prompt template includes, By constructing a prompt template that includes risk context and category placeholders, static risk assessment is refactored into a mask language modeling task.

[0022] Learnable cue vectors are introduced to concatenate the masked language modeling task with aligned input features to incorporate dynamic task semantics.

[0023] The beneficial effects of this preferred technical solution are as follows: by constructing a prompt template containing risk context and category information, the traditional classification task is cleverly reconstructed into a masked language modeling task, enabling the deep learning model to utilize the knowledge transfer capability of the pre-trained language model; at the same time, by introducing learnable prompt vectors and dynamically fusing them with aligned features, flexible injection and adaptive guidance of task semantics are achieved, which not only enhances the recognition accuracy of the deep learning model for complex risk patterns, but also simultaneously realizes the classification of risk levels and the generation of natural language interpretation through the inherent mechanism of generative tasks.

[0024] As a preferred embodiment of the static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts described in this invention, the step of introducing a learnable prompt vector and concatenating the prompt vector with input features includes: Learnable prompt embedding vectors are preset in the prompt template and concatenated with semantically aligned text and numerical feature vectors to form a joint input representation that integrates task prior knowledge and specific instance information.

[0025] After inputting the joint representation into the deep model, the semantics of the cue vector and the forward computation parameters of the deep learning model are simultaneously optimized through end-to-end training, so that the cue can dynamically guide the deep learning model to focus on deep features related to risk assessment.

[0026] Deep learning models are guided by a mechanism that, while classifying risk levels, generate corresponding text explanations based on the learned semantic prompts.

[0027] The beneficial effects of this preferred technical solution are that by splicing and jointly optimizing the learnable cue embedding vector and aligned multimodal features, it not only achieves the dynamic fusion of task prior knowledge and specific instance information, enhancing the deep learning model's ability to focus on key features of risk assessment, but also utilizes an end-to-end training mechanism to enable the co-evolution of cue semantics and deep learning model parameters, thereby simultaneously completing highly accurate risk level classification and natural language interpretation generation, effectively improving the credibility of assessment results and the transparency of the decision-making process.

[0028] This invention provides a static assessment system for personal risks in power operations based on contrastive learning and meta-learning prompts.

[0029] To address the aforementioned technical problems, this invention provides the following technical solution: a static assessment system for personal risks in power operations based on contrastive learning and meta-learning prompts, comprising: a multimodal data input and preprocessing module, a contrastive learning and semantic alignment module, a meta-learning and prompting mechanism module, and a risk assessment and interpretation generation module.

[0030] The multimodal data input and preprocessing module acquires text work order information and structured numerical features of power operations.

[0031] The contrastive learning and semantic alignment module constructs a unified semantic space between text modalities and numerical modalities through contrastive learning pre-training based on the acquired text work order information and structured numerical features.

[0032] Based on a unified semantic space, comparative learning optimization is performed using an improved InfoNCE loss function.

[0033] The meta-learning and prompting mechanism module, based on the feature representation of the unified semantic space, introduces a meta-learning prompting mechanism, and enables the deep learning model to acquire cross-task generalization ability by constructing meta-learning tasks.

[0034] The risk assessment and interpretation generation module reconstructs the classification task into a language modeling task by constructing a prompt template, and introduces a learnable prompt vector. The prompt vector is concatenated with the input features, and the prompt representation and generation task parameters are optimized synchronously in an end-to-end joint training manner to achieve risk level prediction and interpretation generation.

[0035] The present invention provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the described static assessment method for personal risk assessment in power operations based on contrastive learning and meta-learning prompts.

[0036] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the described method for static assessment of personal risks in power operations based on contrastive learning and meta-learning prompts.

[0037] The beneficial effects of this invention are as follows: First, it employs an improved contrastive learning framework, utilizing cross-modal attention and an innovative loss function to achieve deep semantic alignment of text and numerical features in a unified semantic space, overcoming the shallowness problem of traditional multimodal fusion. Second, it introduces a meta-learning fast adaptation mechanism based on prototype networks, enabling deep learning models to quickly adapt to new tasks in high-risk, low-sample scenarios through a task-aware framework, thus improving generalization ability. Finally, it applies cue learning to the field of risk assessment for the first time, generating risk level predictions and natural language explanations simultaneously through learnable cue templates and end-to-end joint optimization, effectively solving the problem of opaque decision-making in deep learning models, thereby achieving accurate, adaptive, and interpretable risk assessment as a whole. Attached Figure Description

[0038] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 The present invention provides an overall flowchart of a static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts, which is an embodiment of the present invention.

[0040] Figure 2This invention provides a comparative learning pre-training method for a static assessment method of personal risk in power operations based on comparative learning and meta-learning prompts, as an embodiment of the present invention.

[0041] Figure 3 This diagram illustrates the meta-learning prompting mechanism of a static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts, as provided in an embodiment of the present invention.

[0042] Figure 4 This is a schematic diagram of a static assessment system for personal risk in power operations based on contrastive learning and meta-learning prompts, provided as an embodiment of the present invention. Detailed Implementation

[0043] To make the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0044] Example 1, referring to Figure 1 This is one embodiment of the present invention, which provides a static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts, including: S1. Obtain textual work order information and structured numerical features for power operations.

[0045] S2. Based on the acquired text work order information and structured numerical features, a unified semantic space between text modalities and numerical modalities is constructed through contrastive learning pre-training.

[0046] S3. Based on a unified semantic space, optimization is performed through a contrastive learning loss function.

[0047] S4. Based on the feature representation of the unified semantic space, a meta-learning mechanism is introduced to enable deep learning models to acquire cross-task generalization ability based on feature representation.

[0048] S5. By constructing a prompt template, the classification task is reconstructed into a language modeling task, and a learnable prompt vector is introduced. The prompt vector is concatenated with the input features, and the prompt representation and generation task parameters are optimized synchronously in an end-to-end joint training manner to achieve risk level prediction and interpretation generation.

[0049] Through an end-to-end systematic process from multimodal data input to interpretable assessment output, this approach first utilizes contrastive learning to achieve deep semantic alignment between text and numerical features, overcoming the limitations of shallow multimodal fusion. Then, a meta-learning mechanism is employed to endow the deep learning model with rapid adaptability in small-sample scenarios, effectively alleviating the problem of insufficient generalization caused by the scarcity of high-risk samples. Finally, cue learning reconstructs the classification task into a language modeling task, improving the accuracy of risk level prediction while naturally generating easily understandable decision explanations. This achieves a synergistic improvement in the accuracy, adaptability, and interpretability of power operation risk assessment.

[0050] Example 2, refer to Figures 2-3 As an embodiment of the present invention, based on the previous embodiment, a static assessment method for personal risk assessment in power operations based on contrastive learning and meta-learning prompts is provided, including:

[0051] The construction of a unified semantic space between textual and numerical modalities through contrastive learning pre-training in S2 includes steps A1-A3: A1. An attention-based encoder is used to process the text modality in multimodal data of power operation.

[0052] A2. Capture long-distance dependencies in text through self-attention mechanism to extract semantic features of security risks.

[0053] A3. Multilayer perceptron is used to encode numerical modes and learn the complex interaction relationships between numerical features.

[0054] In the embodiments of this application, the attention mechanism in A1 is the Transformer, such as... Figure 2 As shown, this framework uses parallel text encoders and numerical encoders to process unstructured job descriptions (such as work order content) and structured job parameter data (such as voltage, temperature, etc.), respectively, converting them into high-dimensional feature representations. Subsequently, a core contrastive learning loss module drives deep alignment of features from both modalities within a unified semantic space: it encourages semantically related text-numerical feature pairs (e.g., the text describing "high-altitude work" and the actual height value) to move closer together, while keeping unrelated feature pairs further apart. This process enables deep learning models to deeply fuse and understand the deep semantic relationships behind cross-modal data. Specifically, self-supervised learning allows deep learning models to deeply understand the semantic relationships between text and numerical data. In text modality processing, a Transformer-based encoder is used to process the work order text, and its self-attention mechanism can be represented as: in, , , These represent the query, key, and value matrices, respectively. Let be the dimension of the key vector. It is a normalization function.

[0055] The deep learning models involved in this invention include, but are not limited to, Transformer encoders, multilayer perceptrons, prototype networks, and other basic architectures. Through the collaborative computation of queries, key and value matrices, deep learning models can effectively capture long-distance dependencies in text and accurately extract key semantic features related to security risks.

[0056] In numerical modality processing, structured data is encoded using a multilayer perceptron. Through multilayer nonlinear transformations, deep learning models can learn the complex interactions between numerical features. Each layer of transformation can be represented as: in, Indicates the first The activation value of the layer, This represents the activation value of the (l-1)th layer. and For learnable parameters, This is the activation function.

[0057] In one alternative implementation, the attention mechanism can be a sparse attention mechanism, specifically by setting a local attention window or filtering based on content relevance, so that each position only performs attention calculations with some key positions in the sequence, thereby significantly reducing computational complexity and memory usage while maintaining the ability to capture long-distance dependencies, making it suitable for processing long text work order information.

[0058] In another alternative implementation, the attention mechanism can adopt a multi-head relative positional attention mechanism. By introducing relative positional encoding instead of absolute positional encoding, the deep learning model can better model the relative distance relationship between words and symbols in the text when calculating attention weights, thereby improving the semantic understanding of sequence-sensitive risk descriptions (such as the order of operation steps and causal conditions) in the work order text.

[0059] In this embodiment, the optimization of the contrastive learning loss function in S3 is achieved through the improved InfoNCE loss function. Specifically, the improved InfoNCE loss function normalizes and weights the similarity between anchor samples, positive samples, and negative samples within a batch, thereby driving the deep learning model to bring semantically similar sample pairs (such as text and numerical modal features from the same task) closer together in the feature space, while pushing away semantically dissimilar sample pairs. The temperature parameter τ is used to adjust the sharpness of the similarity distribution, thereby controlling the intensity of the deep learning model's attention to difficult samples. Finally, the model is optimized through backpropagation of this loss function.

[0060] The improved InfoNCE loss function is expressed as follows: in, To compare learning loss, For anchor point samples, As a positive sample, For negative samples, For temperature parameters, The number of samples in the batch. The number of positive samples. The number of negative samples. This is the similarity function.

[0061] The optimization mechanism proposed in this invention achieves tight aggregation of semantically similar samples and effective separation of semantically dissimilar samples in the feature space through a carefully designed positive and negative sample pair strategy, thereby driving the deep learning model to learn highly discriminative feature representations and ultimately achieving deep semantic alignment of bimodal features.

[0062] In one alternative implementation, the contrastive learning loss function can be optimized using a contrastive loss based on symmetric cross-entropy. By introducing a symmetric loss calculation method, the contrastive loss in both the text-to-numerical and numerical-to-text directions is calculated separately, and the two are weighted and summed to enhance the symmetry and stability of cross-modal alignment and reduce optimization bias caused by modal asymmetry.

[0063] In another alternative implementation, the contrastive learning loss function can be optimized using a loss function that integrates prototype contrast: based on intra-batch sample-level contrast, a prototype contrast loss based on category prototypes (when sparse labels exist) or clustered prototypes (in unsupervised scenarios) is introduced. By constructing intra-modal and cross-modal prototype centers, the similarity between anchor samples and various types of prototypes is calculated, and samples are encouraged to aggregate towards similar prototypes and separate from dissimilar prototypes, thereby enhancing the discriminative and generalization capabilities of feature representations at a more abstract semantic level.

[0064] Furthermore, the optimization in S3 using the contrastive learning loss function includes steps B1-B2: B1. Utilize the positive and negative sample pair strategy to aggregate semantically similar samples and separate semantically dissimilar samples in the feature space, thereby driving the deep learning model to learn discriminative feature representations.

[0065] B2. Based on discriminative feature representation, complete the deep semantic alignment of bimodal features.

[0066] In this embodiment, the introduction of a meta-learning mechanism in S4 enables the deep learning model to acquire cross-task generalization ability based on feature representations, i.e., the introduction of a meta-learning hint mechanism. By constructing a meta-learning task, the deep learning model acquires cross-task generalization ability, specifically including, for example... Figure 3 As shown, this mechanism follows a meta-learning paradigm of "support set-query set". First, it utilizes a support set containing a small number of labeled samples to extract task-specific knowledge through a "meta-encoder + soft template" module, reconstructing the risk assessment task into a language generation task. This allows for rapid optimization of the base learner to adapt to new scenarios. Simultaneously, prior domain knowledge is injected into the deep learning model through a "knowledge initializer" and "adjusted label" components. For the query set samples to be evaluated, the adapted model is used to calculate their similarity to prototypes of each category for risk classification, and natural language explanations are generated synchronously using learnable prompt templates. The entire process is optimized through meta-loss, enabling the deep learning model to not only quickly adapt to new risk assessment tasks under small sample conditions but also output intuitive and interpretable decision-making criteria. In one alternative implementation, introducing a meta-learning mechanism to enable deep learning models to acquire cross-task generalization capabilities based on feature representations can be an optimization framework based on Model-Independent Meta-Learning (MAML): In this implementation scheme, the meta-learning mechanism employs a model-independent meta-learning algorithm. Specifically, during the meta-training phase, the deep learning model learns to quickly adapt to the initialization parameters of new tasks by adaptively updating gradients on multiple risk assessment meta-tasks in the inner loop. In the outer loop, based on the performance on multiple task validation sets, the initialization parameters are meta-optimized, enabling the deep learning model to acquire cross-task generalization capabilities. Each risk assessment meta-task consists of a small number of support set samples (such as small sample data of different job types or risk levels). Inner optimization enables the deep learning model to quickly fit the current task, while outer optimization ensures that the deep learning model has a good starting point for generalization on unseen tasks.

[0067] In another alternative implementation, a meta-learning mechanism is introduced to enable deep learning models to acquire cross-task generalization capabilities based on feature representations. This can also be achieved through a meta-learning method based on relational networks. In this implementation, the meta-learning mechanism employs a relational network as the task adaptation module. Specifically, for each risk assessment meta-task, the deep learning model concatenates or interactively computes the feature representations of the support set samples and the query samples. A learnable relational module (typically a multi-layer neural network) outputs the matching score or relational weight between the two, thereby directly modeling the similarity relationship between samples and achieving classification. This method does not explicitly rely on category prototype computation; instead, it learns the relationship mapping between the support set and the query set end-to-end, enabling it to better adapt to risk assessment scenarios with fuzzy category boundaries or fine-grained distinctions.

[0068] Furthermore, the introduction of a meta-learning mechanism in S4 enables deep learning models to acquire cross-task generalization capabilities based on feature representations, including steps C1-C2: C1. Employs a meta-learner based on metric learning to achieve small sample classification by calculating prototype vectors for each category.

[0069] C2. For the classification of query samples, the class probability is calculated using the softmax function based on the distance metric between the sample and the prototype vector of each class.

[0070] Specifically, for classifying query samples, the class probability is calculated using the softmax function based on the distance metric between the sample and the prototype vectors of each class. in, This is a query sample. It is a distance function.

[0071] In this embodiment of the application, the meta-learner in C1, i.e., the prototype network, serves as the meta-learner. Specifically, the mathematical foundation of meta-learning can be expressed as follows: in, Indicates the task. For task distribution, For the task The training set, For parameters The model update function, As expected.

[0072] This invention employs a prototype network as a meta-learner, achieving few-sample classification by calculating prototype vectors for each category: in, It is a category prototype vector, It is a feature extraction function. It supports centralized classification. The sample set, It is the first Features of each sample It is the first Labels for each sample.

[0073] In one alternative implementation, the meta-learner can be a relational network-based meta-learner. Specifically, it directly models the matching relationship between support set samples and query samples through a relational module. The feature vectors of all samples in the support set are paired and concatenated or interacted with the feature vectors of the query samples, and then input into a trainable relational network. The output is a relational score representing the degree of correlation between the two, and finally, the category of the query sample is determined based on the score.

[0074] In another alternative implementation, the meta-learner can be a model-agnostic meta-learning (MAML)-based meta-learner. Specifically, this involves performing inner and outer loop optimizations across multiple tasks to obtain a set of initialization parameters that can quickly adapt to new tasks. In practice, for each task, one or more gradient updates are performed using a small number of support set samples, followed by meta-optimization of the outer initialization parameters based on the query set loss. This achieves overall model generalization to small sample task distributions without relying on specific classification structures such as prototype computation.

[0075] Furthermore, in S5, refactoring the classification task into a language modeling task by constructing a prompt template includes steps D1-D2: D1. By constructing a prompt template that includes risk context and category placeholders, the static risk assessment is reconstructed into a mask language modeling task.

[0076] Specifically, to achieve interpretable risk assessment, this invention introduces prompting learning into the risk assessment task. This is achieved by constructing a prompt template: in, It is a prompt template function. These are input features.

[0077] D2. Introduce learnable cue vectors to concatenate the masked language modeling task with aligned input features to incorporate dynamic task semantics.

[0078] The traditional classification task is restructured into a language modeling task, and its generation process can be formalized as follows: in, It's the mask position. Indicates the first of the generated text Each character.

[0079] Furthermore, in S5, a learnable cue vector is introduced, and the cue vector is concatenated with the input features, including steps E1-E3: E1. Pre-set learnable prompt embedding vectors in the prompt template and concatenate them with semantically aligned text and numerical feature vectors to form a joint input representation that integrates task prior knowledge and specific instance information.

[0080] Specifically, this is achieved by introducing learnable cue vectors: in, For learnable cue embedding, the cue vector is concatenated with the input features: E2. After inputting the joint representation into the deep learning model, the semantics of the prompt vector and the forward computation parameters of the deep learning model are simultaneously optimized through end-to-end training, so that the prompt can dynamically guide the deep learning model to focus on deep features related to risk assessment.

[0081] E3, the deep learning model is based on a guidance mechanism. While completing the risk level classification, it generates corresponding text explanations based on the learned prompt semantics.

[0082] Example 4, refer to Figure 4 This embodiment of the present invention provides a static assessment system for personal risks in power operations based on contrastive learning and meta-learning prompts, including: a multimodal data input and preprocessing module, a contrastive learning and semantic alignment module, a meta-learning and prompting mechanism module, and a risk assessment and interpretation generation module.

[0083] The multimodal data input and preprocessing module acquires text work order information and structured numerical features for power operations.

[0084] The contrastive learning and semantic alignment module constructs a unified semantic space between text modalities and numerical modalities based on the acquired text work order information and structured numerical features through contrastive learning pre-training.

[0085] Based on a unified semantic space, comparative learning optimization is performed using an improved InfoNCE loss function.

[0086] The meta-learning and prompting mechanism module, based on the feature representation of the unified semantic space, introduces a meta-learning prompting mechanism, which enables deep learning models to acquire cross-task generalization ability by constructing meta-learning tasks.

[0087] The risk assessment and interpretation generation module reconstructs the classification task into a language modeling task by constructing a prompt template, and introduces learnable prompt vectors. The prompt vectors are concatenated with the input features, and the prompt representation and generation task parameters are optimized synchronously in an end-to-end joint training manner to achieve risk level prediction and interpretation generation.

[0088] This embodiment also provides an electronic device applicable to a static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts as proposed in the above embodiment.

[0089] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a static assessment method for personal risk assessment in power operations based on contrastive learning and meta-learning prompts, as proposed in the above embodiment.

[0090] The storage medium proposed in this embodiment and the method for static assessment of personal risk in power operations based on contrastive learning and meta-learning prompts proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0091] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0092] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts, characterized in that: include, Obtain textual work order information and structured numerical features for power operations; Based on the acquired text work order information and structured numerical features, a unified semantic space between text modalities and numerical modalities is constructed through contrastive learning pre-training. Based on a unified semantic space, the loss function is optimized through contrastive learning. Based on the feature representation of the unified semantic space, a meta-learning mechanism is introduced to enable deep learning models to acquire cross-task generalization capabilities based on the feature representation. By constructing a prompt template, the classification task is reconstructed into a language modeling task. Learnable prompt vectors are introduced, and the prompt vectors are concatenated with the input features. The prompt representation and generation task parameters are simultaneously optimized through end-to-end joint training, thereby achieving risk level prediction and interpretation generation.

2. The static assessment method for personal risk in power operations based on contrastive learning and meta-learning prompts as described in claim 1, characterized in that: The construction of a unified semantic space between textual and numerical modalities through contrastive learning pre-training includes... An attention-based encoder is used to process the text modality in multimodal data of power operations; Capture long-distance dependencies in text using a self-attention mechanism to extract semantic features of security risks; Multilayer perceptrons are used to encode numerical modes and learn the interaction relationships between numerical features.

3. The static assessment method for personal risk in power operations based on contrastive learning and meta-learning prompts as described in claim 2, characterized in that: The optimization through comparative learning of the loss function includes, The positive and negative sample pair strategy is used to aggregate semantically similar samples and separate semantically dissimilar samples in the feature space, so as to drive the deep learning model to learn discriminative feature representations. Based on discriminative feature representation, deep semantic alignment of bimodal features is achieved.

4. The static assessment method for personal risk in power operations based on contrastive learning and meta-learning prompts as described in claim 3, characterized in that: The introduction of the meta-learning mechanism, enabling the deep learning model to acquire cross-task generalization ability based on the feature representation, includes: A meta-learner based on metric learning is used to achieve few-sample classification by calculating prototype vectors for each category; For classifying query samples, the class probability is calculated using the softmax function based on the distance metric between the sample and the prototype vectors of each class.

5. The static assessment method for personal risk in power operations based on contrastive learning and meta-learning prompts as described in claim 4, characterized in that: The method of achieving small sample classification by calculating prototype vectors for each category includes... Based on the feature extraction function, the sample features are extracted to obtain the prototype vector of the corresponding category; The calculation of class probabilities using the softmax function includes... Based on the query samples and prototype vectors, the class probability is derived using a distance function.

6. The static assessment method for personal risk in power operations based on contrastive learning and meta-learning prompts as described in claim 4, characterized in that: The step of reconstructing a classification task into a language modeling task by constructing a prompt template includes, By constructing a prompt template that includes risk context and category placeholders, static risk assessment is reconstructed into a mask language modeling task; Learnable cue vectors are introduced to concatenate the masked language modeling task with aligned input features to incorporate dynamic task semantics.

7. The static assessment method for personal risk in power operations based on contrastive learning and meta-learning prompts as described in claim 4, characterized in that: The process of introducing a learnable cue vector and concatenating the cue vector with input features includes: Learnable prompt embedding vectors are preset in the prompt template and concatenated with semantically aligned text and numerical feature vectors to form a joint input representation that integrates prior task knowledge and specific instance information. After inputting the joint representation into the deep learning model, the semantics of the prompt vector and the forward computation parameters of the deep learning model are simultaneously optimized through end-to-end training, so that the prompt can dynamically guide the deep learning model to focus on deep features related to risk assessment. Deep learning models are guided by a mechanism that, while classifying risk levels, generate corresponding text explanations based on the learned semantic prompts.

8. A static assessment system for personal risks in power operations based on contrastive learning and meta-learning prompts, employing the static assessment method for personal risks in power operations based on contrastive learning and meta-learning prompts as described in any one of claims 1 to 7, characterized in that, include: The system includes a multimodal data input and preprocessing module, a contrastive learning and semantic alignment module, a meta-learning and prompting mechanism module, and a risk assessment and interpretation generation module. The multimodal data input and preprocessing module acquires text work order information and structured numerical features of power operations; The contrastive learning and semantic alignment module, based on the acquired text work order information and structured numerical features, constructs a unified semantic space between text modalities and numerical modalities through contrastive learning pre-training. Based on a unified semantic space, comparative learning optimization is performed using an improved InfoNCE loss function; The meta-learning and prompting mechanism module, based on the feature representation of the unified semantic space, introduces a meta-learning prompting mechanism, and enables the deep learning model to acquire cross-task generalization ability by constructing meta-learning tasks. The risk assessment and interpretation generation module reconstructs the classification task into a language modeling task by constructing a prompt template, and introduces a learnable prompt vector. The prompt vector is concatenated with the input features, and the prompt representation and generation task parameters are optimized synchronously in an end-to-end joint training manner to achieve risk level prediction and interpretation generation.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the static assessment method for personal risk assessment in power operations based on contrastive learning and meta-learning prompts, as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the static assessment method for personal risk assessment in power operations based on contrastive learning and meta-learning prompts, as described in any one of claims 1 to 7.