Method and device for generating switching operation sequence, equipment and medium

Through the adversarial network generator, the problem of low accuracy and slow speed of inversion operation sequence generation in the existing technology is solved, and more efficient inversion operation sequence generation is achieved to adapt to complex power grids. Operation requirements.

CN118898527APending Publication Date: 2024-11-05GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410926097.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

The existing reverse gate operation sequence is mainly filled in manually, with low accuracy and slow speed, making it difficult to meet the operation needs of complex power grids.

Method used

Adversarial network generator is used to decompose and reconstruct the reversed task sequence through convolution kernel and weight parameters to generate an accurate reversed operation sequence, and use the historical reversed operation ticket dataset to train model parameters.

Benefits of technology

It improves the accuracy and speed of generation of reverse switch operation sequences, reduces the dependence on manual filling, and adapts to the needs of different power grid operation modes and structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898527A_ABST
    Figure CN118898527A_ABST
Patent Text Reader

Abstract

The technical scheme of the invention discloses a switching operation sequence generation method and device, equipment and a medium, and relates to the field of deep learning, the method comprises the following steps: inputting a switching task sequence into a generator of an adversarial network, the model parameters of the generator comprising a first convolution kernel, a second convolution kernel and a weight parameter; the switching task sequence is decomposed according to the first convolution kernel and the second convolution kernel, a first feature sequence set and a second feature sequence set are obtained, and the first feature sequence set and the second feature sequence set represent features of different dimensions of the switching task sequence respectively; and according to the weight parameters, performing reconstruction operation on the first feature sequence set and the second feature sequence set, determining a reconstruction sequence set, and according to the reconstruction sequence set, generating a switching operation sequence. According to the technical scheme provided by the invention, the generation accuracy and the generation speed of the switching operation sequence can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning, and in particular to a method, device, equipment and medium for generating a switching operation sequence. Background Art

[0002] In the huge power system, switching operation is one of the key links to ensure the safe, stable and efficient operation of the power grid. It is not just a simple switch operation, but a series of complex and sophisticated steps to adjust and optimize the grid structure according to the actual operation needs and dispatching instructions of the power grid, and realize the reliable transmission and distribution of electric energy.

[0003] The complexity of switching operations is mainly reflected in the following aspects: first, the operation modes of the power grid are diverse, and different operation modes require different switching operation strategies; second, the main wiring structures of substations are different, and different structures have different requirements for switching operations; third, the configuration differences of relay protection and automatic devices make the precautions and operating steps in the switching operation process different; finally, different operation tasks, such as power outages, power supply, equipment maintenance, etc., require the formulation of corresponding switching operation sequences. Therefore, it is very difficult to determine the corresponding switching operation sequences according to different switching tasks.

[0004] However, the current switching operation sequence is mainly filled out manually by referring to the corresponding forms, which has low accuracy and is very slow. Summary of the invention

[0005] The present invention provides a method, device, equipment and medium for generating a switching operation sequence, which can improve the generation accuracy of the switching operation sequence and improve the generation speed of the switching operation sequence.

[0006] In a first aspect, an embodiment of the present invention provides a method for generating a switching operation sequence, comprising:

[0007] Inputting the switching task sequence into a generator of an adversarial network, wherein the model parameters of the generator include a first convolution kernel, a second convolution kernel, and a weight parameter;

[0008] Decomposing the switching task sequence according to the first convolution kernel and the second convolution kernel to obtain a first feature sequence set and a second feature sequence set, wherein the first feature sequence set and the second feature sequence set respectively represent features of different dimensions of the switching task sequence;

[0009] According to the weight parameter, a reconstruction operation is performed on the first feature sequence set and the second feature sequence set to determine a reconstruction sequence set, and a switching operation sequence is generated according to the reconstruction sequence set;

[0010] Among them, the first convolution kernel, the second convolution kernel and the weight parameters are updated in the process of training the generator of the adversarial network using the historical switching operation ticket data set.

[0011] The second invention, an embodiment of the present invention provides a device for generating a switching operation sequence, comprising:

[0012] An input module, used for inputting the switching task sequence into a generator of the adversarial network, wherein the model parameters of the generator include a first convolution kernel, a second convolution kernel and a weight parameter;

[0013] A feature sequence set determination module, used for decomposing the switching task sequence according to the first convolution kernel and the second convolution kernel to obtain a first feature sequence set and a second feature sequence set, wherein the first feature sequence set and the second feature sequence set respectively represent features of different dimensions of the switching task sequence;

[0014] A generating module, configured to perform a reconstruction operation on the first feature sequence set and the second feature sequence set according to a weight parameter, determine a reconstruction sequence set, and generate a switching operation sequence according to the reconstruction sequence set;

[0015] Among them, the first convolution kernel, the second convolution kernel and the weight parameters are updated in the process of training the generator of the adversarial network using the historical switching operation ticket data set.

[0016] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0017] at least one processor; and,

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for generating a switching operation sequence described in any one of the embodiments of the present invention.

[0020] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for generating a switching operation sequence as described in any one of the embodiments of the present invention when executed.

[0021] The embodiment of the present invention provides a method, device, equipment and medium for generating a switching operation sequence, the method comprising: inputting a switching task sequence into a generator of an adversarial network, wherein the model parameters of the generator include a first convolution kernel, a second convolution kernel and a weight parameter; decomposing the switching task sequence according to the first convolution kernel and the second convolution kernel to obtain a first feature sequence set and a second feature sequence set, wherein the first feature sequence set and the second feature sequence set respectively characterize the features of different dimensions of the switching task sequence; performing a reconstruction operation on the first feature sequence set and the second feature sequence set according to the weight parameter, determining a reconstructed sequence set, and generating a switching operation sequence according to the reconstructed sequence set; wherein the first convolution kernel, the second convolution kernel and the weight parameter are updated in the process of training the generator of the adversarial network using a historical switching operation ticket data set. Specifically, by continuously updating the first convolution kernel, the second convolution kernel and the weight parameter during the training process, and then using the trained adversarial network generator, the switching task sequence can be decomposed and reconstructed, thereby generating a switching operation sequence corresponding to the switching task sequence. In this way, the switching operation sequence corresponding to the switching task sequence can be accurately generated, thereby improving the speed and accuracy of generating the switching operation sequence. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 1 A flow chart of a method for generating a switching operation sequence provided in Embodiment 1 of the present invention;

[0024] Figure 2 A schematic diagram of the structure of a discriminator provided in an embodiment of the present invention;

[0025] Figure 3 A flow chart of a method for generating a switching operation sequence provided in Embodiment 2 of the present invention;

[0026] Figure 4 A schematic diagram of the decomposition process of a switching task sequence provided by an embodiment of the present invention;

[0027] Figure 5 A schematic diagram of a reconstruction operation provided by an embodiment of the present invention;

[0028] Figure 6 A schematic diagram of the adversarial network structure provided by an embodiment of the present invention;

[0029] Figure 7A schematic diagram of the structure of the attention and long short-term memory network module provided by an embodiment of the present invention;

[0030] Figure 8 A schematic diagram of the structure of a generator provided by an embodiment of the present invention;

[0031] Fig. 9 A schematic diagram of the structure of a switching operation sequence generation device provided in Embodiment 3 of the present invention;

[0032] Fig.10 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] It should be noted that the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0036] Embodiment 1

[0037] Figure 1 A flowchart of a method for generating a switching operation sequence provided in Embodiment 1 of the present invention is applied to the generation of a switching operation sequence in a power system. The method can be executed by a switching operation sequence generation device, which can be implemented in the form of hardware and / or software and configured in various computers or servers.

[0038] Step 110: input the switching task sequence into a generator of an adversarial network, wherein the model parameters of the generator include a first convolution kernel, a second convolution kernel, and a weight parameter.

[0039] Among them, the switching task sequence is a sequence generated according to the switching task, and the operations, steps and equipment involved in the corresponding switching task can be determined by the content of the switching task sequence. The adversarial network is a neural network, including a generator and a discriminator. The generator is used to generate a switching operation sequence sample according to the switching task sequence. The discriminator is used to determine whether the input switching operation sequence is generated by the generator, and generate a judgment result according to the correct sequence sample and the input switching operation sequence, and determine the loss value of the loss function of the adversarial network, and then update the model parameters in the adversarial network according to the loss value and the judgment result. Exemplarily, the model parameters can be updated using a preset loss function and an optimization algorithm, wherein the optimization algorithm can be the Adam algorithm.

[0040] Specifically, the first convolution kernel, the second convolution kernel and the weight parameters are updated in the process of training the generator of the adversarial network using the historical switching operation ticket dataset, and then the switching operation sequence corresponding to the switching task sequence can be determined by the first convolution kernel, the second convolution kernel and the weight parameters.

[0041] It should be noted that there is no limitation on the generation of switching task sequence for this application.

[0042] Step 120: Decompose the switching task sequence according to the first convolution kernel and the second convolution kernel to obtain a first feature sequence set and a second feature sequence set, wherein the first feature sequence set and the second feature sequence set respectively represent features of different dimensions of the switching task sequence.

[0043] Specifically, the first convolution kernel and the second convolution kernel are a kind of feature matrix, which is used for convolution operation. In the embodiment of the present invention, they are specifically used to decompose the switching task sequence to obtain the first feature sequence set and the second feature sequence set. Furthermore, the first convolution kernel and the second convolution kernel will be continuously updated during the training process of the generator of the adversarial network. When the training is successful, the optimal first convolution kernel and the second convolution kernel will be obtained. Through the optimal first convolution kernel and the second convolution kernel, the switching task sequence can be decomposed into feature sequences of different dimensions to achieve the purpose of collecting feature parameters in the switching task sequence, and at the same time, some noise in the switching task sequence can be eliminated. Effective sequence decomposition can provide the accuracy of the subsequent reconstruction process, and at the same time, it can improve the accuracy of the generation of the switching operation sequence.

[0044] Step 130: Perform a reconstruction operation on the first feature sequence set and the second feature sequence set according to the weight parameter to determine a reconstruction sequence set, and generate a switching operation sequence according to the reconstruction sequence set.

[0045] Specifically, the weight parameter is a weight coefficient used to reconstruct the feature sequences in the first feature sequence set and the second feature sequence set and generate a reconstructed sequence. Furthermore, the weight parameter will be continuously updated during the training process of the generator of the adversarial network. When the training is successful, the optimal weight parameter will be obtained. Through the optimal weight parameter, the first feature sequence set and the second feature sequence set can be reconstructed. Through the reconstruction operation, a reconstructed sequence can be generated. The reconstructed sequence integrates the important parameters and features of the first feature sequence and the second feature sequence that characterize the switching task. Furthermore, the switching operation sequence corresponding to the switching task sequence can be accurately generated according to the reconstructed sequence set.

[0046] The training method of the adversarial network comprises:

[0047] Acquire a historical switching operation ticket data set, wherein the historical switching operation ticket data set includes a historical switching task sequence and a corresponding historical switching operation sequence;

[0048] Using the generator of the adversarial network, the historical switching task sequence is decomposed and reconstructed to obtain a reconstructed switching task sequence sample, and a switching operation sequence sample is generated according to the reconstructed switching task sequence sample;

[0049] Inputting the historical switching operation sequence and the switching operation sequence sample into the discriminator of the adversarial network, and determining the discrimination result and the loss value of the adversarial network loss function;

[0050] If the loss value does not meet the preset accuracy requirement, the model parameters of the adversarial network are updated according to the judgment result and the loss value, wherein the model parameters include: a first convolution kernel, a second convolution kernel and a weight parameter.

[0051] Specifically, the switching operation sequence sample is the switching operation sequence generated by the generator in the training process. The historical switching operation sequence and the switching operation sequence sample are input into the discriminator of the adversarial network, and the discrimination result and the loss value of the adversarial network loss function can be determined. If the loss value does not meet the preset accuracy requirement, it means that the adversarial network has not been trained successfully, and the model parameters of the adversarial network are updated according to the discrimination result and the loss value. By continuously updating the model parameters of the adversarial network, the switching operation sequence samples generated by the generator can be gradually approached to the historical switching operation sequence corresponding to the historical switching task sequence. When the training is completed, an accurate generator that can generate the historical switching operation sequence corresponding to the historical switching task sequence will be obtained. Among them, the model parameters of the adversarial network include a first convolution kernel, a second convolution kernel and a weight parameter. The first convolution kernel and the second convolution kernel are used to decompose the historical switching task sequence, and the weight parameter is used to reconstruct the switching task sequence.

[0052] Exemplarily, the loss function of the adversarial network of the embodiment of the present invention is:

[0053]

[0054] The loss function of the generator is:

[0055] G loss =λ1g mse +λ2g loss ;

[0056]

[0057] The loss function of the discriminator is:

[0058]

[0059] Among them, D() represents the output of the discriminator, is the switching operation sequence generated by the generator, E[] represents the expected operation. λ1 and λ2 are hyperparameters, g mse is the mean square error between the generated switching operation sequence and the actual switching operation sequence, g loss is the loss function related to the discriminator output, B is the size of a batch sample; where λ1 and λ2 are hyperparameters, g mse is the mean square error between the generated switching operation sequence and the actual switching operation sequence, g loss is the loss function related to the discriminator output, and B is the size of a batch sample.

[0060] For example, Figure 2 A schematic diagram of the structure of a discriminator provided in an embodiment of the present invention, specifically, a switching operation sequence generated by a generator and the actual switching operation sequence Y = {y1,y2,...,y n}After concatenation at the input layer, the sequence J of length 2n is Input hidden layer. In the hidden layer of the discriminator, the input sequence is feature extracted. The hidden layer consists of 4 convolution, activation and pooling operations. Convolution extracts features from the data. The activation function improves the network's expressiveness by adding nonlinear factors. Pooling removes redundancy and reduces the number of parameters by dimensionality reduction. Sequence J undergoes a convolution operation with a convolution kernel size of 3, a number of convolution kernels of 16, a step size of 1, and a padding of 1. Then an activation operation is performed, in which the activation function used is lrelu. Then a maximum pooling operation with a pooling kernel size of 2 and a step size of 2 is performed to obtain a feature map C1 with a length of n and a number of channels of 16. C1 undergoes a convolution operation with a convolution kernel size of 3, a number of convolution kernels of 32, a step size of 1, and a padding of 1. Then an activation operation is performed, in which the activation function used is lrelu. Then a maximum pooling operation with a pooling kernel size of 2 and a step size of 2 is performed to obtain a feature map C1 with a length of n and a number of channels of 16. The feature map C2 has 32 channels. C2 is convolved with a kernel size of 3, a kernel number of 64, a stride of 1, and a padding of 1. Then an activation operation is performed, where the activation function used is lrelu. Then a maximum pooling operation with a pooling kernel size of 2 and a stride of 2 is performed, resulting in a length of The feature map C3 has 64 channels. C3 is convolved with a kernel size of 3, a kernel number of 128, a stride of 1, and a padding of 1. Then an activation operation is performed, in which the activation function used is lrelu. Then a maximum pooling operation with a pooling kernel size of 2 and a stride of 2 is performed, and finally a length of The feature map C4 has a channel number of 128. The fully connected layer integrates the output C4 of the hidden layer, and finally the output layer outputs the final judgment result. Output 1 indicates that the discriminator judges that the input sequence is a real switching operation sequence, and output 0 indicates that the discriminator judges that the input sequence is a switching operation sequence generated by the generator.

[0061] An embodiment of the present invention provides a method for generating a switching operation sequence, comprising: inputting a switching task sequence into a generator of an adversarial network, wherein the model parameters of the generator include a first convolution kernel, a second convolution kernel, and a weight parameter; decomposing the switching task sequence according to the first convolution kernel and the second convolution kernel to obtain a first feature sequence set and a second feature sequence set, wherein the first feature sequence set and the second feature sequence set respectively characterize the features of different dimensions of the switching task sequence; performing a reconstruction operation on the first feature sequence set and the second feature sequence set according to the weight parameter, determining a reconstructed sequence set, and generating a switching operation sequence according to the reconstructed sequence set; wherein the first convolution kernel, the second convolution kernel, and the weight parameter are updated in the process of training the generator of the adversarial network using a historical switching operation ticket data set. Specifically, by continuously updating the first convolution kernel, the second convolution kernel, and the weight parameter during the training process, and then using the trained adversarial network generator, the switching task sequence can be decomposed and reconstructed, thereby generating a switching operation sequence corresponding to the switching task sequence. In this way, the switching operation sequence corresponding to the switching task sequence can be accurately generated, thereby improving the speed and accuracy of generating the switching operation sequence.

[0062] Embodiment 2

[0063] Figure 3 Flow chart of a method for generating a switching operation sequence provided in the second embodiment of the present invention. This embodiment optimizes each step of generating a switching operation sequence based on the above embodiments. Figure 3 .

[0064] Step 201: input the switching task sequence into a generator of an adversarial network, wherein the model parameters of the generator include a first convolution kernel, a second convolution kernel and a weight parameter.

[0065] Step 202: Use the first convolution kernel and the second convolution kernel to perform convolution operations on the switching task sequence respectively to obtain a first convolution result and a second convolution result.

[0066] Optionally, a convolution operation can be performed using the following formula:

[0067]

[0068] In the formula, A i is the first convolution result generated after the i-th decomposition, D i is the second convolution result generated by the i-th decomposition, * is the convolution operation, H i is the first convolution kernel, G i is the second convolution kernel, h i,j and g i,j Then H i and Gi The coefficient of i+1,j A i+1 The element at position j in d i+1,j D i+1 The element at position j in .

[0069] Step 203: If the number of convolution operations does not meet the preset end condition, the first convolution kernel and the second convolution kernel are used to perform convolution operations on the first convolution result generated by the previous convolution operation respectively.

[0070] Step 204: If the number of convolution operations meets the preset termination condition, a first feature sequence set is determined based on a first convolution result corresponding to the first convolution kernel, and a first feature sequence set is determined based on a second convolution result corresponding to the second convolution kernel.

[0071] The preset end condition may be a threshold condition, which in the embodiment of the present invention is a convolution operation number threshold, which may be determined by the dimension of the switching task sequence. For example, if the dimension of the switching task sequence is n, the convolution operation number is 2n.

[0072] For example, Figure 4 A schematic diagram of the decomposition process of the switching task sequence provided by an embodiment of the present invention, wherein {A1, A2, ..., A n} is the first feature sequence set, {D1,D2,…,D n} is the first feature sequence set, and X is the switching task sequence.

[0073] Step 205: For a first feature sequence in the first feature sequence set, obtain a weight parameter corresponding to each second feature sequence in the second feature sequence set and the first feature sequence.

[0074] Step 206: Calculate the weighted sum of each second feature sequence according to the weight parameter, and determine the reconstructed sequence corresponding to the first feature sequence according to the first feature sequence and the weighted sum.

[0075] Optionally, you can use the following formula to perform the reconstruction operation:

[0076]

[0077] Among them, X i represents the reconstructed sequence corresponding to the i-th first feature sequence, d ik is the weight parameter corresponding to the kth second feature sequence and the ith first feature sequence in the second feature sequence set, A i is the i-th first characteristic sequence, D k is the kth second characteristic sequence, Characterizes the weighted sum of each weight parameter corresponding to the i-th first feature sequence and each second feature sequence.

[0078] For example, Figure 5 A schematic diagram of a reconstruction operation provided by an embodiment of the present invention, wherein X is a switching task sequence, A is a first feature sequence, and D is a second feature sequence. Specifically, for a first feature sequence in a first feature sequence set, a weight parameter corresponding to each second feature sequence in a second feature sequence set and the first feature sequence is obtained, and then a weighted sum of each second feature sequence is calculated according to the weight parameter, and a reconstruction sequence X1-Xn corresponding to the first feature sequence is determined according to the first feature sequence and the weighted sum.

[0079] Step 207: Determine a reconstructed sequence set according to the reconstructed sequences corresponding to the first feature sequences in the first feature sequence set.

[0080] Specifically, each reconstructed sequence group generated by the above method may constitute a reconstructed sequence set.

[0081] Step 208: Input each of the reconstructed sequences into a corresponding network layer of the long short-term memory network to generate a network layer output corresponding to each network layer.

[0082] Among them, the generator of the adversarial network includes a long short-term memory network module and a corresponding attention module. Each network layer in the long short-term memory network module is connected to the corresponding attention module. The number of long short-term memory network modules and attention modules is the same as the dimension of the switching task sequence.

[0083] Among them, the output of the network layer represents the hidden state of the sequence features at the current moment. The hidden state is the long short-term memory network's understanding and memory of the reconstructed sequence of the input so far.

[0084] Optionally, the network layer output corresponding to each network layer can be determined by the following formula:

[0085] Among them, tanh is the hyperbolic tangent function, W h and b h is a learnable parameter matrix and bias vector used to map the output of the LSTM network layer to the space of attention weights, u is a context vector used to calculate similarity, which is usually a learnable parameter that is independent of the output; a im is the network layer output; e im It is the intermediate calculation amount.

[0086] Step 209: Input the network layer output into the corresponding attention module to generate the corresponding attention weight.

[0087] Among them, the attention weight represents the weight of the key features of the input parameters.

[0088] Optionally, the attention weights corresponding to each network layer can be determined by the following formula:

[0089] f m =σ(W f ·[h m-1 ,x m ]+b f )

[0090] i m =σ(W i ·[h m-1 ,x m ]+b i )

[0091]

[0092] o m =σ(W o ·[h m-1 ,x m ]+b o )

[0093] h m =o m ·tanh(c m );

[0094] Among them, f m is the output of the forget gate of the mth layer in the LSTM network, i m is the input gate output of the mth layer in the long short-term memory network, is the candidate update value of the mth layer in the LSTM network, c m is the cell state of the mth layer in the LSTM network, o m is the output gate output of the mth layer in the LSTM network, h m is the output of the mth layer in the long short-term memory network, that is, the attention weight, σ represents the sigmoid function, tanh represents the hyperbolic tangent function, and W f , W i , W c , W o is the weight matrix, b f , b i , b c , b o is the corresponding bias vector.

[0095] For example, Figure 6A schematic diagram of the adversarial network structure provided for an embodiment of the present invention, wherein the adversarial network as a whole includes a generator G and a discriminator D, the SDAR module is used to decompose and reconstruct the switching task sequence, X is the reconstructed sequence, and A-LSTM is an attention and long short-term memory network module. Specifically, by inputting the switching task sequence into the SDAR module, the decomposition and reconstruction of the switching task sequence will be completed, and then the reconstructed sequence will be generated. After the reconstructed sequence passes through the A-LSTM module, a switching operation sequence will be generated. The discriminator will determine the discrimination result and the loss value of the preset loss function based on the generated switching operation sequence and the actual switching operation sequence, and then update the parameter model of the adversarial network based on the discrimination result and the loss value of the preset loss function. Furthermore, Figure 7 A schematic diagram of the structure of the attention and long short-term memory network module provided in an embodiment of the present invention, wherein x is the reconstructed sequence, a is the network layer output, and h is the attention weight. is the output of A-LSTM. Specifically, in the embodiment of the present invention, the number of decompositions of the SDAR module is 22, and the number of LSTM layers is 14.

[0096] For example, Figure 8 The schematic diagram of the structure of the generator provided by the embodiment of the present invention, wherein LSTM is the network layer of the long short-term memory network in the long short-term memory network module, and Attention is the attention module. Specifically, the switching task sequence can be input into the adversarial network, and then the switching task sequence can be decomposed and reconstructed to generate a reconstructed sequence set {X1, X2…X n}, and then reconstruct the storage set through LSTM and attention modules to generate a switching operation sequence.

[0097] Step 210: For any reconstruction sequence, determine the network layer output and attention weight corresponding to each network layer, and generate the switching operation sequence elements corresponding to the reconstruction sequence according to the network layer output and attention weight corresponding to each network layer. The switching operation sequence elements corresponding to each reconstruction sequence constitute a switching operation sequence.

[0098] Optionally, generating a switching operation sequence element corresponding to the reconstruction sequence according to the network layer outputs and attention weights corresponding to the network layers, including:

[0099] Determine the weighted sum of the network layer output and attention weight corresponding to each network layer;

[0100] The switching operation sequence element corresponding to the reconstruction sequence is determined according to the weighted sum.

[0101] Exemplarily, the weighted sum of the network layer output and attention weight corresponding to each network layer can be determined by the following formula: in, is the weighted sum, aik is the network layer output corresponding to the network layer, h ik is the attention weight. Further, we can

[0102] Determine the element of the switching operation sequence corresponding to the reconstruction sequence, where H is the switching operation sequence element.

[0103] The embodiment of the present invention provides a method for generating a switching operation sequence. By using a first convolution kernel and a second convolution kernel to perform a convolution operation, a first feature sequence set and a second feature sequence set can be determined to complete the decomposition operation of the switching task sequence. Then, the weighted sum of each second feature sequence is calculated by a weight parameter. The reconstruction sequence corresponding to the first feature sequence can be determined according to the first feature sequence and the weighted sum, and the reconstruction operation of the switching task sequence can be completed. Furthermore, the generator also includes a long short-term memory network module and a corresponding attention module. By inputting the reconstruction sequence into the long short-term memory network module and the corresponding attention module, the attention weight and network output corresponding to the reconstruction sequence can be determined. Then, according to the network layer output and attention weight corresponding to each network layer, the switching operation sequence elements corresponding to the reconstruction sequence are generated. The switching operation sequence elements corresponding to each reconstruction sequence constitute the switching operation sequence. Through the decomposition and reconstruction operations, the key features in the switching task sequence can be accurately obtained, the noise can be removed, and then the switching operation sequence corresponding to the switching task sequence can be accurately generated, and the generation speed of the switching operation sequence can be improved.

[0104] Embodiment 3

[0105] Fig. 9 This is a schematic diagram of the structure of a switching operation sequence generation device provided in the third embodiment of the present invention. Fig. 9 As shown, the device comprises:

[0106] An input module 510, used for inputting the switching task sequence into a generator of the adversarial network, wherein the model parameters of the generator include a first convolution kernel, a second convolution kernel and a weight parameter;

[0107] A feature sequence set determination module 520 is used to decompose the switching task sequence according to the first convolution kernel and the second convolution kernel to obtain a first feature sequence set and a second feature sequence set, wherein the first feature sequence set and the second feature sequence set respectively represent features of different dimensions of the switching task sequence;

[0108] A generating module 530, configured to perform a reconstruction operation on the first feature sequence set and the second feature sequence set according to a weight parameter, determine a reconstruction sequence set, and generate a switching operation sequence according to the reconstruction sequence set;

[0109] Among them, the first convolution kernel, the second convolution kernel and the weight parameters are updated in the process of training the generator of the adversarial network using the historical switching operation ticket data set.

[0110] The device provided in this embodiment can accurately obtain key features in the switching task sequence and remove noise by decomposing and reconstructing the switching task sequence, and then can accurately generate a switching operation sequence corresponding to the switching task sequence, thereby improving the generation speed of the switching operation sequence.

[0111] Optionally, the feature sequence set determination module 520 includes:

[0112] A first calculation unit, configured to use the first convolution kernel and the second convolution kernel to perform convolution operations on the switching task sequence respectively, to obtain a first convolution result and a second convolution result;

[0113] A judgment unit is used to, if the number of convolution operations does not meet the preset termination condition, use the first convolution kernel and the second convolution kernel to perform convolution operations on the first convolution result generated by the previous convolution operation respectively; if the number of convolution operations meets the preset termination condition, determine a first feature sequence set based on the first convolution result corresponding to the first convolution kernel, and determine a second feature sequence set based on the second convolution result corresponding to the second convolution kernel.

[0114] Optionally, the generating module 530 includes:

[0115] An acquiring unit, configured to acquire, for a first feature sequence in the first feature sequence set, a weight parameter corresponding to each second feature sequence in the second feature sequence set and the first feature sequence;

[0116] A reconstruction unit, configured to calculate a weighted sum of each second feature sequence according to the weight parameter, and determine a reconstructed sequence corresponding to the first feature sequence according to the first feature sequence and the weighted sum;

[0117] The aggregation unit is used to determine a reconstructed sequence set according to the reconstructed sequences corresponding to the first feature sequences in the first feature sequence set.

[0118] Optionally, the device for generating the switching operation sequence also includes: a long short-term memory network module and a corresponding attention module, each network layer in the long short-term memory network module is connected to the corresponding attention module, and the number of long short-term memory network modules and attention modules is the same as the dimension of the switching task sequence.

[0119] Optionally, the generating module 530 includes:

[0120] A network layer output determination unit, used for inputting each reconstructed sequence into a corresponding network layer of a long short-term memory network to generate a network layer output corresponding to each network layer;

[0121] An attention weight determination unit, used for inputting the network layer output into a corresponding attention module to generate a corresponding attention weight;

[0122] A calculation unit is used to determine the network layer outputs and attention weights corresponding to each network layer for any reconstruction sequence, and generate switching operation sequence elements corresponding to the reconstruction sequence according to the network layer outputs and attention weights corresponding to each network layer. The switching operation sequence elements corresponding to each reconstruction sequence constitute a switching operation sequence.

[0123] Optionally, the calculation unit is specifically used to: determine the weighted sum of the network layer outputs and attention weights corresponding to each network layer; and determine the switching operation sequence element corresponding to the reconstruction sequence according to the weighted sum.

[0124] Optionally, the switching operation sequence generating device further includes: a training module, the training module is used to train any adversarial network described in the embodiment of the present invention, and the training module includes:

[0125] An acquisition unit, used for acquiring a historical switching operation ticket data set, wherein the historical switching operation ticket data set includes a historical switching task sequence and a corresponding historical switching operation sequence;

[0126] A decomposition and reconstruction unit, used to use the generator of the adversarial network to decompose and reconstruct the historical switching task sequence to obtain a reconstructed switching task sequence sample, and generate a switching operation sequence sample according to the reconstructed switching task sequence sample;

[0127] A judgement unit, used for inputting the historical switching operation sequence and the switching operation sequence sample into the discriminator of the adversarial network, and determining the judgment result and the loss value of the adversarial network loss function;

[0128] A judgment unit is used to update the model parameters of the adversarial network according to the judgment result and the loss value if the loss value does not meet the preset accuracy requirement, wherein the model parameters include: a first convolution kernel, a second convolution kernel and a weight parameter.

[0129] The switching operation sequence generation device provided in the embodiment of the present invention can execute the switching operation sequence generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0130] Embodiment 4

[0131] Fig.10A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0132] like Fig.10 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0133] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0134] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a generation device for a switching operation sequence.

[0135] In some embodiments, the switching operation sequence generation device may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the switching operation sequence generation device described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the switching operation sequence generation device in any other appropriate manner (e.g., by means of firmware).

[0136] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0137] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0138] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0139] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0140] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0141] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0142] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0143] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating a switching operation sequence, characterized in that: include: Inputting the switching task sequence into a generator of an adversarial network, wherein the model parameters of the generator include a first convolution kernel, a second convolution kernel, and a weight parameter; Decomposing the switching task sequence according to the first convolution kernel and the second convolution kernel to obtain a first feature sequence set and a second feature sequence set, wherein the first feature sequence set and the second feature sequence set respectively represent features of different dimensions of the switching task sequence; According to the weight parameter, a reconstruction operation is performed on the first feature sequence set and the second feature sequence set to determine a reconstruction sequence set, and a switching operation sequence is generated according to the reconstruction sequence set; Among them, the first convolution kernel, the second convolution kernel and the weight parameters are updated in the process of training the generator of the adversarial network using the historical switching operation ticket data set.

2. The method according to claim 1, characterized in that Decomposing the switching task sequence according to the first convolution kernel and the second convolution kernel to obtain a first feature sequence set and a second feature sequence set includes: Using the first convolution kernel and the second convolution kernel to perform convolution operations on the switching task sequence respectively, to obtain a first convolution result and a second convolution result; If the number of convolution operations does not meet the preset termination condition, the first convolution kernel and the second convolution kernel are used to perform convolution operations on the first convolution result generated by the previous convolution operation respectively; If the number of convolution operations meets the preset termination condition, a first feature sequence set is determined based on a first convolution result corresponding to the first convolution kernel, and a second feature sequence set is determined based on a second convolution result corresponding to the second convolution kernel.

3. The method according to claim 1, characterized in that The performing a reconstruction operation on the first feature sequence set and the second feature sequence set according to the weight parameter to determine a reconstructed sequence set includes: For a first feature sequence in the first feature sequence set, obtaining a weight parameter corresponding to each second feature sequence in the second feature sequence set and the first feature sequence; Calculating a weighted sum of each second feature sequence according to the weight parameter, and determining a reconstructed sequence corresponding to the first feature sequence according to the first feature sequence and the weighted sum; A reconstructed sequence set is determined according to the reconstructed sequences corresponding to the first feature sequences in the first feature sequence set.

4. The method according to claim 1, characterized in that: The generator of the adversarial network includes a long short-term memory network module and a corresponding attention module. Each network layer in the long short-term memory network module is connected to the corresponding attention module. The number of long short-term memory network modules and attention modules is the same as the dimension of the switching task sequence.

5. The method according to claim 4, characterized in that Generating a switching operation sequence according to the reconstruction sequence set includes: Inputting each of the reconstructed sequences into a corresponding network layer of a long short-term memory network to generate a network layer output corresponding to each network layer; Input the network layer output into the corresponding attention module to generate the corresponding attention weight; For any reconstruction sequence, determine the network layer outputs and attention weights corresponding to each network layer, and generate the switching operation sequence elements corresponding to the reconstruction sequence based on the network layer outputs and attention weights corresponding to each network layer. The switching operation sequence elements corresponding to each reconstruction sequence constitute a switching operation sequence.

6. The method according to claim 5, characterized in that The generating of the switching operation sequence elements corresponding to the reconstruction sequence according to the network layer outputs and attention weights corresponding to the network layers includes: Determine the weighted sum of the network layer output and attention weight corresponding to each network layer; The switching operation sequence element corresponding to the reconstruction sequence is determined according to the weighted sum.

7. The method according to any one of claims 1 to 6, characterized in that: The training method of the adversarial network comprises: Acquire a historical switching operation ticket data set, wherein the historical switching operation ticket data set includes a historical switching task sequence and a corresponding historical switching operation sequence; Using the generator of the adversarial network, the historical switching task sequence is decomposed and reconstructed to obtain a reconstructed switching task sequence sample, and a switching operation sequence sample is generated according to the reconstructed switching task sequence sample; Inputting the historical switching operation sequence and the switching operation sequence sample into the discriminator of the adversarial network, and determining the discrimination result and the loss value of the adversarial network loss function; If the loss value does not meet the preset accuracy requirement, the model parameters of the adversarial network are updated according to the judgment result and the loss value, wherein the model parameters include: a first convolution kernel, a second convolution kernel and a weight parameter.

8. A device for generating a switching operation sequence, characterized in that: include: An input module, used for inputting the switching task sequence into a generator of the adversarial network, wherein the model parameters of the generator include a first convolution kernel, a second convolution kernel and a weight parameter; A feature sequence set determination module, used for decomposing the switching task sequence according to the first convolution kernel and the second convolution kernel to obtain a first feature sequence set and a second feature sequence set, wherein the first feature sequence set and the second feature sequence set respectively represent features of different dimensions of the switching task sequence; A generating module, configured to perform a reconstruction operation on the first feature sequence set and the second feature sequence set according to a weight parameter, determine a reconstruction sequence set, and generate a switching operation sequence according to the reconstruction sequence set; Among them, the first convolution kernel, the second convolution kernel and the weight parameters are updated in the process of training the generator of the adversarial network using the historical switching operation ticket data set.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for generating a switching operation sequence according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for generating a switching operation sequence according to any one of claims 1 to 7 when executed.