A method for setting and evaluating a decision pole tower factor weight based on a large model
By adopting a decision tower factor weight setting method based on a large model, combined with Transformer architecture and unsupervised feedback learning, the weights are dynamically adjusted, solving the problems of fixity and universality in tower disaster analysis and improving the flexibility and accuracy of the assessment.
Patent Information
- Application Number
- CN202410922657.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-07-10
AI Technical Summary
Existing methods for analyzing tower disasters suffer from problems such as fixed weight allocation, poor modeling versatility, strong dependence on labels, and uncertainty in effectiveness, making it difficult to achieve flexible and efficient disaster assessment.
A decision-making tower factor weight setting method based on a large model is adopted. The Transformer architecture model and unsupervised feedback learning are used to dynamically adjust the weight values of influencing factors. The tower stability is evaluated through a multivariate function model, and the model is optimized by combining user feedback.
It has improved the flexibility and adaptability of pole disaster assessment, enhanced the accuracy and efficiency of assessment, reduced the reliance on label data, and adapted to the analysis needs of different scenarios.
Smart Images

Figure CN118798043B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a method for setting and evaluating the weight of decision-making tower factors based on large models, belonging to the field of power system safety evaluation and disaster risk management. BACKGROUND
[0002] With the development of big data and artificial intelligence technology, more and more disaster evaluation methods begin to rely on data-driven. For example, by collecting and analyzing historical disaster data, meteorological data, geographical data, etc., to predict and evaluate the potential risks of towers and other power facilities.
[0003] Limitations of traditional analysis methods: Currently, tower disaster analysis mainly relies on traditional methods such as decision trees, deep neural networks, and mathematical modeling. These methods require detailed screening and analysis of relevant factors to determine the weight of decision factors, and may need to construct labels for modeling. The disadvantage of traditional methods is the fixedness of weight distribution, which is difficult to change once determined, and the modeling process is time-consuming and laborious, with unstable results, and it is difficult to conduct universal analysis.
[0004] The risk analysis method and system for power transmission and distribution line towers based on meteorological disasters (CN113537846B) mentioned in the disclosure number: According to meteorological disaster information, a risk level distribution map is drawn, the tower location is rasterized and superimposed analysis is performed to obtain a meteorological risk level distribution map of each power transmission and distribution line tower in the region. Although this method considers the impact of meteorological factors on tower risk, it does not involve the application of large models and unsupervised learning, and may still have limitations in the flexibility of weight distribution and model construction.
[0005] In the analysis of tower disasters, the methods currently used such as decision trees, deep neural networks or mathematical modeling indeed require detailed screening and analysis of various relevant factors to determine the weight of decision factors, and even need to construct labels in order to model the tower disaster model. However, this process has several significant problems and defects:
[0006] (1) Fixedness of weight distribution: Once the weight distribution of each factor is determined, it is difficult to change. This fixedness limits the flexibility and adaptability of the model. If the weight needs to be adjusted to more accurately reflect the actual situation, the model must be rebuilt and trained, which is time-consuming and laborious.
[0007] (2) Poor universality of modeling: Due to the specificity of weights and labels, existing disaster analysis models often have difficulty in universal analysis. This means that separate modeling is required for each specific scenario or situation, greatly reducing analysis efficiency.
[0008] (3) Dependence on labels: Existing supervised learning methods highly depend on real labels. However, in real-world applications, real labels may not always be available or easily accessible. This limits the application scope of supervised learning methods in tower disaster analysis.
[0009] (4) Uncertainty of effects: Even if a lot of time and resources are invested in model construction and training, the final effects may not be ideal. This may be caused by various factors such as the complexity of data, the limitations of models, or the unreasonable distribution of weights.
[0010] The methods currently used for tower disaster analysis have obvious defects and shortcomings in weight distribution, modeling versatility, label dependence, and uncertainty of effects. To solve these problems, more flexible and versatile modeling methods may need to be explored, and the dependence on real labels may need to be reduced to improve the accuracy and efficiency of analysis. SUMMARY
[0011] To solve the problems existing in the prior art, the present application proposes a method for setting and evaluating tower factor weights based on a large model.
[0012] The technical solution of the present application is as follows:
[0013] On the one hand, the present application provides a method for setting and evaluating tower factor weights based on a large model, which includes the following steps:
[0014] A general large model with logical reasoning and structured data processing functions is selected as the basis;
[0015] Determine the influence factors related to tower disasters, collect the influence factor data of sample towers and process them in JSON format to form a JSON format data set;
[0016] Extract the fields of the influence factors from the JSON format data set and input them into the large model, and use the logical reasoning and structured data processing functions of the large model to output the weight values of each influence factor;
[0017] Use the large model to construct a multivariate function model based on the weight values of each influence factor, and use the data values of each tower factor data as input variables, and use the output values of the multivariate function model to measure the tower stability;
[0018] Real-time acquisition of the influence factor data of the target tower, inputting the data values of the influence factor data of the target tower into the multivariate function model, and obtaining the tower stability evaluation result of the target tower;
[0019] The feedback information of the user corresponding to the tower stability evaluation result is collected and input into the large model for unsupervised feedback learning to optimize the weight values of the influence factors and the multivariate function model.
[0020] Preferably, the large model is based on a Transformer architecture model and processes input data through a multi-layer self-attention mechanism and a feedforward neural network.
[0021] The attention mechanism obtains the attention degree of each position in the input sequence to other positions by calculating an attention score matrix of the input sequence; the attention score matrix is calculated by a dot product attention mechanism, and the specific formula is as follows:
[0022]
[0023] wherein a ij is the attention score, representing the attention degree of position i to position j; e ij is the original attention score between position i and position j; e ik is the original attention score between position i and position k; a is a scaling factor; b ij is a first bias term; b ik is a second bias term; l is a regularization coefficient; reg(i, j) is a regularization function, representing a penalty value calculated based on the relationship between positions i and j;
[0024] The calculation of the penalty value is as follows:
[0025]
[0026] wherein |i-j| is the absolute distance between positions i and j;
[0027] The specific formula of the original attention score is as follows:
[0028]
[0029] wherein Q i is the query vector of position i; K j is the key vector of position j; is a scaling factor, d k is the dimension of the key vector; b is a third bias term;
[0030] The information of different positions is weighted and aggregated based on the attention score matrix and sent to the feedforward neural network for processing to obtain the output of the large model.
[0031] Preferably, the JSON format dataset consists of factors related to tower disasters, including tower number, typhoon center wind speed, tower type, typhoon location longitude and latitude, short-time rainfall in the area where the tower is located, tower geology, tower longitude and latitude, temperature and humidity, typhoon moving speed, and icing condition.
[0032] The tower number is used to track and manage tower information as a unique identifier of the tower; the typhoon center wind speed is used to assess the impact of the typhoon on the tower; the tower type is used to distinguish the wind bearing capacity of different tower structure types, including wooden power poles, steel power poles, concrete power poles, and composite material power poles; the typhoon location longitude and latitude are used to calculate the relative distance and direction between the typhoon and the tower; the short-time rainfall in the area where the tower is located is used to assess the impact of rainfall in a short period of time on soil humidity and tower foundation stability; the tower geology is used to assess the impact of the soil type and bearing capacity of the foundation where the tower is located on the stability of the tower; the tower longitude and latitude are used to express the accurate geographic location of the tower for spatial analysis and risk assessment; the temperature and humidity are used to assess the performance and lifespan of the tower material; the typhoon moving speed is used to determine the speed of typhoon movement and assess the duration and intensity of the typhoon in a specific area; and the icing condition is used to determine whether there is an ice layer on the tower and assess the risk of tower collapse.
[0033] Preferably, the specific steps of the unsupervised feedback learning include:
[0034] Collecting user feedback, including tower number and evaluation of the accuracy of the mathematical model evaluation results; analyzing the accuracy evaluation, if the tower evaluation result is not accurate enough, checking the model evaluation result for the tower; adjusting the weight value of the field according to the user feedback, and modifying the nested formula in the mathematical model and the combination method in the formula; and reconstructing the mathematical model based on the adjusted weight value and nested formula.
[0035] In another aspect, the present application also provides a system for setting and evaluating tower factor weights based on a large model, comprising:
[0036] A data collection and processing module selects a general large model with logical reasoning and structured data processing functions as the basis; determines the influence factors related to tower disasters, collects the influence factor data corresponding to the sample tower and processes them in JSON format to form a JSON format dataset; inputs the fields of the influence factors extracted from the JSON format dataset into the large model, and outputs the weight values of each influence factor using the logical reasoning and structured data processing functions of the large model;
[0037] The model construction module constructs a multivariate function model based on weight values of the influence factors by using the large model, takes data values of the tower factor data as input variables, and takes output values of the multivariate function model as a measure of the tower stability;
[0038] The tower stability evaluation module obtains the influence factor data of the target tower in real time, inputs the data values of the influence factor data of the target tower into the multivariate function model, and obtains a tower stability evaluation result of the target tower;
[0039] The optimization module collects feedback information of the user corresponding to the tower stability evaluation result, inputs the feedback information into the large model for unsupervised feedback learning, and optimizes the weight values of the influence factors and the multivariate function model.
[0040] Preferably, the large model is based on a Transformer architecture model and processes input data through a multi-layer self-attention mechanism and a feedforward neural network;
[0041] The attention mechanism obtains the attention degree of each position in the input sequence to other positions by calculating an attention score matrix of the input sequence; the attention score matrix is calculated by a dot-product attention mechanism, and the specific formula is as follows:
[0042]
[0043] wherein a ij is an attention score, representing the attention degree of position i to position j; e ij is an original attention score between position i and position j; e ik is an original attention score between position i and position k; a is a scaling factor; b ij is a first bias term; b ik is a second bias term; l is a regularization coefficient; reg(i, j) is a regularization function, representing a penalty value calculated based on the relationship between positions i and j;
[0044] The calculation of the penalty value is specifically as follows:
[0045]
[0046] wherein |i-j| is the absolute distance between positions i and j;
[0047] The original attention score is specifically as follows:
[0048]
[0049] wherein Q i is a query vector of position i; K j is a key vector of position j; is a scaling factor, d k is the dimension of the key vector; b is a third bias term;
[0050] The information of different positions is weighted and aggregated based on the attention score matrix, and is sent to a feedforward neural network for processing to obtain the output of the large model.
[0051] Preferably, the data set consists of factors related to tower disasters, including tower number, typhoon center wind speed, tower type, typhoon location longitude and latitude, short-time rainfall in the area where the tower is located, tower geological conditions, tower longitude and latitude, temperature and humidity, typhoon moving speed, and icing condition.
[0052] The tower number is used to track and manage tower information as a unique identifier of the tower; the typhoon center wind speed is used to evaluate the impact of the typhoon on the tower; the tower type is used to distinguish the wind bearing capacity of different tower structure types, including wooden power poles, steel power poles, concrete power poles, and composite material power poles; the typhoon location longitude and latitude are used to calculate the relative distance and direction between the typhoon and the tower; the short-time rainfall in the area where the tower is located is used to evaluate the impact of rainfall in a short period of time on soil humidity and the stability of the tower foundation; the tower geological conditions are used to evaluate the impact of the soil type and bearing capacity of the foundation where the tower is located on the stability of the tower; the tower longitude and latitude are used to express the accurate geographic location of the tower for spatial analysis and risk assessment; the temperature and humidity are used to evaluate the performance and service life of the tower material; the typhoon moving speed is used to judge the speed of typhoon movement and evaluate the time and intensity of the typhoon on a specific area; and the icing condition is used to determine whether there is an ice layer on the tower and to evaluate the risk of tower collapse.
[0053] Preferably, the specific steps of the unsupervised feedback learning include:
[0054] Collecting user feedback, including tower number and evaluation of the accuracy of the mathematical model evaluation results; analyzing the accuracy evaluation, if the tower evaluation result is not accurate enough, checking the evaluation result of the model for the tower; adjusting the weight value of the field according to the user feedback, and modifying the nested formula in the mathematical model and the combination method in the formula; and reconstructing the mathematical model based on the adjusted weight value and the nested formula.
[0055] In another aspect, the present application also provides an electronic device having a computer program stored thereon, wherein the computer program is executed by a processor to implement a method for setting and evaluating tower factor weights based on a large model according to any one of the embodiments of the present application.
[0056] In yet another aspect, the present application also provides a computer readable medium for storing one or more programs, which when executed by one or more processors, cause the one or more processors to implement a method for setting and evaluating tower factor weight based on a large model according to any embodiment of the present application.
[0057] The present application has the following beneficial effects:
[0058] 1. The present application combines the powerful reasoning ability of large models and unsupervised feedback learning methods, aiming to solve the problems existing in traditional tower disaster assessment methods, such as fixed weight distribution, complex modeling process and dependence on labeled data, etc., and shows significant advantages in flexibility, adaptability, learning efficiency and user participation, etc.
[0059] 2. The present application realizes dynamic weight distribution, automatic modeling and unsupervised learning optimization through large models, thereby improving the accuracy and efficiency of tower disaster assessment. BRIEF DESCRIPTION OF DRAWINGS
[0060] Figure 1 Optimized model diagram of the present application. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0062] It should be understood that the step numbers used herein are only for the convenience of description, and are not limited to the execution sequence of the steps.
[0063] It should be understood that the terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clear from the context, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0064] The terms "comprise" and "include" indicate the presence of described features, whole, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, whole, steps, operations, elements, components and / or sets thereof.
[0065] The term "and / or" means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0066] Embodiment One:
[0067] Referring to Figure 1 A method for setting and evaluating the weight of a decision-making tower factor based on a large model, comprising the following steps:
[0068] S10, a general large model with logical reasoning and structured data processing functions is selected as the basis; the influence factors related to tower disasters are determined, the influence factor data corresponding to the sample tower is collected and processed in JSON format to form a JSON format data set; the fields of the influence factors are input into the large model through the JSON format data set, and the weight values of the influence factors are output by using the logical reasoning and structured data processing functions of the large model;
[0069] S20, a multivariate function model based on the weight values of the influence factors is constructed by using the large model, and the data values of the tower factor data are used as input variables, and the output values of the multivariate function model are used to measure the tower stability;
[0070] S30, the influence factor data of the target tower is obtained in real time, and the data values of the influence factor data of the target tower are input into the multivariate function model to obtain the tower stability evaluation result of the target tower;
[0071] S40, the feedback information of the user corresponding to the tower stability evaluation result is collected and input into the large model for unsupervised feedback learning, and the weight values of the influence factors and the multivariate function model are optimized.
[0072] As a preferred embodiment of the present embodiment, in steps S10-S40, 1, a general large model base with strong performance is selected: when constructing the tower disaster evaluation model, a large model with strong performance, logical reasoning ability and structured data processing ability is first selected as the basis. This kind of large model usually undergoes massive data training, can understand and process complex text information, and can perform logical reasoning. They can process natural language text and extract useful information from it, providing accurate data support for subsequent disaster assessment.
[0073] When constructing the tower disaster evaluation model, it is crucial to select a general large model base with strong performance. Such large models are usually based on deep learning technology and trained on a large amount of data to achieve understanding and processing of complex text information, while having logical reasoning ability.
[0074] The XMRT model is based on the Transformer architecture, which is a neural network structure based on self-attention mechanism, especially suitable for processing sequence data. The Transformer model processes input data through multiple layers of self-attention mechanism and feedforward neural network.
[0075] The algorithmic formula of XMRT mainly involves the calculation of self-attention mechanism. In self-attention mechanism, the model calculates the attention degree of each position in the input sequence to other positions, in order to better capture the dependency relationship in the text. Specifically, for the input sequence (X = [x1, x2,..., xn]), the self-attention mechanism calculates an attention score matrix, that is:
[0076]
[0077] where each element a ij represents the attention degree of position i to position j. This attention score matrix is calculated by dot-product attention mechanism.
[0078] e ij : In attention mechanism, e ij usually represents the original attention score between position i and position j. This score reflects the degree of attention or importance of position i to position j. e ij is obtained by calculating the dot product between the vectors corresponding to positions i and j.
[0079] e (..) : This is the exponential function of e (..) . It will convert the value in the parentheses to a positive number, and this value will increase rapidly with the increase of input. In machine learning and deep learning, this function is often used to convert linear output to non-linear positive output, especially in the case of converting output to probability distribution.
[0080] α·e ij : Here, α is a scaling factor, and e ij is the original attention score between positions i and j. This scaling factor can help adjust the result of dot product to avoid its value being too large, so as to prevent the softmax function from entering the saturation zone. If α is a learnable parameter, then during the training process, the model can automatically adjust this scaling factor to adapt to the data.
[0081] b ij : This is a position-dependent bias term. In neural networks, bias terms are used to adjust the output of neurons, making it easier or more difficult to be activated. b ij can capture specific relationships between different positions in the sequence.
[0082] represents the exponentialization of the attention score between positions i and j after scaling and bias adjustment.
[0083] The exponentialized sum of all possible attention scores between position k and position i. This sum is used for normalization, ensuring that the sum of attention weights for all positions is 1, forming a valid probability distribution.
[0084] This is actually part of the softmax function, which is commonly used in multi-classification problems to convert raw scores into a probability distribution.
[0085] λ: This is a regularization coefficient that controls the strength of the regularization term. Regularization is a technique to prevent overfitting in models by introducing a penalty term related to the model's complexity.
[0086] reg(i, j): This is a regularization function that calculates a penalty value based on the relationship between positions i and j. If the model tends to overemphasize certain specific positions, the regularization term can help balance this tendency.
[0087] If the input and output are positions in a sequence, reg(i, j) can be a function based on the distance between position i and position j.
[0088]
[0089] Here, |i-j| is the absolute distance between positions i and j, and the addition of 1 is to avoid division by zero. This regularization method encourages the model to pay more attention to positions that are closer to the current position.
[0090] λ·reg(i, j): This represents a regularization penalty term related to positions i and j, used to control the distribution of attention weights and prevent model overfitting.
[0091] a ij : This is the final attention score, representing the attention of position i to position j. It is calculated by divided by subtracting λ·reg(i, j).
[0092] The entire formula combines the softmax function and the regularization term, aiming to balance the accuracy of attention weights and the generalization ability of the model.
[0093] Through this formula, we can calculate the attention of each position to all other positions, resulting in a complete attention score matrix. This matrix can help the model better understand and process the dependencies in the input sequence.
[0094] In the attention mechanism, e ij usually represents the original attention score between position i and position j. This score reflects the degree of attention or importance of position i to position j.ij is obtained by computing the dot product between the vectors corresponding to position i and position j.
[0095] Specifically, e ij is calculated as follows: i and the key vector (Key) K j In the context of self-attention mechanisms, each position has an associated query vector and key vector. These vectors are obtained by linear transformations from the input vectors.
[0096] Query vector and key vector:
[0097] Q i : represents the query vector for position i. It is obtained by multiplying the input vector with a learnable weight matrix.
[0098] K j : represents the key vector for position j. Similar to the query vector, it is obtained by multiplying the input vector with another learnable weight matrix.
[0099] Dot product calculation:
[0100] The dot product between Q i and K j is used to measure the similarity between the two vectors. The larger the dot product, the higher the relevance between the two positions.
[0101] Scaling operation:
[0102] However, directly using the dot product as the similarity score can cause numerical issues, especially when the dimensionality of the vectors is high. To prevent the dot product result from being too large and to avoid the problem of gradient vanishing or exploding in the subsequent softmax operation, a scaling factor is usually introduced. In this formula, the scaling factor is where d k is the dimensionality of the key vector.
[0103] Adjustment factor or bias term
[0104] These parameters can be used to further adjust the attention mechanism to make it more flexible or adaptive to specific task requirements. λ is a learnable scaling factor that can dynamically adjust the scaling degree of the dot product based on the data. b is a learnable bias term that can be used to adjust the baseline value of the attention score. These parameters can be learned through training data so that the model can better capture the relevance in the input data.
[0105] Therefore, the formula for calculating the similarity score e ij is as follows:
[0106]
[0107] This scaled dot product attention mechanism is a core part of the Transformer model. It allows the model to dynamically focus on different locations when processing sequential data, thereby more effectively capturing and understanding complex dependencies in the input data.
[0108] In general, e ij The calculation of the attention score is a key step in the self-attention mechanism. It measures the similarity between different positions by scaling the dot product, which provides the basis for subsequent attention score calculation.
[0109] Based on these attention scores, the XMRT model can weighted aggregate information from different locations to generate context-rich representations. These representations are then fed into a feedforward neural network for processing, ultimately generating the model's output.
[0110] In constructing a pole disaster assessment model, these characteristics of the XMRT model can be utilized to understand and process complex textual information related to pole disasters. The model can analyze textual data from multiple sources, such as disaster reports, weather data, and geographic location information, to achieve an accurate assessment of pole disaster risks. Simultaneously, the logical reasoning capabilities of the XMRT model also help it make reasonable inferences and predictions when processing this data.
[0111] 2. Factors related to tower disasters
[0112] When constructing a pole disaster assessment model, a key step is to aggregate factors that are relevant to or potentially relevant to pole disasters. These factors constitute the foundational data for the model's assessment of pole stability. To facilitate data storage, transmission, and processing, organizing these factors into a JSON (JavaScript Object Notation) format dataset is a highly effective practice.
[0113] JSON is a lightweight data interchange format that is easy to read and write, and also easy for machines to parse and generate. In the context of pole disaster assessment, a typical JSON dataset might contain the following fields:
[0114] J = [{
[0115] Pole Number: "xxx"
[0116] "Wind speed at the center of the typhoon": "xx",
[0117] "Pole Type": "Straight Line"
[0118] "Typhoon location (latitude and longitude)": "xxx",
[0119] "Short-term rainfall in the area where the tower is located": "xxx",
[0120] "Geological conditions of the tower": "xxx",
[0121] "Latitude and longitude of the tower": "xxx",
[0122] "Temperature": "xxx",
[0123] "Humidity": "xxx",
[0124] "Typhoon moving speed": "xxx",
[0125] "Whether there is icing": "xxx",
[0126] },]
[0127] Each field represents an important factor related to the risk of tower disasters. Here is a detailed description of these factors:
[0128] Tower number: A unique identifier for each tower, used to track and manage tower information.
[0129] Typhoon center wind speed: The maximum wind speed at the center of the typhoon, an important indicator for assessing the impact of the typhoon on the tower.
[0130] Pole type: Describes the structural type of the tower, such as wooden poles, steel poles, concrete poles, and composite poles, different types have different wind resistance capabilities.
[0131] Typhoon location latitude and longitude: The current geographical location of the typhoon, used to calculate the relative distance and direction between the typhoon and the tower.
[0132] Short-term rainfall in the area where the tower is located: The amount of rainfall in a short period of time, which may affect soil moisture and the stability of the tower foundation.
[0133] Geological conditions of the tower: The soil type and bearing capacity of the foundation where the tower is located, which directly affects the stability of the tower.
[0134] Latitude and longitude of the tower: The accurate geographical location of the tower, used for spatial analysis and risk assessment.
[0135] Temperature and humidity: Environmental conditions that may affect the performance and lifespan of tower materials.
[0136] Typhoon moving speed: The speed at which the typhoon moves, affecting the duration and intensity of the typhoon's impact on a particular area.
[0137] Whether there is icing: Indicates whether there is an ice layer covering the tower, icing will increase the load on the tower and may increase the risk of tower collapse.
[0138] These factors collectively form the basis of data sets for assessing the risk of tower disasters. In practical applications, certain factors can be added or deleted according to specific circumstances to adapt to different regional specific environmental and climatic conditions. By storing and processing these data in JSON format, it is convenient to integrate with various data processing and analysis tools, so as to more effectively assess the risk of tower disasters.
[0139] 3. Extract fields and embed them into large model prompts
[0140] Extract the fields F = ["tower number", "typhoon center wind speed", "tower type", "typhoon location longitude and latitude", "short-term rainfall in the area where the tower is located", "tower geology", "tower longitude and latitude", "temperature", "humidity", "typhoon moving speed", "icing"] and embed them into the large model prompt as follows:
[0141]
[0142]
[0143] The sum of the weights should be equal to 1 to ensure the rationality of the weight distribution. In this example, the sum of the weights of all factors is exactly equal to 1, meeting this requirement.
[0144] 4. Build output tower modeling formula prompts
[0145] Based on the field and weight information obtained in the previous step, a mathematical model for evaluating the stability of the tower can be constructed. This model can be a multivariate function, where the input variables are the values of each field, and the output is the evaluation result of the tower stability. To construct this function, the ability of the large model is used to derive a suitable mathematical formula. Through the prompt, the large model is guided to output a Python function as the evaluation model of the tower stability according to the given fields and weights.
[0146] prompt_fun = 'As a modeling task for evaluating the stability of the tower, it is necessary to reconstruct a mathematical model based on the fields (i.e. various influencing factors) and their corresponding weights provided by {prompt_weight}. The goal of this model is to comprehensively evaluate the stability of the tower under various conditions.
[0147] Use Python language to define the model and output the stability evaluation result F in the form of a function. When constructing the model, refer to the construction principle of neural network, that is, through the nesting and combination of multiple polynomial formulas to reflect the complex relationship between various influencing factors.
[0148] According to the actual fields and weights, derive and construct a model formula suitable for this task:
[0149] def example_function(x,w):
[0150] return 1 / (math.exp(math.sin(x[0]*w[0])+math.cos(x[1]*w[1])+...)+1)
[0151] In the above, x represents a list containing the numerical values of all influencing factors, and w represents a list of weights corresponding to these factors. Through the nesting and combination of mathematical functions such as sine (sin), cosine (cos), and exponential (exp), a comprehensive evaluation result F can be obtained, which is used to quantify the stability of the tower under the influence of various factors.
[0152] Please ensure that the model can accurately calculate the stability evaluation value of the tower according to the given fields and weights. Finally, the function should directly return this evaluation result F.
[0153] Important note:
[0154] x[0], x[1],... in the formula represent each field (influencing factor) in {prompt_weight}.
[0155] w[0], w[1],... in the formula are the weights corresponding to these fields.
[0156] The model formula should be flexible enough to adapt to different numbers and types of influencing factors.
[0157] Please ensure the logicality and mathematical accuracy of the formula to accurately evaluate the stability of the tower.
[0158] The values and types in the x and w lists in the above code need to be replaced according to actual situations in practical applications. In addition, if the influencing factors include non-numeric types (such as tower types), appropriate processing needs to be done inside the function to convert them into numerical values that can be used for mathematical calculations.
[0159] By comparing the stability scores of different towers, it can be determined which towers face higher collapse risks under the current environmental conditions, and accordingly, maintenance or reinforcement plans can be developed.
[0160] 5. Execute and output the code
[0161] Execute the Python function code obtained in Step 4 and output the evaluation result. This result can be a specific numerical value representing the stability score of the tower under the current environmental conditions. By comparing the scores of different towers, it can be determined which towers face higher risks of collapse.
[0162] 6. Unsupervised feedback learning
[0163] In unsupervised feedback learning, user feedback is embedded as contextual information into the process of model optimization. User feedback can help adjust the model's weights and nested formulas, thereby improving the model's accuracy. In the provided scenario, the user has provided feedback on the accuracy of the tower assessment, which can be used to guide the adjustment of the model weights.
[0164] Unsupervised feedback learning steps:
[0165] (1) Collect feedback:
[0166] Some user feedback R has been provided, which includes the tower number and an evaluation of the model's assessment accuracy.
[0167] (2) Analyze feedback:
[0168] For feedback on "tower assessment not accurate enough", the model's assessment results for that tower need to be checked, and possible problems need to be identified, such as unreasonable weight settings for certain fields or the need to adjust the model formula.
[0169] For feedback on "tower assessment relatively accurate", it can be considered that the current model's assessment of these towers is reliable, so the accuracy of the assessment of these towers should be maintained as much as possible when adjusting the model.
[0170] (3) Adjust the model:
[0171] Based on user feedback, the weights of fields can be manually or automatically adjusted. For example, if a certain field is proven to be unimportant in the assessment, its weight can be reduced; conversely, if a certain field has a significant impact on the assessment results, its weight can be increased.
[0172] In addition to adjusting the weights, it is also possible to consider modifying the model's nested formulas. This may involve adding or removing certain terms in the formula, or changing the way terms are combined.
[0173] (4) Embed user feedback into prompt words:
[0174] When optimizing the model, user feedback can be embedded as contextual information into the prompt words. In this way, the model will consider user feedback at each optimization, thereby better adjusting itself.
[0175] (5) Reconstruct the model and output:
[0176] Based on the adjusted weights and modified nested formulas, the model can be reconstructed and output in Python code. The new model should be able to more accurately reflect the information in the user feedback.
[0177] Example prompt:
[0178] prompt_user = "Based on current user feedback R, the evaluation of tower number 1 is not accurate enough, while the evaluation of tower number 2 is more accurate. Therefore, the field weights W and model formula F need to be adjusted to improve the accuracy of tower evaluation. Please help me rebuild the nested formula and output the new Python function code. The new function should directly return the evaluation result F so that the model can be continuously optimized based on user feedback."
[0179] Example of reconstructed model output:
[0180] def fun(x,w):
[0181] adjusted_w = [w[0] * 0.8, w[1] * 1.2, ...] # Adjust weights
[0182] return 1 / (math.exp(math.sin(x[0]*adjusted_w[0])+math.cos(x[1]*adjusted_w[1])+...)+1)
[0183] In practical applications, these parameters are fine-tuned based on specific user feedback and model performance. Furthermore, if there are many fields or influencing factors, more complex optimization algorithms may be needed to automatically adjust weights and formulas.
[0184] 7. Iterative optimization model
[0185] With the continuous accumulation of user feedback and multiple iterations of model optimization, a more accurate and reliable tower disaster assessment model can be obtained. This process is ongoing, as changes in the natural environment and new data inputs may require timely adjustments and optimizations to the model. Figure 1 As shown. This iterative optimization method ensures that the model remains in optimal condition, providing strong support for the prevention and response to tower disasters.
[0186] Example 2:
[0187] The data collection and processing module uses a general-purpose large model with logical reasoning and structured data processing capabilities as its foundation. It identifies the influencing factors related to tower disasters, collects the influencing factor data corresponding to sample towers, and processes it into JSON format to form a JSON dataset. The influencing factor fields are extracted from the JSON dataset and input into the large model. The model's logical reasoning and structured data processing capabilities are then used to output the weight values of each influencing factor.
[0188] The model construction module constructs a multivariate function model based on weight values of the influence factors by using the large model, takes data values of the tower factor data as input variables, and takes output values of the multivariate function model as a measure of the tower stability.
[0189] The tower stability evaluation module obtains the influence factor data of the target tower in real time, inputs data values of the influence factor data of the target tower into the multivariate function model, and obtains a tower stability evaluation result of the target tower. The module is used to realize the function of step S30 in the above embodiment one, and details are not repeated.
[0190] The optimization module collects feedback information of the user corresponding to the tower stability evaluation result, inputs the feedback information into the large model for unsupervised feedback learning, and optimizes the weight values of the influence factors and the multivariate function model. The module is used to realize the function of step S40 in the above embodiment one, and details are not repeated.
[0191] Embodiment three
[0192] The embodiment provides an electronic device having a computer program stored thereon, the computer program being executed by a processor to implement a method for setting and evaluating tower factor weights based on a large model according to any one of the embodiments of the present application.
[0193] Embodiment four
[0194] The embodiment provides a computer readable medium for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement a method for setting and evaluating tower factor weights based on a large model according to any one of the embodiments of the present application.
[0195] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" and the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, wherein a, b, and c can be single or multiple.
[0196] Those skilled in the art can clearly understand that the units and algorithm steps described in the embodiments disclosed herein can be realized by electronic hardware, computer software and a combination of electronic hardware and computer software. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solutions. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0197] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0198] In several embodiments provided in the present application, any function realized in the form of a software function unit and sold or used as an independent product can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art or the part of the technical solutions that make contributions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory; hereinafter referred to as: ROM), a random access memory (Random Access Memory; hereinafter referred to as: RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0199] The above is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, based on the content of the specification and drawings of the present application, are also included in the patent protection scope of the present application.
Claims
1. A method for setting and evaluating a decision pole tower factor weight based on a large model, characterized in that, Comprise the following steps: Select a general large model with logical reasoning and structured data processing functions as the basis; Determine the impact factors related to the tower disaster, collect the impact factor data corresponding to the sample tower and process it in JSON format to form a JSON format data set; Through the field input of the impact factor extracted from the JSON format data set to the large model, the weight value of each impact factor is output by using the logical reasoning and structured data processing functions of the large model; A multivariate function model based on the weight values of each impact factor is constructed using the large model, and the data values of each tower factor data are used as input variables, and the output values of the multivariate function model are used to measure the tower stability; Real-time acquisition of the impact factor data of the target tower, inputting the data values of the impact factor data of the target tower into the multivariate function model to obtain the tower stability evaluation result of the target tower; Among them, according to the actual field and weight, a multivariate function model suitable for this task is derived and constructed, specifically: def example_function(x,w): return 1 / (math.exp(math.sin(x[0]*w[0])+math.cos(x[1]*w[1])+...)+1) In the above, x represents a list containing the numerical values of all impact factors, and w represents the weight list corresponding to these impact factors. Through the nested combination of sine sin, cosine cos and exponential exp functions, a comprehensive evaluation result is obtained, which is used to quantify the stability of the tower under the influence of various factors; Collect the feedback information of the user corresponding to the tower stability evaluation result, input it into the large model for unsupervised feedback learning, and optimize the weight value of each impact factor and the multivariate function model; Among them, the large model is based on the Transformer architecture model, which processes input data through multiple self-attention mechanisms and feedforward neural networks; The attention mechanism calculates the attention score matrix of the input sequence to obtain the attention degree of each position in the input sequence to other positions; the attention score matrix is calculated by dot product attention mechanism, and the specific formula is as follows: where a ij is an attention score indicating the attention of position i to position j; e ij is an original attention score between position i and position j; e ik is an original attention score between position i and position k; a is a scaling factor; b ij is a first bias term; b ik is a second bias term; l is a regularization coefficient; reg(i, j) is a regularization function indicating a penalty value calculated based on the relationship between positions i and j; The calculation of the penalty value is as follows: Where |i-j| is the absolute distance between positions i and j; The original attention score is as follows: where Q i is the query vector at position i; K j is the key vector at position j; is a scaling factor, d k is the dimension of the key vector; b is a third bias term; Based on the attention score matrix, the information of different positions is weighted and aggregated, and sent to the feedforward neural network for processing to obtain the output of the large model.
2. The method of claim 1, wherein the JSON format data set is composed of factors related to tower disasters, including tower number, typhoon center wind speed, tower type, typhoon location latitude and longitude, tower area short-time rainfall, tower geology, tower latitude and longitude, temperature and humidity, typhoon moving speed, and icing condition. The tower number is used to track and manage tower information as a unique identifier of the tower; the typhoon center wind speed is used to evaluate the impact of the typhoon on the tower; the tower type is used to distinguish the bearing capacity of different tower structure types to the wind, and the tower structure types include wooden poles, steel poles, concrete poles and composite material poles; the typhoon position longitude and latitude are used to calculate the relative distance and direction of the typhoon and the tower; the short-time rainfall of the area where the tower is located is used to evaluate the impact of the rainfall in a short time on the soil humidity and the stability of the tower foundation; the tower geological condition is used to evaluate the impact of the soil type and bearing capacity of the foundation where the tower is located on the stability of the tower; the tower longitude and latitude are used to express the accurate geographical position of the tower for spatial analysis and risk assessment; the temperature and humidity are used to evaluate the performance and service life of the tower material; the typhoon moving speed is used to judge the speed of the typhoon movement and evaluate the action time and intensity of the typhoon on a specific area; the icing condition is used to judge whether there is an ice layer on the tower and evaluate the risk of tower collapse.
3. The method for setting and evaluating the factor weight of a decision pole tower based on a large model according to claim 1, characterized in that, The specific steps of the unsupervised feedback learning include: Collecting user feedback, including tower number and evaluation of the accuracy of the evaluation results of the mathematical model; analyzing the accuracy of the evaluation, if the evaluation of the tower evaluation results is not accurate, checking the evaluation results of the model for the tower; adjusting the weight value of the field according to the user feedback, and modifying the nested formula in the mathematical model and the combination method in the formula; based on the adjusted weight value and the nested formula, the mathematical model is reconstructed.
4. A system for setting and evaluating pole tower factor weights based on large models, characterized in that, It includes: A data collection and processing module selects a general large model with logical reasoning and structured data processing functions as the basis; Determine the influence factors related to tower disasters, collect the influence factor data corresponding to the sample tower and process them in JSON format to form a JSON format data set; input the fields of the influence factors extracted from the JSON format data set into the large model, and output the weight values of each influence factor using the logical reasoning and structured data processing functions of the large model; The model construction module uses the large model to construct a multivariate function model based on the weight values of each influence factor, and uses the data values of each tower factor data as input variables, and uses the output values of the multivariate function model to measure the tower stability; The tower stability evaluation module obtains the influence factor data of the target tower in real time, inputs the data values of the influence factor data of the target tower into the multivariate function model, and obtains the tower stability evaluation result of the target tower; Among them, according to the actual field and weight, a multivariate function model suitable for this task is derived and constructed, which is specifically: def example_function(x,w): return 1 / (math.exp(math.sin(x[0]*w[0])+math.cos(x[1]*w[1])+...)+1) In the above, x represents a list containing the numerical values of all influencing factors, w represents a list of weights corresponding to these influencing factors, and a comprehensive evaluation result is obtained through the nested combination of sine sin, cosine cos, and exponential exp functions, which is used to quantify the stability of the tower under the influence of various factors; An optimization module collects feedback information of users on the tower stability evaluation results, inputs the feedback information into the large model for unsupervised feedback learning, and optimizes the weight values of the influencing factors and the multivariate function model; The large model is based on a Transformer architecture model and processes input data through a multi-layer self-attention mechanism and a feedforward neural network; The attention mechanism calculates an attention score matrix of the input sequence to obtain the attention degree of each position in the input sequence to other positions. The attention score matrix is calculated by a dot product attention mechanism, and the specific formula is as follows: where a ij is an attention score, indicating the attention of position i to position j; e ij is an original attention score between position i and position j; e ik is an original attention score between position i and position k; a is a scaling factor; b ij is a first bias term; b ik is a second bias term; l is a regularization coefficient; reg(i, j) is a regularization function, indicating a penalty value calculated based on the relationship between positions i and j; The calculation of the penalty value is as follows: Where |i-j| is the absolute distance between positions i and j. The original attention score is as follows: where Q i is the query vector at position i; K j is the key vector at position j; is a scaling factor, d k is the dimension of the key vector; b is a third bias term; The information at different positions is weighted and aggregated based on the attention score matrix, and is sent to the feedforward neural network for processing to obtain the output of the large model.
5. The system for setting and evaluating tower factor weights based on a large model according to claim 4, wherein: The data set is composed of factors related to tower disasters, including tower number, typhoon center wind speed, tower type, typhoon location latitude and longitude, short-time rainfall in the area where the tower is located, tower geology, tower latitude and longitude, temperature and humidity, typhoon moving speed, and icing condition; The tower number is used to track and manage tower information as a unique identifier of the tower. The typhoon center wind speed is used to evaluate the impact of the typhoon on the tower. The tower type is used to distinguish the wind bearing capacity of different tower structure types, including wooden power poles, steel power poles, concrete power poles, and composite material power poles. The typhoon location latitude and longitude are used to calculate the relative distance and direction between the typhoon and the tower. The short-time rainfall in the area where the tower is located is used to evaluate the impact of short-time rainfall on soil moisture and tower foundation stability. The tower geology is used to evaluate the impact of the soil type and bearing capacity of the tower foundation on the stability of the tower. The tower latitude and longitude are used to represent the accurate geographic position of the tower for spatial analysis and risk assessment. The temperature and humidity are used to evaluate the performance and service life of the tower material. The typhoon moving speed is used to judge the speed of the typhoon movement and evaluate the time and intensity of the typhoon on a specific area. The icing condition is used to determine whether there is an ice layer on the tower and to evaluate the risk of tower collapse.
6. The system for setting and evaluating factor weights of a decision pole tower based on a large model according to claim 4, characterized in that, The specific steps of the unsupervised feedback learning include: Collecting user feedback, including tower number and evaluation of the accuracy of the evaluation results of the mathematical model; analyzing the evaluation of the accuracy, if the evaluation of the tower evaluation results is not accurate, checking the evaluation results of the model for the tower; adjusting the weight value of the field according to the user feedback, and modifying the nested formula in the mathematical model and the combination mode in the formula; and reconstructing the mathematical model based on the adjusted weight value and the nested formula.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method for setting and evaluating tower factor weights based on a large model according to any one of claims 1 to 3 when executing the program.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method for setting and evaluating tower factor weights based on a large model according to any one of claims 1 to 3.
Citation Information
Patent Citations
Risk Analysis Method and System for Transmission and Distribution Line Towers Based on Meteorological Disasters
CN113537846B
Method and device for predicting tower stability risk under action of wind field, and medium
CN116523297A
Tower stability evaluation method, system and equipment in extreme environment
CN117709204A