Electromagnetic spectrum confrontation strategy extraction method based on large language model
By analyzing the electromagnetic spectrum adversarial strategy text in large language model and generating a structured strategy data dictionary, the problem of slow strategy generation speed and difficult to integrate domain knowledge in the existing technology is solved, and efficient and flexible strategy generation is achieved.
Patent Information
- Application Number
- CN202510066745.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-13
AI Technical Summary
The existing electromagnetic spectrum adversarial strategy generation methods have problems such as slow strategy generation speed and difficult to integrate domain knowledge and complex design of reward function.
The electromagnetic spectrum adversarial strategy extraction method based on large language model is adopted, and the structured strategy data dictionary is quickly generated by analyzing and extracting typical electromagnetic spectrum adversarial strategy texts.
It significantly improves the generation efficiency of adversarial strategies, realizes the natural integration of domain knowledge, reduces the dependence of environmental training, and improves the flexibility and adaptability of strategy generation.
Smart Images

Figure CN119990111A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the cross-technical field of electromagnetic spectrum countermeasure strategy generation and artificial intelligence, and specifically to an electromagnetic spectrum countermeasure strategy extraction method based on a large language model. Background Art
[0002] Electromagnetic spectrum countermeasure strategy is an important part of electromagnetic spectrum management and directly determines the effectiveness of electromagnetic spectrum management and countermeasure. Currently, strategy generation methods usually rely on rule-based algorithms or reinforcement learning methods.
[0003] In the patent "Coarse-grained Intelligent UAV Penetration Method Based on Reinforcement Learning" applied by the 54th Institute of China Electronics Technology Group Corporation, with the authorization announcement number CN118189973B, a coarse-grained grid environment was constructed to address the problem that the generation of UAV penetration strategies takes a long time and is subject to the constraints of the training environment, and reinforcement learning is used to generate penetration strategies, effectively reducing the computational complexity and resource requirements. However, the construction of a coarse-grained grid environment also requires the adjustment of hyperparameters such as the grid size, and the selection of hyperparameters has always been a difficult problem in the study of intelligent methods.
[0004] In the patent "A multi-UAV collaborative penetration method based on heterogeneous multi-agent reinforcement learning" applied by the 54th Institute of China Electronics Technology Group Corporation, with the authorization announcement number CN113822409B, a multi-agent deep reinforcement learning method was used to generate a collaborative penetration strategy for the problem of heterogeneous multi-UAV strategy generation. However, the reward distribution problem between multi-agents requires more expert experience to solve, and the degree of intelligence needs to be further improved.
[0005] In the article "Heterogeneous Multi-UAV Collaborative Penetration Method Based on MA2IDDPG Algorithm" published in Hebei Industrial Science and Technology, Chang Xin et al. proposed to use curriculum learning method to introduce expert domain knowledge in the exploration process of intelligent agents, thereby improving the strategy generation rate. In the article "Multi-agent Game Strategy Generation Method Based on Hierarchical Reinforcement Learning" published in Radio Engineering, Chang Xin et al. improved the learning efficiency and decision-making effect of multi-agents through hierarchical reinforcement learning. However, in the above scheme, there are the following problems: First, the strategy generation speed is slow. Traditional methods often require a lot of simulation environment training, which consumes time and computing resources. Then, it is difficult to integrate domain knowledge. Training starts from zero knowledge and lacks full use of existing domain experience and knowledge. Finally, the reward function design is complex. In the reinforcement learning process, the effect of strategy generation is highly dependent on the setting of the reward function, and it is difficult to flexibly adapt to complex confrontation scenarios. Summary of the invention
[0006] Based on the pain points of slow strategy generation, difficulty in integrating domain knowledge and complex reward function design in the current electromagnetic spectrum countermeasure strategy generation field, the present invention proposes an electromagnetic spectrum countermeasure strategy extraction method based on a large language model. By directly parsing and extracting typical electromagnetic spectrum countermeasure strategy texts, a structured strategy data dictionary is quickly generated, which significantly improves the efficiency of countermeasure strategy generation.
[0007] The technical solution adopted by the present invention is:
[0008] A method for extracting electromagnetic spectrum countermeasure strategies based on a large language model comprises the following steps:
[0009] Step 1: Input a text description of the electromagnetic spectrum countermeasure strategy through the user interface to form a strategy text;
[0010] Step 2: Use the pre-trained large language model to perform semantic analysis on the strategy text and extract strategy data related to electromagnetic spectrum confrontation;
[0011] Step 3: Construct a policy data dictionary based on the policy data obtained in step 2;
[0012] Step 4: Generate a visual editing interface for users to perform parameter verification on the generated policy data dictionary;
[0013] Step 5: Save the verified policy data dictionary in a structured file format and provide export function;
[0014] Step 6: Draw the electromagnetic spectrum countermeasure strategy based on the strategy data dictionary.
[0015] Furthermore, the specific method of step 1 is:
[0016] Step 1-1: Use the tkinter framework to build the strategy extraction interface;
[0017] Step 1-2: Create a strategy name input box in the strategy extraction interface for users to enter the strategy name;
[0018] Step 1-3: Build a text box automatic height adjustment module to obtain the content entered by the user in the text box, calculate the total number of characters in the content, split the text content by line, and dynamically adjust the height of the text box;
[0019] Step 1-4: Construct a user command input box in the strategy extraction interface. The user command input box uses the wrap="word" attribute to wrap by word. Whenever the user enters or deletes characters in the user command input box, the text box automatic height adjustment module is called to dynamically adjust the height of the text box according to the text content.
[0020] Step 1-5: Construct an extraction content input box in the policy extraction interface. The extraction content input box uses the wrap="word" attribute to wrap by word. Whenever the user enters or deletes characters in the extraction content input box, the text box automatic height adjustment module is called to dynamically adjust the height of the text box according to the text content.
[0021] Step 1-6: Build a submit button. When the user clicks the submit button, the user instruction and the extracted content are concatenated to form the policy text.
[0022] Furthermore, the specific method of step 2 is:
[0023] Step 2-1: Add "You:" characters at the beginning of the policy text to form a query message and assign it to the user_input variable;
[0024] Step 2-2: Load the pre-trained GLM-4-9B-Chat large language model, use user_input as the input of the model, and obtain the response_data policy data generated by the large language model.
[0025] Furthermore, the specific method of step 3 is:
[0026] Using the JSON module, use the json.loads(message) statement to convert the response_data policy data from a dictionary string to a Python dictionary object dict_data.
[0027] Furthermore, the specific method of step 4 is:
[0028] Step 4-1: Use tk.Toplevel to create a new subwindow for displaying and editing the strategy data dictionary. This window is independent of the main window and has its own interface.
[0029] Step 4-2: Build scroll support and enable scroll bars when the content of the policy data dictionary exceeds the window;
[0030] Step 4-3: Recursively traverse the strategy data dictionary. If the value attribute of the traversed dictionary is a dictionary, recursively call itself and add indentation at each level. If the value attribute is a normal value, generate a key-value pair input box;
[0031] Step 4-4: Check the data in the visual interface. If the key or value is wrong, modify it in the corresponding text box.
[0032] Furthermore, the specific method of step 5 is:
[0033] Step 5-1: A file dialog box pops up, select the save path;
[0034] Step 5-2: Save the policy data dictionary as a JSON file and name the file the same as the policy name.
[0035] Furthermore, the specific method of step 6 is:
[0036] Step 6-1: Label the physical platform, using different symbols for each platform icon;
[0037] Step 6-2: Draw the strategy path and equipment power range at different stages. If the equipment is turned on, draw the corresponding area, where the radar uses a solid line and the reconnaissance equipment uses a dotted line.
[0038] The beneficial effects of the present invention are:
[0039] 1. The present invention can realize rapid strategy generation. It uses a large language model to analyze and extract existing typical strategy texts, directly generates a strategy data dictionary that can be used for confrontation, and reduces training and deduction time.
[0040] 2. The present invention can achieve the natural integration of domain knowledge. The typical strategies summarized by domain experts are converted into inputs, and the domain knowledge and generation strategies are naturally integrated with the powerful understanding and reasoning capabilities of the language model.
[0041] 3. The present invention can realize de-environmental training. It abandons the mode of traditional methods that rely on simulation environment for training and avoids the deviation problem caused by imperfect environment construction.
[0042] 4. The present invention can achieve efficient parsing and structured storage. By combining the language model output with the customized data structure, it is convenient to deploy and call the strategy in the electromagnetic spectrum management and control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 The figure is a flow chart of a method according to an embodiment of the present invention.
[0044] Figure 2 It is an input interface for policy name, user instructions and content to be extracted.
[0045] Figure 3 It is the interface after inputting user instructions and content to be extracted.
[0046] Figure 4 This is a nested structure diagram for electromagnetic spectrum countermeasure strategy information.
[0047] Figure 5 This is the interface for storing policy dictionaries.
[0048] Figure 6Schematic diagram of the first phase electromagnetic spectrum countermeasure strategy.
[0049] Figure 7 Schematic diagram of the second phase electromagnetic spectrum countermeasure strategy.
[0050] Figure 8 This is a schematic diagram of the third-phase electromagnetic spectrum countermeasure strategy. DETAILED DESCRIPTION
[0051] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0052] A method for extracting electromagnetic spectrum countermeasure strategies based on a large language model. The method inputs or imports countermeasure strategy text through a user interface, performs semantic analysis on the text content based on a large language model, and automatically extracts key strategy elements, such as target location, device status, etc.; generates a strategy data dictionary that conforms to the expected format, and provides a visual editing tool for users to modify strategy parameters; and finally stores or exports the strategy in a format such as JSON for use in frequency-using equipment calls.
[0053] like Figure 1 As shown, the method specifically comprises the following steps:
[0054] Step 1: Input a text description of the electromagnetic spectrum countermeasure strategy through the user interface;
[0055] Step 1-1: Build a strategy extraction interface;
[0056] Use the tkinter framework to build the strategy extraction interface. Initialize the tkinter framework, root = tk.Tk(), and set the strategy extraction interface panel, root.title ("Strategy Extraction Interface").
[0057] Step 1-2: Create a policy name input box;
[0058] First, use tk.Label to create a text label that reads "Strategy Name:" to prompt the user to enter the strategy name in the subsequent input box. The label is placed at row 0, column 0 of the interface, and the padding is set to 10. Then, use tk.Entry to create a single-line text input box for the user to enter the strategy name, and the width of the input box is set to 40 characters to provide sufficient input space. Finally, the input box is placed at row 0, column 1 of the interface, to the right of the label.
[0059] Step 1-3: Build a text box automatic height adjustment module;
[0060] The function of this module is to obtain the content entered by the user in the text box, calculate the total number of characters in the content, and split the text content by line. For each line of content, calculate the required number of lines and add up the number of lines of all lines, taking into account the line wrapping requirements. Dynamically adjust the height according to the actual number of lines, and then update the display effect of the text box to make the adjustment take effect immediately. By monitoring the changes in the content of the text box in real time, dynamically adjust the height of the text box according to the number of characters, so that it always adapts to the size of the current content, thereby avoiding the problem of incomplete content display or taking up too much interface space.
[0061] Step 1-4: Build a user command input box;
[0062] In the user interface, a label "User command:" and a multi-line text box for users to enter text are created and laid out in the first row and first column of the grid, and a margin of 10 is added to the label and the text box. The text box uses the wrap="word" attribute to wrap by word, with a default width of 40 characters and a height of 5 lines. Whenever the user enters or deletes characters in the text box, the text box automatic height adjustment module is called to dynamically adjust the height of the text box according to the text content, ensuring that the interface layout adapts to input content of different lengths.
[0063] Step 1-5: Construct the input box for extracting content;
[0064] In the user interface, a label "Extract content:" and a multi-line text box for users to enter text are created and laid out in the first row and first column of the grid. A margin of 10 is added to the label and the text box. The text box wraps by word through the wrap="word" attribute. The default width is 40 characters and the height is 5 lines. Whenever the user enters or deletes characters in the text box, the text box automatic height adjustment module is called to dynamically adjust the height of the text box according to the text content to ensure that the interface layout adapts to input content of different lengths.
[0065] Step 1-6: Build a submit button and concatenate the user instructions and extracted content to form a policy text;
[0066] A "Submit" button is created and placed in row 3 and column 2 of the interface grid. The vertical spacing between the button and the surrounding elements is set to 20, and sticky = 'e' is used to align the button to the right side of the cell. Figure 2 It is an input interface for policy name, user instructions and content to be extracted. The input user instructions are:
[0067] “Generate data in python dictionary format according to the content. Do not show any explanation and annotation information. The format is such as {“first”:{“platform_red_1”:{“camp”:“red”,“location”:[0,0],“unit”:“km”,“equipment”:{“radar”:{“status”:“off”,”range”:3,“unit”:“km”},“reconnaissance”:{“status”:“off”,”range”:5,“unit”:“km”}}}}}””
[0068] The input for extraction is:
[0069] "In the electromagnetic spectrum confrontation strategy, the Red side includes three platforms, namely Platform Red 1, Platform Red 2 and Platform Red 3. All three platforms are equipped with radar and reconnaissance equipment. The radar power range is 3km and the reconnaissance equipment perception range is 5km. In the first stage, Platform Red 1 is located at [0,0]km, Platform Red 2 is located at [0,1]km, and Platform Red 3 is located at [1,0]km. The radar and reconnaissance equipment are all turned off. In the second stage, Platform Red 1 is located at [1,1]km, Platform Red 2 is located at [1,2]km, and Platform Red 3 is located at [2,1]km. The radar status is all turned off, and the reconnaissance equipment status is all turned on. In the third stage, Platform Red 1 is located at [3,3]km, Platform Red 2 is located at [3,4]km, and Platform Red 3 is located at [4,3]km. The radar status of Platform Red 1 and Platform Red 3 is all turned on, and the radar status of Platform Red 2 is all turned off. The reconnaissance equipment status of Platform Red 1, Platform Red 2 and Platform Red 3 is all turned on."
[0070] When the user clicks the button, the user instruction and the extracted content are concatenated to form the policy text, namely:
[0071] "Generate data in python dictionary format according to the content. Do not show any explanation and annotation information. The format is such as {"first":{"platform_red_1":{"camp":"red","location":[0,0],"unit":"km","equipment":{"radar":{"status":"off","range":3,"unit":"km"},"reconnaissance":{"status":"off","range":5,"unit":"km"}}}}}: In the electromagnetic spectrum confrontation strategy, the red side includes three platforms, namely platform red 1, platform red 2 and platform red 3. The three platforms Both are equipped with radar and reconnaissance equipment. The radar power range is 3km and the reconnaissance equipment perception range is 5km. In the first stage, Platform Red 1 is located at [0,0]km, Platform Red 2 is located at [0,1]km, and Platform Red 3 is located at [1,0]km. The radar and reconnaissance equipment are both off. In the second stage, Platform Red 1 is located at [1,1]km, Platform Red 2 is located at [1,2]km, and Platform Red 3 is located at [2,1]km. The radar status is all off, and the reconnaissance equipment status is all on. In the third stage, Platform Red 1 is located at [3,3]km, Platform Red 2 is located at [3,4]km, and Platform Red 3 is located at [4,3]km. The radar status of Platform Red 1 and Platform Red 3 is both on, and the radar status of Platform Red 2 is both off. The reconnaissance equipment status of Platform Red 1, Platform Red 2, and Platform Red 3 is all on. "
[0072] Figure 3 It is the interface after inputting user instructions and content to be extracted.
[0073] Step 2: Use the pre-trained large language model to perform semantic analysis on the input strategy text and extract strategy elements related to electromagnetic spectrum confrontation;
[0074] Step 2-1: Construct query information based on user input;
[0075] The pre-trained large language model used in this method is the GLM-4-9B-Chat model open sourced by Zhipu Qingyan. The model provides complete generation code in the matching application "trans_cli_demo". Add the ""You:"" character at the beginning of the generated policy text to form the query information, that is:
[0076] "You: Generate data in python dictionary format according to the content. Do not show any explanation and annotation information. The format is such as {"first":{"platform_red_1":{"camp":"red","location":[0,0],"unit":"km","equipment":{"radar":{"status":"off","range":3,"unit":"km"},"reconnaissance":{"status":"off","range":5,"unit":"km"}}}}}: In the electromagnetic spectrum confrontation strategy, the red side includes three platforms, namely platform red 1, platform red 2 and platform red 3. The three All platforms are equipped with radar and reconnaissance equipment. The radar power range is 3km and the reconnaissance equipment perception range is 5km. In the first stage, platform Red 1 is located at [0,0]km, platform Red 2 is located at [0,1]km, and platform Red 3 is located at [1,0]km. The radar and reconnaissance equipment are both off. In the second stage, platform Red 1 is located at [1,1]km, platform Red 2 is located at [1,2]km, and platform Red 3 is located at [2,1]km. The radar status is all off, and the reconnaissance equipment status is all on. In the third stage, platform Red 1 is located at [3,3]km, platform Red 2 is located at [3,4]km, and platform Red 3 is located at [4,3]km. The radar status of platform Red 1 and platform Red 3 is both on, and the radar status of platform Red 2 is both off. The reconnaissance equipment status of platform Red 1, platform Red 2, and platform Red 3 is all on. "
[0077] Assign the query information to the user_input variable.
[0078] Step 2-2: Load the pre-trained large language model and obtain the processed extracted policy data.
[0079] Take user_input as the input of the GLM-4-9B-Chat model and get the response_data strategy data generated by the large language model, namely:
[0080]
[0081]
[0082]
[0083]
[0084] Step 3: Build a policy data dictionary based on the parsing results.
[0085] Using the JSON module, use the json.loads(message) statement to convert the dictionary string into a Python dictionary object dict_data, that is:
[0086] {"first": {"platform_red_1": {"camp": "Red", "location": [0, 0], "unit": "km", "equipment": {"radar": {"status": "off", "range": 3, "unit": "km"}, "reconnaissance": {"status": "off", "range": 5, "unit": "km"}}}, "platform_red_2": {"camp": "Red", "location": [0, 1], "unit": "km", "equipment": {"radar": {"status": "off", "range": 3, "unit": "km"}, "reconnaissance": {"status": "off", "range": 5, "unit": "km"}}}, "platform_red_3": {"camp": "Red", "location": [1, 0], "unit": "km", "equipment": {"radar": {"status": "off", "range": 3, "unit": "km"}, "reconnaissance": {"status": "off", "range": 5, "unit": "km"}}}}, "second": {"platform_red_1": {"camp": "Red", "location": [1, 1], "unit": "km", "equipment": {"radar": {"status": "off", "range": 3, "unit": "km"}, "reconnaissance": {"status": "on", "range": 5, "unit": "km"}}}, "platform_red_2": {"camp": "Red", "location": [1, 2], "unit": "km", "equipment": {"radar": {"status": "off", "range": 3, "unit": "km"}, "reconnaissance": {"status": "on", "range": 5, "unit": "km"}}}, "platform_red_3": {"camp": "Red", "location": [2, 1], "unit": "km", "equipment": {"radar": {"status": "off",'range': 3, 'unit': 'km'},'reconnaissance': {'status': 'on', 'range': 5, 'unit': 'km'}}},'third': {'platform_red_1': {'camp': 'Red', 'location': [3, 3], 'unit': 'km', 'equipment': {'radar': {'status': 'on', 'range': 3, 'unit': 'km'},'reconnaissance': {'status': 'on', 'range': 5, 'unit': 'km'}}}, 'platform_red_2': {'camp': 'Red', 'location': [3, 4], 'unit': 'km', 'equipment': {'radar': {'status': 'off', 'range': 3, 'unit': 'km'},'reconnaissance': {'status': 'on', 'range': 5, 'unit': 'km'}}}, 'platform_red_3': {'camp': 'Red', 'location': [4, 3], 'unit': 'km', 'equipment': {'radar': {'status': 'on', 'range': 3, 'unit': 'km'},'reconnaissance': {'status': 'on', 'range': 5, 'unit': 'km'}}}}},
[0087] Step 4: Provide a visual editing interface for users to perform parameter verification on the generated policy data dictionary;
[0088] Step 4-1: Pop up a new interface for displaying and editing dictionary data;
[0089] Use tk.Toplevel to create a new sub-window. Toplevel is associated with the main window through root. This window is independent of the main window and has its own interface. Set the title of the sub-window to "Edit key-value pairs". This title will be displayed in the title bar of the pop-up window to facilitate users to understand the function of the window.
[0090] Step 4-2: Build scrolling support. When the content of the policy dictionary data exceeds the window, enable the scroll bar.
[0091] Step 4-3: Recursively generate key-value pair editors for nested dictionaries.
[0092] Recursively traverse the dictionary data and generate an input box. If the value attribute of the traversed dictionary is a dictionary, recursively call itself and add indentation at each level. If the value attribute is a normal value, generate a key-value pair input box.
[0093] Figure 4 This is a nested structure diagram for electromagnetic spectrum countermeasure strategy information.
[0094] Step 4-4: Verify data. Check the data in the visual interface. If the key or value is wrong, modify it in the corresponding text box.
[0095] Step 5: Save the strategy data dictionary in a structured file format and support export for electronic countermeasure equipment to call;
[0096] Step 5-1: A file dialog box pops up, select the save path.
[0097] Step 5-2: Save the dictionary data as a JSON file. Use the "strategy" entered in the strategy name dialog box as the file name and save the dictionary data as a JSON file. Figure 5 This is the interface for storing policy dictionaries.
[0098] Step 6: Draw electromagnetic spectrum countermeasure strategies based on the digital dictionary.
[0099] Step 6-1: Label the physical platform. Each platform icon uses a different symbol, including square, equilateral triangle, and inverted triangle.
[0100] Step 6-2: Draw the strategy path and equipment power range at different stages. If the equipment (radar or reconnaissance) is turned on, draw the corresponding area, with solid lines for radar and dotted lines for reconnaissance equipment.
[0101] Figure 6 Schematic diagram of the first phase electromagnetic spectrum countermeasure strategy. Figure 7 Schematic diagram of the second phase electromagnetic spectrum countermeasure strategy. Figure 8 This is a schematic diagram of the third-phase electromagnetic spectrum countermeasure strategy.
[0102] In summary, the present invention uses a large language model to parse and extract typical electromagnetic spectrum countermeasure strategy texts, generates a structured strategy data dictionary, extracts key parameters of the electromagnetic spectrum countermeasure strategy extraction method from the text, and saves it as dictionary data, which can be used for electromagnetic spectrum management.
[0103] The present invention significantly improves the generation efficiency of adversarial strategies, reduces dependence on environmental training, realizes the natural integration of domain knowledge, has high adaptability and broad application prospects, and can solve the problems of slow strategy generation, dependence on environmental training and difficulty in integrating domain knowledge in complex and changeable adversarial scenarios.
Claims
1. A method for extracting electromagnetic spectrum countermeasure strategies based on a large language model, characterized in that: The following steps are involved: Step 1: Input a text description of the electromagnetic spectrum countermeasure strategy through the user interface to form a strategy text; Step 2: Use the pre-trained large language model to perform semantic analysis on the strategy text and extract strategy data related to electromagnetic spectrum confrontation; Step 3: Construct a policy data dictionary based on the policy data obtained in step 2; Step 4: Generate a visual editing interface for users to perform parameter verification on the generated policy data dictionary; Step 5: Save the verified policy data dictionary in a structured file format and provide export function; Step 6: Draw the electromagnetic spectrum countermeasure strategy based on the strategy data dictionary.
2. According to claim 1, a method for extracting electromagnetic spectrum countermeasure strategies based on a large language model is characterized in that: The specific method of step 1 is: Step 1-1: Use the tkinter framework to build the strategy extraction interface; Step 1-2: Create a strategy name input box in the strategy extraction interface for users to enter the strategy name; Step 1-3: Build a text box automatic height adjustment module to obtain the content entered by the user in the text box, calculate the total number of characters in the content, split the text content by line, and dynamically adjust the height of the text box; Step 1-4: Construct a user command input box in the strategy extraction interface. The user command input box uses the wrap="word" attribute to wrap by word. Whenever the user enters or deletes characters in the user command input box, the text box automatic height adjustment module is called to dynamically adjust the height of the text box according to the text content. Step 1-5: Construct an extraction content input box in the policy extraction interface. The extraction content input box uses the wrap="word" attribute to wrap by word. Whenever the user enters or deletes characters in the extraction content input box, the text box automatic height adjustment module is called to dynamically adjust the height of the text box according to the text content. Step 1-6: Build a submit button. When the user clicks the submit button, the user instruction and the extracted content are concatenated to form the policy text.
3. According to claim 2, a method for extracting electromagnetic spectrum countermeasure strategies based on a large language model is characterized in that: The specific method of step 2 is: Step 2-1: Add ""You:"" characters at the beginning of the policy text to form a query message and assign it to the user_input variable; Step 2-2: Load the pre-trained GLM-4-9B-Chat large language model, use user_input as the input of the model, and obtain the response_data policy data generated by the large language model.
4. The electromagnetic spectrum countermeasure strategy extraction method based on a large language model according to claim 3 is characterized in that: The specific method of step 3 is: Using the JSON module, use the json.loads(message) statement to convert the response_data policy data from a dictionary string to a Python dictionary object dict_data.
5. According to claim 4, a method for extracting electromagnetic spectrum countermeasure strategies based on a large language model is characterized in that: The specific method of step 4 is: Step 4-1: Use tk.Toplevel to create a new subwindow for displaying and editing the strategy data dictionary. This window is independent of the main window and has its own interface. Step 4-2: Build scroll support and enable scroll bars when the content of the policy data dictionary exceeds the window; Step 4-3: Recursively traverse the strategy data dictionary. If the value attribute of the traversed dictionary is a dictionary, recursively call itself and add indentation at each level. If the value attribute is a normal value, generate a key-value pair input box; Step 4-4: Check the data in the visual interface. If the key or value is wrong, modify it in the corresponding text box.
6. The electromagnetic spectrum countermeasure strategy extraction method based on a large language model according to claim 5 is characterized in that: The specific method of step 5 is: Step 5-1: A file dialog box pops up, select the save path; Step 5-2: Save the policy data dictionary as a JSON file and name the file the same as the policy name.
7. The method for extracting electromagnetic spectrum countermeasure strategies based on a large language model according to claim 6, characterized in that: The specific method of step 6 is: Step 6-1: Label the physical platform, using different symbols for each platform icon; Step 6-2: Draw the strategy path and equipment power range at different stages. If the equipment is turned on, draw the corresponding area, where the radar uses a solid line and the reconnaissance equipment uses a dotted line.
Citation Information
Patent Citations
A Multi-UAV Cooperative Penetration Method Based on Heterogeneous Multi-Agent Reinforcement Learning
CN113822409B
Coarse-grained intelligent UAV penetration method based on reinforcement learning
CN118189973B