Multi-waveform combination retrieval and optimization method for tokamak discharge experimental data
By using the slope of waveform segments and the drop distance of head data as combination characteristics in tokamak discharge experimental data, combined with the optimization rule base and the execution plan tree, the efficiency of multi-waveform combination retrieval is achieved, the problem of insufficient waveform retrieval function in the existing technology is solved, and the data screening efficiency of scientific researchers is improved.
Patent Information
- Application Number
- CN202311597947.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2043-11-28
AI Technical Summary
The waveform retrieval function of existing tokamak discharge experimental data is weak, and multi-waveform combination search cannot be effectively carried out, resulting in inefficient discharge gun collection of scientific researchers screening specific waveform characteristics in massive data.
A multi-waveform combination search and optimization method is proposed. By extracting the tokamak discharge experimental waveform data of the Mdsplus database, calculating the slope of the waveform segments and the drop distance of the head data of the interval segments as combination characteristics, a waveform feature library is constructed, and an execution plan tree is constructed based on the optimization rule library, supporting flexible multi-waveform combination search.
It significantly improves the multi-waveform combination retrieval efficiency of tokamak discharge experimental data, and can quickly complete custom data classification based on waveform shape characteristics, improving the work efficiency of scientific researchers.
Smart Images

Figure CN117668017B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of pattern recognition and thermonuclear fusion reactors, and in particular relates to a multi-waveform combination retrieval and optimization method for tokamak discharge experimental data. Background Art
[0002] Tokamaks achieve fusion reactions based on magnetic confinement and are currently the mainstream device for conducting fusion experimental research around the world. With the long-term operation of tokamak plasma discharge experiments in various countries, a large amount of waveform data has been collected and accumulated. Tokamak discharge experiment analysis based on these data is conducive to scientific researchers to master the physical characteristics of plasma, explore plasma behavior and related events, and has important guiding significance for device operation, control and diagnostic measurement.
[0003] The discharge experiment waveform visualization tools developed by the fusion research community, such as Jscope, EastScope, WebScope, JWeb-Scope, and the discharge management system of the EAST research group, have relatively simple data retrieval functions and weak waveform retrieval functions. When analyzing and processing time series data such as discharge waveforms, researchers often manually search and filter signal sets with specific waveform characteristics, and are unable to perform combined retrieval of multiple waveforms.
[0004] Searching existing patents, no multi-waveform combination retrieval and optimization method for tokamak discharge experimental data has been found. In order to improve the work efficiency of scientific researchers in fusion research and enable them to quickly screen out discharge cannon sets with multiple waveform features from massive discharge waveform data, an efficient technical support solution is needed. Summary of the invention
[0005] The purpose of the present invention is to provide a multi-waveform combination retrieval and optimization method for tokamak discharge experimental data, which helps to improve the efficiency of scientific researchers in preprocessing discharge experimental data and quickly complete the classification of customized discharge experimental data based on waveform shape features.
[0006] To achieve the above object, the present invention proposes a multi-waveform combination retrieval and optimization method for tokamak discharge experimental data, comprising the following steps:
[0007] S1. Extract the Tokamak discharge experiment waveform data from the Mdsplus database, segment it according to a fixed time, calculate the slope of the waveform segment and the head data drop distance of the interval segment (hereinafter referred to as DDISH) as the combined feature, and build a waveform feature library for each discharge signal;
[0008] S2, searching the waveform feature library with waveforms of different lengths and common shapes to be searched, generating a judgment threshold according to the size of the matching result set and the time consumption, and building an optimization rule library based on this;
[0009] S3, when searching for a combined search condition containing multiple waveforms, first query the optimization rule base based on the length of the waveform to be searched and the DDISH average value, determine the search cost of each waveform, and build and optimize the execution plan tree with waveform matching operators, merging operators, projection operators, transfer operators and selection operators;
[0010] S4. Post-order traversal of the execution plan tree, with the traversal results as the execution order, executes and returns the final matching result set.
[0011] Optionally, the step of calculating the slope of the waveform segment and the head data drop distance of the interval segment as the combined feature in S1 is specifically:
[0012] S11, segmenting the discharge signal waveform, and marking the segmented discharge signal waveform;
[0013] S12, calculating the slope values of all discharge signal waveform segments in S11;
[0014] S13, calculating waveform feature 1 according to the slope value in S12;
[0015] S14, calculating the difference between the first data points of the interval waveform segments, and obtaining waveform feature 2.
[0016] Optionally, the specific steps of constructing the optimization rule base in S2 are:
[0017] S21, generating a discharge signal waveform length threshold;
[0018] S22, generating upper and lower thresholds of the average DDISH of the discharge signal waveform;
[0019] S23. Through all the signals of the tokamak discharge experiment and after retrieval testing, the waveform length threshold and the upper and lower thresholds of the average DDISH are generated and stored in the memory database.
[0020] Optionally, the method for generating the discharge signal waveform length threshold is as follows:
[0021] For waveforms of different lengths to be retrieved (multiples of 0.5 seconds), convex, concave, flat, and spike-shaped waveforms are selected for retrieval tests. As the waveform length gradually increases, when the average time consumption increases by less than α, the current waveform length t α As the length threshold of the signal waveform.
[0022] Optionally, the method for generating upper and lower threshold values of the average DDISH of the discharge signal waveform is as follows:
[0023] For waveforms of different lengths to be retrieved (multiples of 0.5 seconds), the upper bound β of the average DDISH value of the waveform segment to be retrieved is set according to the statistical value. 1 and the lower bound β 2 , where: the average DDISH value is greater than β 1 When the matching result set is less than 5% of the entire discharge cannon set; the average DDISH value is less than β 2 When , the matching result set is greater than 30% of the entire discharge cannon set.
[0024] Let the waveform matching operator M nk It indicates that a similarity matching calculation is performed on a waveform to be retrieved. The content is (shot, starttime, endtime, Thd, sigid), which records the discharge shot number, start time, end time, similarity threshold and signal category number of the waveform to be retrieved. The waveform matching operator returns the discharge shot result set matched in the current discharge shot set.
[0025] Let Repetitive be the detection M nk The AveDDISH function is used to calculate whether there are multiple duplicate functions in the search expression. nk The average DDISH value of the waveform to be retrieved is represented by the Len function, which calculates M nk The length of the waveform to be retrieved, the matching conditions of the optimization rules and the corresponding priorities are as follows (0 is the highest and 4 is the lowest):
[0026] Condition 1: Repetitive (M nk )=True Priority: 0
[0027] Condition 2: AveDDISH(M nk )≥β 1 and Len(M nk )≤t α Priority: 1
[0028] Condition 3: AveDDISH(M nk )≥β 1 and Len(M nk )>t α Priority: 2
[0029] Condition 4: β 2 ≤AveDDISH(M nk )<β 1 and Len(M nk )≤t α Priority: 3
[0030] Condition 5: Others Priority: 4.
[0031] Optionally, the waveform matching operator in S3 is represented by M nk , the calculation steps are as follows:
[0032] S31, extracting the combined characteristic data of the waveform to be retrieved from the memory database;
[0033] S32, then take the combined characteristic data of a discharge gun waveform from the current discharge gun set in turn, use a sliding window of the same length as the waveform to be retrieved, slide on the time series data of a discharge signal of a gun in turn along the time axis, and calculate the distance value corresponding to the waveform of the current window and the waveform to be retrieved. The sliding window with a distance value less than the similarity threshold Thd and the smallest distance value to the waveform to be retrieved is used as the best matching position of the waveform to be retrieved in a discharge gun, and the discharge gun is marked as "matched".
[0034] S33, taking all the discharge gun numbers marked as "matched" in S32 as the waveform matching operator M nk The calculation result of .
[0035] Optionally, the merging operator (∨) in S3 is used to remove duplicates from the matched multiple discharge cannon matching result sets and merge them into one result set;
[0036] The projection operator (∞) in S3 is used to transform the waveform matching operator Mn k The result set is mapped to another or a set of M nk , so that they have the same result set;
[0037] The transfer operator (Δ) in S3 is used to submit the partial calculation result set of the left side of the operator to the right side as the input of the right side calculation, and take the right side calculation result as the final calculation result;
[0038] The operator (◇) selected in S3 is used to directly obtain the discharge cannon result set.
[0039] Optionally, the specific method for constructing the execution plan tree in S3 is: the multi-waveform search condition of the tokamak discharge experiment data is composed of simple AND or logic, and the search expression format is as follows:
[0040]
[0041] SS31. Create a tree with the merge operator (∨) as the root node;
[0042] SS32, scan the search expression and record the repeated occurrences of M nk , create a new node Ri i Make it the same as the aforementioned repeated waveform matching operator, with R ij is a leaf node, each R ijCorresponding to a projection operator (∞) as its parent node, and all projection operators (∞) as a child node of the root node;
[0043] SS33, take E n All M nk ; If the quantity is 1, then M nk For leaf nodes, select operator (◇) as its parent node, and select operator (◇) as a child node of the root node; if the number exceeds 1, calculate all M nk Average DDISH value, waveform segment length, query optimization rule base for all M nk The judgment threshold β corresponding to the discharge signal 1 , β 2 and t α , according to the optimization rule condition matching to obtain the priority; according to the priority from high to low for all M nk After sorting, M nk The binary tree is established in sequence for the left node and the transfer operator (Δ) for the right node. The M with the lowest priority nk is the root node of the binary tree, E n All M nk The constructed binary tree is a subtree of the root node (∨);
[0044] SS34, judge all E n Whether the subtree has been generated, otherwise continue to take an E n , repeat step S43; if all E n If all subtrees have been generated, the execution plan tree is built.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] The present invention uses the slope of waveform segmentation and the head data drop distance of interval segmentation as combined features to represent the waveform, effectively expressing the changing trend of the waveform and significantly reducing the data dimension; the head data drop distance of interval segmentation is compared with the head drop distance of continuous segmentation, further reducing the sensitivity of the local waveform and the amount of data; compared with the data retrieval scheme of the existing discharge experiment waveform visualization tool, the present invention designs waveform matching operators, merging operators, projection operators, transfer operators and selection operators, supports more flexible multi-waveform combination retrieval, and constructs an optimization rule base after retrieving the test tokamak discharge experiment waveform data, and provides a method for constructing an execution plan tree for waveform retrieval optimization. The development and implementation of a waveform retrieval platform based on the method described in the present invention is helpful to improve the efficiency of scientific researchers in pre-processing discharge experiment data and quickly complete the classification of custom discharge experiment data based on waveform shape features. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is the technical application framework of the present invention;
[0048] Figure 2 It is a schematic diagram of the implementation steps of the present invention;
[0049] Figure 3 It is a schematic diagram of the comparison of the search time consumption (Wmhd) of waveforms with different lengths to be searched;
[0050] Figure 4 This is a distribution diagram of the average DDISH value and the number of matching discharge guns;
[0051] Figure 5 A schematic diagram of building an execution plan tree based on a search expression;
[0052] Figure 6 Schematic diagram of the time comparison of different test cases when executing the plan tree with optimization and without optimization. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0054] Figure 1 It is a specific technical application framework for realizing the multi-waveform combination retrieval and optimization method for tokamak discharge experimental data described in the present invention. Among them, the waveform feature extraction and conversion module extracts the discharge signal data in the Mdsplus database, extracts the waveform features and the judgment threshold of the optimization rules to the Redis memory database, and converts the waveform data into the storage format of the Influxdb database; the retrieval expression is submitted from the input end to the waveform retrieval parsing and optimization module, and the execution plan tree is generated after parsing and optimization; the waveform retrieval module traverses the execution plan tree, executes the operator operation in the traversal order, and submits the retrieved result set to the waveform output module; the waveform output module retrieves the waveform database and displays the output corresponding to the matched waveform.
[0055] The multi-waveform combination retrieval and optimization method for Tokamak discharge experimental data of the present invention has the following specific implementation steps: Figure 2 As shown, the details are as follows:
[0056] Step S1: Extract the tokamak discharge experiment waveform data from the Mdsplus database, segment it according to a fixed time, calculate the slope of the waveform segment and the head data drop distance of the interval segment as the combined feature, and construct a waveform feature library for each discharge signal; in this embodiment, the waveform combination feature data of Ip, Wmhd, Dfsdev, Li, Betan, Betap, Q95, Elongation and other signals from the Mdsplus database are extracted to the Redis memory database, and the test data volume is 13021 shots, including the EAST tokamak experiment from 2019 to 2020.
[0057] The specific method of generating waveform combination features is as follows: Let S[t i ] is a discharge signal of a certain path at t i The value at the moment, then the time series S = {S[t 0 ],S[t 1 ], ..., S[t i ], ..., S[t n-1 ]} represents the discharge signal waveform of this circuit; S[t i :t j ]={S[t i ], ..., S[t j-1 ]} represents a subsequence of S (where 0≤i<j≤n), that is, a part of the waveform of the discharge signal. Let S′[t i ] is the normalized discharge signal waveform, which is divided into k continuous and non-overlapping segments in the time domain (interval is w = 50ms):
[0058]
[0059] The discharge signal waveform after segmentation is recorded as:
[0060]
[0061] Waveform segmentation After linear fitting, the slope value of the fitting line is obtained Multiply by the precision coefficient β (taking the Wmhd signal as an example, the value is an integer of 100) and then round down to get the sequence SF′, which is used to represent waveform feature 1:
[0062]
[0063] Calculating the difference between the first data points of the interval waveform segments (DDISH for short) is used to distinguish between waveform segments with the same slope but different overall trends:
[0064]
[0065] Depend on The constructed sequence SD' is used to represent waveform feature 2:
[0066]
[0067] The waveform features SF′ and SD′ of each signal are stored in the Redis memory database as combined waveform features.
[0068] Step S2: searching the waveform feature library with waveforms to be searched of different lengths and common shapes, generating a judgment threshold according to the size of the matching result set and the time consumption, and building an optimization rule library based on this;
[0069] Generate discharge signal waveform length threshold t α : Taking the Wmhd discharge signal waveform as an example, a waveform segment with a length of 0.5s to 4.0s was selected for retrieval test. In the test, the same width waveform contained various test shapes (convex, concave, flat, spike-shaped), and the average retrieval time was finally taken. Figure 3 As shown in the figure, when the width of the waveform to be retrieved is around 3.5s, the rising trend slows down. α The value is 3.5.
[0070] Generate the upper and lower thresholds of the average DDISH of the discharge signal waveform: Taking the Wmhd discharge signal waveform as an example, 3000 waveform segments with a length of 1.5s were randomly selected and searched within the range of 13021 shots. Figure 4 As shown in Figure 1, when the aveDDSH value is higher than 7.3, the number of matched discharge guns returned is less than 650; when the aveDDSH value is lower than 4.8, the number of matched discharge guns returned exceeds 3900. At this time, the upper bound β of the waveform average DDISH is taken. 1 is 7.3, and the lower bound of the waveform average DDISH is β 2 is 4.8.
[0071] According to the above method, the signal waveform length threshold t of Ip, Wmhd, Dfsdev, Li, Betan, Betap, Q95, and Elongation is tested and obtained. α and the upper and lower bounds of the average DDISH 1 With β 2 , and store it in the Redis memory database;
[0072] Let the waveform matching operator M nkIt indicates that a similarity matching calculation is performed on a waveform to be retrieved. The content is (shot, starttime, endtime, Thd, sigid), which records the discharge shot number, start time, end time, similarity threshold and signal category number of the waveform to be retrieved. The waveform matching operator returns the discharge shot result set matched in the current discharge shot set.
[0073] Let Repetitive be the detection M nk The AveDDISH function is used to calculate whether there are multiple duplicate functions in the search expression. nk The average DDISH value of the waveform to be retrieved is represented by the Len function, which calculates M nk The length of the waveform to be retrieved, the matching conditions of the optimization rules and the corresponding priorities are as follows (0 is the highest and 4 is the lowest):
[0074] Condition 1: Repetitive (M nk )=True Priority: 0
[0075] Condition 2: AveDDISH(M nk )≥β 1 and Len(M nk )≤t α Priority: 1
[0076] Condition 3: AveDDISH(M nk )≥β 1 and Len(M nk )>t α Priority: 2
[0077] Condition 4: β 2 ≤AveDDISH(M nk )<β 1 and Len(M nk )≤t α Priority: 3
[0078] Condition 5: Others Priority: 4.
[0079] Step S3: When searching for a combination of search conditions containing multiple waveforms, first query the optimization rule base based on the length of the waveform to be searched and the DDISH average value, determine the search cost of each waveform, and construct and optimize the execution plan tree with waveform matching operators, merging operators, projection operators, transfer operators and selection operators;
[0080] The retrieval conditions for multiple waveform combinations retrieved in this embodiment are in the following form:
[0081] ([M 00:84351,1.5,1.8,300,3]and[M 01 :84351,1.2,1.6,200,0]and[M 02 :93119,2.4,2.8,300,2])or([M 10 :86990,8.3,8.8,300,2]and[M 11 :87666,0.5,2.8,300,7]and[M 12 :84351,1.2,1.6,200,0]and[M 13 :84351,3.7,4.3,300,0])or[M 20 :85809,7.8,8.5,100,0];
[0082] in:
[0083] E 0 =([M 00 :84351,1.5,1.8,300,3]and[M 01 :84351,1.2,1.6,200,0]and[M 02 :93119,2.4,2.8,300,2]);
[0084] E 1 =([M 10 :86990,8.3,8.8,300,2]and[M 11 :87666,0.5,2.8,300,7]and[M 12 :84351,1.2,1.6,200,0]and[M 13 :84351,3.7,4.3,300,0]);
[0085] E 2 =[M 20 :85809,7.8,8.5,100,0];
[0086] This search condition indicates that E 0 Medium 00 、M 01 and M 02 The intersection of the three waveform retrieval results, E 1 Medium 10 、M 11 、M 12 and M 13 The intersection of the four waveform retrieval results and E 2 M 20 The waveform retrieval results are merged.
[0087] The waveform matching operator M nk The specific calculation steps are as follows:
[0088] Step S31, extracting the combined characteristic data of the waveform to be retrieved from the memory database;
[0089] Step S32, then sequentially take the combined characteristic data of a discharge gun waveform from the current discharge gun set, use a sliding window of the same length as the waveform to be retrieved, slide on the time series data of a discharge signal of a gun along the time axis, and calculate the distance value corresponding to the waveform of the current window and the waveform to be retrieved. The sliding window with a distance value less than the similarity threshold Thd and the smallest distance value to the waveform to be retrieved is taken as the best matching position of the waveform to be retrieved in a discharge gun, and the discharge gun is marked as "matched".
[0090] Step S33: Take all discharge gun numbers marked as "matched" in S32 as waveform matching operator M nk The calculation result of .
[0091] The distance value between the waveform to be retrieved and its sliding window of equal length in S32 is calculated using the following formula:
[0092]
[0093] s′∈SF′ p′ ,q′∈SF′ Q′ , sd′∈SD′ p′ ,qd′∈SD′ Q′
[0094] Among them, Q′ represents the waveform to be retrieved, P′ represents the subsequence of the same length as Q′ in the sliding window corresponding to the discharge signal of a gun, L represents the number of segments of the waveform to be retrieved, and γ is the weight adjustment coefficient; SF' p′ , SF' Q′ Respectively represent the sequence of waveform features 1 corresponding to P′ and Q′, SD′ p′ , SD′ Q′ P′ and Q′ represent the sequence of waveform feature 2 respectively; s′ and q′ represent the sequence SF′ respectively p′ , SF' Q′ The values on , sd′ and qd′ represent the sequence SD′ p′ , SD′ Q′ The value on .
[0095] First, according to M nk The recorded discharge signal category searches the Redis memory database to obtain the corresponding signal waveform length threshold t α and the upper and lower bounds of the average DDISH 1 With β2 , an execution plan tree is constructed using a waveform matching operator, a merging operator, a projection operator, a transfer operator, and a selection operator. The specific steps of this embodiment are as follows:
[0096] Step SS31: Create a tree with the merge operator (∨) as the root node;
[0097] Step SS32: Scan the search expression and find the repeated waveform matching operator M 01 and M 12 , create a new node R 00 Make it the same as the aforementioned repeated waveform matching operator, and use R 00 is a leaf node, with a projection operator (∞) as its parent node, and a projection operator (∞) as a child node of the root node;
[0098] Step SS33:
[0099] Take E 0 , judge E 0 Contains M rk If the number of exceeds 1, extract M nk The waveform feature data recorded in the Redis database, calling the AveDDSH function and the Len function to calculate the average DDISH and length of the current waveform respectively, generates M according to the matching conditions of the aforementioned optimization rules rk The corresponding priority is assigned to all M rk Sort by Figure 5 The example shown in M 00 -M 02 , whose priority order is M 01 、M 00 、M 02 . 01 is the left node, the transfer operator (Δ) is the right node, M 00 Create a subtree for its parent node, and then use M 00 is the left node, the transfer operator (Δ) is the right node, M 02 Create a new subtree for the parent node, and M 02 As a child node of the root node.
[0100] Take E 1 , judge E 1 Contains M nk If the number of is greater than 1, the steps for constructing the subtree are the same as E. 0 .
[0101] Take E 2 , judge E 2 Contains M nk The number of is equal to 1, then M 20It is a leaf node, selects the operator (◇) as its parent node, and selects the operator (◇) as a child node of the root node.
[0102] Step SS34: Determine all E k Once the operation is completed, the execution plan tree is built and optimized.
[0103] Step S4: Post-order traversal of the execution plan tree (such as Figure 5 The following execution order is obtained:
[0104] R 00 -∞-M 01 -Δ-M 00 -Δ-M 02 -M 12 -Δ-M 13 -Δ-M 10 -Δ-M 11 -M 20 -◇-∨;
[0105] Figure 5 The lower left is the unoptimized execution plan tree, and the execution order is as follows:
[0106] M 00 -Δ-M 01 -Δ-M 02 -M 10 -Δ-M 11 -Δ-M 12 -Δ-M 13 -M 20 -◇-∨;
[0107] In order to verify that the optimized execution plan tree can improve the efficiency of multi-waveform combination retrieval of tokamak discharge experimental data, this embodiment implements two typical retrieval expression tests. The test data volume is 13021 shots, including the EAST experiment from 2019 to 2020. As shown in the following table, the first retrieval expression only has AND logic, and the second retrieval expression contains AND or OR logic. The Conditions column of the table gives the common combinations of waveforms to be retrieved that meet the Rules conditions. A total of 9 Cases were generated in the test, and the retrieval efficiency was compared for the cases where rule optimization was used and not used.
[0108]
[0109] Figure 6 The test results are shown. The solid bar graph is the time consumption after waveform retrieval optimization, and the grid-style bar graph is the time consumption without optimization. The efficiency of optimized waveform retrieval is improved, and the time consumption is reduced by an average of 39.9%.
[0110] In summary: This method uses the slope of the waveform segment and the head data drop distance of the interval segment as combined features to represent the waveform, which effectively expresses the changing trend of the waveform and significantly reduces the data dimension; compared with the data retrieval scheme of the existing discharge experiment waveform visualization tool, the present invention designs waveform matching operators, merging operators, projection operators, transfer operators and selection operators, supports more flexible multi-waveform combination retrieval, and constructs an optimization rule base after retrieving the test tokamak discharge experiment waveform data, and provides a method for constructing an execution plan tree for waveform retrieval optimization. The development and implementation of a waveform retrieval platform based on the method described in the present invention helps to improve the efficiency of scientific researchers in preprocessing discharge experiment data and quickly complete the classification of custom discharge experiment data based on waveform shape features.
[0111] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A multi-waveform combination retrieval and optimization method for tokamak discharge experimental data, characterized in that: The following steps are involved: S1. Extract the Tokamak discharge experiment waveform data from the Mdsplus database, segment it according to a fixed time, calculate the slope of the waveform segment and the head data drop distance of the interval segment as the combined feature, and build a waveform feature library for each discharge signal; S2, searching the waveform feature library with waveforms to be searched of different lengths and shapes, generating a judgment threshold according to the size of the matching result set and the time consumption, and building an optimization rule library based on this; S3. When searching for a combination of search conditions containing multiple waveforms, first query the optimization rule base based on the length of the waveform to be searched and the average value of the head data drop distance, determine the search cost of each waveform, and construct and optimize the execution plan tree with waveform matching operators, merging operators, projection operators, transfer operators and selection operators; The waveform matching operator in S3 is represented by M nk , the calculation steps are as follows: S31, extracting the combined characteristic data of the waveform to be retrieved from the memory database; S32, then sequentially take the combined characteristic data of a discharge gun waveform from the current discharge gun set, use a sliding window of the same length as the waveform to be retrieved, slide on the time series data of the discharge signal of a gun along the time axis, calculate the distance value corresponding to the waveform of the current window and the waveform to be retrieved, and the sliding window with the smallest distance value to the waveform to be retrieved less than the similarity threshold Thd is taken as the best matching position of the waveform to be retrieved in a discharge gun, and mark the discharge gun as "matched"; S33, taking all discharge gun numbers marked as "matched" in S32 as waveform matching operator M nk The calculation results of The merging operator in S3 is used to remove duplicates from the matched multiple discharge cannon matching result sets and merge them into one result set; The projection operator in S3 is used to transform the waveform matching operator M nk The result set is mapped to another or a set of M nk , so that they have the same result set; The transfer operator in S3 is used to submit the partial calculation result set of the left side of the operator to the right side as the input of the calculation on the right side, and take the calculation result on the right side as the final calculation result; The operator is selected in S3 to directly obtain the discharge cannon result set; The specific method of constructing the execution plan tree in S3 is: the multi-waveform search condition of the tokamak discharge experiment data is composed of simple AND or logic, and the search expression format is: SS31. Create a tree with the merge operator as the root node; SS32, scan the search expression and record the repeated occurrences of M nk , create a new node R ij Make it the same as the waveform matching operator, with R ij is a leaf node, each R ij Corresponding to a projection operator as its parent node, and all projection operators as a child node of the root node; SS33, take E n All M nk ; If the quantity is 1, then M nk For a leaf node, select an operator as its parent node, and make the selected operator a child node of the root node; If the number exceeds 1, calculate all M nk The average value of the head data drop distance and the length of the waveform segment are used to query all M nk The corresponding discharge signal judgment thresholds β1, β2 and t α , according to the optimization rule condition matching to obtain the priority; according to the priority from high to low for all M nk After sorting, M nk The binary tree is built for the left node and the transfer operator is built for the right node. The M with the lowest priority nk is the root node of the binary tree, E n All M nk The constructed binary tree is used as a subtree of the root node; SS44, judge all E n Whether the subtree has been generated, otherwise continue to take an E n , repeat step S43; if all E n If all subtrees have been generated, the execution plan tree is built; S4. Post-order traversal of the execution plan tree, with the traversal results as the execution order, executes and returns the final matching result set.
2. The multi-waveform combination retrieval and optimization method for tokamak discharge experimental data according to claim 1 is characterized in that: The step of calculating the slope of the waveform segment and the head data drop distance of the interval segment as the combined feature in S1 is specifically as follows: S11, segmenting the discharge signal waveform, and marking the segmented discharge signal waveform; S12, calculating the slope values of all discharge signal waveform segments in S11; S13, generating waveform feature 1 according to the slope value in S12; S14, calculating the difference between the first data points of the interval waveform segments, and obtaining waveform feature 2.
3. The multi-waveform combination retrieval and optimization method for tokamak discharge experimental data according to claim 1 is characterized in that: The specific steps of constructing the optimization rule base in S2 are: S21, generating a discharge signal waveform length threshold; S22, generating upper and lower thresholds of the average head data drop distance of the discharge signal waveform; S23. Perform a retrieval test on the tokamak discharge experiment data set, generate the waveform length threshold and the upper and lower limit thresholds of the average head data drop distance, and store them in the memory database.
4. The multi-waveform combination retrieval and optimization method for tokamak discharge experimental data according to claim 3 is characterized in that: The method for generating the discharge signal waveform length threshold is as follows: For waveforms of different lengths to be retrieved, convex, concave, flat, and spike-shaped waveforms are selected for retrieval tests. As the waveform length gradually increases, when the average time consumption increases by a ratio less than α, the current waveform length t α As the length threshold of the signal waveform.
5. The multi-waveform combination retrieval and optimization method for tokamak discharge experimental data according to claim 3 is characterized in that: The method for generating the upper and lower threshold values of the average head data drop distance of the discharge signal waveform is as follows: For waveforms to be retrieved of different lengths, the upper bound β1 and lower bound β2 of the average head data drop distance value of the waveform fragment to be retrieved are set according to the statistical value, where: when the average head data drop distance value is greater than β1, the matching result set is less than 5% of the entire discharge gun set; when the average head data drop distance value is less than β2, the matching result set is greater than 30% of the entire discharge gun set.
Citation Information
Patent Citations
Simulation method for three-dimensional full-space plasma response in EAST Tokamak
CN112733363A
Method and device for controlling output current of EAST fast control power supply
CN114583994A