Power distribution network fault plan retrieval generation method and related device
By employing a heuristically optimized and enhanced contingency plan model in distribution network fault handling, and utilizing structured text vectors and heuristic algorithms to generate recovery strategies, the problem of traditional methods relying on human experience is solved, achieving rapid and intelligent fault recovery and contingency plan library optimization.
Patent Information
- Application Number
- CN202511169182.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-12-05
AI Technical Summary
Traditional methods for handling power distribution network faults rely on human experience, resulting in low recovery efficiency. Furthermore, existing AI-based methods lack intelligent contingency plan retrieval and generation mechanisms, making it impossible to respond quickly to complex faults, and the generated recovery strategies may not be suitable for the actual situation.
A large-scale model of distribution network fault contingency plan based on heuristic optimization enhancement is adopted. By generating structured fault query text vectors, cosine similarity calculation and heuristic algorithms are used to quickly retrieve or generate recovery strategies. Combined with enhanced pigeon heuristic algorithm to optimize load recovery, considering factors such as electrical distance, load priority, capacity and controllability, an efficient fault recovery scheme is generated.
It improves the efficiency and accuracy of power distribution network fault handling, enhances the level of intelligence, ensures the rapid recovery of high-priority loads and system stability, reduces reliance on human experience, and optimizes the coverage and adaptability of the contingency plan database.
Smart Images

Figure CN121071192A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of smart grid, and relates to a power distribution network fault recovery technology, in particular to a power distribution network fault plan searching and generating method and related devices. BACKGROUND
[0002] As an important part of the power system, the power distribution network is responsible for delivering power from the transmission network to various user terminals. Its reliability and stability are directly related to the normal operation of society and economic development. However, in the daily operation of the power distribution network, due to factors such as equipment aging, natural disasters, external interference, and operation errors, power distribution network failures occur from time to time. These failures not only affect the supply of electricity, but also can cause equipment damage, production interruption, personnel casualties, and other major losses. Therefore, timely and effective power distribution network fault recovery is also crucial.
[0003] Traditional power distribution network fault handling methods mainly rely on manual experience judgment, often requiring a large amount of manpower and material resources, and the decision-making process is heavily dependent on the experience level of on-site personnel. Further, when faced with complex fault types, the method of manual experience judgment to develop recovery strategies not only takes time, but also may lead to low recovery efficiency due to human factors. In addition, with the expansion of the power distribution network scale and the diversification of fault types, the development of recovery strategies becomes more difficult, and the above traditional fault recovery methods have been unable to meet the needs of modern power distribution networks for fast response and efficient recovery.
[0004] In recent years, with the development of artificial intelligence technology, intelligent fault diagnosis and recovery strategy development methods have gradually attracted attention. Currently, some research has attempted to use rule-based systems, expert systems, and machine learning methods to support power distribution network fault handling, but these methods have certain limitations. For example, rule base maintenance is difficult, model training data is insufficient, and it is difficult to cover all complex fault scenarios. Further specifically, the existing power distribution network fault recovery methods based on artificial intelligence generally have the following shortcomings: first, there is a lack of intelligent plan searching and generating mechanism, which cannot quickly filter out the most suitable recovery strategy from a large plan library; second, there is no effective feedback and optimization mechanism, and the generated recovery strategy may not adapt to the actual situation; third, when relevant plans cannot be retrieved, effective alternative solutions cannot be provided. SUMMARY
[0005] The purpose of the present application is to provide a power distribution network fault plan retrieval generation method and related device to solve one or more of the above technical problems. The technical solution disclosed by the present application is a power distribution network fault plan large model double-path retrieval generation scheme based on heuristic optimization enhancement, which can quickly respond to faults and generate or retrieve recovery strategies, improve the reliability and operation stability of the power distribution network, and effectively improve the fault handling efficiency, accuracy and intelligent level of the power distribution network.
[0006] To achieve the above purpose, the present application adopts the following technical solutions: In the first aspect of the present application, a power distribution network fault plan retrieval generation method is provided, comprising the following steps: Obtain power distribution network fault information and generate a structured fault query text vector; Calculate the similarity of the fault query text vector and each vector in the power distribution network fault plan vector library, and obtain the similarity calculation result; Based on the similarity calculation result, obtain the power distribution network fault plan retrieval or generation result; wherein, if there is a vector in the power distribution network fault plan vector library that is similar to the fault query text vector and has a similarity greater than or equal to a preset threshold, then based on the vector with a similarity greater than or equal to the preset threshold, extract the text block and generate the power distribution network fault plan retrieval result; if there is no vector in the power distribution network fault plan vector library that is similar to the fault query text vector and has a similarity greater than or equal to the preset threshold, then use a heuristic algorithm to obtain the power distribution network fault plan generation result.
[0007] The further improvement of the technical solution of the present application is that in the step of obtaining power distribution network fault information and generating a structured fault query text vector, The power distribution network fault information includes one or more of fault type, occurrence time, impact range and possible cause; The step of generating a structured fault query text vector is to perform standardization and formatting processing based on a preset template, and convert the query information into a vector representation of the selected retrieval enhancement generation model.
[0008] The further improvement of the technical solution of the present application is that the construction step of the power distribution network fault plan vector library comprises: Obtain power system dispatching regulation text data; Based on the text content features, process the obtained power system dispatching regulation text data to obtain text data suitable for generation large model processing; According to the text content, the text data suitable for the generative large model processing is processed in blocks to obtain a plurality of text blocks; each text block processing is converted into a vector form and stored in a database to obtain a constructed power distribution network fault plan vector library.
[0009] Further improvement of the technical scheme of the application is that in the step of calculating the similarity of the fault query text vector and each vector in the power distribution network fault plan vector library to obtain the similarity calculation result, a cosine similarity calculation method is used to calculate the similarity of the fault query text vector and each vector in the power distribution network fault plan vector library.
[0010] Further improvement of the technical scheme of the application is that the step of obtaining the power distribution network fault plan generation result by using the heuristic algorithm comprises: Based on the power distribution network fault information, the network state information of the fault area is collected and shared by using a distributed control mode; wherein the power distribution network fault information comprises specific position, type and severity information of the fault; Based on the power distribution network fault information and the network state information of the fault area, a heuristic algorithm is applied to consider four factors of electrical distance, priority of load, capacity and controllability, to prioritize the recovery of high-priority load as a search rule for optimization, to obtain the optimized recovery strategy as the power distribution network fault plan generation result; In the optimization process, the objective function is based on the weighted load level, the important loads of grade I and II are prioritized and the number of switch operations is minimized; the constraint conditions include node voltage constraint, line current constraint and loopless network constraint.
[0011] Further improvement of the technical scheme of the application is that in the optimization process, The power supply of the important load is maximized, and the objective function is expressed as: ; In the formula, is the total outage load; I, II and III grade loads during power outage are represented respectively; are the number of nodes of each grade load respectively; are the important weight coefficients of each grade load respectively; is the node index; The number of switch operations is minimized, and the objective function is expressed as: ; In the formula, represents the number of switch operations during the power distribution network fault recovery; and represent the number of branch switches and tie switches in the remaining network respectively; and indicate on-off states of branch switches and tie switches, respectively; is an index of the branch switch; is an index of the tie switch; fitness function of the heuristic algorithm is represented as: ; In the formula, switch target function weight.
[0012] Further improvement of the technical scheme of the present application is that the heuristic algorithm is used to consider four factors of electrical distance, priority of load, capacity and controllability, and priority is ensured for recovery of high-priority load as a search rule in the process of optimization, The heuristic algorithm used is an enhanced pigeon heuristic algorithm, which generates initial solutions by using a chaotic initialization strategy on the basis of a traditional pigeon heuristic algorithm, and dynamically retains the best individual of each generation by introducing an elite selection strategy, so as to accelerate the convergence speed by directional accumulation of high-quality genes; in addition, in the landmark operator stage, a Cauchy disturbance strategy is used to apply long-tail distribution disturbance to the global optimal solution, and when the fitness criterion exceeds a threshold value, the large step length characteristic of Cauchy mutation is used to force the local optimum to jump out.
[0013] Further improvement of the technical scheme of the present application is that the chaotic initialization strategy is used to generate initial solutions, which includes: The tent map mapping is defined as: ; In the formula, 0 X 0<1, and the value is generated by a rand function; when µ =1, the mapping remains in a completely chaotic state, Xn ∈(0, 1); A random number between 0 and 1 is generated by using the tent map mapping; subsequently, according to the solution space of the problem and the dimension of the pigeon heuristic algorithm, the corresponding individual initialization formula is converted into the following formula: ; In the formula, represents the jth variable of the ith individual in the population; z represents the jth variable of the ith individual in the population; c represents the jth variable of the ith individual in the population; and represent the lower bound and the upper bound of the solution space, respectively; D is the dimension of the pigeon heuristic algorithm; By using reverse learning initialization, the reverse solution is calculated on the basis of each initial solution, and the initial solution and the reverse solution jointly constitute a new population.
[0014] Further improvement of the technical scheme of the present application is that the elite selection strategy is introduced to dynamically reserve the optimal individual of each generation, and the convergence speed is accelerated by directional accumulation of high-quality genes, including: The highest fitness individual is selected as the initial pigeon population by using the elite selection strategy; wherein, The current solution and the reverse solution are used as the starting point in the search process, and the reverse point is defined as: In the D-dimensional space of the algorithm, represents a point in the space, , , are respectively The lower limit and the upper limit of the value; for the reverse point Corresponding to each space point, it is represented as: ; In the generated initial population, the reverse point of each individual is calculated, and the fitness value is calculated by substituting the fitness function; based on the calculation result of the fitness value, the size of the fitness value of each individual and its reverse point is compared, if the fitness value of the reverse point is smaller, the reverse point is used to replace the original individual, otherwise the original individual is kept unchanged.
[0015] Further improvement of the technical scheme of the present application is that in the landmark operator stage, the Cauchy disturbance strategy is used to apply long-tail distribution disturbance to the global optimal solution, and when the fitness criterion exceeds the threshold value, the large step length characteristic of Cauchy mutation is used to force to jump out of the local optimum, including: The Cauchy probability density function is defined as: ; The Cauchy distribution function is defined as: ; In the formula, x 0 represents the location parameter of the Cauchy distribution; γ represents the scale parameter of the Cauchy distribution; The Cauchy perturbation is applied to the global optimal solution, and the global best solution is represented as: ; In the formula, represents the global best solution; represents a random number generated by the Cauchy probability distribution; and respectively represent the upper limit and the lower limit of the pigeon optimization problem; Wherein, the new After that, first check whether the perturbed coordinates are within the defined range, if it is beyond, keep the original coordinates unchanged, if the perturbed coordinates are within the boundary, compare the fitness of the perturbed solution and the original global optimal solution, if the perturbed solution is better, update the global optimal solution and reset the failure count variable to 0, finally, according to the fitness ranking, reassign the half of the population that performs poorly to converge to the latest global best position.
[0016] In a second aspect, the present application provides a power distribution network fault plan retrieval generation system, comprising: A data preprocessing module is configured to obtain power distribution network fault information and generate a structured fault query text vector. A similarity calculation module is configured to calculate the similarity between the fault query text vector and each vector in the power distribution network fault plan vector library, and obtain a similarity calculation result. A retrieval generation module is configured to obtain a power distribution network fault plan retrieval or generation result based on the similarity calculation result, wherein if there is a vector in the power distribution network fault plan vector library that has a similarity greater than or equal to a preset threshold with the fault query text vector, the retrieval generation module extracts a text block based on the vector and generates a power distribution network fault plan retrieval result; if there is no vector in the power distribution network fault plan vector library that has a similarity greater than or equal to a preset threshold with the fault query text vector, the retrieval generation module uses a heuristic algorithm to obtain a power distribution network fault plan generation result.
[0017] Further improvements of the technical scheme of the present application are that in the data preprocessing module, the step of obtaining power distribution network fault information and generating a structured fault query text vector includes: The power distribution network fault information includes one or more of fault type, occurrence time, impact range, and possible causes. The step of generating a structured fault query text vector includes standardized and formatted processing based on a preset template, converting the query information into a vector representation of the selected retrieval enhancement generation model.
[0018] Further improvements of the technical scheme of the present application are that the construction step of the power distribution network fault plan vector library includes: Obtain power system dispatching regulation text data. Process the obtained power system dispatching regulation text data based on text content features to obtain text data suitable for processing by a generative large model. According to the text content, the text data suitable for processing by a generative large model is processed in blocks to obtain a plurality of text blocks, each text block is processed and converted into a vector form and stored in a database, and a constructed power distribution network fault plan vector library is obtained.
[0019] The further improvement of the technical scheme of the present application is that in the step of calculating the similarity of the fault query text vector and each vector in the power distribution network fault preplan vector library to obtain the similarity calculation result, a cosine similarity calculation method is used to calculate the similarity of the fault query text vector and each vector in the power distribution network fault preplan vector library.
[0020] The further improvement of the technical scheme of the present application is that the step of obtaining the power distribution network fault preplan generation result by using the heuristic algorithm comprises: Based on the power distribution network fault information, network state information of the fault area is collected and shared by using a distributed control mode; wherein the power distribution network fault information comprises specific position, type and severity information of the fault; Based on the power distribution network fault information and the network state information of the fault area, a heuristic algorithm is applied to consider four factors of electrical distance, priority of load, capacity and controllability, to prioritize the recovery of high-priority load as a search rule to perform optimization, to obtain the optimized recovery strategy as the power distribution network fault preplan generation result; In the optimization process, the target function takes the weighted load level as a reference, and the important loads of levels I and II are prioritized and the number of switch operations is minimized; the constraint conditions comprise node voltage constraint, line current constraint and loopless network constraint.
[0021] The further improvement of the technical scheme of the present application is that in the optimization process, The power supply of important loads is maximized, and the target function is expressed as: ; In the formula, is the total outage load; I, II and III represent the loads of levels I, II and III respectively during power outage; N1, N2 and N3 are the node numbers of the loads of levels I, II and III respectively; W1, W2 and W3 are the important weight coefficients of the loads of levels I, II and III respectively; is the node index; The number of switch operations is minimized, and the target function is expressed as: ; In the formula, represents the number of switch operations during the power distribution network fault recovery; and represent the numbers of branch switches and tie switches in the remaining network respectively; and indicate the on-off states of the branch switches and the tie switches respectively; is the branch switch index; is the tie switch index; fitness function of the heuristic algorithm is represented as: ; In the formula, Switch target function weight.
[0022] Further improvement of the technical scheme of the application is that the heuristic algorithm is used to consider four factors of electrical distance, priority of load, capacity and controllability, and priority is ensured for recovery of high-priority load as a search rule in the process of optimization, The heuristic algorithm used is an enhanced pigeon heuristic algorithm, which generates initial solutions by using a chaotic initialization strategy on the basis of a traditional pigeon heuristic algorithm, and dynamically retains the best individual of each generation by introducing an elite selection strategy, so as to accelerate the convergence speed by directional accumulation of high-quality genes; in addition, in the landmark operator stage, a Cauchy disturbance strategy is used to apply long-tail distribution disturbance to the global optimal solution, and when the fitness criterion exceeds a threshold value, the large step length characteristic of Cauchy mutation is used to force the local optimum to jump out.
[0023] Further improvement of the technical scheme of the application is that the chaotic initialization strategy is used to generate initial solutions, which comprises: The tent map mapping is defined as: ; In the formula, 0 X 0<1, and the value is generated by a rand function; the value is selected µ =1, the mapping remains in a completely chaotic state, Xn ∈(0,1); A random number between 0 and 1 is generated by using the tent map mapping; subsequently, according to the solution space of the problem and the dimension of the pigeon heuristic algorithm, the corresponding individual initialization formula is converted into the following formula: ; In the formula, represents the jth variable of the ith individual in the population; z represents the jth variable of the ith individual in the population; c represents the jth variable of the ith individual in the population; and respectively represent the lower bound and the upper bound of the solution space; D is the dimension of the pigeon heuristic algorithm; By using reverse learning initialization, the reverse solution is calculated on the basis of each initial solution, and the new population is formed.
[0024] Further improvement of the technical scheme of the application is that the elite selection strategy is introduced to dynamically retain the best individual of each generation, and the convergence speed is accelerated by directional accumulation of high-quality genes, which comprises: The individual with the highest fitness is selected as the initial pigeon population by using the elite selection strategy; wherein, In the search process, the current solution and the reverse solution are used as the starting point simultaneously, and the reverse point is defined as: In the D-dimensional space of the algorithm, denotes a point in the space, , , respectively the lower bound and the upper bound of the value; for the reverse point corresponding to each space point, is denoted as: ; In the generated initial population, the reverse point of each individual is calculated, and the fitness value is calculated by substituting the fitness function; based on the calculation result of the fitness value, the size of the fitness value of each individual and its reverse point is compared, if the fitness value of the reverse point is smaller, the reverse point is replaced with the original individual, otherwise the original individual is kept unchanged.
[0025] Further improvement of the technical scheme of the application is that, in the landmark operator stage, a Cauchy disturbance strategy is used to apply long-tail distribution disturbance to the global optimal solution, when the fitness criterion exceeds the threshold value, the large step length characteristic of Cauchy mutation is used to force to jump out of the local optimum, including: The Cauchy probability density function is defined as: ; The Cauchy distribution function is defined as: ; In the formula, x 0 represents the location parameter of the Cauchy distribution; γ represents the scale parameter of the Cauchy distribution; Cauchy perturbation is applied to the global optimal solution, and the global best solution is denoted as: ; In the formula, represents the global best solution; represents a random number generated by the Cauchy probability distribution; and respectively represent the upper bound and the lower bound of the pigeon optimization problem; Wherein, after obtaining a new , firstly, it is checked whether the perturbed coordinate is within the defined range, if it is out of the range, the original coordinate is kept unchanged, if the perturbed coordinate is within the boundary, the fitness of the perturbed solution and the original global optimal solution is compared, if the perturbed solution is better, the global optimal solution is updated and the failure count variable is reset to 0; finally, according to the fitness ranking, the half of the population with poor performance is re-allocated to converge to the latest global best position.
[0026] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the power distribution network fault plan retrieval generation method according to any one of the first aspect of the present application.
[0027] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the power distribution network fault plan retrieval generation method according to any one of the first aspect of the present application.
[0028] Compared with the prior art, the present application has the following beneficial effects: The power distribution network fault plan retrieval generation method disclosed in the present application aims to improve the efficiency, accuracy, and intelligent level of power distribution network fault handling through natural language processing and artificial intelligence technology. Specifically, the new method disclosed in the present application combines intelligent retrieval and generation, can quickly respond to power distribution network faults and generate or retrieve fault recovery strategies, thereby improving the reliability and operational stability of the power distribution network, and can be applied to fault recovery and emergency management of intelligent power distribution networks, automated power distribution systems, and power networks. Further specifically, in the technical solution of the present application, first, the natural language processing technology is used to structure the fault information into a standard format fault query text vector, ensuring the standardization and processability of the fault information, laying a foundation for subsequent intelligent retrieval, speeding up the retrieval speed and improving the accuracy; second, combined with the RAG model with enhanced retrieval, the retrieval and generation capabilities are utilized, historical fault data and plans are efficiently utilized, similar plans are quickly located in the retrieval stage through vector similarity measurement, and new plans are generated in the generation stage based on the retrieval results and current fault characteristics, reducing the dependence on artificial experience, realizing intelligent generation and retrieval; at the same time, a heuristic algorithm is introduced to optimize the preliminary retrieved plans, focusing on key factors such as load recovery cost, comprehensive recovery value, and load controllability, prioritizing high-priority load recovery, considering system economy and stability, generating more practical fault recovery schemes, and improving fault handling efficiency and recovery accuracy.
[0029] In the preferred technical solution of the present application, an innovative mechanism of vector retrieval and heuristic algorithm fusion is disclosed; wherein the RAG technology and the improved heuristic algorithm (such as the enhanced pigeon heuristic algorithm) are combined and applied to power distribution network fault plan management, the plans are quickly retrieved through vector similarity, and when the retrieval fails, a new strategy is generated using the heuristic algorithm, effectively solving the problem of insufficient plan library coverage, improving fault recovery efficiency, and being an innovative solution not seen in the existing power distribution network fault recovery field.
[0030] In the preferred technical scheme of the present application, the enhanced pigeon-inspired optimization algorithm is specifically adopted, aiming at the problem that the traditional PIO is easy to fall into local optimum, a chaotic initialization strategy is adopted to generate initial solutions with wider coverage, the ergodicity of the chaotic system is utilized to enhance the population diversity, and premature convergence is avoided from the root; in addition, an elite selection strategy is introduced to dynamically reserve the optimal individual of each generation, the convergence speed is accelerated through directional accumulation of high-quality genes, and the global exploration and local development capabilities are balanced by combining with the Cauchy disturbance strategy; furthermore, in the landmark operator stage, the Cauchy disturbance strategy is innovatively adopted to apply long-tailed distribution disturbance to the global optimal solution, when the fitness criterion exceeds the threshold, the large step length characteristic of Cauchy mutation is utilized to force the local optimum to jump out, and the defect that the traditional algorithm is easy to stagnate in a complex multi-peak function is effectively solved. In summary, the synergistic effect of the above strategies effectively reduces the active power loss and the number of switch operations, and has both global exploration ability and local fine search ability, and the convergence speed and solution quality are better than those of the traditional heuristic algorithm. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the present application or prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below; obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0032] Figure 1 is a flowchart of a power distribution network fault plan retrieval generation method in an embodiment of the present application; Figure 2 is a flowchart of a power distribution network fault plan retrieval generation method in a specific embodiment of the present application; Figure 3 is a schematic diagram of a power distribution network fault plan retrieval generation system in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical scheme and advantages of the present application more clear, the technical scheme in the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application; obviously, the described embodiment technical scheme is a part of the embodiments of the present application, and is not all the embodiments.
[0034] All other embodiments obtained by those of ordinary skill in the art based on the technical solutions disclosed in the embodiments of the present application without creative labor fall within the scope of the present application. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0035] Referring to Figure 1 The power distribution network fault plan retrieval generation method provided by the embodiments of the present application specifically includes the following steps: Step 1, obtaining power distribution network fault information and generating a structured fault query text vector; Step 2, calculating the similarity of the fault query text vector and each vector in the power distribution network fault plan vector library, and obtaining a similarity calculation result; Step 3, obtaining a power distribution network fault plan retrieval or generation result based on the similarity calculation result; wherein, if there is a vector in the power distribution network fault plan vector library that is similar to the fault query text vector and has a similarity greater than or equal to a preset threshold, then text blocks are extracted based on the vector that is similar to the fault query text vector and has a similarity greater than or equal to the preset threshold, and a power distribution network fault plan retrieval result is generated; if there is no vector in the power distribution network fault plan vector library that is similar to the fault query text vector and has a similarity greater than or equal to the preset threshold, then a heuristic algorithm is used to obtain a power distribution network fault plan generation result, with the optimization goal of restoring power supply to important loads as much as possible and minimizing the number of switch actions.
[0036] The technical solution provided by the embodiments of the present application is specifically a power distribution network fault plan large model double-path retrieval generation method based on heuristic optimization enhancement, which can automatically retrieve the corresponding recovery strategy plan according to the power distribution network fault information. If a matching recovery strategy plan cannot be retrieved, a new corresponding recovery strategy is generated through a heuristic algorithm. In a further optimized technical solution, the generated new strategy can be submitted to an expert for review. After the review is passed, the new recovery strategy can be added to the power distribution network fault plan vector library for future quick use. In summary, the method of the present application can effectively improve the response speed and recovery accuracy of the power distribution network fault, and can further optimize the plan library through an expert review mechanism.
[0037] Referring to Figure 2The embodiment of the application specifically provides a power distribution network fault plan retrieval generation method, which starts from constructing a power distribution network fault plan vector library to provide a data basis for subsequent retrieval; when a fault occurs, fault information is collected and a fault query text is constructed; similar text blocks in the plan vector library are retrieved through RAG (Retrieval-Augmented Generation) technology, and if a matching plan is found, the recovery strategy is directly output for the user to use; if the retrieval fails, the pigeon heuristic algorithm is used to generate a recovery strategy to ensure the timeliness and effectiveness of fault handling. In a further optional technical solution, the generated strategy is reviewed by experts, and reasonable and effective strategies are constructed as new fault plans, which are vectorized again and included in the plan vector library to form a closed-loop optimization mechanism. The steps of the above embodiment technical solution can specifically include: Step 1: Constructing a power distribution network fault plan vector library; In a specific example technical solution, first, the power system dispatching regulation text is preprocessed, and based on the content features of the text, various data such as tables in the file are processed, and all information is converted into text that can be processed by the generative large model; then, the regulation text is blocked according to the content; then, each text block is processed through natural language processing technology (such as BERT), and is converted into a vector form (explanatorily, these vectors represent the key information in the plan, so that the system can quickly retrieve related plans by calculating the similarity); finally, the vectors of all plans are stored in the database for efficient retrieval and updating.
[0038] Step 2: Fault information preprocessing; In a specific example technical solution, when a fault occurs in the power distribution network, the system collects fault information through a monitoring platform or manual reporting, covering fault types, occurrence time, impact range, possible causes, etc.; the collected fault information is standardized and formatted based on templates, and is converted into a suitable query information to a vector representation of the RAG model. Through this process, the system can obtain a structured fault information representation to facilitate subsequent plan retrieval. A specific example template is shown in Table 1.
[0039] Table 1. Example template
[0040] Step 3: Fault recovery plan retrieval based on RAG technology; In a specific example technical solution, after a fault occurs, the most matching text blocks in the plan vector library are found according to the calculation of vector similarity. If the query similarity is higher than the threshold, the large model outputs a strategy based on these text blocks and prompt words to guide relevant personnel to perform recovery. The system uses cosine similarity to match fault information and plans: ; In the formula, similarity represents the similarity between two vectors, the value range is between ; the value is closer to 1, indicating that the two vectors are more similar; the value is closer to -1, indicating that the two vectors are less similar; the value is 0, indicating that the two vectors are orthogonal (i.e. independent and irrelevant). A, B represent two vectors respectively; represents the angle between the vector and the vector , which is used to measure the difference in direction of the two vectors. represents the component of the vector in the first dimension. represents the component of the vector in the first dimension. represents the component of the vector in the first dimension. represents the component of the vector in the first dimension. represents the dimension number of the vector, that is, the number of components in the vector.
[0041] Step 4: When the heuristic method cannot be retrieved, a recovery strategy is generated; In a specific example technical solution, when the system cannot retrieve the relevant strategy from the contingency library, that is, when the similarity is lower than the threshold, the heuristic search rule is applied based on the fault data of the distribution network and the network state information of the fault area, considering the electrical distance, the priority of the load, the capacity and the controllability of the four factors, and the recovery of the high-priority load is ensured first, and the search scheme obtains the optimized fault recovery strategy.
[0042] In the optimization of the fault recovery strategy, the target function takes the weighted load level as the basis, and the important loads of grade I and grade II are preferentially restored and the number of switch operations is minimized; the constraint conditions include node voltage, line current and loop-free network, etc.
[0043] Considering island division, when the distribution network system fails, the distributed power (Distributed Generation, DG) with independent power supply capability is divided into an island to restore power supply to important loads as much as possible. The off-grid distribution network realizes fault reconstruction through the connection and disconnection of grid-connected switches. Therefore, the target function of the present application is: 1) considering the classification of load levels, the power supply to important loads is restored as much as possible; 2) on the basis of 1), the number of switch actions is minimized.
[0044] The mathematical model is specifically represented as: To maximize the restoration of power supply to important loads, the target function can be described as: ; In the formula, is the total outage load; I, II, III level loads during power failure, respectively; Number of nodes of each level load, respectively; Importance weight coefficient of each level load, respectively; Node index; Minimize the number of switch operations, the objective function is expressed as: ; In the formula, Indicates the number of switch operations during power distribution network fault recovery; And Respectively represent the number of branch switches and tie switches in the remaining network; And Indicate the on-off state of branch switches and tie switches, respectively; Branch switch index; Tie switch index; Fitness function of heuristic algorithm Indicated as: ; In the formula, Switch objective function weight.
[0045] The recovery reconfiguration of the remaining system power distribution network is also subject to the following constraints: 1) Node voltage constraint: ; In the formula, And The maximum voltage and minimum voltage of the nodes in the system, respectively; The actual voltage of the pth node; 2) Current offset: ; In the formula, Indicates the maximum current that can pass through the line during system reconfiguration and recovery; The actual current value of the dth line after reconfiguration; In addition, in order to avoid the occurrence of loop structure in the remaining power distribution network, the island should be isolated from the remaining main system, and all interconnection switches in the remaining network should be closed.
[0046] After the target and constraints of fault recovery are clear, heuristic method is used to generate possible switch state candidate set. In this step, the heuristic method will screen out switch state combinations that meet the constraints according to the search rules mentioned above, combined with the detailed information of power failure and the knowledge in the large model. These combinations will be used as candidate solutions for the subsequent optimization process.
[0047] In the basic Pigeon-Inspired Optimization (PIO) algorithm, two operator models are simulated according to different navigation tools used by pigeons on their way home: (1) map and compass operator, and (2) landmark operator.
[0048] ; wherein, is the map and compass factor, which is in the range of 0~1; is a random number between 0 and 1; denotes the velocity vector of the t-th pigeon; denotes the velocity vector of the t-th pigeon; denotes the current global best position; denotes the iteration number. In two-dimensional space, the velocity of the t-th pigeon is determined by its previous velocity and the current position relative to the current best position of the pigeon group. Similarly, the position of the first pigeon depends on its previous position and the current velocity. By comparing the positions of all pigeons, the individual with the optimal fitness value is selected as the current global optimal position .
[0049] i The landmark operator
[0050] ; ; wherein, fitness() represents the fitness of each pigeon, and represents the quality of the evaluated solution; denotes the number of pigeons remaining in each generation, which is equivalent to half of the original population; is the center position of all pigeons in the t-th generation; rand is a random number between 0 and 1. In the landmark operator evaluation stage, the navigation reference direction of the pigeon group is based on the center position of the dominant individual (pigeon familiar with the landmark). In this stage, pigeons will no longer be disturbed by their individual velocities. Therefore, the population can quickly converge to the optimal value.
[0051] In the implementation of the PIO algorithm, in order to prevent the population from converging to a local optimum too early, the present invention introduces a "chaos and reverse" strategy in the initialization process to enhance the randomness of the initial solution and the coverage of the solution space. At the same time, in the iteration process, a failure count (FC) variable is introduced, and when the FC value exceeds a predefined threshold MFC, a Cauchy perturbation redistribution strategy is used to disturb the global optimal solution, thereby maintaining the diversity of the population and avoiding the algorithm falling into a local optimum.
[0052] In a specific exemplary technical solution, the characteristics of chaotic motion are utilized to generate diverse initial flocks of pigeons through the Tent Map method. This method can cover the solution space more broadly and iterate faster, thereby effectively preventing premature convergence during the optimization process. The tent map mapping is defined as follows: ; In the above formula, 0 < X 0 < 1, its value is generated by the rand function. (Selection) µ = 1, then the mapping remains in a completely chaotic state. Xn ∈(0,1). Using this method, random numbers between 0 and 1 are generated. Then, based on the solution space of the problem at hand... S min , S max ] and the dimension of the PIO algorithm D The corresponding individual initialization formula can be transformed into the following formula: ; In the formula, Indicates the first in the whole z The first individual c Dimensional variables; S min and S max These represent the lower and upper bounds of the solution space, respectively.
[0053] By employing inverse learning initialization, the reverse solution is calculated based on each initial solution, and these solutions are combined to form a new population. This enhances population diversity while ensuring that the solution is closer to the global optimum.
[0054] In a specific exemplary technical solution, an elite selection strategy is used to select the individuals with the highest fitness from the above solutions as the initial pigeon flock, thereby improving the search efficiency and solution quality of the algorithm. During the search process, both the current solution and the reverse solution are used as starting points; the reverse point is defined as: In the D-dimensional space of the algorithm, This represents a point in space. Here, and For the reverse point For each spatial point, it is represented as: ; In the initial population generated by chaotic motion, calculate the reverse point of each individual S. And substitute it into the fitness function Calculate the fitness value. By comparing the fitness value of each individual with that of its reverse point, if the fitness value of the reverse point is smaller... If the initial fitness is found to be unsuitable, the original individual is replaced with the reversed point; otherwise, the original individual remains unchanged. This process, combined with an elite selection strategy, improves the quality of the initial solution by iteratively comparing the fitness values of the initial point with its symmetric point.
[0055] In a specific exemplary technical solution, in the subsequent iterations of the PIO algorithm, particularly the landmark operator stage, to overcome the problem of the population potentially getting trapped in local optima, this invention introduces a Cauchy perturbation redistribution strategy to disturb the global optimum, forcing individuals to continue moving and escape the current global optimum, thereby maintaining the population's exploration ability. The Cauchy probability density function is defined as: ; Furthermore, the Cauchy distribution function is defined as follows: ; In the formula, x 0 represents the location parameter of the Cauchy distribution; γ This represents the scale parameter of the Cauchy distribution. Different x 0 and γ The values correspond to different probability density functions. This paper selects... x 0 = 0 and γ The value of 1 yields significantly different function values within a smaller range of independent variables. Then, the Cauchy perturbation is applied to the global optimum.
[0056] ; in, Representing the world's best solutions; Denotes random numbers generated by the Cauchy probability distribution; where, and Let represent the upper and lower bounds of the pigeon flock optimization problem, respectively. After obtaining new... This process then involves several steps. First, it checks if the perturbation coordinates are within the defined range; if they are outside, the original coordinates are kept unchanged. If the perturbation value is within the boundary, the fitness of the perturbation solution is compared with that of the original global optimum. If the perturbation solution is better, the global optimum is updated and the FC (Full Functional Computation) is reset to 0. Finally, based on the fitness ranking, the underperforming half of the population is redistributed to converge towards the latest global optimum.
[0057] Further preferred technical solutions also include: Step 5: Expert review and update of the contingency plan database; Based on the requirements outlined in the contingency plan, a set of faults and their corresponding recovery strategies are generated. These strategies, along with the recovery strategies generated in step 4, are reviewed by experts to ensure their rationality, effectiveness, and feasibility. Experts adjust or optimize the generated recovery strategies based on the nature of the actual faults. The generated contingency plan and expert recommendations are then provided to the large model to generate the final strategy; for example, as shown in Table 2.
[0058] Table 2. Examples of Original Strategies and Expert Opinions
[0059] Based on the final strategy and contingency plan template, new contingency plans are generated through automated scripts and vectorized to become new contingency plan entries. Through this mechanism, the contingency plan library can be continuously expanded and optimized, enabling the system to provide richer and more accurate recovery strategies in the face of future failures.
[0060] In the preferred embodiment of this invention, an expert closed-loop review and dynamic optimization mechanism for the contingency plan database is further introduced to ensure the rationality and executability of the generated strategies and to dynamically update the database. Experts adjust and optimize the strategies based on actual power business needs, forming a high-quality contingency plan database, improving the system's intelligence level, and meeting the high requirements for distribution network fault recovery. This mechanism is unique and innovative in the field of distribution network fault recovery. This invention continuously optimizes the contingency plan database through an expert review mechanism. The database, after expert review, evaluation, and correction, better meets actual needs, providing strong support for fault recovery, enhancing the reliability and stability of the distribution network, achieving intelligent and automated fault handling, and effectively coping with complex and ever-changing fault scenarios.
[0061] In summary, the new technical solution provided by this invention can improve the fault response speed and recovery accuracy of distribution networks, effectively ensure the rapid generation or retrieval of suitable fault recovery strategies, realize the intelligent generation and retrieval of fault recovery strategies, reduce reliance on human experience, improve the automation and intelligence level of fault handling, effectively cope with complex and ever-changing distribution network fault scenarios, and improve the reliability and operational stability of distribution networks. Furthermore, by gradually optimizing the contingency plan library through an expert review mechanism, the rationality and effectiveness of the contingency plans can be improved.
[0062] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the apparatus embodiments, please refer to the embodiments of the method of the present invention.
[0063] Please see Figure 3 In this embodiment of the invention, a power distribution network fault contingency plan retrieval and generation system is provided, comprising: The data preprocessing module is used to acquire distribution network fault information and generate structured fault query text vectors; The similarity calculation module is used to calculate the similarity between the fault query text vector and each vector in the distribution network fault contingency plan vector library, and obtain the similarity calculation result; The retrieval and generation module is used to obtain the retrieval or generation result of the distribution network fault contingency plan based on the similarity calculation result. Specifically, if the similarity calculation result is that there exists a vector in the distribution network fault contingency plan vector library with a similarity greater than or equal to a preset threshold with the fault query text vector, then text blocks are extracted based on the vector with a similarity greater than or equal to the preset threshold, and a distribution network fault contingency plan retrieval result is generated. If the similarity calculation result is that there is no vector in the distribution network fault contingency plan vector library with a similarity greater than or equal to the preset threshold with the fault query text vector, then a heuristic algorithm is used to obtain the distribution network fault contingency plan generation result.
[0064] In one embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used to execute the operation of a distribution network fault plan retrieval and generation method.
[0065] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the distribution network fault contingency plan retrieval and generation method in the above embodiment.
[0066] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.
[0067] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0068] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0069] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0070] Finally, 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 the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for searching and generating a power distribution network failure scenario, characterized by, The method comprises the following steps: obtaining power distribution network fault information and generating a structured fault query text vector; calculating the similarity of the fault query text vector and each vector in the power distribution network fault plan vector library to obtain a similarity calculation result; based on the similarity calculation result, obtaining a power distribution network fault plan retrieval or generation result; wherein, if the similarity calculation result is that there is a vector in the power distribution network fault plan vector library that is similar to the fault query text vector and the similarity is greater than or equal to a preset threshold, then based on the vector with a similarity greater than or equal to the preset threshold, a text block is extracted and a power distribution network fault plan retrieval result is generated; if the similarity calculation result is that there is no vector in the power distribution network fault plan vector library that is similar to the fault query text vector and the similarity is greater than or equal to a preset threshold, then a heuristic algorithm is used to obtain a power distribution network fault plan generation result.
2. The method of claim 1, wherein, In the step of obtaining power distribution network fault information and generating a structured fault query text vector, The power distribution network fault information includes one or more of fault type, occurrence time, impact range and possible cause; The step of generating a structured fault query text vector is to perform standardization and formatting processing based on a preset template, and to convert the query information into a vector representation of the selected retrieval enhancement generation model.
3. The method of claim 1, wherein, The construction step of the power distribution network fault plan vector library comprises: obtaining power system dispatching regulation text data; processing the obtained power system dispatching regulation text data based on text content features to obtain text data suitable for processing by a generative large model; According to the text content, the text data suitable for processing by the generative large model is processed in blocks to obtain a plurality of text blocks; each text block is processed and converted into a vector form and stored in a database to obtain a constructed power distribution network fault plan vector library.
4. The method of claim 1, wherein, In the step of calculating the similarity of the fault query text vector and each vector in the power distribution network fault plan vector library to obtain a similarity calculation result, a cosine similarity calculation method is used to calculate the similarity of the fault query text vector and each vector in the power distribution network fault plan vector library.
5. The method of claim 1, wherein, The step of using a heuristic algorithm to obtain a power distribution network fault plan generation result comprises: Based on the power distribution network fault information, the network state information of the fault area is collected and shared using a distributed control mode; wherein, the power distribution network fault information includes the specific location, type and severity information of the fault; Based on the power distribution network fault information and the network state information of the fault area, a heuristic algorithm is applied to consider four factors: electrical distance, priority of load, capacity and controllability, to prioritize the recovery of high-priority loads as the search rule for optimization, and to obtain the optimized recovery strategy as the power distribution network fault plan generation result; In the optimization process, the objective function is based on the weighted load level, the important loads of level I and II are prioritized and the number of switch operations is minimized; the constraint conditions include node voltage constraint, line current constraint and loopless network constraint.
6. The method of claim 5, wherein, In the optimization process, The objective function is represented as: ; wherein, is the total load outage; I, II, III, respectively, are the load levels at the time of outage; N1, N2, N3, respectively, are the number of nodes of each load level; W1, W2, W3, respectively, are the important weight coefficients of each load level; is the node index; Minimize the number of switch operations, the objective function is expressed as: ; wherein denotes the number of switch operations at fault restoration of the distribution network; and represent the number of branch switches and tie switches in the remaining network, respectively; and indicate the on-off state of the branch switches and tie switches, respectively; is the index of the branch switches; is the index of the tie switches; Fitness function of heuristic algorithm is represented as: ; In the formula, Switching objective function weights.
7. The method of claim 5, wherein, The application heuristic algorithm is used to consider four factors of electrical distance, priority of load, capacity and controllability, and high priority load recovery is preferentially ensured as a search rule in the optimization process, The adopted heuristic algorithm is an enhanced pigeon heuristic algorithm, which generates an initial solution by using a chaos initialization strategy on the basis of a traditional pigeon heuristic algorithm, and introduces an elite selection strategy to dynamically reserve each generation of optimal individuals, and accelerates the convergence speed by directional accumulation of high-quality genes; in addition, in the landmark operator stage, a Cauchy disturbance strategy is used to apply a long-tailed distribution disturbance to the global optimal solution, and when the fitness criterion exceeds a threshold value, the large step length characteristic of Cauchy mutation is used to force the local optimum to jump out.
8. The method of claim 7, wherein, The chaos initialization strategy is used to generate an initial solution, which includes: The tent map mapping is defined as: ; In the formula, 0 < X 0 < 1, the value is generated by the rand function; selection µ If = 1, the mapping remains in a completely chaotic state. Xn ∈(0,1); By using the tent map mapping, a random number between 0 and 1 is generated; then, according to the solution space of the problem and the dimension of the pigeon heuristic algorithm, the corresponding individual initialization formula is converted into the following formula: ; wherein, denotes the i-th variable of the j-th individual in the population of size N; z denotes the i-th variable of the j-th individual in the population of size N; c denotes the i-th variable of the j-th individual in the population of size N; and denote the lower and upper bounds of the solution space, respectively; D is the dimension of the pigeonhole algorithm; By using reverse learning initialization, the inverse solution is calculated on the basis of each initial solution, and the new population is formed.
9. The method of claim 8, wherein, The elite selection strategy is introduced to dynamically reserve each generation of optimal individuals, and the convergence speed is accelerated by directional accumulation of high-quality genes, which includes: By using the elite selection strategy, the individual with the highest fitness is selected as the initial pigeon population; wherein, In the search process, the current solution and the inverse solution are used as the starting point at the same time, and the definition of the inverse point is: In the D-dimensional space of the algorithm, denotes a point in the space, , , respectively lower and upper bounds of the values; for the inverse points corresponding to each point in the space, is denoted as: ; In the generated initial population, the fitness value of each individual is calculated by substituting the inverse point into the fitness function; based on the calculation result of the fitness value, the fitness values of each individual and its inverse point are compared, if the fitness value of the inverse point is smaller, the inverse point is used to replace the original individual, otherwise the original individual is kept unchanged.
10. The method of claim 7, wherein, In the landmark operator stage, the Cauchy disturbance strategy is used to apply a long-tailed distribution disturbance to the global optimal solution, and when the fitness criterion exceeds a threshold value, the large step length characteristic of Cauchy mutation is used to force the local optimum to jump out, which includes: The Cauchy probability density function is defined as: ; The Cauchy distribution function is defined as: ; wherein x 0 represents a location parameter of the Cauchy distribution; γ represents a scale parameter of the Cauchy distribution; The Cauchy perturbation is applied to the global optimal solution, and the global best solution is expressed as: ; wherein representing the best global solution; representing a random number generated by a Cauchy probability distribution; and representing the upper and lower bounds of the pigeonhole optimization problem, respectively; wherein, after obtaining the new After that, first check if the perturbed coordinate is within the defined range, if not, keep the original coordinate unchanged, if the perturbed coordinate is within the boundary, compare the fitness of the perturbed solution and the original global optimal solution, if the perturbed solution is better, update the global optimal solution and reset the failure count variable to 0. Finally, according to the fitness ranking, reassign the half of the population that performs poorly to converge to the latest global best position.
11. A power distribution network contingency search generation system, characterized by, It includes: The data preprocessing module is used to obtain power distribution network fault information and generate a structured fault query text vector; The similarity calculation module is used to calculate the similarity of the fault query text vector and each vector in the power distribution network fault plan vector library, and obtain a similarity calculation result; The retrieval generation module is used to obtain a power distribution network fault plan retrieval or generation result based on the similarity calculation result; wherein, if there is a vector in the power distribution network fault plan vector library that is similar to the fault query text vector and has a similarity greater than or equal to a preset threshold value, text blocks are extracted based on the vector that is similar to the fault query text vector and has a similarity greater than or equal to the preset threshold value, and a power distribution network fault plan retrieval result is generated; if there is no vector in the power distribution network fault plan vector library that is similar to the fault query text vector and has a similarity greater than or equal to the preset threshold value, a heuristic algorithm is used to obtain a power distribution network fault plan generation result.
12. The power distribution network failure scenario search and generation system according to claim 11, characterized by, In the data preprocessing module, the step of obtaining power distribution network fault information and generating a structured fault query text vector, The power distribution network fault information includes one or more of fault type, occurrence time, influence range and possible cause; The step of generating a structured fault query text vector is to perform standardization and formatting processing based on a preset template, convert the query information into a vector representation of the selected retrieval enhancement generation model.
13. The power distribution network failure scenario search and generation system according to claim 11, characterized by, The construction step of the power distribution network fault plan vector library includes: Obtain power system dispatching regulation text data; Based on the text content features, the obtained power system dispatching regulation text data is processed to obtain text data suitable for generative large model processing; According to the text content, the text data suitable for generative large model processing is processed in blocks to obtain multiple text blocks; each text block is processed and converted into a vector form and stored in a database to obtain a constructed power distribution network fault plan vector library.
14. The power distribution network failure scenario search and generation system according to claim 11, wherein, In the step of calculating the similarity between the fault query text vector and each vector in the power distribution network fault plan vector library, the cosine similarity calculation method is used to calculate the similarity between the fault query text vector and each vector in the power distribution network fault plan vector library.
15. The power distribution network failure scenario retrieval and generation system of claim 11, wherein, The step of using a heuristic algorithm to obtain a power distribution network fault plan generation result includes: Based on the power distribution network fault information, the network state information of the fault area is collected and shared using a distributed control mode; wherein the power distribution network fault information includes the specific location, type and severity information of the fault; Based on the power distribution network fault information and the network state information of the fault area, a heuristic algorithm is applied to consider four factors of electrical distance, priority of load, capacity and controllability, and the recovery of high-priority load is prioritized as a search rule for optimization to obtain an optimized recovery strategy as a power distribution network fault plan generation result; In the optimization process, the objective function is based on the weighted load level, the important load of grade I and II is prioritized and the number of switch operations is minimized; the constraint conditions include node voltage constraint, line current constraint and loop-free network constraint.
16. The power distribution network failure scenario retrieval and generation system of claim 15, wherein, In the optimization process, The objective function for maximizing the recovery of important load supply is: ; wherein, is the total load outage; I, II, III, respectively, are the load levels at the time of outage; N1, N2, N3, respectively, are the number of nodes of each load level; W1, W2, W3, respectively, are the important weight coefficients of each load level; is the node index; The objective function for minimizing the number of switch operations is: ; wherein denotes the number of switch operations at fault restoration of the distribution network; and represent the number of branch switches and tie switches in the remaining network, respectively; and indicate the on-off state of the branch switches and tie switches, respectively; is the index of the branch switches; is the index of the tie switches; Fitness function of heuristic algorithm is represented as: ; In the formula, Switching objective function weights.
17. The power distribution network failure scenario retrieval and generation system of claim 15, wherein, In the process of applying a heuristic algorithm to consider four factors of electrical distance, priority of load, capacity and controllability, and prioritize the recovery of high-priority load as a search rule for optimization, The heuristic algorithm used is an enhanced pigeon heuristic algorithm, which generates an initial solution based on a chaos initialization strategy, dynamically retains the best individual of each generation by introducing an elite selection strategy, and accelerates the convergence speed by directional accumulation of high-quality genes; in addition, in the landmark operator stage, a Cauchy disturbance strategy is used to disturb the global optimal solution with a long tail distribution, and when the fitness criterion exceeds the threshold, the large step characteristic of Cauchy mutation is used to force the local optimum to jump out.
18. The power distribution network failure scenario retrieval and generation system of claim 17, wherein, The chaos initialization strategy for generating an initial solution includes: The tent map mapping is defined as: ; In the formula, 0 < X 0 < 1, the value is generated by the rand function; selection µ If = 1, the mapping remains in a completely chaotic state. Xn ∈(0,1); A random number between 0 and 1 is generated by tent map mapping, and then, according to the solution space of the problem and the dimension of the pigeon heuristic algorithm, the corresponding individual initialization formula is converted into the following formula: ; wherein, denotes the i-th variable of the j-th individual in the population of size N; z denotes the i-th variable of the j-th individual in the population of size N; c denotes the i-th variable of the j-th individual in the population of size N; and denote the lower and upper bounds of the solution space, respectively; D is the dimension of the pigeonhole algorithm; By adopting reverse learning initialization, the reverse solution is calculated on the basis of each initial solution to jointly constitute a new population.
19. The power distribution network failure scenario retrieval and generation system of claim 18, wherein, The introduction of the elite selection strategy dynamically retains the optimal individual of each generation, accelerates the convergence speed by directional accumulation of high-quality genes, and includes: By using the elite selection strategy, the individual with the highest fitness is selected as the initial pigeon population; wherein, In the search process, the current solution and the reverse solution are used as the starting point, and the definition of the reverse point is: In the D-dimensional space of the algorithm, denotes a point in the space, , , are respectively lower and upper bounds of the values; for the inverse points corresponding to each space point, is denoted as: ; In the generated initial population, the reverse point of each individual is calculated, and the fitness value is calculated by substituting the fitness function; based on the calculation result of the fitness value, the size of each individual and its reverse point is compared, if the fitness value of the reverse point is smaller, the reverse point is replaced with the original individual, otherwise the original individual is kept unchanged.
20. The power distribution network failure scenario retrieval and generation system of claim 17, wherein, In the landmark operator stage, the Cauchy disturbance strategy is adopted to disturb the global optimal solution with a long-tailed distribution, and when the fitness criterion exceeds the threshold value, the large step length characteristic of Cauchy mutation is used to force the local optimum to jump out, including: The Cauchy probability density function is defined as: ; The Cauchy distribution function is defined as: ; wherein x 0 represents a location parameter of the Cauchy distribution; The Cauchy perturbation is applied to the global optimal solution, and the global optimal solution is represented as: represents a scale parameter of the Cauchy distribution; The processor implements the power distribution network fault plan retrieval generation method according to any one of claims 1-10 when executing the program. ; wherein representing the best global solution; representing a random number generated by a Cauchy probability distribution; and representing the upper and lower bounds of the pigeonhole optimization problem, respectively; wherein, after obtaining the new After that, first check if the perturbed coordinate is within the defined range, if not, keep the original coordinate unchanged, if the perturbed coordinate is within the boundary, compare the fitness of the perturbed solution and the original global optimal solution, if the perturbed solution is better, update the global optimal solution and reset the failure count variable to 0. Finally, according to the fitness ranking, reassign the half of the population that performs poorly to converge to the latest global best position.
21. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The computer program implements the power distribution network fault plan retrieval generation method according to any one of claims 1-10 when executed by the processor. 22.A non-transitory computer-readable storage medium having stored thereon a computer program.