Unmanned vehicle formation automatic control method and system based on large language model
Through the automatic control method of unmanned vehicle fleet based on large language model, the control strategy is dynamically adjusted to meet different task requirements, and the problem of lack of flexibility and universality of unmanned vehicle fleet control in the existing technology is solved, achieving efficient and flexible Formation control.
Patent Information
- Application Number
- CN202411592448.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The existing unmanned vehicle fleet control technology lacks flexibility and versatility, and it is difficult to adapt to the formation needs of different scenarios and scales.
The automatic control method of unmanned vehicle fleet based on the large language model is adopted. Through in-depth analysis of task instructions, key information such as the number of unmanned vehicles, task goals and font style are extracted, and the control strategy is dynamically adjusted to meet different task needs.
It realizes flexible and efficient control of unmanned vehicle formations, can adapt to various types of task needs, and improves the coordination and efficiency of the formation.
Smart Images

Figure CN119472667A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of coordinated control of unmanned vehicle systems, and in particular to an automatic control method and system for an unmanned vehicle formation based on a large language model. Background Art
[0002] In the rapidly developing autonomous system, coordinating multiple unmanned vehicles to form a cohesive intelligent formation is a very challenging task. The main task of formation control is to control the state of the intelligent agents in the formation to track or maintain a specific geometric formation shape. The traditional formation control strategy design mode is usually preset and static, and it relies heavily on predetermined algorithms. Its inherent design mode leads to the limitation of the number and configuration of formations. Expanding the number, scale and diversity of vehicle formations requires fundamental reorganization or modification of existing algorithms. It lacks flexibility and versatility. In complex, changeable and unpredictable scenarios, it is difficult to flexibly adapt to different mission requirements and the formation change needs of unmanned vehicle fleets of different sizes. Summary of the invention
[0003] In view of this, the embodiments of the present disclosure provide an automatic control method and system for unmanned vehicle formations based on a large language model, which can solve the problems of the prior art such as single solution, lack of flexibility and versatility, and inability to meet the formation requirements in different scenarios.
[0004] In a first aspect, the present disclosure provides an automatic control method for an unmanned vehicle formation based on a large language model, which specifically includes the following contents:
[0005] Analyze the acquired task instructions to obtain task semantics, where the task semantics include the number of unmanned vehicles, task objectives, and font styles;
[0006] Extracting a task formation from the task target, and determining a task level according to the task formation;
[0007] Based on the task level, determining a target external tool;
[0008] Acquire a corresponding control strategy based on the target external tool, wherein the control strategy includes position information of the unmanned vehicle formation;
[0009] Automatic control of the unmanned vehicle formation is performed according to the control strategy.
[0010] Optionally, when the task formation belongs to the first formation library, the task level is the first level;
[0011] The first formation library includes letters and Chinese characters without curves and without cross collision points;
[0012] When the task formation belongs to the second formation library, the task level is the second level;
[0013] The second formation library includes letters and Chinese characters containing curves and / or intersection collision points.
[0014] Optionally, acquiring a corresponding control strategy based on the target external tool includes:
[0015] When the task level is the first level, the target external tool is a first-class external tool, and the corresponding control strategy includes: arranging all unmanned vehicles according to the preset vehicle spacing and task formation;
[0016] When the task level is the second level, the target external tool is a second type of external tool, and the control strategy is acquired according to the second type of external tool and a preset strategy.
[0017] Optionally, the obtaining the control strategy according to the second type of external tool and a preset strategy includes:
[0018] Obtain text information of the task formation and its font style, wherein the text information includes text content, text width, and text height;
[0019] Based on the text information, obtaining a target text image;
[0020] Converting the target text image into an array, and performing binarization processing on the array to generate a binary image;
[0021] Extracting an initial skeleton image from the binary image, performing line width processing on the initial skeleton image to obtain a target skeleton image, wherein the line widths in the target skeleton image are all one pixel wide;
[0022] The target skeleton image is analyzed based on a preset analysis strategy to obtain a control strategy.
[0023] Optionally, analyzing the target skeleton image based on a preset analysis strategy to obtain a control strategy includes:
[0024] Analyze the target skeleton image to obtain all points whose pixel values are less than a preset threshold and their corresponding coordinate information;
[0025] Based on the coordinate information, uniform coordinate point information consistent with the number of unmanned vehicles is determined.
[0026] Optionally, determining uniform coordinate point information consistent with the number of unmanned vehicles based on the coordinate information includes:
[0027] A100, recording all points whose pixel values are less than a preset threshold and their corresponding coordinate information into a first point set;
[0028] A200, randomly selecting a point from the first point set as a target point, and moving the target point to the second point set;
[0029] A300, determining whether the number of points in the second point set is consistent with the number of the unmanned vehicles; if not, calculating the distances from all points in the first point set to all points in the second point set, obtaining the point with the smallest distance from any point in the first point set to the second point set, and recording the point as a target point pair;
[0030] Record all the acquired target point pairs as minimum distance point sets;
[0031] A400, select the point with the largest distance from the minimum distance point set as the target point, and set YY+242301P
[0032] The target point moves to a second point set;
[0033] Return to execute A300 , when the number of points in the second point set is consistent with the number of the unmanned vehicles, all point information in the second point set is used as uniform coordinate point information.
[0034] Optionally, the unmanned vehicle formation automatic control method based on the large language model further includes:
[0035] Based on the preset vehicle spacing and the uniform coordinate point information, the expected formation information is obtained;
[0036] If the expected formation information conflicts with the actual arrangement, the preset vehicle spacing and uniform coordinate point information are dynamically adjusted.
[0037] In the second aspect, the present application discloses an automatic control system for an unmanned vehicle formation based on a large language model, comprising:
[0038] An interactive module, including system-level prompts, constraint-level prompts and user-level prompts, wherein the system-level prompts are used to set roles and goals, the constraint-level prompts are used to ensure output standardization and accuracy, and the user-level prompts are used for human-computer interaction and customized control;
[0039] A tool-enhanced large language model is communicatively connected with the interaction module, and is used to output a control strategy for automatic control of the unmanned vehicle formation according to the task instructions received by the interaction module and the unmanned vehicle formation automatic control method based on the large language model;
[0040] The unmanned vehicle control module is connected to the tool enhanced large language model communication, and is used to automatically schedule the unmanned vehicles to form a platoon according to the control strategy.
[0041] Optionally, the unmanned vehicle formation automatic control system based on the large language model also includes a verification module, which is used to verify the control strategy. When the verification is passed, the tool enhances the large language model to send the control strategy to the unmanned vehicle control module.
[0042] Optionally, if the control strategy fails the verification, the verification module sends verification failure information to the tool-enhanced large language model, and the tool-enhanced large language model re-acquires the control strategy.
[0043] In a third aspect, the present disclosure also provides a computer device, using the following technology
[0044] Technical plan:
[0045] The computer device comprises:
[0046] at least one processor; and,
[0047] a memory communicatively connected to the at least one processor; wherein,
[0048] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the above-mentioned unmanned vehicle formation automatic control methods based on a large language model.
[0049] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned unmanned vehicle formation automatic control methods based on a large language model.
[0050] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0051] The unmanned vehicle formation automatic control method based on a large language model disclosed in the present application can accurately extract key information such as the number of unmanned vehicles, task objectives and font styles through in-depth analysis of task instructions. This powerful parsing capability ensures the precise execution of tasks and can effectively reduce errors; by extracting the task formation in the task objective and determining the task level based on the formation, the control strategy can be dynamically adjusted according to the complexity and importance of the task. This flexibility enables the formation control to adapt to various types of task requirements; corresponding control strategies are generated according to the task level, including the position information of the unmanned vehicle formation. This intelligent strategy generation mechanism ensures the coordination and efficiency of the unmanned vehicle formation when performing tasks; finally, the unmanned vehicle formation is automatically controlled according to the generated control strategy. This automated control can effectively reduce the need for human intervention and improve the efficiency, reliability and formation accuracy of operations.
[0052] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 A schematic flow chart of an automatic control method for an unmanned vehicle platoon based on a large language model provided in an embodiment of the present disclosure.
[0055] Figure 2 A flowchart of a method for obtaining a control strategy based on a second type of external tool and a preset strategy provided in an embodiment of the present disclosure.
[0056] Figure 3 A schematic flow chart of a method for analyzing a target skeleton image based on a preset analysis strategy to obtain a control strategy provided in an embodiment of the present disclosure.
[0057] Figure 4 A schematic diagram of a flow chart of a method for acquiring uniform coordinate point information provided in an embodiment of the present disclosure.
[0058] Figure 5 for Figure 4 A flowchart of a specific embodiment of the present invention is provided.
[0059] Figure 6A flowchart of the inspection method for the security inspection link provided in an embodiment of the present disclosure.
[0060] Figure 7 A schematic diagram of the framework of an unmanned vehicle platoon automatic control system based on a large language model provided in an embodiment of the present disclosure.
[0061] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0062] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0063] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0064] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0065] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0066] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will appreciate that the present invention may be described without these specific details.
[0067] Practice the aspects described.
[0068] Reference Figure 1 The present application discloses an automatic control method for an unmanned vehicle formation based on a large language model, which specifically includes:
[0069] S100, obtaining task instructions.
[0070] Specifically, the task instruction can be a pre-programmed script or issued by the user in real time; the task instruction can exist in the form of text, voice or image; multi-source task reception improves the flexibility and adaptability of the system, and can handle both fixed programming and dynamic instructions.
[0071] For example, the task instruction may be "Use 20 vehicles to form a convoy, adjust the convoy to form the letter B, and use Songti font style."
[0072] S200, analyzing the task instruction to obtain task semantics, where the task semantics includes the number of unmanned vehicles, task objectives, and font style.
[0073] Specifically, task instructions can be analyzed based on a large language model to obtain task semantics, which can effectively improve the accuracy and efficiency of instruction parsing and reduce the errors and time costs of manual parsing. The refinement of task semantics means higher task execution quality and efficiency.
[0074] For example, the extracted task semantics include: the number of unmanned vehicles is 20, the task objective is to adjust the fleet to form the letter B, and the font style is Songti.
[0075] S300, extracting the task formation in the task target, and determining the task level according to the task formation.
[0076] When the task formation belongs to the first formation library, the task level is the first level; wherein the first formation library includes letters and Chinese characters that do not contain curves and do not contain cross collision points.
[0077] When the task formation belongs to the second formation library, the task level is the second level; wherein the second formation library includes letters and Chinese characters containing curves and / or intersection collision points.
[0078] Further, the first formation library includes formations such as the one - character formation, two - character formation, three - character formation, L - formation, T - formation, A - formation, E - formation, F - formation, H - formation, I - formation, K - formation, M - formation, N - formation, V - formation, W - formation, X - formation, Y - formation, Z - formation, and other formations with simple strokes.
[0079] Further, the second formation library includes B - formation, C - formation, D - formation, G - formation, J - formation, O - formation, P - formation, Q - formation, R - formation, S - formation, U - formation, and Chinese characters containing collision points; taking '中' as an example, there are two cross - collision points in it, that is, the intersection point of the vertical line and the flat opening.
[0080] The determination of the task level helps to allocate different resources and control strategies for different tasks, ensuring that each task can be properly processed, while improving the flexibility and adaptability of the system, and enabling it to handle tasks of different complexities.
[0081] For example, when the extracted task formation is B and it is determined that the task formation belongs to the second formation library, the corresponding task level is the second level.
[0082] S400. Based on the task level, determine the target external tool;
[0083] Obtain the corresponding control strategy based on the target external tool.
[0084] Specifically, when the task level is the first level, the target external tool is the first type of external tool, and the corresponding control strategy includes: arranging all unmanned vehicles according to the preset inter - vehicle distance and task formation.
[0085] When the task level is the second level, the target external tool is the second type of external tool, and obtain the control strategy according to the second type of external tool and the preset strategy.
[0086] Through this step, ensure that each task can obtain the most suitable control strategy, improve the success rate and efficiency of task execution, and at the same time, it can reduce unnecessary high - cost operations and make resource utilization more efficient.
[0087] S500. Automatically control the formation of unmanned vehicles according to the control strategy.
[0088] Specifically, automatically regulate the movement of all unmanned vehicles according to the obtained control strategy to present an arrangement plan matching the task instructions, which can significantly reduce the need for manual operations, improve the automation level and efficiency of task execution, effectively enhance the reliability and stability of the system, and reduce the possibility of human errors.
[0089] The unmanned vehicle formation automatic control method based on a large language model disclosed in the present application can accurately extract key information such as the number of unmanned vehicles, task objectives and font styles through in-depth analysis of task instructions. This powerful parsing capability ensures the precise execution of tasks and can effectively reduce errors; by extracting the task formation in the task objective and determining the task level based on the formation, the control strategy can be dynamically adjusted according to the complexity and importance of the task. This flexibility enables the formation control to adapt to various types of task requirements; corresponding control strategies are generated according to the task level, including the position information of the unmanned vehicle formation. This intelligent strategy generation mechanism ensures the coordination and efficiency of the unmanned vehicle formation when performing tasks; finally, the unmanned vehicle formation is automatically controlled according to the generated control strategy. This automated control can effectively reduce the need for human intervention and improve the efficiency, reliability and formation accuracy of operations.
[0090] Reference Figure 2 According to the method of obtaining the control strategy based on the second type of external tool and the preset strategy, the method specifically includes the following steps:
[0091] S421, obtaining text information of the task formation and its font style, the text information including text content, text width, and text height.
[0092] Specifically, the text information of the task formation and its font style can be obtained based on the draw.textbbox method, and drawn at the center of the image, using black as the drawing color to ensure that the image can be recognized as a binary image in subsequent steps.
[0093] In this embodiment, the recognition and processing of different task formations and font styles are supported, effectively improving the flexibility and adaptability of the system.
[0094] S422, obtaining a target text image based on the text information.
[0095] Specifically, based on the text information, a target text image can be obtained by drawing in a preset drawing software.
[0096] For example, according to the extracted text information, such as "V-shape" and "bold", a corresponding text image is generated; for example, the generated image shows a bold "V" shape with specific width and height parameters.
[0097] Converting text information into images facilitates intuitive understanding of task objectives, especially in complex or abstract task instructions. Graphic processing helps to clearly display the task content, and the graphical text information facilitates subsequent image processing steps and improves processing efficiency.
[0098] S423, converting the target text image into an array, and performing binarization processing on the array to generate a binary image.
[0099] Among them, the foreground object, i.e., the target text, in the binary image is highlighted in white, and the background is black.
[0100] Specifically, the generated text image can be converted into an array format, where each element of the array corresponds to a pixel of the image; the array is binarized, and each pixel in the image is converted to 0 or 1, where 0 represents the background and 1 represents the text content.
[0101] Through binarization processing, the complexity of the image can be effectively simplified, which is convenient for subsequent skeleton extraction and analysis. At the same time, the binary image reduces the amount of data and can speed up the calculation speed of subsequent image processing steps.
[0102] S424, extracting an initial skeleton image from the binary image, performing line width processing on the initial skeleton image to obtain a target skeleton image, wherein the line widths in the target skeleton image are all one pixel wide.
[0103] Among them, the extracted initial skeleton image is the refined image.
[0104] Specifically, pixels on the boundary of foreground objects in binary images can be identified (a pixel is considered a boundary pixel if only one or two of its neighboring pixels are foreground pixels), and the boundary pixels can be removed without destroying the connectivity of the foreground objects by looking up a table (determining which pixels can be removed based on the pattern of the pixel's eight neighboring pixels); the process of identifying and removing boundaries is iterated repeatedly until no more boundary pixels can be removed, and the initial skeleton image can be extracted.
[0105] In this step, skeletonization processing can accurately extract the main framework of the text to ensure accurate recognition of the task formation; one-pixel-wide line processing standardizes the image format to facilitate subsequent analysis and control strategy generation.
[0106] S425, analyzing the target skeleton image based on a preset analysis strategy to obtain a control strategy.
[0107] Based on the analysis of skeleton images, intelligent control strategies can be generated to ensure efficient collaborative operation of unmanned vehicle formations. At the same time, by analyzing skeleton images, task formations can be accurately identified and corresponding control strategies can be generated to ensure the accuracy and efficiency of task execution.
[0108] The method for obtaining a control strategy according to a first preset analysis strategy disclosed in this embodiment can reduce noise and redundant information in the image by binarizing and skeletonizing the text image, making the final skeleton image clearer and more precise, which helps to extract more accurate information in the subsequent analysis process, thereby obtaining a more precise control strategy; converting the text image into an array and generating a binary image through binarization, so that the image data becomes more compact and the processing speed is faster, which is particularly important for scenarios that require real-time processing of large amounts of data; by performing line width processing on the initial skeleton image, it is ensured that the line width in the final target skeleton image is one pixel wide, which can avoid analysis errors caused by changes in image resolution or line width; by analyzing the target skeleton image based on the preset analysis strategy, the analysis strategy can be customized according to different needs and scenarios, so as to obtain a control strategy that better meets actual needs and enhances adaptability and flexibility.
[0109] Reference Figure 3 , a method for analyzing a target skeleton image based on a preset analysis strategy to obtain a control strategy specifically includes the following steps:
[0110] S4251, analyze the target skeleton image and obtain all YY+242301P whose pixel values are less than the preset threshold
[0111] There are points and their corresponding coordinate information.
[0112] Specifically, you can first use an image processing library (such as OpenCV) to read the target skeleton image; traverse each pixel in the image to determine whether its pixel value is less than a preset threshold (for example, the pixel value of a black skeleton in a white background is lower); record the qualified pixel points and their coordinate information (x, y) in a list.
[0113] Furthermore, pixel values less than 128 (black) may be set to True, and others to False.
[0114] By presetting the threshold, the key points in the skeleton image can be accurately extracted, avoiding the interference of redundant information; traversing the image for pixel value analysis is an efficient algorithm that can quickly process large amounts of data.
[0115] S4252, based on the coordinate information, determine uniform coordinate point information consistent with the number of unmanned vehicles.
[0116] Ensure that the distribution of unmanned vehicles in the image is balanced to avoid excessive concentration or lack of unmanned vehicles in certain areas; through uniform distribution, the task allocation of unmanned vehicles can be optimized to ensure that each unmanned vehicle can perform its tasks effectively.
[0117] The method disclosed in this embodiment analyzes the target skeleton image based on a preset analysis strategy to obtain a control strategy. By accurately extracting key points in the skeleton image and evenly distributing the coordinates of the unmanned vehicles, it is ensured that each unmanned vehicle can perform the task efficiently, thereby effectively avoiding waste of resources; by using preset thresholds and uniform distribution algorithms, the impact of environmental noise and image distortion on the system can be reduced; accurate coordinate information and uniform distribution strategies can ensure the accuracy and consistency of the unmanned vehicles when performing tasks; complex image analysis tasks are decomposed into simple pixel value analysis and coordinate processing, which can simplify the implementation and maintenance of the system; by adjusting the preset thresholds and the number of unmanned vehicles, it can adapt to different task formations and font styles, thereby enhancing the flexibility and adaptability of the system.
[0118] Reference Figure 4 Based on the coordinate information, determine the uniform coordinate point signal YY+242301P that is consistent with the number of unmanned vehicles
[0119] The method of providing information specifically comprises the following steps:
[0120] A100, recording all points whose pixel values are less than a preset threshold and their corresponding coordinate information into a first point set.
[0121] A200, randomly select a point from the first point set as the target point, and move the target point to the second point set.
[0122] Among them, after the target point is moved to the second point set, the target point no longer exists in the original first point set, that is, each time a point is moved into the second point set, the corresponding point is missing from the first point set.
[0123] Randomly select the initial point to ensure that the starting point of the distribution has a certain degree of randomness, laying the foundation for the subsequent uniform distribution; through random selection, the initial point selection process is simplified and complex calculations are avoided.
[0124] A300 determines whether the number of points in the second point set is consistent with the number of unmanned vehicles. If not, calculates the distance from all points in the first point set to all points in the second point set, obtains the point with the smallest distance from any point in the first point set to the second point set, and records it as a target point pair. All the obtained target point pairs are recorded as the minimum distance point set.
[0125] A400, select the point with the largest distance from the minimum distance point set as the target point, and move the target point to the second point set.
[0126] Selecting the point with the largest distance helps ensure that the newly selected point is as far away from the currently selected point as possible, ensuring uniform distribution between the unmanned vehicles. At the same time, it can maximize the coverage of key areas in the image and ensure that each unmanned vehicle can cover as many key points as possible. By maximizing the distance, the points can be gradually evenly distributed to avoid excessive concentration of points.
[0127] Return to execute A300, and determine the consistency between the number of points in the second point set and the number of unmanned vehicles each time.
[0128] A500, when the number of points in the second point set is consistent with the number of unmanned vehicles, all point information in the second point set is used as uniform coordinate point information.
[0129] Ensure that the final number of points is consistent with the number of unmanned vehicles, avoiding the problem of too many or too few points; through iterative optimization, the uniform distribution of points can be efficiently achieved, ensuring that each unmanned vehicle can perform its tasks effectively.
[0130] The method disclosed in this embodiment determines uniform coordinate point information consistent with the number of unmanned vehicles based on coordinate information. By accurately extracting key points in the skeleton image and gradually optimizing the distribution of points, it can ensure that each target unmanned vehicle can perform tasks efficiently and effectively avoid waste of resources; through preset thresholds and distance calculations, it can effectively reduce the impact of environmental noise and image distortion on the system and improve the robustness of the system; accurate coordinate information and uniform distribution strategies can ensure the accuracy and consistency of unmanned vehicles when performing tasks; decomposing complex image analysis tasks into simple pixel value analysis and distance calculations can simplify the implementation and maintenance of the system; by adjusting the preset thresholds and the number of unmanned vehicles, it can adapt to different task formations and font styles, which can effectively enhance the flexibility and adaptability of the system.
[0131] Further, refer to Figure 5 For example, in the initial state, the first point set contains N points and the second point set contains 0 points.
[0132] A point is randomly selected from the first point set (N points) as the first point, and the first point is moved to the second point set; at this time, the first point set contains N-1 points, and the second point set contains 1 point.
[0133] Secondly, calculate the distances from all points in the first point set to the first point, record the point with the largest distance as the second point, and move the second point to the second point set; at this point, the first point set contains N-2 points, and the second point set contains 2 points.
[0134] Then, calculate the distance from all points in the first point set (N-2 points) to all points in the second point set (2 points), obtain the point with the smallest distance from any point in the first point set to the second point set, and record it as the target point pair. For example, first determine the point with the smallest distance from the first point in the first point set to the second point set, and obtain the first target point pair; then determine the point with the smallest distance from the second point in the first point set to the second point set, and obtain the second target point pair. Similarly, determine the point with the smallest distance from the Qth point in the first point set to the second point set, and obtain the Qth target point pair. Determine whether Q is equal to M, where M is the number of points contained in the current first point set. If Q is less than M, recalculate until all points in the current first point set are traversed; when Q is equal to M, that is, after completing the distance calculation from all points in the current first point set to the second point set, the corresponding minimum distance point set can be obtained.
[0135] In this step, M=N-2, so N-2 pairs of point pairs with the smallest distance are obtained, and all the obtained target point pairs are recorded as the minimum distance point set, that is, the minimum distance point set contains N-2 pairs of target point pairs.
[0136] The point with the largest distance is selected from the minimum distance point set as the target point, and the target point is moved to the second point set; at this time, the first point set contains N-3 points and the second point set contains 3 points; specifically, the point with the largest distance is selected from the N-2 pairs of points with the smallest distance as the next point to be moved to the second point set.
[0137] If the number of points in the second point set is inconsistent with the number of unmanned vehicles, that is, it is less than the number of unmanned vehicles, calculate the distance from all points in the first point set (N-3 points) to all points in the second point set, obtain the point with the smallest distance between any point in the first point set and the second point set, and record it as the target point pair, record all the obtained target point pairs as the minimum distance point set, and then move the largest point in the minimum distance point set to the second point set, and repeat this process until the number of points in the second point set is consistent with the number of unmanned vehicles, and finally use the information of all points in the second point set as uniform coordinate point information.
[0138] Reference Figure 6 Furthermore, the unmanned vehicle formation automatic control method based on the large language model disclosed in the present application also includes a safety inspection link, and the inspection method of the safety inspection link specifically includes:
[0139] B100, based on the preset vehicle spacing and uniform coordinate point information, obtains the expected formation information.
[0140] Specifically, the position information of each vehicle in actual scale can be obtained according to the method that the ratio of the vehicle spacing in the uniform coordinate point information to the preset vehicle spacing, that is, the expected formation information can be obtained.
[0141] B200: If the expected formation information conflicts with the actual arrangement, dynamically adjust the preset vehicle spacing and uniform coordinate point information.
[0142] Specifically, the expected formation information is compared with the actual site information to determine whether there is a conflict (for example, the expected positions of two or more unmanned vehicles overlap). If a conflict is found, the preset vehicle spacing and uniform coordinate point information are dynamically adjusted. Specific methods may include: 1) Adjusting the vehicle spacing: increasing or decreasing the preset vehicle spacing to avoid overlap between unmanned vehicles; 2) Reallocating coordinates: recalculating the uniform coordinate point information based on the new vehicle spacing to ensure that the positions of the unmanned vehicles no longer conflict.
[0143] By dynamically adjusting the distance between vehicles and coordinate information, it can adapt to changes in the actual arrangement in real time and avoid conflicts caused by environmental changes or adjustments in the number of unmanned vehicles. Through safety inspections, it ensures that the positions of unmanned vehicles in the formation are reasonable, avoids collisions and mutual interference, and improves the safety of the formation.
[0144] Reference Figure 7 In the second aspect, the present application discloses an automatic control system for an unmanned vehicle formation based on a large language model, comprising:
[0145] Interaction module, including interactive dialogue window, system-level prompts, constraint-level prompts and user-level prompts. System-level prompts are used to set roles and goals, constraint-level prompts are used to ensure output standardization and accuracy, and user-level prompts are used for human-computer interaction and customized control;
[0146] The tool-enhanced large language model is communicatively connected with the interaction module, and is used to output a control strategy for automatic control of the unmanned vehicle formation according to the task instructions received by the interaction module and the unmanned vehicle formation automatic control method based on the large language model; specifically, the tool-enhanced large language model includes a large language model and a tool collaboration module, the large language model can be used to analyze the task instructions, and the tool collaboration module is used to call the corresponding target external tool according to the task level to obtain the corresponding control strategy.
[0147] The unmanned vehicle control module is connected to the tool-enhanced large language model for automatically scheduling unmanned vehicles into formations according to the control strategy.
[0148] The interaction module adopts a multi-level structural design. It provides overall guidelines for the large model through system-level prompts, defines the output of the large model using constraint-level prompts to ensure its relevance and accuracy, and acts as a channel for human-computer interaction through user-level prompts, allowing users to manipulate the behavior of the large model through intuitive commands.
[0149] The set system-level prompts are mainly responsible for defining the role of the large language model when performing tasks and its basic task framework. They are the core mechanism for the model to understand the task context and provide macro-guidance for the processing of task instructions. For example, you can first define a "formation commander" role for the large model. This role gives the model clear responsibilities and task scope, allowing it to focus more on the specific scenario of unmanned vehicle formations, better understand the role's behavior and dialogue, rather than processing overly broad or irrelevant requests, thereby generating outputs that are more in line with the situation. System-level prompts also include task guidelines for formation tasks, such as commanding a fleet to form a specific formation. This high-level task guidance allows for clear task goals when dealing with complex formations, ensuring that the model understands user intent and generates outputs that are more in line with actual needs.
[0150] The constraint-level prompts set can normalize and standardize the output content generated by the large model to ensure the relevance and accuracy of its output; the constraint-level prompts set a strict output format and require the content generated by the model to be presented in a specific form (for example, coordinate data in JSON format). This method not only ensures that the output can be directly read and executed by the unmanned vehicle control system, but also improves the efficiency of system integration and reduces the time cost of human intervention and data conversion. Compared with the traditional free output structure, the standardized output structure significantly improves the system's degree of automation and real-time performance. At the same time, constraint-level prompts can set precise numerical standards for the output. For example, the model must ensure the minimum distance between unmanned vehicles and other requirements. This technical improvement directly improves the reliability of the system in dealing with complex environments.
[0151] The set user-level prompts allow users to manipulate the behavior of the final output formation plan with intuitive commands through an interactive dialogue window, achieving precise task control, directly reflecting the user's intentions and needs, and being able to perform corresponding formation control operations according to the user's instructions.
[0152] Through user-level prompts, users can directly input the specific requirements of the formation task in natural language or structured command form. The flexible design of this module allows users to define multiple formation parameters, such as 1) Number of unmanned vehicles: users can specify the number of unmanned vehicles participating in the formation through instructions. For example, users can enter the command "Use 20 unmanned vehicles to form a formation" or "Automatically adjust the number of vehicles according to task requirements", and the system will generate a suitable formation plan based on this. 2) Formation arrangement: users can require the formation to form a specific shape or character, such as "arrange into the letter B" or "form a square array". The system will generate an accurate formation that meets the requirements based on user instructions, with the cooperation of font libraries and coordinate calculation tools. 3) Formation style and style: users can choose different formation styles or styles according to visual or functional requirements. For example, by entering "Use Song style" or "Select modern style formation", the system can call different font libraries to display a variety of formation effects. This highly customized function meets the diverse needs in different scenarios.
[0153] The tool-enhanced large language model includes a tool collaboration module and a large language model. The tool collaboration module can call an external font library and the skeleton positioning of a coordinate calculation tool to implement the execution of Chinese and English character formation tasks in various styles.
[0154] Specifically, when the user inputs instructions through the interactive module, the tool-enhanced large language model can extract the name of the function call, the parameters of the function call, the text used to generate the target string skeleton, the number of unmanned vehicles (car_number), and the font style used when generating the skeleton from the received user input; secondly, create a white background image, set the color mode to grayscale mode, and load the specified font file from the external font library. Create a zero-size image, use the draw.textbbox method to calculate the width and height of the target string text, and draw it in the center of the image, and the drawing color is black; then convert the image to an array and binarize it to generate a binary image. Pixel values less than 128 (black) are set to True, and others are False; next, use the skeletonize function of the skimage library to extract the skeleton of the image and generate a skeleton image with a width of only one pixel; finally, find all points with True pixel values in the skeleton image, obtain their coordinates, and evenly select car_number coordinate points from the skeleton.
[0155] Furthermore, the unmanned vehicle formation automatic control system based on the large language model also includes a safety module that can check and verify the output of the large model.
[0156] Specifically, the security control module can parse the output to check whether it conforms to the expected JSON format. If the output content is not in the standard JSON format, the regular expression r'\[([\d\.]+),([\d\.]+)\]' will be used to extract possible coordinate points from the text.
[0157] Furthermore, it is also possible to check whether the generated coordinates match the number of vehicle fleets, including: extracting the number of generated coordinate points and comparing them with the number of unmanned vehicles specified by the user. If the number of generated coordinate points is less than or more than the number specified by the user, it is considered abnormal; the safety control module will provide feedback "The number of generated coordinates exceeds / is less than the number specified by the user. Please regenerate the output containing car_number coordinate points."
[0158] Furthermore, the system can perform coordinate verification and physical feasibility checks, including: calculating the distance between all unmanned vehicles to ensure that the distance between each vehicle is greater than a safety threshold. If the distance between vehicles is too small (less than the set safety threshold), the safety control module will provide feedback again, requiring adjustment of the distribution of coordinate points to increase vehicle spacing; then, based on the feedback from the safety control module, the user requirements are re-understood and the output results are readjusted.
[0159] If the generated coordinates do not match the number of vehicles in the fleet, increase or decrease the generation of coordinate points and ensure that all generated points match the specified number of vehicles; if the distance between vehicles is too small, adjust the distribution of coordinate points to increase the distance between vehicles.
[0160] The unmanned vehicle formation automatic control system based on a large language model disclosed in the present application ensures that the system always maintains consistency and goal orientation when processing tasks by setting roles and goals, thereby improving the efficiency of task processing; at the same time, it can ensure output standardization and accuracy, reduce errors and deviations, and improve the reliability and accuracy of the system; support human-computer interaction and customized control, so that the system can be adjusted according to the specific needs of the user and provide personalized control solutions.
[0161] By communicating with the interactive module, the tool-enhanced large language model can output appropriate control strategies based on the received task instructions and the unmanned vehicle formation automatic control method based on the large language model, thereby enhancing the intelligence and adaptability of the system.
[0162] Each module of the system, such as the interaction module, the tool-enhanced large language model, the unmanned vehicle control module and the verification module, can be run and upgraded independently, providing good flexibility and scalability, facilitating the system's functional expansion and technical upgrades in the future; user-level prompts enable the system to perform customized control according to the needs of specific users, enhancing the system's applicability and user experience; the tool-enhanced large language model relies on a large amount of data and algorithms, and can perform complex decision analysis and generate efficient and intelligent unmanned vehicle formation control strategies, giving the system powerful data-driven decision-making capabilities.
[0163] In summary, this unmanned vehicle platoon automatic control system based on a large language model provides a comprehensive solution for the automated control of unmanned vehicle platoons through its high efficiency, accuracy, safety, reliability, flexibility, and intelligent decision-making capabilities. It has broad application prospects and important practical significance.
[0164] Furthermore, the unmanned vehicle formation automatic control system based on the large language model also includes a verification module, which is used to verify the control strategy. When the verification is passed, the tool enhances the large language model to send the control strategy to the unmanned vehicle control module.
[0165] If the control strategy fails the verification, the verification module sends verification failure information to the tool-enhanced large language model, and the tool-enhanced large language model re-acquires the control strategy.
[0166] Specifically, check whether the format of the uniform coordinate points is in json format. If not, use the regular expression r'\[([\d\.]+),([\d\.]+)\]' to extract possible coordinate points in json format from the text.
[0167] In this embodiment, the verification module verifies the control strategy to ensure the safety and effectiveness of the strategy; when the strategy passes the verification, it is directly sent to the unmanned vehicle control module to reduce human intervention and errors and improve the automation level of the system.
[0168] The existence of the verification module requires that the control strategy must pass strict verification before execution, avoiding the implementation of inappropriate or dangerous strategies and enhancing the safety and reliability of the system. If the control strategy fails the verification, the system will automatically re-acquire a new strategy. This iterative optimization process helps the system to continuously improve and ensure that the final implemented strategy is the optimal one.
[0169] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, etc.
[0170] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device executes all or part of the steps of the unmanned vehicle formation automatic control method based on a large language model in the aforementioned embodiments of the present disclosure.
[0171] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.
[0172] like Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Figure 8 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0173] like Figure 8 As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0174] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 8A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0175] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the unmanned vehicle formation automatic control method based on a large language model of an embodiment of the present disclosure are executed.
[0176] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0177] According to the computer-readable storage medium of the embodiment of the present disclosure, non-transitory computer-readable instructions are stored thereon. When the non-transitory computer-readable instructions are executed by the processor, all or part of the steps of the automatic control method of the unmanned vehicle formation based on the large language model of each embodiment of the present disclosure are executed.
[0178] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).
[0179] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0180] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limiting. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0181] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0182] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0183] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0184] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.
[0185] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0186] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. An automatic control method for unmanned vehicle formation based on a large language model, characterized in that: include: Analyze the acquired task instructions to obtain task semantics, where the task semantics include the number of unmanned vehicles, task objectives, and font styles; Extracting a task formation from the task target, and determining a task level according to the task formation; Based on the task level, determining a target external tool; Acquire a corresponding control strategy based on the target external tool, wherein the control strategy includes position information of the unmanned vehicle formation; Automatic control of the unmanned vehicle formation is performed according to the control strategy.
2. The automatic control method for unmanned vehicle formation based on a large language model according to claim 1 is characterized in that: When the task formation belongs to the first formation library, the task level is the first level; The first formation library includes letters and Chinese characters without curves and without cross collision points; When the task formation belongs to the second formation library, the task level is the second level; The second formation library includes letters and Chinese characters containing curves and / or intersection collision points.
3. The automatic control method of unmanned vehicle formation based on large language model according to claim 2 is characterized in that: The acquiring a corresponding control strategy based on the target external tool includes: When the task level is the first level, the target external tool is a first-class external tool, and the corresponding control strategy includes: arranging all unmanned vehicles according to the preset vehicle spacing and task formation; When the task level is the second level, the target external tool is a second type of external tool, and the control strategy is acquired according to the second type of external tool and a preset strategy.
4. The automatic control method for unmanned vehicle formation based on a large language model according to claim 3 is characterized in that: The obtaining of the control strategy according to the second type of external tool and the preset strategy includes: Obtain text information of the task formation and its font style, wherein the text information includes text content, text width, and text height; Based on the text information, obtaining a target text image; Converting the target text image into an array, and performing binarization processing on the array to generate a binary image; Extracting an initial skeleton image from the binary image, performing line width processing on the initial skeleton image to obtain a target skeleton image, wherein the line widths in the target skeleton image are all one pixel wide; The target skeleton image is analyzed based on a preset analysis strategy to obtain a control strategy.
5. The automatic control method of unmanned vehicle formation based on large language model according to claim 4 is characterized in that: The step of analyzing the target skeleton image based on a preset analysis strategy to obtain a control strategy includes: Analyze the target skeleton image to obtain all points whose pixel values are less than a preset threshold and their corresponding coordinate information; Based on the coordinate information, uniform coordinate point information consistent with the number of unmanned vehicles is determined.
6. The automatic control method for unmanned vehicle formation based on a large language model according to claim 5 is characterized in that: The step of determining uniform coordinate point information consistent with the number of the unmanned vehicles based on the coordinate information includes: A100, recording all points whose pixel values are less than a preset threshold and their corresponding coordinate information into a first point set; A200, randomly selecting a point from the first point set as a target point, and moving the target point to the second point set; A300, determining whether the number of points in the second point set is consistent with the number of the unmanned vehicles; if not, calculating the distances from all points in the first point set to all points in the second point set, obtaining the point with the smallest distance from any point in the first point set to the second point set, and recording the point as a target point pair; Record all the acquired target point pairs as minimum distance point sets; A400, selecting a point with the largest distance from the minimum distance point set as a target point, and moving the target point to the second point set; Return to execute A300 , when the number of points in the second point set is consistent with the number of the unmanned vehicles, all point information in the second point set is used as uniform coordinate point information.
7. The automatic control method of unmanned vehicle formation based on large language model according to claim 6 is characterized in that: Also includes: Based on the preset vehicle spacing and the uniform coordinate point information, the expected formation information is obtained; If the expected formation information conflicts with the actual arrangement, the preset vehicle spacing and uniform coordinate point information are dynamically adjusted.
8. An automatic control system for unmanned vehicle formation based on a large language model, characterized in that: include: An interactive module, including system-level prompts, constraint-level prompts and user-level prompts, wherein the system-level prompts are used to set roles and goals, the constraint-level prompts are used to ensure output standardization and accuracy, and the user-level prompts are used for human-computer interaction and customized control; A tool-enhanced large language model is communicatively connected to the interaction module, and is used to output a control strategy for automatic control of an unmanned vehicle formation according to the task instructions received by the interaction module and the unmanned vehicle formation automatic control method based on the large language model according to any one of claims 1 to 7; The unmanned vehicle control module is connected to the tool enhanced large language model communication, and is used to automatically schedule the unmanned vehicles to form a platoon according to the control strategy.
9. The unmanned vehicle formation automatic control system based on a large language model according to claim 8 is characterized in that: It also includes a verification module, which is used to verify the control strategy. When the verification is passed, the tool enhances the large language model to send the control strategy to the unmanned vehicle control module.
10. The unmanned vehicle formation automatic control system based on a large language model according to claim 9, characterized in that: If the control strategy fails the verification, the verification module sends verification failure information to the tool-enhanced large language model, and the tool-enhanced large language model re-acquires the control strategy.
Citation Information
Patent Citations
Distributed cluster unmanned aerial vehicle formation flight path generation method in complex unknown environment
CN114610066A
Constrained multi-robot reinforcement learning safety formation method based on two-dimensional laser observation
CN116300905A
Unmanned aerial vehicle group performance simulation system based on Cesium
CN117373317A
Unmanned cluster formation control algorithm intelligent generation method based on large model
CN117647934A
Strategy generation method and device, electronic equipment and storage medium
CN118133987A
Cited By
Unmanned aerial vehicle cluster formation control method and system based on multi-modal large language model
CN120469480A
A Method and System for Unmanned Aerial Vehicle (UAV) Swarm Formation Control Based on Multimodal Large Language Model
CN120469480B