Multi-target attack method and system based on K-means clustering
By applying the K-means clustering algorithm in the multi-target attack zone, the targets are clustered and the attack point locations are generated, which solves the problems of poor target distribution and low application efficiency in the existing technology, and achieves effective and accurate distribution of weapons. attack.
Patent Information
- Application Number
- CN202411384790.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art has poor effect when effectively allocating the targets and the number of bombs in the attack area, and cannot accurately locate the target position, and has low application efficiency.
A multi-target attack method based on K-means clustering is adopted. The targets in the attack area are clustered through the K-means clustering algorithm to generate k small attack areas with high aggregation degree and corresponding attack point locations.
It realizes the effective distribution of weapons, accurately locates targets and improves combat efficiency, and provides real-time, accurate and reliable attack plans.
Smart Images

Figure CN119337714A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of command information technology, and in particular relates to a multi-target attack method and system based on K-means clustering. Background Art
[0002] Carrying out precise strikes on multiple randomly distributed targets in the attack area is one of the key factors that determine the outcome of a war. In order to effectively damage all enemy targets and reduce the consumption of weapons and ammunition, it is necessary to plan the targets and the number of bombs in the attack area under certain constraints. The present invention studies the multi-target attack scheme based on the K-means clustering algorithm. Finally, the research results give the minimum amount of ammunition and the location of the attack point when damaging all targets, providing an effective decision-making basis for battlefield deployment.
[0003] Through the above analysis, the problems and defects of the existing technology are: the existing technology has poor effect on the effective allocation of targets and bomb quantities in the area, cannot locate the target position more accurately, and has low efficiency in actual application. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the disclosed embodiment of the present invention provides a multi-target attack method and system based on K-means clustering.
[0005] The technical solution is as follows: A multi-target attack method based on K-means clustering, comprising:
[0006] S1: Let the number of attack points k = 1, and randomly select an initial attack point C0 (x0, y0) in the attack area;
[0007] S2: Calculate all target points a in the attack area i (x i ,y i ) to the attack point C0(x0,y0);
[0008] S3: Classify all target points into the class corresponding to the attack point closest to them;
[0009] S4: Recalculate and generate a new attack point C(x, y), where x is the average value of the horizontal coordinates of all target points in the class, and y is the average value of the vertical coordinates of all target points in the class;
[0010] S5: Determine whether the attack point position is updated or reaches the set number of iterations;
[0011] S6: Determine whether the distance between the target point farthest from the attack point in the class and the attack point is less than the bomb damage radius;
[0012] S7: If it is less than the bomb damage radius, output the k value; if it is greater than or equal to the bomb damage radius, set k=k+1, increase the number of attack points by 1 each time, and re-execute step S2.
[0013] In step S2, all target points a in the attack area are calculated i (x i ,y i ) to the attack point C0(x0,y0), the expression is:
[0014]
[0015] Where, d i The target point a i (x i ,y i ) to the attack point C0(x0,y0), x i is the horizontal coordinate of the i-th target point, y i is the ordinate of the i-th target point, x0 is the abscissa of the attack point, and y0 is the ordinate of the attack point.
[0016] In step S3, all target points are classified into the class corresponding to the attack point closest to them. When there is only one attack point, all targets are classified into the class of the initial attack point C0 (x0, y0).
[0017] In step S5, if the attack point position is not updated or reaches the set number of iterations, step S6 is executed; if the attack point position is updated or does not reach the set number of iterations, step S2 is re-executed.
[0018] In step S6, if the distance between the target point farthest from the attack point in the class and the attack point is less than the bomb damage radius, the process ends and the attack plan is output; if the distance between the target point farthest from the attack point in the class and the attack point is greater than the bomb damage radius, step S7 is executed.
[0019] In step S7, when all conditions are met, the minimum number of bombs m, ie, the k value, is output, and the coordinates of the attack point C are obtained.
[0020] Another object of the present invention is to provide a multi-target attack system based on K-means clustering, which is implemented by the multi-target attack method based on K-means clustering, and the system comprises:
[0021] The initial attack point selection module is used to randomly select an initial attack point C0(x0,y0) in the attack area when k=1;
[0022] Attack distance calculation module, used to calculate all target points a in the attack area i (xi ,y i ) to the attack point C0(x0,y0);
[0023] All target point classification module is used to classify all target points into the class corresponding to the attack point closest to them;
[0024] A new attack point calculation module is used to recalculate and generate a new attack point C(x,y), where x is the average value of the horizontal coordinates of all target points in the class, and y is the average value of the vertical coordinates of all target points in the class;
[0025] The iteration number setting module is used to determine whether the attack point position is updated or the set iteration number is reached;
[0026] The bomb damage radius judgment module is used to judge whether the distance between the target point farthest from the attack point in the class and the attack point is less than the bomb damage radius;
[0027] The attack distance calculation recalculation module is used to set k=k+1, increase the number of attack points by 1 each time, and re-execute the attack distance calculation until all conditions are met, then output the minimum number of bombs m, i.e., the k value; and obtain the coordinates of the attack point C.
[0028] Furthermore, the multi-target attack system based on K-means clustering is mounted on a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and the processor implements the functions of the multi-target attack system based on K-means clustering when executing the computer program.
[0029] Furthermore, the multi-target attack system based on K-means clustering is carried on a computer-readable storage medium, and the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the functions of the multi-target attack system based on K-means clustering can be realized.
[0030] Furthermore, the multi-target attack system based on K-means clustering is mounted on an information data processing terminal, and the information data processing terminal is used to provide a user input interface to implement the functions of the multi-target attack system based on K-means clustering when executed on an electronic device.
[0031] In combination with all the above technical solutions, the beneficial effects of the present invention are as follows:
[0032] The present invention aims to solve the problem of reasonably allocating weapons in order to save combat costs and the problem of effectively striking all targets in the attack area. The present invention uses the K-means clustering algorithm to plan the targets and the number of bombs in the attack area under certain constraints, thereby achieving the purpose of effectively allocating weapons, accurately locating targets and improving combat efficiency.
[0033] This method uses the K-means algorithm to cluster the targets in the attack area, and obtains k small attack areas with high aggregation and the corresponding attack point locations. It is very meaningful for commanders to accurately and quickly analyze the battlefield situation through the output results, and to derive reliable attack strategies, thereby effectively striking the targets in the attack area. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;
[0035] Figure 1 is a flow chart of a multi-target attack method based on K-means clustering provided by an embodiment of the present invention;
[0036] Figure 2 It is a schematic diagram of a multi-target attack method based on K-means clustering provided by an embodiment of the present invention;
[0037] Figure 3 is a randomly distributed target position map provided by an embodiment of the present invention;
[0038] Figure 4 It is an attack scheme diagram provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.
[0040] The innovation of the present invention lies in that the present invention can optimize the number of bombs dropped, obtain the minimum amount of bombs used to cause damage to all targets in the attack area, and provide accurate location information of each attack point, ultimately providing commanders with a real-time, accurate and reliable attack plan.
[0041] Example 1: In the case where there are n targets randomly distributed in the attack area, the position information of each target is known as a i (x i ,yi ), i = 1, 2, 3 ... n, the carrier carries m bombs, and its damage radius is r. If all n targets in the attack area are destroyed, find the minimum number of bombs m and the attack point position C of each bomb. i .
[0042] like Figure 1 As shown, the multi-target attack method based on K-means clustering provided by the embodiment of the present invention includes:
[0043] S1: Let the number of attack points k = 1, and randomly select an initial attack point C0 (x0, y0) in the attack area;
[0044] S2: Calculate all target points a in the attack area i (x i ,y i ) to the attack point C0(x0,y0);
[0045] The expression is:
[0046]
[0047] Where, d i The target point a i (x i ,y i ) to the attack point C0(x0,y0), x i is the horizontal coordinate of the i-th target point, y i is the ordinate of the i-th target point, x0 is the abscissa of the attack point, and y0 is the ordinate of the attack point.
[0048] S3: Classify all target points into the class corresponding to the attack point closest to them;
[0049] At this time, since there is only one attack point, all targets are classified into the class of the initial attack point C0;
[0050] S4: Recalculate and generate a new attack point C(x, y), where x is the average value of the horizontal coordinates of all target points in the class, and y is the average value of the vertical coordinates of all target points in the class;
[0051] S5: Determine whether the attack point position is updated or reaches the set number of iterations;
[0052] If yes, execute step S6; if no, execute step S2 again;
[0053] S6: Determine whether the distance between the target point farthest from the attack point in the class and the attack point is less than the bomb damage radius;
[0054] If yes, then the process ends and the attack plan is output; if no, then step S7 is executed;
[0055] S7: If it is less than the bomb damage radius, output the k value; if it is greater than or equal to the bomb damage radius, set k=k+1, increase the number of attack points by 1 each time, and re-execute step S2.
[0056] When all conditions are met, output the minimum number of bombs m, i.e. the k value, and the coordinates of the attack point, i.e. the coordinates of point C.
[0057] Figure 2 This is the principle of the multi-target attack method based on K-means clustering provided by an embodiment of the present invention.
[0058] Embodiment 2, based on the analysis of practical problems and mathematical models, begins to study the attack strategy of practical problems on the battlefield.
[0059] Assume that the damage radius of a bomb is 1.5, and 50 target points are randomly distributed in a combat area. The specific locations are shown in Table 1. Figure 3 shown.
[0060] First, select 1 weapon to attack, and then continue to increase the number of bullets. When 5 weapons are used to attack, that is, k = 5, by substituting the above model into calculation, we can get the attack point at this time:
[0061] C1=(5.2365,2.4004),C2=(3.1848,3.6194),C3=(0.9339,0.9316),C4=(3.7530,0.9297),C5=(2.6936,2.0945), the calculated maximum intra-class distance D max =1.4950, which is less than the bomb damage radius of 1.5. At this time, all targets in the attack area can be destroyed. The attack plan is shown in Table 1 and Figure 4 shown.
[0062] Table 1 Randomly distributed target positions
[0063]
[0064]
[0065] Embodiment 3, the embodiment of the present invention provides a multi-target attack system based on K-means clustering, the system comprising:
[0066] The initial attack point selection module is used to randomly select the initial attack point C0(x0,y0) in the attack area when k=1;
[0067] Attack distance calculation module, used to calculate all target points a in the attack areai (x i ,y i ) to the attack point C0(x0,y0);
[0068] All target point classification module is used to classify all target points into the class corresponding to the attack point closest to them;
[0069] A new attack point calculation module is used to recalculate and generate a new attack point C(x,y), where x is the average value of the horizontal coordinates of all target points in the class, and y is the average value of the vertical coordinates of all target points in the class;
[0070] The iteration number setting module is used to determine whether the attack point position is updated or the set iteration number is reached;
[0071] The bomb damage radius judgment module is used to judge whether the distance between the target point farthest from the attack point in the class and the attack point is less than the bomb damage radius;
[0072] The attack distance calculation recalculation module is used to set k=k+1, increase the number of attack points by 1 each time, and re-execute the attack distance calculation until all conditions are met, then output the minimum number of bombs m, i.e., the k value; and obtain the coordinates of the attack point C.
[0073] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.
Claims
1. A multi-target attack method based on K-means clustering, characterized in that: The method includes: S1: Let the number of attack points k = 1, and randomly select an initial attack point C0 (x0, y0) in the attack area; S2: Calculate all target points a in the attack area i (x i ,y i ) to the attack point C0(x0,y0); S3: Classify all target points into the class corresponding to the attack point closest to them; S4: Recalculate and generate a new attack point C(x, y), where x is the average value of the horizontal coordinates of all target points in the class, and y is the average value of the vertical coordinates of all target points in the class; S5: Determine whether the attack point position is updated or reaches the set number of iterations; S6: Determine whether the distance between the target point farthest from the attack point in the class and the attack point is less than the bomb damage radius; S7: If it is less than the bomb damage radius, output the k value; if it is greater than or equal to the bomb damage radius, set k=k+1, increase the number of attack points by 1 each time, and re-execute step S2.
2. The multi-target attack method based on K-means clustering according to claim 1, characterized in that: In step S2, all target points a in the attack area are calculated i (x i ,y i ) to the attack point C0 (x0, y0), the expression is: Where, d i The target point a i (x i ,y i ) to the attack point C0(x0,y0), x i is the horizontal coordinate of the i-th target point, y i is the ordinate of the i-th target point, x0 is the abscissa of the attack point, and y0 is the ordinate of the attack point.
3. The multi-target attack method based on K-means clustering according to claim 1, characterized in that: In step S3, all target points are classified into the class corresponding to the attack point closest to them. When there is only one attack point, all targets are classified into the class of the initial attack point C0 (x0, y0).
4. The multi-target attack method based on K-means clustering according to claim 1, characterized in that: In step S5, if the attack point position is not updated or reaches the set number of iterations, step S6 is executed; if the attack point position is updated or does not reach the set number of iterations, step S2 is re-executed.
5. The multi-target attack method based on K-means clustering according to claim 1, characterized in that: In step S6, if the distance between the target point farthest from the attack point in the class and the attack point is less than the bomb damage radius, the process ends and the attack plan is output; if the distance between the target point farthest from the attack point in the class and the attack point is greater than the bomb damage radius, step S7 is executed.
6. The multi-target attack method based on K-means clustering according to claim 1, characterized in that: In step S7, when all conditions are met, the minimum number of bombs m, ie, the k value, is output, and the coordinates of the attack point C are obtained.
7. A multi-target attack system based on K-means clustering, characterized in that: The system is implemented by the multi-target attack method based on K-means clustering according to any one of claims 1 to 6, and the system comprises: The initial attack point selection module is used to randomly select an initial attack point C0 (x0, y0) in the attack area when k=1; Attack distance calculation module, used to calculate all target points a in the attack area i (x i ,y i ) to the attack point C0(x0,y0); All target point classification module is used to classify all target points into the class corresponding to the attack point closest to them; A new attack point calculation module is used to recalculate and generate a new attack point C(x, y), where x is the average value of the horizontal coordinates of all target points in the class, and y is the average value of the vertical coordinates of all target points in the class; The iteration number setting module is used to determine whether the attack point position is updated or the set iteration number is reached; The bomb damage radius judgment module is used to judge whether the distance between the target point farthest from the attack point in the class and the attack point is less than the bomb damage radius; The attack distance calculation recalculation module is used to set k=k+1, increase the number of attack points by 1 each time, and re-execute the attack distance calculation until all conditions are met, then output the minimum number of bombs m, i.e., the k value; and obtain the coordinates of the attack point C.
8. The multi-target attack system based on K-means clustering according to claim 7, characterized in that: The system is mounted on a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, the functions of the multi-target attack system based on K-means clustering are realized.
9. The multi-target attack system based on K-means clustering according to claim 7, characterized in that: The system is mounted on a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the functions of the multi-target attack system based on K-means clustering can be realized.
10. The multi-target attack system based on K-means clustering according to claim 7, characterized in that: The system is mounted on an information data processing terminal, and the information data processing terminal is used to provide a user input interface to implement the functions of the multi-target attack system based on K-means clustering when it is executed on an electronic device.