Model weight information updating method and device, computer equipment, readable storage medium and program product

By feature encoding and particle swarm construction of the model weight information of the power risk assessment model and iteratively update it, the problem of low accuracy of traditional power risk assessment models when there is insufficient training samples is solved, and the accuracy of power risk assessment is improved.

CN119228121AActive Publication Date: 2024-12-31ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411219277.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-31
Estimated Expiration
2044-09-02

AI Technical Summary

Technical Problem

The accuracy of the traditional power risk assessment model depends on the number of training samples, resulting in low accuracy of power risk assessment when the number of training samples is insufficient.

Method used

By obtaining the model weight information of the pre-trained power risk assessment model, performing feature coding and particle swarm construction, evaluating particle fitness, and iteratively updating the model weight information to improve the prediction accuracy of the power risk assessment model.

Benefits of technology

The accuracy of the power risk assessment model is improved, the prediction accuracy of the model prediction effect to each model structure is refined, and the accuracy of the power risk assessment is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228121A_ABST
    Figure CN119228121A_ABST
Patent Text Reader

Abstract

The invention relates to a model weight information updating method and device, computer equipment, a computer readable storage medium and a computer program product, and is applied to the technical field of big data, and the method comprises the steps: obtaining model weight information of a plurality of model parameters in a pre-trained power risk assessment model; performing feature coding on the model weight information of the plurality of model parameters to obtain model weight coding features; executing a particle swarm construction step: constructing an initialized particle swarm according to the model weight coding features; the fitness of each particle in the initialized particle swarm is evaluated, particle fitness is obtained, and the particle fitness is used for representing the prediction precision of each model structure in the power risk assessment model; and performing iterative updating on the model weight information according to the particle fitness to obtain target model weight information. The method can improve the accuracy of model power risk assessment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a method, apparatus, computer device, computer-readable storage medium and computer program product for updating model weight information. Background Art

[0002] As the economy continues to develop, the demand for electricity is also increasing. The corresponding power operations are also varied and complex, such as three-dimensional cross-operations, continuous complex system engineering operations, etc., which lead to dangerous factors in the production process of power operations. Therefore, there is an urgent need for a power risk assessment method that can accurately assess power risks.

[0003] In traditional technology, the power risk of power operations is assessed through a pre-trained power risk assessment model. However, the power risk assessment accuracy of the pre-trained power risk assessment model depends on the number of training samples. Therefore, there may be a situation where the power risk assessment accuracy of the trained power risk assessment model is low, resulting in low power risk assessment accuracy of the model. Summary of the invention

[0004] Based on this, it is necessary to provide a model weight information updating method, device, computer equipment, computer readable storage medium and computer program product that can improve the accuracy of the model's power risk assessment in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for updating model weight information, comprising:

[0006] Obtain model weight information of multiple model parameters in a pre-trained power risk assessment model;

[0007] Performing feature encoding on the model weight information of the multiple model parameters to obtain model weight encoding features;

[0008] Execute the particle swarm construction step: construct an initialization particle swarm according to the model weight encoding feature;

[0009] Evaluate the fitness of each particle in the initialized particle group to obtain the particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model;

[0010] The model weight information is iteratively updated according to the particle fitness to obtain the target model weight information.

[0011] In one embodiment, the fitness of each particle in the initialized particle group is evaluated to obtain the particle fitness, including: for each particle in the initialized particle group, according to the difference between the output data of the model structure in the power risk assessment model corresponding to the particle and the corresponding real data, the fitness of the particle is evaluated to obtain the particle fitness of the particle.

[0012] In one of the embodiments, the model weight information is iteratively updated according to the particle fitness to obtain the target model weight information, including: if the particle fitness of the current iteration does not meet the preset fitness condition, a random number within a preset value range is obtained, and the model weight information of the current iteration is adjusted according to the random number, and the particle swarm construction step is returned to execute; if the particle fitness of the current iteration meets the preset fitness condition, the model weight information of the current iteration is determined as the target model weight information.

[0013] In one of the embodiments, adjusting the model weight information of the current iteration according to the random number includes: obtaining iterative design parameters; determining global particle information according to the particle fitness of each particle in the particle swarm of the current iteration; and adjusting the model weight information of the current iteration according to the global particle information, the random number and the iterative design parameters.

[0014] In one of the embodiments, after iteratively updating the model weight information according to the particle fitness to obtain the target model weight information, the method further includes: adjusting the power risk assessment model according to the target model weight information to obtain a target power risk assessment model; if power operation information of the power operation to be evaluated is detected, extracting features of the power operation information through the target power risk assessment model to obtain power operation features; and evaluating the power safety risk of the power operation to be evaluated according to the power operation features to obtain a power risk assessment result.

[0015] In one of the embodiments, the power operation information includes a plurality of power operation data belonging to at least one category that changes in time series; the target power risk assessment model is used to extract features of the power operation information to obtain power operation features, including: for the power operation data belonging to each category, obtaining the impact information of the power operation data on the power safety risk assessment of the power operation to be assessed; normalizing the power operation data according to the impact information of the power operation data on the power safety risk assessment of the power operation to be assessed to obtain normalized power operation data; and extracting features of the normalized power operation data through the target power risk assessment model to obtain power operation features.

[0016] In a second aspect, the present application also provides a model weight information updating device, comprising:

[0017] An acquisition module, used to acquire model weight information of multiple model parameters in a pre-trained power risk assessment model;

[0018] An encoding module, used for performing feature encoding on the model weight information of the plurality of model parameters to obtain model weight encoding features;

[0019] A construction module is used to execute a particle swarm construction step: construct an initialization particle swarm according to the model weight encoding feature;

[0020] An evaluation module, used for evaluating the fitness of each particle in the initialized particle group to obtain the particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model;

[0021] The updating module is used to iteratively update the model weight information according to the particle fitness to obtain the target model weight information.

[0022] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0023] Obtain model weight information of multiple model parameters in a pre-trained power risk assessment model;

[0024] Performing feature encoding on the model weight information of the multiple model parameters to obtain model weight encoding features;

[0025] Execute the particle swarm construction step: construct an initialization particle swarm according to the model weight encoding feature;

[0026] Evaluate the fitness of each particle in the initialized particle group to obtain the particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model;

[0027] The model weight information is iteratively updated according to the particle fitness to obtain the target model weight information.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0029] Obtain model weight information of multiple model parameters in a pre-trained power risk assessment model;

[0030] Performing feature encoding on the model weight information of the multiple model parameters to obtain model weight encoding features;

[0031] Execute the particle swarm construction step: construct an initialization particle swarm according to the model weight encoding feature;

[0032] Evaluate the fitness of each particle in the initialized particle group to obtain the particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model;

[0033] The model weight information is iteratively updated according to the particle fitness to obtain the target model weight information.

[0034] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0035] Obtain model weight information of multiple model parameters in a pre-trained power risk assessment model;

[0036] Performing feature encoding on the model weight information of the multiple model parameters to obtain model weight encoding features;

[0037] Execute the particle swarm construction step: construct an initialization particle swarm according to the model weight encoding feature;

[0038] Evaluate the fitness of each particle in the initialized particle group to obtain the particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model;

[0039] The model weight information is iteratively updated according to the particle fitness to obtain the target model weight information.

[0040] The above-mentioned model weight information updating method, device, computer equipment, computer-readable storage medium and computer program product obtain the model weight information of multiple model parameters in the pre-trained power risk assessment model; feature encode the model weight information of the multiple model parameters to obtain model weight encoding features; execute the particle swarm construction step: construct an initialization particle swarm according to the model weight encoding features; evaluate the fitness of each particle in the initialization particle swarm to obtain particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model; iteratively update the model weight information according to the particle fitness to obtain target model weight information, refine the model prediction effect of the power risk assessment model to the granularity of the prediction accuracy of each model structure, and use the particle fitness that can characterize the prediction accuracy of the model structure as the basis for updating the model weight information, so that when the power risk assessment accuracy of the trained power risk assessment model is low, the model weight information can be iteratively updated to improve the power risk assessment accuracy of the power risk assessment model that uses the target model weight information as the basis for updating the model weight information. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 An application environment diagram of a method for updating model weight information in an embodiment;

[0043] Figure 2 Schematic diagram of a flow chart of a method for updating model weight information in one embodiment;

[0044] Figure 3 A flowchart of the steps after the model weight information is iteratively optimized by a particle swarm algorithm according to the weight fusion information to obtain the target model weight information in an embodiment;

[0045] Figure 4 A schematic diagram of the structure of a target power risk assessment result in one embodiment;

[0046] Figure 5 is a structural block diagram of a device for updating model weight information in one embodiment;

[0047] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] It should be noted that the information (including but not limited to model weight information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the acquisition, transmission, storage, use and processing of relevant data are in compliance with the relevant provisions of national laws and regulations. For content pushed to users (for example, power risk assessment results, etc.), users can refuse or conveniently refuse content push, etc. In the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0050] The model weight information updating method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the model weight information of the pre-trained power risk assessment model, wherein the model weight information is used to characterize the weight of the model parameters in the power risk assessment model; the model weight information is fused to obtain the weight fusion information, and the model weight information is iteratively optimized by the particle swarm algorithm according to the weight fusion information to obtain the target model weight information. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0051] In an exemplary embodiment, Figure 2 As shown, a model weight information updating method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 202 to 210. Among them:

[0052] Step 202: Obtain model weight information of multiple model parameters in a pre-trained power risk assessment model.

[0053] The multiple model parameters in step 202 are input parameters of each model structure in the power risk assessment model.

[0054] Exemplarily, step 202 includes: querying a preset database to obtain model weight information of a pre-trained power risk assessment model.

[0055] As an embodiment, a preset database is queried to obtain model weight information of a pre-trained power risk assessment model, including: the preset database includes model configuration information of the power risk assessment model, wherein the model configuration information includes structural parameters of each model structure in the power risk assessment model, and weights of input parameters of each model structure in the power risk assessment model, and the weights of the input parameters of each model structure in the power risk assessment model in the model configuration information of the power risk assessment model are determined as the model weight information of the pre-trained power risk assessment model.

[0056] Step 204 , feature encoding is performed on the model weight information of the multiple model parameters to obtain model weight encoding features.

[0057] Exemplarily, step 204 includes: according to the position of the model structure corresponding to the model weight information in the power risk assessment model, feature encoding the model weight information of multiple model parameters to obtain model weight encoding features.

[0058] As an embodiment, according to the position of the model structure corresponding to the model weight information in the power risk assessment model, the model weight information of multiple model parameters is feature encoded to obtain the model weight encoding feature, including: the model weight encoding feature includes a weight encoding matrix, and the model weight information of multiple model parameters includes the weights of the input parameters of each model structure in the power risk assessment model; according to the position of each model structure in the power risk assessment model, the weights of the input parameters of each model structure in the power risk assessment model are feature encoded to obtain the weight encoding matrix.

[0059] Among them, the model structure in the power risk assessment model includes but is not limited to convolutional layers, pooling layers and fully connected layers.

[0060] Furthermore, according to the position of each model structure in the power risk assessment model, the weights of the input parameters of each model structure in the power risk assessment model are feature-encoded to obtain a weight coding matrix, including: according to the position of each model structure in the power risk assessment model, the weights of the input parameters of each model structure in the power risk assessment model are particle swarm encoded and model structure position encoded to obtain coding information of the weights of the input parameters of each model structure in the power risk assessment model; according to the coding information of the weights of the input parameters of each model structure in the power risk assessment model, the weights of the input parameters of each model structure in the power risk assessment model are fused to obtain a weight coding matrix.

[0061] Optionally, according to the coding information of the weights of the input parameters of each model structure in the power risk assessment model, the weights of the input parameters of each model structure in the power risk assessment model are fused to obtain a weight coding matrix, which can be expressed as follows:

[0062] P = [ w 11 1 c 1 … w k 1 cn … w 11 2 c 1 … w k 2 cn … … … … … w 11 Mc 1 … w k Mcn … w 11 1 p 1 … … w k 1 pn w 11 2 p 1 … … w k 2 pn … … … … w 11 Mp 1 … … w k Mpn ]

[0063] in, is the weight encoding matrix, is the weight of the first input data of the first convolutional layer belonging to the first particle swarm for the first output data, is the first particle swarm species The convolutional layer The input data for The weight of the output data, is the weight of the first input data of the first pooling layer belonging to the first particle swarm for the first output data, is the first particle swarm species The first pooling layer The input data for The weight of the output data, is the weight of the first input data of the first convolutional layer belonging to the second particle swarm for the first output data, is the particle species belonging to the second population The convolutional layer The input data for The weight of the output data, is the weight of the first input data of the first pooling layer belonging to the second particle swarm for the first output data, is the particle species belonging to the second population The first pooling layer The input data for The weight of the output data, For the The weight of the first input data of the first convolutional layer of the particle swarm for the first output data, For the The particle swarm species The convolutional layer The input data for The weight of the output data, For the The weight of the first input data of the first pooling layer of the particle swarm for the first output data, For the The particle swarm species The first pooling layer The input data for The weight of the output data.

[0064] Step 206, executing the particle swarm construction step: constructing an initialized particle swarm according to the model weight encoding features.

[0065] Exemplarily, step 206 includes: determining particle swarm information of the initialized particle swarm, and constructing the initialized particle swarm according to the weight fusion information and the particle swarm information, wherein the particle swarm information includes particle velocity.

[0066] As an embodiment, constructing an initialized particle swarm according to weight fusion information and particle swarm information includes: determining each weight in the weight fusion information as each particle in the initialized particle swarm, and determining the particle speed as the movement speed of each particle in the initialized particle swarm.

[0067] Step 208 , evaluating the fitness of each particle in the initialized particle swarm to obtain the particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model.

[0068] As an embodiment, step 208 includes: for each particle in the initialized particle group, according to the difference between the output data of the model structure in the power risk assessment model corresponding to the particle and the corresponding real data, the fitness of the particle is evaluated to obtain the particle fitness of the particle.

[0069] Furthermore, according to the difference between the output data of the model structure in the power risk assessment model corresponding to the particle and the corresponding real data, the fitness of the particle is evaluated to obtain the particle fitness of the particle, including: obtaining multiple training samples, wherein one training sample includes the input data and real data of the model structure in the power risk assessment model corresponding to the particle; mapping the input data of multiple training samples to the output data of the model structure in the power risk assessment model corresponding to the particle through the model structure of the power risk assessment model corresponding to the particle; according to the difference between the output data of the model structure in the power risk assessment model corresponding to the particle corresponding to the multiple training samples and the corresponding real data, the fitness of the particle is evaluated to obtain the particle fitness of the particle.

[0070] Optionally, according to the difference between the output data of the model structure in the power risk assessment model corresponding to the particles corresponding to the plurality of training samples and the corresponding real data, the fitness of the particles is evaluated to obtain the particle fitness of the particles, which can be expressed by the formula:

[0071] E = 1 n ∑ j = 1 n [ ∑ k = 1 a ( t jk − y jk ) 2 ]

[0072] in, is the particle fitness of the particle, is the sample size, is the number of model structures, For the In the sample The real data corresponding to the model structure, For the In the sample The output data of the model structure.

[0073] Step 210, iteratively update the model weight information according to the particle fitness to obtain the target model weight information.

[0074] Exemplarily, step 210 includes: traversing the size relationship between the particle fitness of each particle in the particle swarm and the particle fitness of the best particle in the particle swarm, for each particle in the particle swarm, if the particle fitness of the particle is greater than the particle fitness of the best particle in the particle swarm, then determining the particle fitness of the particle as the particle fitness of the best particle in the particle swarm; after the traversal is completed, if the particle fitness of the best particle in the particle swarm is greater than the particle fitness of the best particle in the particle swarm of the previous iteration, then determining the particle fitness of the best particle in the particle swarm as the best particle in the particle swarm of the current iteration. The particle fitness of the particle, if the particle fitness of the best particle in the particle swarm is not greater than the particle fitness of the best particle in the particle swarm of the previous iteration, the particle fitness of the best particle in the particle swarm of the previous iteration is determined as the particle fitness of the best particle in the particle swarm of the current iteration; if the particle fitness of the current iteration does not meet the preset fitness condition, the model weight information of the current iteration is adjusted, and the step of executing the particle swarm construction is returned; if the particle fitness of the current iteration meets the preset fitness condition, the model weight information of the current iteration is determined as the target model weight information.

[0075] As an embodiment, adjusting the model weight information of the current iteration includes: obtaining a random number within a preset value range, and adjusting the model weight information of the current iteration according to the random number.

[0076] Furthermore, the model weight information of the current iteration is adjusted according to the random number, including: obtaining iterative design parameters, and determining global particle information, wherein the iterative design parameters are parameters set on demand and may also be shrinkage and expansion coefficients; the model weight information of the current iteration is adjusted according to the global particle information, random numbers and iterative design parameters.

[0077] As an embodiment, determining the global particle information includes: determining an average value of the best particles in all iterated particle groups as the global particle information.

[0078] Further, the average value of the best particles in all iterative particle swarms is determined as the global particle information, including: the ratio between the sum of the best particles in all iterative particle swarms and the number of iterations is determined as the global particle information.

[0079] Among them, the value of the particle is the corresponding weight value, for example, is the value of a particle in the first particle swarm.

[0080] Optionally, the ratio between the sum of the best particles in all iterated particle swarms and the number of iterations is determined as the global particle information, which can be expressed as:

[0081]

[0082] in, is the global particle information, is the number of iterations, For the The best particle in the particle swarm of iterations.

[0083] As one embodiment, the model weight information of the current iteration is adjusted according to the global particle information, random numbers and iterative design parameters, including: the random numbers include a first random number and a second random number that satisfy a standard normal distribution, and a third random number that satisfies a uniform probability distribution; local particle information is determined according to the first random number, the second random number and the particles of the current iteration; particle adjustment information is determined according to the local particle information, the global particle information, the iterative design parameters, the first random number and the third random number; and the model weight information of the current iteration is adjusted according to the particle adjustment information.

[0084] As one embodiment, local particle information is determined based on a first random number, a second random number, and a particle of a current iteration, including: determining the product of the first random number and a particle of the current iteration as a first parameter, determining the product of the second random number and the optimal particle of the current iteration as a second parameter, determining the sum of the first random number and the second random number as a third parameter, and determining the ratio between the sum of the first parameter and the second parameter and the third parameter as the local particle information.

[0085] Optionally, the ratio between the sum of the first parameter and the second parameter and the third parameter is determined as the local particle information, which can be expressed by the formula:

[0086]

[0087] in, is the local particle information, is the first random number, is a particle of the current iteration, is the second random number, is the optimal particle of the current iteration.

[0088] As an embodiment, particle adjustment information is determined according to local particle information, global particle information, iterative design parameters, a first random number and a third random number, including: when the third random number is greater than or equal to a preset value, the local particle information, the global particle information, the iterative design parameters, the first random number, the model weight information of the current iteration and the third random number are mapped to the particle adjustment information through a first mapping function; when the third random number is less than the preset value, the local particle information, the global particle information, the iterative design parameters, the first random number, the model weight information of the current iteration and the third random number are mapped to the particle adjustment information through a second mapping function, wherein the preset value can be 0.5 or other values ​​without limitation.

[0089] Optionally, when the preset value is 0.5, the first mapping function and the second mapping function can be expressed as follows:

[0090]

[0091] in, Adjust information for particles, To iterate the design parameters, is the model weight information of the current iteration, is the third random number.

[0092] As an embodiment, adjusting the model weight information of the current iteration according to the particle adjustment information includes: determining the particle adjustment information as information after adjusting the model weight information of the current iteration.

[0093] In this way, the model weight information is adjusted through Gaussian quantum behavior, and the Gaussian mutation operator is used instead of the random sequence to guide the particle mutation and iterative optimization. The particle adjustment adopts the wave function for iteration, so as to avoid the model weight information from converging to the local optimum too early in the particle swarm algorithm, thereby ensuring the model prediction accuracy of the target power risk assessment model under the adjusted target model weight information.

[0094] In the above-mentioned model weight information updating method, the model weight information of multiple model parameters in the pre-trained power risk assessment model is obtained; the model weight information of multiple model parameters is feature encoded to obtain model weight encoding features; the particle swarm construction step is executed: according to the model weight encoding features, an initialization particle swarm is constructed; the fitness of each particle in the initialization particle swarm is evaluated to obtain particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model; according to the particle fitness, the model weight information is iteratively updated to obtain the target model weight information, and the model prediction effect of the power risk assessment model is refined to the granularity of the prediction accuracy of each model structure, and the particle fitness that can characterize the prediction accuracy of the model structure is used as the basis for updating the model weight information, so that when the power risk assessment accuracy of the trained power risk assessment model is low, the model weight information can be iteratively updated to improve the power risk assessment accuracy of the power risk assessment model that uses the target model weight information as the basis for updating the model weight information.

[0095] In an exemplary embodiment, Figure 3 As shown, according to the weight fusion information, the model weight information is iteratively optimized by the particle swarm algorithm to obtain the target model weight information, including steps 302 to 306. Among them:

[0096] Step 302: Adjust the power risk assessment model according to the target model weight information to obtain the target power risk assessment model.

[0097] Exemplarily, step 302 includes: adjusting the weights of output parameters of the corresponding model structure in the power risk assessment model according to the target model weight information to obtain the target power risk assessment model.

[0098] Step 304: If the power operation information of the power operation to be evaluated is detected, the power operation information is subjected to feature extraction through the target power risk assessment model to obtain power operation features.

[0099] Among them, the power operation to be evaluated in step 304 is the power operation waiting for risk assessment. The power operation to be evaluated can be set by the user as needed, or it can respond to preset conditions. Further, the preset condition can be a preset interval time. At each preset interval time, the power operation to be evaluated is randomly selected from the unevaluated power operations; or, the power operation that has been separated from the last power operation risk assessment by a preset interval time is determined as the power operation to be evaluated; the preset condition can also be the operation type of the power operation, and the unevaluated power operation whose operation type represents the power operation risk factor higher than the preset risk factor threshold is determined as the power operation to be evaluated. The preset risk factor threshold can be set by the user as needed, or it can be an empirical value, which is not limited here.

[0100] Among them, the power operation information in step 304 includes power operation data of at least one of the personnel information category, operation construction category, operation environment category and operation management system category. The power operation data belonging to the personnel information category includes but is not limited to the number of production personnel, the number of safety and supervision personnel, the technical level of personnel, the safety awareness of personnel and the health level of personnel; the power operation data belonging to the operation construction category includes but is not limited to the power supply area, the proportion of insulated lines, the grid automation coverage rate, safety protection equipment and operation monitoring video; the power operation data belonging to the operation environment category includes but is not limited to the operation environment terrain information, operation weather information, operation area dryness information and operation area natural disaster information; the power operation data belonging to the operation management system category includes but is not limited to the risk management system, risk management agency information, risk management measures, violation management mechanism and operation risk assessment mechanism.

[0101] Exemplarily, step 304 includes: if power operation information of the power operation to be evaluated is detected, extracting features of the power operation information through a feature extraction layer in the target power risk assessment model to obtain power operation features.

[0102] As an embodiment, through the feature extraction layer in the target power risk assessment model, feature extraction is performed on the power operation information to obtain power operation features, including: the power operation information includes multiple power operation data belonging to at least one category that change in time series; for the power operation data belonging to each category, the influence information of the power operation data on the power safety risk assessment of the power operation to be assessed is obtained; according to the influence information of the power operation data on the power safety risk assessment of the power operation to be assessed, the power operation data is normalized to obtain normalized power operation data; through the feature extraction layer in the target power risk assessment model, feature extraction is performed on the normalized power operation data to obtain power operation features.

[0103] Among them, the impact information of the power operation data on the power safety risk assessment of the power operation to be assessed represents the positive impact state or negative impact state of the power operation data on the power safety risk assessment of the power operation to be assessed. When the power operation data on the power safety risk assessment of the power operation to be assessed is in a positive impact state, it means that the larger the power operation data is, the lower the power safety risk of the power operation to be assessed; when the power operation data on the power safety risk assessment of the power operation to be assessed is in a negative impact state, it means that the larger the power operation data is, the higher the power safety risk of the power operation to be assessed.

[0104] Furthermore, the power operation data is normalized according to the impact information of the power operation data on the power safety risk assessment of the power operation to be assessed to obtain normalized power operation data, including: obtaining the maximum data value and the minimum data value in each data belonging to the same category as the power operation data, and normalizing the power operation data according to the impact state, the maximum data value and the minimum data value represented by the impact information of the power operation data on the power safety risk assessment of the power operation to be assessed to obtain normalized power operation data.

[0105] As one embodiment, the power operation data is normalized according to the impact state, data maximum value and data minimum value represented by the impact information of the power operation data on the power safety risk assessment of the power operation to be assessed, to obtain normalized power operation data, including: if the impact state represented by the power operation data on the impact information of the power safety risk assessment of the power operation to be assessed is a positive impact state, then the difference between the power operation data and the data minimum value, and the ratio of the difference between the data maximum value and the data minimum value are determined as the normalized power operation data; if the impact state represented by the power operation data on the impact information of the power safety risk assessment of the power operation to be assessed is a negative impact state, then the difference between the data maximum value and the power operation data, and the ratio of the difference between the data maximum value and the data minimum value are determined as the normalized power operation data.

[0106] Optionally, the ratio of the difference between the power operation data and the minimum value of the data and the difference between the maximum value of the data and the minimum value of the data is determined as the power operation normalized data, which can be expressed by the formula:

[0107]

[0108] in, Normalize data for power operations, For power operation data, is the minimum value of the data, is the maximum value of the data.

[0109] Optionally, the ratio of the difference between the maximum value of the data and the power operation data, and the difference between the maximum value of the data and the minimum value of the data, is determined as the power operation normalized data, which can be expressed by the formula:

[0110]

[0111] In this way, the influence status of the power operation data represented by its impact information on the power safety risk assessment of the power operation to be assessed is used as the basis for data normalization, thereby ensuring that the data processing scale of the target power risk assessment model is small, that is, improving the power risk assessment efficiency of the model, and the normalized power operation normalized data after normalization can also represent the impact characteristics of the power operation data on the power safety risk assessment, thereby improving the power risk assessment accuracy of the model. In summary, both the power risk assessment efficiency and the power risk assessment accuracy of the model are taken into account.

[0112] Step 306: Evaluate the power safety risk of the power operation to be evaluated based on the power operation characteristics to obtain a power risk evaluation result.

[0113] Exemplarily, step 306 includes: mapping the power operation features into power risk assessment results through a fully connected layer in the target power risk assessment model.

[0114] As an example, refer to Figure 4 The target power risk assessment model includes a convolutional layer, a pooling layer, and a fully connected layer as shown in the figure. The power operation information of the power operation to be assessed is used as the input of the target power risk assessment model. The power operation information is processed in sequence through the convolutional layer and the pooling layer of the target power risk assessment model to obtain the power operation characteristics, and the power operation characteristics are mapped to the power risk assessment results through the fully connected layer.

[0115] In this embodiment, the power risk assessment model is adjusted according to the target model weight information to obtain the target power risk assessment model; if the power operation information of the power operation to be evaluated is detected, the power operation information is feature extracted through the target power risk assessment model to obtain the power operation characteristics; based on the power operation characteristics, the power safety risk of the power operation to be evaluated is evaluated to obtain the power risk assessment result, and the power safety risk of the power operation to be evaluated is evaluated based on the power operation information of the power operation to be evaluated through the target power risk assessment model with updated weights, thereby improving the accuracy of the power safety risk assessment.

[0116] As a detailed embodiment, model weight information of multiple model parameters in a pre-trained power risk assessment model is obtained; feature encoding is performed on the model weight information of multiple model parameters to obtain model weight encoding features; a particle swarm construction step is executed: an initialization particle swarm is constructed according to the model weight encoding features; for each particle in the initialization particle swarm, the fitness of the particle is evaluated according to the difference between the output data of the model structure in the power risk assessment model corresponding to the particle and the corresponding real data to obtain the particle fitness of the particle; if the particle fitness of the current iteration does not meet the preset fitness condition, a random number within a preset value range is obtained, an iterative design parameter is obtained, and global particle information is determined; according to the global particle information, the random number and the iterative design parameter, the model weight information of the current iteration is adjusted, and the particle swarm construction step is returned to be executed; if the particle fitness of the current iteration meets the preset fitness condition, the model weight information of the current iteration is determined as the target model weight information.

[0117] Furthermore, according to the target model weight information, the power risk assessment model is adjusted to obtain the target power risk assessment model; for the power operation data belonging to each category, the influence information of the power operation data on the power safety risk assessment of the power operation to be assessed is obtained; according to the influence information of the power operation data on the power safety risk assessment of the power operation to be assessed, the power operation data is normalized to obtain normalized power operation data; through the target power risk assessment model, feature extraction is performed on the normalized power operation data to obtain power operation features; according to the power operation features, the power safety risk of the power operation to be assessed is assessed to obtain a power risk assessment result.

[0118] In this way, by obtaining the model weight information of multiple model parameters in the pre-trained power risk assessment model; feature encoding the model weight information of multiple model parameters to obtain model weight encoding features; executing the particle swarm construction step: constructing an initialization particle swarm according to the model weight encoding features; evaluating the fitness of each particle in the initialization particle swarm to obtain particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model; iteratively updating the model weight information according to the particle fitness to obtain the target model weight information, and refining the model prediction effect of the power risk assessment model to the granularity of the prediction accuracy of each model structure, and using the particle fitness that can characterize the prediction accuracy of the model structure as the basis for updating the model weight information, so that when the power risk assessment accuracy of the trained power risk assessment model is low, the model weight information can be iteratively updated to improve the power risk assessment accuracy of the power risk assessment model that uses the target model weight information as the basis for updating the model weight information.

[0119] Furthermore, the model weight information is adjusted through Gaussian quantum behavior, and the Gaussian mutation operator is used instead of the random sequence to guide the particle mutation and iterative optimization, wherein the particle adjustment adopts the wave function for iteration, thereby avoiding the model weight information from converging to the local optimum too early in the particle swarm algorithm, thereby ensuring the model prediction accuracy of the target power risk assessment model under the adjusted target model weight information; the target power risk assessment model with updated weights evaluates the power safety risk of the power operation to be evaluated according to the power operation information of the power operation to be evaluated, thereby improving the accuracy of the power safety risk assessment.

[0120] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0121] Based on the same inventive concept, the embodiment of the present application also provides a model weight information updating device for implementing the model weight information updating method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the model weight information updating device provided below can refer to the limitations on the model weight information updating method above, and will not be repeated here.

[0122] In an exemplary embodiment, Figure 5 As shown, a model weight information updating device 500 is provided, comprising: an acquisition module 502, an encoding module 504, a construction module 506, an evaluation module 508 and an updating module 510, wherein:

[0123] An acquisition module 502 is used to acquire model weight information of multiple model parameters in a pre-trained power risk assessment model;

[0124] The encoding module 504 is used to perform feature encoding on the model weight information of the multiple model parameters to obtain the model weight encoding feature;

[0125] The construction module 506 is used to execute the particle swarm construction step: construct an initialization particle swarm according to the model weight encoding feature;

[0126] An evaluation module 508 is used to evaluate the fitness of each particle in the initialized particle group to obtain the particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model;

[0127] The updating module 510 is used to iteratively update the model weight information according to the particle fitness to obtain the target model weight information.

[0128] In one embodiment, the evaluation module 508 is also used to evaluate the fitness of each particle in the initialized particle group according to the difference between the output data of the model structure in the power risk assessment model corresponding to the particle and the corresponding real data, so as to obtain the particle fitness of the particle.

[0129] In one of the embodiments, the update module 510 is also used to obtain a random number within a preset value range if the particle fitness of the current iteration does not meet the preset fitness conditions, adjust the model weight information of the current iteration according to the random number, and return to execute the particle swarm construction step; if the particle fitness of the current iteration meets the preset fitness conditions, the model weight information of the current iteration is determined as the target model weight information.

[0130] In one embodiment, the updating module 510 is further used to obtain iterative design parameters and determine global particle information; and adjust the model weight information of the current iteration according to the global particle information, the random number and the iterative design parameters.

[0131] In one of the embodiments, after the model weight information is iteratively optimized through the particle swarm algorithm according to the weight fusion information to obtain the target model weight information, the device also includes: an adjustment module, used to adjust the power risk assessment model according to the target model weight information to obtain the target power risk assessment model; if the power operation information of the power operation to be evaluated is detected, the power operation information is feature extracted through the target power risk assessment model to obtain the power operation feature; based on the power operation feature, the power safety risk of the power operation to be evaluated is evaluated to obtain the power risk assessment result.

[0132] In one of the embodiments, the power operation information includes multiple power operation data belonging to at least one category that change in time series; the adjustment module is also used to obtain, for the power operation data belonging to each category, the impact information of the power operation data on the power safety risk assessment of the power operation to be assessed; based on the impact information of the power operation data on the power safety risk assessment of the power operation to be assessed, the power operation data is normalized to obtain normalized power operation data; and through the target power risk assessment model, feature extraction is performed on the normalized power operation data to obtain power operation features.

[0133] Each module in the above-mentioned model weight information updating device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0134] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a model weight information updating method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0135] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0136] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0137] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0138] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0139] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0141] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for updating model weight information, characterized in that: The method comprises: Obtain model weight information of multiple model parameters in a pre-trained power risk assessment model; Performing feature encoding on the model weight information of the multiple model parameters to obtain model weight encoding features; Execute the particle swarm construction step: construct an initialization particle swarm according to the model weight encoding feature; Evaluate the fitness of each particle in the initialized particle group to obtain the particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model; The model weight information is iteratively updated according to the particle fitness to obtain the target model weight information.

2. The method according to claim 1, characterized in that The step of evaluating the fitness of each particle in the initialized particle group to obtain the particle fitness includes: For each particle in the initialized particle group, the fitness of the particle is evaluated according to the difference between the output data of the model structure in the power risk assessment model corresponding to the particle and the corresponding real data to obtain the particle fitness of the particle.

3. The method according to claim 1, characterized in that The iterative updating of the model weight information according to the particle fitness to obtain the target model weight information includes: If the particle fitness of the current iteration does not meet the preset fitness condition, a random number within a preset value range is obtained, and the model weight information of the current iteration is adjusted according to the random number, and the particle swarm construction step is returned to be executed; If the particle fitness of the current iteration meets the preset fitness condition, the model weight information of the current iteration is determined as the target model weight information.

4. The method according to claim 3, characterized in that The step of adjusting the model weight information of the current iteration according to the random number includes: Obtain iterative design parameters, and determine global particle information; The model weight information of the current iteration is adjusted according to the global particle information, the random number and the iterative design parameter.

5. The method according to claim 1, characterized in that After iteratively updating the model weight information according to the particle fitness to obtain the target model weight information, the method further includes: According to the target model weight information, the power risk assessment model is adjusted to obtain a target power risk assessment model; If power operation information of the power operation to be evaluated is detected, feature extraction is performed on the power operation information through the target power risk assessment model to obtain power operation features; According to the power operation characteristics, the power safety risk of the power operation to be evaluated is evaluated to obtain a power risk assessment result.

6. The method according to claim 5, characterized in that The electric power operation information includes a plurality of electric power operation data belonging to at least one category and changing in time sequence; The step of extracting features of the power operation information through the target power risk assessment model to obtain power operation features includes: For each category of power operation data, obtaining information on the impact of the power operation data on the power safety risk assessment of the power operation to be assessed; According to the influence information of the power operation data on the power safety risk assessment of the power operation to be assessed, the power operation data is normalized to obtain normalized power operation data; The target power risk assessment model is used to extract features from the normalized power operation data to obtain power operation features.

7. A model weight information updating device, characterized in that: The device comprises: An acquisition module, used to acquire model weight information of multiple model parameters in a pre-trained power risk assessment model; An encoding module, used for performing feature encoding on the model weight information of the plurality of model parameters to obtain model weight encoding features; A construction module is used to execute a particle swarm construction step: construct an initialization particle swarm according to the model weight encoding feature; An evaluation module, used for evaluating the fitness of each particle in the initialized particle group to obtain the particle fitness, wherein the particle fitness is used to characterize the prediction accuracy of each model structure in the power risk assessment model; The updating module is used to iteratively update the model weight information according to the particle fitness to obtain the target model weight information.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Information security monitoring model construction method and device, information security monitoring model application method and device and storage medium

    CN115037553A

  • Training method and assessment method of pipeline risk assessment model, equipment and medium

    CN115952857A

  • Wind resource assessment method and system based on adaptive particle swarm optimization neural network

    CN117634974A

  • Power load prediction method based on particle swarm optimization optimization fusion model

    CN117913776A

  • Source load interaction flexible peak load shifting method based on deep learning and multi-objective optimization algorithm

    CN117937571A