Symbol sequence generation method and device for offshore wind power risk assessment

By adjusting the probability distribution of the generative language model, the generated symbol sequences meet the symbol rules, the problem of too many invalid tokens in the generation of symbol sequences in offshore wind power systems is solved, and the efficiency and accuracy of generation are improved.

CN119903162AActive Publication Date: 2025-04-29WUHAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411866111.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-29
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

When generating symbol sequences, existing generative language models are prone to generate a large number of invalid tokens, resulting in logical errors, inefficiency and reduced accuracy, especially in offshore wind power systems with serious data loss and abnormal problems.

Method used

By obtaining the symbol and symbolic rules set in offshore wind power risk assessment, the valid set of each token is determined, and the probability distribution of the generative language model is adjusted so that the generation probability of tokens located outside the effective set is 0, thus ensuring that the generated symbol sequence meets the symbolic rules.

Benefits of technology

It effectively reduces the existence of invalid tokens in the symbol sequence, makes the generated symbol sequence more in line with the symbol rules, and improves the efficiency and accuracy of generation, especially in the data prediction, abnormal detection and missing value filling tasks of offshore wind power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903162A_ABST
    Figure CN119903162A_ABST
Patent Text Reader

Abstract

Disclosed are a symbol sequence generation method and device for offshore wind power risk assessment, belonging to the technical field of symbol sequence generation, the method comprising: acquiring a plurality of symbols for offshore wind power risk assessment and a symbol rule set of the plurality of symbols, the symbol rule set comprising a plurality of symbol rules; obtaining the ith token in a first symbol sequence generated by the generative language model; based on the ith token and the symbol rule set, determining an effective set of the (i + 1) th token; on the basis of the effective set of the (i + 1) th token, the probability distribution of each token in the probability distribution of the generative language model is adjusted; and obtaining the (i + 1) th token in the first symbol sequence generated by the adjusted generative language model. According to the method, all symbol sequences generated by the generative language model can meet symbol rules, and the existence of invalid tokens in the generated symbol sequences is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of symbol sequence generation, and in particular to a method and device for generating a symbol sequence for offshore wind power risk assessment. Background Art

[0002] The offshore environment is complex, with harsh environments such as high humidity, strong winds, and salt spray. In practical applications, data in offshore wind power systems are often missing or abnormal due to sensor failures, communication interruptions, etc., which seriously affects the monitoring and evaluation of equipment operating status. It is usually necessary to perform status prediction, abnormal data detection, and missing value filling on the data in offshore wind power systems.

[0003] In the related technology, state prediction, abnormal data detection and missing value filling of data in the offshore wind power system include: based on the data in the offshore wind power system, a generative language model is used to generate multiple symbol sequences, and different symbol sequences correspond to state prediction tasks, abnormal data detection tasks and missing value filling tasks respectively.

[0004] When generating a sequence of symbols, current generative language models usually output all possible symbols and select them based on their probabilities. However, in actual scenarios, generative language models may often generate a large number of invalid tokens, which not only lead to logical errors, but also reduce the efficiency and accuracy of generation. Summary of the invention

[0005] The present disclosure provides a method and device for generating a symbol sequence for offshore wind power risk assessment, which can ensure that the symbol sequences generated by the generative language model meet the symbol rules and effectively reduce the presence of invalid tokens in the generated symbol sequence. The technical solution includes at least the following solutions: In a first aspect, a method for generating a symbol sequence for offshore wind power risk assessment is provided, comprising: obtaining multiple symbols for offshore wind power risk assessment, and a symbol rule set of the multiple symbols, the symbol rule set including multiple symbol rules, and the symbol rules are used to limit the context of the multiple symbols; obtaining the i-th token in the first symbol sequence generated by a generative language model; determining a valid set of the i+1-th token based on the i-th token and the symbol rule set; adjusting the probability distribution of each token in the probability distribution of the generative language model based on the valid set of the i+1-th token, the adjusting the probability distribution of each token in the probability distribution of the generative language model including adjusting the generation probability of tokens outside the valid set in the probability distribution of the generative language model to 0; obtaining the i+1-th token in the first symbol sequence generated by the adjusted generative language model.

[0006] Optionally, the multiple symbols used for offshore wind power risk assessment include: a task header symbol set, a task symbol set, a system symbol set and a data symbol set; the task header symbol set includes a state prediction task header symbol, an abnormal data detection task header symbol and a missing value filling task header symbol; the task symbol set includes a state prediction task symbol subset, an abnormal data detection task symbol subset and a missing value filling task symbol subset, and any task symbol subset in the task symbol set uniquely corresponds to a task header symbol in the task header symbol set; the system symbol set includes a start symbol and an end symbol; the data symbol set is used to indicate data in the discretized offshore wind power system.

[0007] Optionally, the symbol rule set includes: the valid set of the i+1th token is determined by the i-th token and the task header symbol in the symbol sequence to which the i-th token belongs; the first token in the symbol sequence is the start symbol; the next token of the start symbol is any task header symbol in the task header symbol set; the valid set of the next token of the first task header symbol is: the union of the data symbol set and the first task symbol subset, the first task header symbol is any symbol in the task header symbol set, the first task symbol subset corresponds to the first task header symbol, and the first task symbol subset is any task symbol subset in the task symbol set; when the i-th token is a symbol in the data symbol set, the valid set of the i+1th token is: the union of the data symbol set, the second task symbol subset, and the end symbol, the second task symbol subset is the task symbol subset corresponding to the task header symbol in the symbol sequence to which the i-th token belongs; when the i-th token is the end symbol, the generative language model stops generating the symbol sequence.

[0008] Optionally, adjusting the probability distribution of each token in the probability distribution of the generative language model based on the valid set of the i+1th token includes: using the following formula to adjust the probability distribution of each token in the probability distribution of the generative language model:

[0009] in, represents the probability distribution of the generative language model when generating the i+1th token, is a token in the probability distribution of the generative language model, is the i-th token of the first symbol sequence, express The probability of being output by the generative language model as the i+1th token of the first symbol sequence, is the valid set of the i+1th token.

[0010] In a second aspect, a symbol sequence generation device for offshore wind power risk assessment is also provided, including: a first acquisition module, used to obtain multiple symbols for offshore wind power risk assessment, and a symbol rule set of the multiple symbols, the symbol rule set including multiple symbol rules, and the symbol rules are used to limit the context of the multiple symbols; a second acquisition module, used to obtain the i-th token in the first symbol sequence generated by the generative language model; a valid set determination module, used to determine the valid set of the i+1-th token based on the i-th token and the symbol rule set; an adjustment module, used to adjust the probability distribution of each token in the probability distribution of the generative language model based on the valid set of the i+1-th token, the adjusting the probability distribution of each token in the probability distribution of the generative language model includes adjusting the generation probability of the token outside the valid set in the probability distribution of the generative language model to 0; a third acquisition module, used to obtain the i+1-th token in the first symbol sequence generated by the adjusted generative language model.

[0011] Optionally, in the first acquisition module, the multiple symbols used for offshore wind power risk assessment include: a task header symbol set, a task symbol set, a system symbol set and a data symbol set; the task header symbol set includes a state prediction task header symbol, an abnormal data detection task header symbol and a missing value filling task header symbol; the task symbol set includes a state prediction task symbol subset, an abnormal data detection task symbol subset and a missing value filling task symbol subset, and any task symbol subset in the task symbol set uniquely corresponds to a task header symbol in the task header symbol set; the system symbol set includes a start symbol and an end symbol; Optionally, in the first acquisition module, the symbol rule set includes: the valid set of the i+1th token is determined by the i-th token and the task header symbol in the symbol sequence to which the i-th token belongs; the first token in the symbol sequence is the start symbol; the next token of the start symbol is any task header symbol in the task header symbol set; the valid set of the next token of the first task header symbol is: the union of the data symbol set and the first task symbol subset, the first task header symbol is any symbol in the task header symbol set, the first task symbol subset corresponds to the first task header symbol, and the first task symbol subset is any task symbol subset in the task symbol set; when the i-th token is a symbol in the data symbol set, the valid set of the i+1th token is: the union of the data symbol set, the second task symbol subset, and the end symbol, the second task symbol subset is the task symbol subset corresponding to the task header symbol in the symbol sequence to which the i-th token belongs; when the i-th token is the end symbol, the generative language model stops generating the symbol sequence.

[0012] Optionally, the adjustment module is further configured to adjust the probability distribution of each token in the probability distribution of the generative language model by using the following formula:

[0013] in, represents the probability distribution of the generative language model when generating the i+1th token, is a token in the probability distribution of the generative language model, is the i-th token of the first symbol sequence, express The probability of being output by the generative language model as the i+1th token of the first symbol sequence, is the valid set of the i+1th token.

[0014] In a third aspect, a computer device is also provided, comprising: a memory and a processor, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor, thereby executing the symbol sequence generation method for offshore wind power risk assessment described in the above embodiment.

[0015] In a fourth aspect, a computer-readable storage medium is also provided, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor, so as to execute the symbol sequence generation method for offshore wind power risk assessment described in the above embodiment.

[0016] In a fifth aspect, a computer program product is provided, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the method described in the first aspect is implemented.

[0017] The beneficial effects brought by the technical solution provided by the embodiments of the present disclosure include at least: In the disclosed embodiment, by adjusting the probability distribution of each token in the probability distribution of the generative language model, the generation probability of the token outside the valid set in the probability distribution of the generative language model is adjusted to 0, so that the probability of the token outside the valid set being generated as the i+1th token becomes 0, that is, the i+1th token generated by the generative language model must be in the valid set. This effectively reduces the existence of invalid tokens in the generated symbol sequence, so that the symbol sequence generated by the generative language model satisfies the symbol rule. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 A flowchart of a method for generating a symbol sequence for offshore wind power risk assessment provided by an exemplary embodiment of the present disclosure is shown; Figure 2 A flowchart of a method for generating a symbol sequence for offshore wind power risk assessment provided by another exemplary embodiment of the present disclosure is shown; Figure 3 A schematic structural diagram of a symbol sequence generating device for offshore wind power risk assessment provided by an exemplary embodiment of the present disclosure is shown; Figure 4 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] Unless otherwise defined, the technical or scientific terms used herein shall have the usual meanings understood by persons of ordinary skill in the field to which the present disclosure belongs. The words "first", "second", "third" and similar words used in the patent application specification and claims of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "one" do not indicate a quantitative limitation, but rather indicate the presence of at least one. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before "include" or "comprises" cover the elements or objects listed after "include" or "comprises" and their equivalents, and do not exclude other elements or objects.

[0021] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0022] To facilitate understanding of the embodiments of the present disclosure, an example is first given below of using a generative language model to generate multiple symbol sequences for data in an offshore wind power system in the related art.

[0023] For the state prediction task, the symbol sequence generated by the generative language model includes: state prediction task header symbol, start symbol, data symbol, and end symbol.

[0024] Exemplarily, the symbol sequence format of the state prediction task generated by the generative language model is as follows: .in The part is a plurality of time series data, that is, a plurality of data symbols; Head symbol for state prediction task; is the starting symbol, indicating the beginning of the time series data. is the end symbol, indicating the end of the time series data. The next symbol after the start symbol is a data symbol, and there is no symbol after the end symbol. In the symbol sequence of the state prediction task, the previous time series data is the question of the next time series data, and the next time series data is the answer to the previous time series data. For example, Belongs to a prediction problem, then the prediction answer generated by the generative language model is the sequence in The value of the next moment at the current moment is .

[0025] For the abnormal data detection task, the symbol sequence generated by the generative language model includes: abnormal data detection task header symbol, start symbol, data symbol, segmentation symbol, abnormal value marking symbol, and end symbol.

[0026] Exemplarily, the symbol sequence format of the abnormal data detection task generated by the generative language model is as follows: .in The part is a plurality of time series data, that is, a plurality of data symbols; Header symbol for abnormal data detection task; It is a separator symbol used to separate questions and answers; Mark outliers with symbols; is the starting symbol, indicating the beginning of the time series data. is the end symbol, indicating the end of the time series data. In the symbol sequence of the abnormal data detection task, the part before the segmentation symbol is equivalent to the question, that is, This part belongs to the question; the part after the separator symbol belongs to the answer, which is This part belongs in the answer.

[0027] For the missing value filling task, the symbol sequence generated by the generative language model includes: missing value filling task header symbol, start symbol, data symbol, segmentation symbol, missing value marking symbol, and end symbol.

[0028] Exemplarily, the symbol sequence format of the missing value filling task generated by the generative language model is as follows: .in The part is multiple time series data, that is, multiple data symbols. Missing values ​​filled in for the generative language model are also data symbols; Fill in the task header symbols for missing values; is the segmentation symbol; Mark missing values ​​with symbols; is the starting symbol, indicating the beginning of the time series data. is the end symbol, indicating the end of the time series data. In the symbol sequence of the missing value filling task, the part before the split symbol is the missing value marked by the generative language model; the part after the split symbol is the missing value filled by the generative language model. After input into the generative language model, the generative language model will identify the missing values ​​in the question and fill in the corresponding missing values, and then output the symbol sequence of the missing value filling task: .

[0029] Figure 1 A flowchart of a method for generating a symbol sequence for offshore wind power risk assessment provided by an exemplary embodiment of the present disclosure is shown, and the method can be executed by a computer device. Figure 1 , the method comprising: In step 101, a plurality of symbols for offshore wind power risk assessment and a symbol rule set of the plurality of symbols are obtained.

[0030] The symbol rule set includes multiple symbol rules, and the symbol rules are used to limit the contexts of multiple symbols.

[0031] In step 102, the i-th token in the first symbol sequence generated by the generative language model is obtained.

[0032] Here, the i-th token is the latest token in the first symbol sequence generated by the generative language model.

[0033] In the process of the generative language model generating the first symbol sequence, the generative language model generates tokens one by one until the first symbol sequence is completely generated, and the i-th token is the latest token generated in the process of the generative language model generating tokens one by one.

[0034] In step 103, based on the ith token and the symbol rule set, a valid set of the i+1th token is determined.

[0035] The i+1th token is the next token of the i-th token, which is the token that the generative language model is about to generate.

[0036] In step 104, based on the valid set of the i+1th token, the probability distribution of each token in the probability distribution of the generative language model is adjusted.

[0037] Adjusting the probability distribution of each token in the probability distribution of the generative language model includes adjusting the generation probability of the token outside the valid set in the probability distribution of the generative language model to 0.

[0038] When the generative language model generates the i+1th token, all possible tokens are distributed in the probability distribution, and each possible token has a probability in the probability distribution. The generative language model randomly samples from this probability distribution to generate the i+1th token. In the probability distribution, the greater the probability of a token, the greater the probability of the token being generated as the i+1th token; the smaller the probability of a token, the smaller the probability of the token being generated as the i+1th token.

[0039] In step 105, the i+1th token in the first symbol sequence generated by the adjusted generative language model is obtained.

[0040] In the disclosed embodiment, by adjusting the probability distribution of each token in the probability distribution of the generative language model, the generation probability of the token outside the valid set in the probability distribution of the generative language model is adjusted to 0, so that the probability of the token outside the valid set being generated as the i+1th token becomes 0, that is, the i+1th token generated by the generative language model must be in the valid set. This effectively reduces the existence of invalid tokens in the generated symbol sequence, so that the symbol sequence generated by the generative language model satisfies the symbol rule.

[0041] Figure 2 A flowchart of a method for generating a symbol sequence for offshore wind power risk assessment provided by another exemplary embodiment of the present disclosure is shown, and the method can be executed by a computer device. Figure 2 , the method comprising: In step 201, a plurality of symbols for offshore wind power risk assessment and a symbol rule set of the plurality of symbols are obtained.

[0042] The symbol rule set includes multiple symbol rules, and the symbol rules are used to limit the contexts of multiple symbols.

[0043] Optionally, the multiple symbols used for offshore wind power risk assessment include: a task header symbol set, a task symbol set, a system symbol set and a data symbol set.

[0044] The task header symbol set includes a state prediction task header symbol, an abnormal data detection task header symbol, and a missing value filling task header symbol. For example, the state prediction task header symbol is , used to indicate the execution status prediction task; the abnormal data detection task header symbol is , used to indicate the execution of the legacy beam angle detection task; the missing value filling task header symbol is , used to perform the missing value filling task. Then the task head symbol set can be expressed as .

[0045] The task symbol set includes a state prediction task symbol subset, an abnormal data detection task symbol subset and a missing value filling task symbol subset. Any task symbol subset in the task symbol set uniquely corresponds to a task header symbol in the task header symbol set.

[0046] The task symbol subset is used to indicate a set of special symbols involved in the task indicated by the task header symbol. The special symbols here are other symbols except the data symbol set.

[0047] That is, the state prediction task symbol subset corresponds to the state prediction task header symbol, the abnormal data detection task symbol subset corresponds to the abnormal data detection task header symbol, and the corresponding missing value filling task header symbol.

[0048] Here, according to the three symbol sequences in the related art, it can be determined that the state prediction task symbol subset is an empty set, because the symbol sequence corresponding to the state prediction task does not involve any special symbols. That is, .

[0049] The subset of symbols for the abnormal data detection task includes: segmentation symbols and outlier marking symbols. For example, the segmentation symbol is , the outlier marker symbol is , then the symbol subset of the abnormal data detection task can be expressed as .

[0050] The missing value filling task symbol subset includes: segmentation symbol and missing value marking symbol. For example, the segmentation symbol is , the outlier marker symbol is , then the missing value filling task symbol subset can be expressed as .

[0051] The system symbol set includes a start symbol and an end symbol. For example, the start symbol is , the end symbol is , then the system symbol set can be expressed as .

[0052] The data symbol set is used to indicate the data in the discretized offshore wind power system. For example, the data symbol set can be represented as .

[0053] Optionally, the symbol rule set includes the following 6 rules.

[0054] Rule 1: The valid set of the i+1th token is determined by the i-th token and the task header symbol in the symbol sequence to which the i-th token belongs.

[0055] The i+1th token indicates the token to be generated, the i-th token indicates the latest token, and the next token of the i-th token is the i+1th token.

[0056] For a sequence of symbols being generated, there must be a task header symbol. When the task header symbol has not been generated (i is less than 2), the valid set of the i+1th token is determined only by the i-th token; when the task header symbol has been generated (i is greater than or equal to 2), the valid set of the i+1th token is determined by the i-th token and the task header symbol in the symbol sequence to which the i-th token belongs.

[0057] For example, the valid set of the i+1th token can be expressed as: Here, the brackets indicate the element that affects the valid set of the i+1th token, that is, the i-th token. For the sake of simplicity, another element that affects the effective set of the i+1th token, that is, the task head symbol in the symbol sequence to which the i-th token belongs, is abbreviated.

[0058] Rule 2: The first token of a symbol sequence is the starting symbol.

[0059] Here, when the first token of the symbol sequence is i equals 0, there is no previous token for the first token, or the previous token of the first token is empty.

[0060] For example, Rule 2 can be expressed as , None means empty.

[0061] Rule 3: The next token of the start symbol is any task header symbol in the task header symbol set.

[0062] For example, Rule 3 can be expressed as That is, when the i-th token is the starting symbol, the valid set of the i+1-th token is the task header symbol set.

[0063] Rule 4: The valid set of the next token of the first task header symbol is the union of the data symbol set and the first task symbol subset.

[0064] The first task header symbol is any symbol in the task header symbol set, the first task symbol subset corresponds to the first task header symbol, and the first task symbol subset is any task symbol subset in the task symbol set.

[0065] Exemplarily, according to different types of the first task header symbol, Rule 4 can be respectively expressed as the following three different valid set forms.

[0066] When the first task header symbol is a state prediction task header symbol, the first task symbol subset is a state prediction task symbol subset.

[0067] Then Rule 4 can be expressed as: .

[0068] When the first task header symbol is an abnormal data detection task header symbol, the first task symbol subset is an abnormal data detection task symbol subset.

[0069] Then Rule 4 can be expressed as: .

[0070] When the first task header symbol is a missing value filling task header symbol, the first task symbol subset is a missing value filling task symbol subset.

[0071] Then Rule 4 can be expressed as: .

[0072] Rule 5: When the i-th token is a symbol in the data symbol set, the valid set of the i+1-th token is the union of the data symbol set, the second task symbol subset, and the end symbol. The second task symbol subset is the task symbol subset corresponding to the task header symbol in the symbol sequence to which the i-th token belongs.

[0073] After generating the symbol sequence according to the valid set defined by the above rules 1 to 4, the value of i in the i-th token in rule 5 must be greater than 2, because the first token and the second token cannot be symbols in the data symbol set. Then in rule 5, there must be a task header symbol in the symbol sequence to which the i-th token belongs, so a unique second task symbol subset can be determined according to rule 5.

[0074] Exemplarily, according to the different types of task header symbols in the symbol sequence to which the i-th token belongs, Rule 5 can be respectively expressed in the following three different valid set forms.

[0075] When the task header symbol in the symbol sequence to which the i-th token belongs is the state prediction task header symbol, it means that the symbol sequence to which the i-th token belongs is used to perform the state prediction task, and at this time the second task symbol subset is the state prediction task symbol subset. Then Rule 5 can be expressed as: .in Indicates that the i-th token is a symbol in the data symbol set.

[0076] When the task header symbol in the symbol sequence to which the i-th token belongs is the abnormal data detection task header symbol, it indicates that the symbol sequence to which the i-th token belongs is used to perform the abnormal data detection task, and at this time the second task symbol subset is the abnormal data detection symbol subset.

[0077] Then Rule 5 can be expressed as: .

[0078] When the task header symbol in the symbol sequence to which the i-th token belongs is the abnormal data detection task header symbol, it indicates that the symbol sequence to which the i-th token belongs is used to perform the abnormal data detection task, and at this time the second task symbol subset is the abnormal data detection symbol subset.

[0079] Then Rule 5 can be expressed as: .

[0080] Rule 6: When the i-th token is the end symbol, the generative language model stops generating the symbol sequence.

[0081] For example, Rule 6 can be expressed as , indicating that the valid set of the i+1th token is an empty set, and generation stops if it is an empty set.

[0082] In step 202, the i-th token in the first symbol sequence generated by the generative language model is obtained.

[0083] For the implementation method of the i-th token in the first symbol sequence, please refer to the aforementioned step 102, and the detailed description is omitted here.

[0084] Exemplarily, the generative language model is an autoregressive generative language model, and the conditional probability of the generative language model generating the i+1th token in the symbol sequence can be defined using formula (1).

[0085] (1) In formula (1), is the conditional probability, which is the probability distribution of the generative language model. Indicates the number of all possible tokens generated in the probability distribution. is a token in the probability distribution of the generative language model, and the token may be generated as the i+1th token of the first symbol sequence; is the i-th token of the first symbol sequence, Represents the probability distribution of the generative language model token is output by the generative language model as the conditional probability of the i+1th token. For example, It is calculated using formula (2).

[0086] (2) In formula (2), is a feature function of a generative language model, for example, a feature extraction module based on a Transformer encoder or an RNN (Recurrent Neural Network). The meanings of other parameters in formula (2) are the same as those in formula (1), and detailed description is omitted here.

[0087] In step 203, based on the ith token and the symbol rule set, a valid set of the i+1th token is determined.

[0088] The symbol rule set defines the valid set of the next token of any token in the symbol sequence. Based on the i-th token and the symbol rule set, the valid set of the i+1-th token can be determined. .

[0089] In step 204, based on the valid set of the i+1th token, the probability distribution of each token in the probability distribution of the generative language model is adjusted.

[0090] Optionally, step 204 includes: adjusting the generation probability of tokens outside the valid set in the probability distribution of the generative language model to 0; and replanning the generation probability of tokens within the valid set in the probability distribution of the generative language model so that the sum of the generation probabilities of all tokens in the entire probability distribution is 1.

[0091] Here, after the generation probability of the token outside the valid set in the probability distribution of the generative language model is adjusted to 0, if the generation probability of the token within the valid set in the probability distribution of the generative language model is not re-planned, the sum of the generation probabilities of all tokens in the probability distribution of the generative language model is not 1, and a complete probability distribution cannot be formed at this time. Therefore, it is necessary to re-plan the generation probability of the token within the valid set in the probability distribution of the generative language model so that the sum of the generation probabilities of all tokens in the entire probability distribution is 1.

[0092] Optionally, step 204 is expressed using formula (3).

[0093] (3) In formula (3), represents the probability distribution of the generative language model when generating the i+1th token, is the valid set of the i+1th token. The meanings of other parameters in formula (3) are the same as those in formula (1), and their detailed description is omitted here.

[0094] In step 205, the i+1th token in the first symbol sequence generated by the adjusted generative language model is obtained.

[0095] After the probability distribution of the generative language model is adjusted, the generative language model can generate the i+1th token, and the i+1th token must comply with the usage rules of each symbol in the symbol sequence (if the i+1th token does not comply with the symbol usage rules, it means that the i+1th token is an invalid token).

[0096] Through the above steps 201 to 205, the existence of invalid tokens in the generated symbol sequence can be effectively reduced, so that the symbol sequences generated by the generative language model all meet the symbol rules.

[0097] Exemplarily, the first symbol sequence is , and the latest token in the first symbol sequence is the i-th token , then by executing the above steps 201 to 205, the i+1th token can be generated , then the first symbol sequence becomes In the above manner, new tokens in the first symbol sequence can be continuously generated until an end symbol is generated or other termination conditions are met, and then token generation can be stopped.

[0098] After applying the above steps 201 to 205 to the method of using a generative language model to generate a symbol sequence to perform state prediction, abnormal data detection and missing value filling for data in an offshore wind power system, the adjusted generative language model can more accurately predict the operating state of the wind power equipment and effectively distinguish between abnormal and normal data.

[0099] By adjusting the probability distribution of each token in the probability distribution of the generative language model based on the valid set of the i+1th token, the probability that the symbol sequence output by the generative language model is erroneous data or invalid tags is significantly reduced, thereby improving the rationality of data filling and the reliability of prediction results.

[0100] Optionally, the method in the embodiment of the present disclosure may also be verified. For example, the first symbol sequence finally generated may be compared and verified with the operation data of the offshore wind power system, so as to quantify the accuracy improvement of the generative language model in risk assessment.

[0101] The method of adjusting the token output by the generative language model in the related art can only screen and filter the generated tokens after the generative language model has generated tokens, and there is a lot of resource waste in this process. This is because the generative language model in the related art only outputs data (equivalent to the data symbols in the data symbol set in the embodiment of the present disclosure), and does not involve the adjustment of the symbol sequence. In this way, the latest token in the sequence does not have valid information, so it is impossible to adjust the probability distribution of the next token according to the latest token.

[0102] The symbol sequence used for offshore wind power risk assessment in the embodiment of the present disclosure can filter invalid tokens before the generative language model generates tokens, so that the tokens generated by the generative language model are all tokens in the valid set, and no invalid tokens appear. This is because the generative language model in the embodiment of the present disclosure outputs a symbol sequence, there are multiple types of symbols, and each type of symbol can only be combined according to the symbols in the symbol rule set, which is equivalent to different types of symbols pre-defining the context of the symbol sequence, so that the possible valid set of the next token can be determined based on the latest token in the first symbol sequence, and then the invalid tokens can be filtered according to the valid set before the generative language model generates tokens.

[0103] The following are device embodiments of the present application. For details not described in detail in the device embodiments, reference may be made to the above method embodiments.

[0104] Figure 3 FIG. 1 is a schematic diagram showing a structure of a symbol sequence generating device for offshore wind power risk assessment provided by an exemplary embodiment of the present disclosure. Figure 3 The symbol sequence generating device 300 for offshore wind power risk assessment includes: a first acquisition module 301 , a second acquisition module 302 , a valid set determination module 303 , an adjustment module 304 and a third acquisition module 305 .

[0105] The first acquisition module 301 is used to acquire multiple symbols for offshore wind power risk assessment and a symbol rule set of the multiple symbols, where the symbol rule set includes multiple symbol rules, and the symbol rules are used to define the context of the multiple symbols.

[0106] The second acquisition module 302 is used to acquire the i-th token in the first symbol sequence generated by the generative language model.

[0107] The valid set determination module 303 is used to determine the valid set of the (i+1)th token based on the (i)th token and the symbol rule set.

[0108] The adjustment module 304 is used to adjust the probability distribution of each token in the probability distribution of the generative language model based on the valid set of the i+1th token, and the adjustment of the probability distribution of each token in the probability distribution of the generative language model includes adjusting the generation probability of the token outside the valid set in the probability distribution of the generative language model to 0; The third acquisition module 305 is used to acquire the i+1th token in the first symbol sequence generated by the adjusted generative language model.

[0109] Optionally, in the first acquisition module 301, the multiple symbols used for offshore wind power risk assessment include: a task header symbol set, a task symbol set, a system symbol set and a data symbol set; the task header symbol set includes a state prediction task header symbol, an abnormal data detection task header symbol and a missing value filling task header symbol; the task symbol set includes a state prediction task symbol subset, an abnormal data detection task symbol subset and a missing value filling task symbol subset, and any task symbol subset in the task symbol set uniquely corresponds to a task header symbol in the task header symbol set; the system symbol set includes a start symbol and an end symbol; Optionally, in the first acquisition module 301, the symbol rule set includes: the valid set of the i+1th token is determined by the i-th token and the task header symbol in the symbol sequence to which the i-th token belongs; the first token in the symbol sequence is the start symbol; the next token of the start symbol is any task header symbol in the task header symbol set; the valid set of the next token of the first task header symbol is: the union of the data symbol set and the first task symbol subset, the first task header symbol is any symbol in the task header symbol set, the first task symbol subset corresponds to the first task header symbol, and the first task symbol subset is any task symbol subset in the task symbol set; when the i-th token is a symbol in the data symbol set, the valid set of the i+1th token is: the union of the data symbol set, the second task symbol subset, and the end symbol, the second task symbol subset is the task symbol subset corresponding to the task header symbol in the symbol sequence to which the i-th token belongs; when the i-th token is the end symbol, the generative language model stops generating the symbol sequence.

[0110] Optionally, the adjustment module 304 is further configured to adjust the probability distribution of each token in the probability distribution of the generative language model using the following formula:

[0111] in, represents the probability distribution of the generative language model when generating the i+1th token, is a token in the probability distribution of the generative language model, is the i-th token of the first symbol sequence, express The probability of the i+1th token being output by the generative language model as the first symbol sequence, is the valid set of the i+1th token.

[0112] It should be noted that: when the symbol sequence device for offshore wind power risk assessment provided in the above embodiment generates a symbol sequence, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the symbol sequence device for offshore wind power risk assessment provided in the above embodiment and the symbol sequence method embodiment for offshore wind power risk assessment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0113] The division of modules in the embodiments of the present disclosure is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present disclosure may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0114] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a terminal device (which can be a personal computer, mobile phone, or communication device, etc.) or a processor (processor) to execute all or part of the steps of the method of each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0115] Figure 4 Schematic diagram of the structure of the computer device provided by the embodiment of the present disclosure. Figure 4 As shown, the computer device 400 includes: a processor 401 and a memory 402 .

[0116] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0117] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is used to be executed by the processor 401 to implement the symbol sequence method for offshore wind power risk assessment provided in the embodiments of the present disclosure.

[0118] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the computer device 400, and the computer device 400 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.

[0119] The embodiment of the present disclosure also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a computer device, the computer device is able to execute the symbol sequence method for offshore wind power risk assessment provided in the embodiment of the present disclosure.

[0120] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the symbol sequence method for offshore wind power risk assessment provided in the embodiments of the present disclosure.

[0121] The above description is only an optional embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating a symbol sequence for offshore wind power risk assessment, characterized in that: The method comprises: Acquire a plurality of symbols for offshore wind power risk assessment, and a symbol rule set of the plurality of symbols, wherein the symbol rule set includes a plurality of symbol rules, and the symbol rules are used to define contexts of the plurality of symbols; Get the i-th token in the first symbol sequence generated by the generative language model; Determine a valid set of an i+1th token based on the i-th token and the symbol rule set; Based on the valid set of the i+1th token, adjusting the probability distribution of each token in the probability distribution of the generative language model, wherein adjusting the probability distribution of each token in the probability distribution of the generative language model comprises adjusting the generation probability of a token outside the valid set in the probability distribution of the generative language model to 0; Obtain the i+1th token in the first symbol sequence generated by the adjusted generative language model.

2. The method according to claim 1, characterized in that The multiple symbols used for offshore wind power risk assessment include: a task header symbol set, a task symbol set, a system symbol set and a data symbol set; The task header symbol set includes a state prediction task header symbol, an abnormal data detection task header symbol and a missing value filling task header symbol; The task symbol set includes a state prediction task symbol subset, an abnormal data detection task symbol subset and a missing value filling task symbol subset, and any task symbol subset in the task symbol set uniquely corresponds to a task header symbol in the task header symbol set; The system symbol set includes a start symbol and an end symbol; The data symbol set is used to indicate discretized data in the offshore wind power system.

3. The method according to claim 2, characterized in that The symbol rule set includes: The valid set of the i+1th token is determined by the i-th token and the task header symbol in the symbol sequence to which the i-th token belongs; The first token of the symbol sequence is the starting symbol; The next token of the start symbol is any task header symbol in the task header symbol set; The valid set of the next token of the first task header symbol is: the union of the data symbol set and the first task symbol subset, the first task header symbol is any symbol in the task header symbol set, the first task symbol subset corresponds to the first task header symbol, and the first task symbol subset is any task symbol subset in the task symbol set; In the case where the i-th token is a symbol in the data symbol set, the valid set of the i+1-th token is: the union of the data symbol set, the second task symbol subset, and the end symbol, and the second task symbol subset is the task symbol subset corresponding to the task header symbol in the symbol sequence to which the i-th token belongs; When the i-th token is the end symbol, the generative language model stops generating a symbol sequence.

4. The method according to any one of claims 1 to 3, characterized in that: The adjusting the probability distribution of each token in the probability distribution of the generative language model based on the valid set of the i+1th token includes: The following formula is used to adjust the probability distribution of each token in the probability distribution of the generative language model: in, represents the probability distribution of the generative language model when generating the i+1th token, is a token in the probability distribution of the generative language model, is the i-th token of the first symbol sequence, express The probability of being output by the generative language model as the i+1th token of the first symbol sequence, is the valid set of the i+1th token.

5. A symbol sequence generation device for offshore wind power risk assessment, characterized in that: The device comprises: A first acquisition module is used to acquire a plurality of symbols for offshore wind power risk assessment, and a symbol rule set of the plurality of symbols, wherein the symbol rule set includes a plurality of symbol rules, and the symbol rules are used to define contexts of the plurality of symbols; A second acquisition module is used to acquire the i-th token in the first symbol sequence generated by the generative language model; A valid set determination module, configured to determine a valid set of an i+1th token based on the i-th token and the symbol rule set; an adjustment module, configured to adjust the probability distribution of each token in the probability distribution of the generative language model based on the valid set of the i+1th token, wherein the adjusting the probability distribution of each token in the probability distribution of the generative language model comprises adjusting the generation probability of a token outside the valid set in the probability distribution of the generative language model to 0; The third acquisition module is used to obtain the (i+1)th token in the first symbol sequence generated by the adjusted generative language model.

6. The device according to claim 5, characterized in that In the first acquisition module, the multiple symbols used for offshore wind power risk assessment include: a task header symbol set, a task symbol set, a system symbol set and a data symbol set; The task header symbol set includes a state prediction task header symbol, an abnormal data detection task header symbol and a missing value filling task header symbol; The task symbol set includes a state prediction task symbol subset, an abnormal data detection task symbol subset and a missing value filling task symbol subset, and any task symbol subset in the task symbol set uniquely corresponds to a task header symbol in the task header symbol set; The system symbol set includes a start symbol and an end symbol; The data symbol set is used to indicate discretized data in the offshore wind power system.

7. The device according to claim 6, characterized in that In the first acquisition module, the symbol rule set includes: The valid set of the i+1th token is determined by the i-th token and the task header symbol in the symbol sequence to which the i-th token belongs; The first token of the symbol sequence is the starting symbol; The next token of the start symbol is any task header symbol in the task header symbol set; The valid set of the next token of the first task header symbol is: the union of the data symbol set and the first task symbol subset, the first task header symbol is any symbol in the task header symbol set, the first task symbol subset corresponds to the first task header symbol, and the first task symbol subset is any task symbol subset in the task symbol set; In the case where the i-th token is a symbol in the data symbol set, the valid set of the i+1-th token is: the union of the data symbol set, the second task symbol subset, and the end symbol, and the second task symbol subset is the task symbol subset corresponding to the task header symbol in the symbol sequence to which the i-th token belongs; When the i-th token is the end symbol, the generative language model stops generating a symbol sequence.

8. A computer device, characterized in that: The computer device comprises: a memory and a processor, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 4.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the method according to any one of claims 1 to 4.

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

Citation Information

Patent Citations

  • Replay method, device and system based on generative language model

    CN118012999A

  • Large language model reasoning acceleration method and related device

    CN118333172A

  • Large language model intelligent interaction method based on memory backtracking

    CN118981514A