System, method and related product for electromagnetic environment simulation
By introducing control nodes and multiple computing nodes into the electromagnetic environment simulation system, and adopting the management strategy of priority queues and occupancy queues, the problem that traditional electromagnetic field strength calculations are difficult to meet the query needs of massive entities and location field strengths, and efficient simulation calculations and performance improvements are achieved.
Patent Information
- Application Number
- CN202410263866.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-03-07
AI Technical Summary
Traditional electromagnetic field strength calculations are difficult to meet the real-time calculation requirements for massive electromagnetic entities and position field strength query requirements, especially when multiple interference sources and detection sources exist.
A system including a control node and a plurality of computing nodes is designed. The control node determines the computing node that performs the corresponding operation based on the type of request information received, and assigns query tasks to the most suitable computing node through the management of the priority queue and the occupancy queue.
Through this system, the computing resources and simulation processing speed of electromagnetic environment simulation can be effectively improved, simulation performance can be improved, and processing efficiency of massive simulation tasks can be met.
Smart Images

Figure CN118211379B_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of electromagnetic simulation technology. More specifically, this disclosure relates to a system, method, device, and computer-readable storage medium for electromagnetic environment simulation. Background Art
[0002] In electromagnetic environment simulation, activities such as the detection of the electromagnetic space often rely on the field strengths of different interference sources and detection sources at a certain position, and comparison calculations are performed based on the field strengths to determine whether interference occurs. Traditional electromagnetic field strength calculations are based on a certain fitting formula or calculation method. However, when there are a large number of electromagnetic entities and location field strength query requirements, the single-machine single-core calculation method is difficult to meet the real-time calculation requirements of simulation.
[0003] In view of this, there is an urgent need to provide a solution for electromagnetic environment simulation to improve the computing resources for electromagnetic environment simulation and enhance the simulation processing speed and performance. Summary of the Invention
[0004] To solve at least one or more of the above-mentioned technical problems, this disclosure proposes solutions for a system, method, device, and computer-readable storage medium for electromagnetic environment simulation in multiple aspects.
[0005] In a first aspect, this disclosure provides a system for electromagnetic environment simulation, including a control node and a plurality of computing nodes. The control node is configured to determine a computing node for performing a corresponding operation according to the type of request information related to electromagnetic environment simulation received, so as to send the request information to the determined computing node; the computing node is configured to perform a corresponding operation based on the received request information.
[0006] In some embodiments, the control node is further configured to: in response to the type being adding a simulation object or updating a simulation object, send the request information to each computing node in the system; in response to the type being performing a query task of electromagnetic field strength, determine a computing node for performing the query task based on the priority level of the query task and the occupancy of each computing node in the system.
[0007] In some other embodiments, when performing a corresponding operation, the computing node is further configured to: in response to receiving a request information for adding a simulation object, add the entity information of the simulation object to be added to the memory of the computing node; in response to receiving a request information for updating a simulation object, update the entity information of the simulation object to be updated stored in the memory; in response to receiving a request information for performing a query task, perform corresponding simulation calculations based on the query task.
[0008] In some other embodiments, the control node is further configured to, among the computing nodes determined to execute the query tasks: determine a priority queue for executing each query task based on the query weights of each query task to be currently assigned, where the priority queue is arranged in descending order of the query weights; determine an occupancy queue of the multiple computing nodes based on the occupancy rates of each computing node in the system, where the occupancy queue is arranged in ascending order of the occupancy rates; and assign the query task with the highest priority level in the priority queue to the computing node with the lowest occupancy rate in the occupancy queue.
[0009] In some embodiments, the control node is further configured to: determine the query weight of the query task based on a first distance between the query time of the query task and the current time and the query frequency of the query task; and / or determine the occupancy rate of each computing node based on a second distance between the assignment time of the tasks already assigned in each computing node and the current time and the number of the tasks already assigned in each computing node.
[0010] In some other embodiments, the query task includes querying the electromagnetic field strength at position p, and the query weight is calculated by the following formula: where represents the query weight, t represents the current time, α represents a weight coefficient, s represents the number of queries of the query task within a preset time period t f and t i represents the query time of the query task within the preset time period t f .
[0011] In some other embodiments, the occupancy rate is calculated by the following formula: where Occupancy m represents the occupancy rate of the m-th computing node, β represents an occupancy rate coefficient, t f represents a preset time period, t represents the current time, task0, task1,..., task n represent the tasks already assigned to the m-th computing node, represents the assignment time when the already assigned task task i is assigned to the m-th computing node.
[0012] In some embodiments, the control node is further configured to: after each query task is assigned, pop the assigned query task from the priority queue; update the occupancy rates of each computing node to obtain the updated occupancy rates of each computing node; and sequentially compare the updated occupancy rates of two adjacent computing nodes in the occupancy queue to determine whether to update the occupancy queue.
[0013] In some other embodiments, the control node is further configured to: in response to the updated occupancy rate of the computing node ranked first in the occupancy rate queue being less than or equal to the updated occupancy rate of the computing node ranked second, not update the occupancy rate queue; or in response to the updated occupancy rate of the computing node ranked first in the occupancy rate queue being greater than the updated occupancy rate of the computing node ranked second, exchange the sorting positions of the computing node ranked first and the computing node ranked second, continue to compare the currently ranked second computing node with the third ranked computing node until the computing node with the minimum updated occupancy rate is ranked first, thereby completing the update of the occupancy rate queue.
[0014] In a second aspect, the present disclosure provides a method for electromagnetic environment simulation, which is applied to a system including a plurality of computing nodes. The method includes: determining a computing node for performing a corresponding operation according to the type of request information related to electromagnetic environment simulation received, so as to send the request information to the determined computing node, such that the computing node performs the corresponding operation based on the received request information.
[0015] In some embodiments, the method further includes: in response to the type being adding a simulation object or updating a simulation object, sending the request information to each computing node in the system; in response to the type being performing a query task for electromagnetic field strength, determining a computing node for performing the query task based on the priority level of the query task and the occupancy of each computing node in the system.
[0016] In some other embodiments, determining a computing node for performing the query task includes: determining a priority queue for performing each query task based on the query weights of the currently to-be-allocated query tasks, where the priority queue is arranged in descending order of the query weights; determining an occupancy rate queue of the plurality of computing nodes based on the occupancy rates of each computing node in the system, where the occupancy rate queue is arranged in ascending order of the occupancy rates; and allocating the query task with the highest priority level in the priority queue to the computing node with the minimum occupancy rate in the occupancy rate queue.
[0017] In still some other embodiments, the method further includes: determining the query weight of the query task based on a first distance between the query time of the query task and the current time and the query frequency of the query task; and / or determining the occupancy rate of each computing node based on a second distance between the allocation time of the tasks already allocated in each computing node and the current time and the number of the tasks already allocated in each computing node.
[0018] In some embodiments, the query task includes querying the electromagnetic field strength at position p, and the query weight is calculated by the following formula: Among them, represents the query weight, t represents the current moment, α represents the weight coefficient, and s represents the number of queries of the query task within the preset time period t f and t i represents the query moment of the query task within the preset time period t f within.
[0019] In some other embodiments, the occupancy rate is calculated by the following formula: where Occupancy m represents the occupancy rate of the m-th computing node, β represents the occupancy rate coefficient, t f represents the preset time period, t represents the current moment, task0, task1,..., task n represents the assigned tasks assigned to the m-th computing node, represents the assigned task task i and the assignment moment when it is assigned to the m-th computing node.
[0020] In still some other embodiments, the method further includes: after each query task is assigned, popping the assigned query task from the priority queue; updating the occupancy rate of each computing node to obtain the updated occupancy rate of each computing node; sequentially comparing the updated occupancy rates of two adjacent computing nodes in the occupancy rate queue to determine whether to update the occupancy rate queue.
[0021] In some embodiments, determining whether to update the occupancy rate queue further includes: in response to the updated occupancy rate of the computing node ranked first in the occupancy rate queue being less than or equal to the updated occupancy rate of the computing node ranked second, not updating the occupancy rate queue; or in response to the updated occupancy rate of the computing node ranked first in the occupancy rate queue being greater than the updated occupancy rate of the computing node ranked second, swapping the sorting positions of the computing node ranked first and the computing node ranked second, and continuing to compare the currently ranked second computing node and the computing node ranked third until the computing node with the smallest updated occupancy rate is ranked first, thus completing the update of the occupancy rate queue.
[0022] In a third aspect, the present disclosure provides a device for electromagnetic environment simulation, including: a processor for executing program instructions; and a memory storing the program instructions, when the program instructions are loaded and executed by the processor, causing the processor to execute any of the methods according to the present disclosure in the first aspect.
[0023] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer-readable instructions stored thereon, which when executed by one or more processors, implement the method as described in any one of the first aspect of the present disclosure.
[0024] Through the solution for electromagnetic environment simulation provided as above, embodiments of the present disclosure are conducive to improving the computing resources for electromagnetic environment simulation by setting up a system including multiple computing nodes, and by determining corresponding computing nodes according to the type of request information received by the control node in the system, enabling multiple computing nodes to undertake corresponding request tasks, thereby realizing the ability of multiple computing nodes to batch process simulation computing tasks, so as to improve the processing efficiency and simulation performance of massive simulation tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the drawings, several embodiments of the present disclosure are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals denote the same or corresponding parts, wherein:
[0026] Figure 1 shows a schematic diagram of a system for electromagnetic environment simulation according to an embodiment of the present disclosure;
[0027] Figure 2 shows a schematic diagram of the operation process of a control node according to some embodiments of the present disclosure;
[0028] Figure 3 shows a schematic diagram of the operation process of a control node for determining a computing node to execute a task according to an embodiment of the present disclosure;
[0029] Figure 4 shows a schematic diagram of the operation process of a computing node according to an embodiment of the present disclosure;
[0030] Figure 5 shows a schematic block diagram of a device for electromagnetic environment simulation according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.
[0032] It should be understood that the terms "comprising" and "including" as used in the specification and claims of this disclosure indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.
[0033] It should also be understood that the terms used in this disclosure specification are for the purpose of describing particular embodiments only and are not intended to limit this disclosure. As used in this disclosure specification and claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms. It should further be understood that the term "and / or" as used in this disclosure specification and claims refers to any combination and all possible combinations of one or more of the associated listed items and includes these combinations.
[0034] As used in this specification and claims, the term "if" can be interpreted, depending on the context, as "when", "once", "in response to determining", or "in response to detecting". Similarly, the phrases "if determined" or "if [the described condition or event] is detected" can be interpreted, depending on the context, as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]".
[0035] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0036] Figure 1 The schematic diagram of the system for electromagnetic environment simulation according to an embodiment of this disclosure is shown. As Figure 1 shown, the system 100 may include a control node 110 and a plurality of computing nodes 120, where the control node 110 may be used to determine the computing node 120 that performs the corresponding operation according to the type of request information related to the electromagnetic environment simulation received, so as to send the request information to the determined computing node 120; the computing node 120 may be used to perform the corresponding operation based on the received request information.
[0037] In some application scenarios, the control node 110 can provide an external service interface to receive request information from the caller. Here, the caller refers to the requester (or client) who calls the system 100 for electromagnetic environment simulation calculation. In some embodiments, the control node 110 can include one or more of a controller, a processor, a server, etc., and is used to undertake functions such as receiving request information, processing request information, and task allocation. In some other embodiments, the computing node 120 can be used to undertake functions such as maintaining the entity information of the simulation object and calculating the simulation task. In some other embodiments, each computing node 120 can be communicatively connected to the control node 110.
[0038] In some embodiments, the computing node 120 can include a graphics processing unit (GPU). In some other embodiments, each computing node can include a single GPU or multiple GPUs. In some other embodiments, the computing node 120 can be scalable. For example, the number of computing nodes 120 can be increased as needed, and the computing resources of each computing node 120 can be scaled according to the number of GPUs. In some embodiments, the computing node 120 can also include a central processing unit (CPU), a memory, etc.
[0039] In some embodiments, the types of request information related to electromagnetic environment simulation can include addition, update, query, etc. In some other embodiments, the request information can include adding information related to electromagnetic environment simulation, updating information related to electromagnetic environment simulation, query tasks of electromagnetic field strength, etc. In some embodiments, the control node 110 can internally maintain the node information of all the computing nodes 120 in the system 100 (for example, by maintaining a node information list), so that when receiving the request information, it can select the corresponding computing node 120 according to the type of the request information. The control node 110 can select an appropriate one or more computing nodes 120 according to the type of the received request information and send the request information to the selected computing node 120, so that the computing node 120 that receives the request information can perform corresponding operations according to the content of the request information. Here, the corresponding operations refer to the operations corresponding to the request information, such as addition operations, update operations, query calculation operations, etc.
[0040] The above combination Figure 1An exemplary description of the system according to the embodiments of the present disclosure is provided. It can be understood that the system 100 of the embodiments of the present disclosure can be a scalable architecture. By setting multiple computing nodes, the improvement of simulation operation resources can be achieved, which is beneficial to realizing the calculation of parallel and batch simulation tasks, and further beneficial to improving the efficiency of simulation calculation, etc., so as to be able to respond to various requests of the caller in a timely manner. It can also be understood that the above description is exemplary rather than restrictive. For example, the information processing process of the control node may not be limited to the above description. The following will be combined with Figure 2 for further description.
[0041] Figure 2 FIG. shows a schematic diagram of the operation process of the control node according to some embodiments of the present disclosure. In some embodiments, the operation process of the system of the embodiments of the present disclosure may include: starting the control node, and starting the required number of computing nodes; after the computing nodes are started, they are connected to the control node according to information such as the network protocol with the control node or the address of the specified control node; the control node may send initialization information to the computing nodes connected to it, so that the computing nodes complete the initialization work; the control node executes the operation process 200. The control node and the computing nodes connected to it constitute the system in the embodiments of the present disclosure. In other embodiments, starting the required number of computing nodes may include starting all the computing nodes that can perform simulation calculations to maximize the computing resources, or starting some computing nodes as needed. In still other embodiments, the initialization information may include entity information of the simulation object, cache settings, memory allocation and other information.
[0042] As Figure 2 shown, the operation process 200 of the control node may include: in step 201, network messages may be listened to in order to receive request information. Here, the network messages may be messages on the network connected between the control node and the caller. Then, in step 202, in response to receiving the request information, it may be determined whether the type of the request information is a query request.
[0043] In response to the type of the request information not being a query request, for example, it is an addition request for adding a simulation object or an update request for updating a simulation object, etc., step 203 may be executed to send the request information to each computing node in the system. In some embodiments, the simulation object may be understood as an electromagnetic entity, that is, an object that can generate electromagnetic waves or generate electromagnetic effects, such as vehicles, airplanes, tanks, communication devices, etc. In other embodiments, sending the request information to each computing node in the system may be sending it to each computing node connected to the control node.
[0044] In response to the type of the request information being a query request, for example, a query request for performing a query task of electromagnetic field strength, step 204 can be executed. In step 204, the control node can determine the computing node for executing the query task based on the priority level of the query task and the occupancy of each computing node in the system. In some embodiments, the query task of electromagnetic field strength can include a task of querying the electromagnetic field strength at a certain location, that is, a simulation calculation task of the electromagnetic field strength at that location. In other embodiments, the control node can determine that one computing node executes one query task. In still other embodiments, the control node can determine that one computing node executes multiple query tasks, or determine that multiple computing nodes execute multiple query tasks.
[0045] In some embodiments, the control node can preferentially allocate query tasks with higher priority levels. In other embodiments, the control node can allocate the query task to a computing node with a lower occupancy for processing to improve the computing efficiency of the query task. The occupancy of a computing node refers to the occupancy of the computing resources of the computing node.
[0046] Then, the process can proceed to step 205, where the control node can send the request information to the computing node determined in step 204 so that the computing node can execute the corresponding query task according to the received request information. Then, in step 206, the control node can asynchronously receive the query result. The control node can asynchronously monitor messages from each computing node. Especially when multiple computing nodes all execute the corresponding query tasks, by asynchronously receiving the query results of each computing node, the control node can help improve the efficiency of receiving the query results. Further, in step 207, the control node can forward the received query result to the caller.
[0047] The above Figure 2 has made an exemplary description of the operation process of the control node according to the embodiments of the present disclosure. It can be understood that by determining whether the type of the request information is a query request and performing different subsequent operations, the efficiency of processing different types of request information can be improved. By determining a suitable computing node based on the priority level of the query task and the occupancy of each computing node in the system, the control node can achieve reasonable task allocation and load balancing of the computing nodes, which is beneficial to improving the computing performance of the entire system. It can also be understood that the above description is exemplary rather than restrictive. For example, in some embodiments, the control node can achieve efficient task allocation by maintaining a priority queue for each query task and an occupancy rate queue for each computing node. The following will be combined with Figure 3 for an exemplary description.
[0048] Figure 3The figure shows a schematic diagram of the operation process of the control node in an embodiment of the present disclosure for determining a computing node to execute a task. It can be seen from the following description that Figure 3 The shown operation process 300 may be a manifestation form of step 204 described above in combination with Figure 2 Therefore, the description of step 204 above in combination with Figure 2 can also be applied to the following description of operation process 300.
[0049] As Figure 3 shown, operation process 300 may include: In step 301, the control node may determine a priority queue for executing each query task based on the query weights of each query task to be currently assigned, where the priority queue is arranged in descending order of the query weights. Each query task to be currently assigned may be a query task that has not been assigned to a computing node, and may include one query task or multiple query tasks. The greater the query weight of a query task, the higher the priority level of the query task. In some embodiments, the priority queue may be implemented in the form of a first ordered array, and each array unit in the first ordered array may store the identifier of a query task and its query weight, and the array units are arranged in descending order of the query weights.
[0050] In some embodiments, the query weight of each query task may be determined based on the first distance between the query time of the query task and the current time and the query frequency of the query task. The query time of the query task may be the time when the control node receives the request information of the query task. The query frequency may be the number of queries of the query task within a preset time period. For example, in some scenarios, the caller will perform a large number of concentrated queries on the electromagnetic field strength at a certain location within a certain time period, that is, send high-frequency query requests to the control node, then the query frequency of the query task in this scenario is relatively high. In some embodiments, the query weight of a query task with a smaller first distance and / or a higher query frequency may be determined to be larger.
[0051] Through such a setting, determining the query weight of the query task based on the first distance and the query frequency will ensure that the query tasks of the locations queried closer to the current time have a higher priority level, and the query tasks of the locations queried more frequently have a higher priority level, so as to meet the requirements of preferentially processing and promptly responding to important query tasks in actual application scenarios.
[0052] In some other embodiments, the query task may include querying the electromagnetic field strength at position p. Assuming that the electromagnetic field strength at position p is queried s times within the preset time period t f and the corresponding query times are t1, t2,..., t s , then the query weight of the query task can be calculated by the following formula:
[0053]
[0054] Among them, represents the query weight, t represents the current moment, α represents the weight coefficient, and s represents the number of queries of the query task within the preset time period t f and t i represents the query moment of the query task within the preset time period t f α can be a constant.
[0055] It can be seen from Formula 1 that the query weight of the query task at the position that is queried more frequently is greater, and the query weight of the query task at the position whose query moment is closer to the current moment is greater. According to such a weight strategy, it can be ensured that the priority level of the query task at the position that is queried more frequently is higher, and the priority level of the query task at the position whose query moment is closer to the current moment is higher.
[0056] It can be understood that determining the query weight of the query task based on the first distance and the query frequency is not limited to be implemented by Formula 1, and other functions can also be set so that the query weight of the query task with a smaller first distance and a higher query frequency is greater.
[0057] For example Figure 3 As shown in [reference], the operation flow 300 may further include step 302. In step 302, the control node may determine an occupancy rate queue of multiple computing nodes based on the occupancy rates of the computing nodes in the system, where the occupancy rate queue may be arranged in ascending order of the occupancy rate. The occupancy rate may be an index for measuring the occupancy of the computing resources of the computing node. In some embodiments, the occupancy rate may be determined based on factors such as the number of tasks already allocated in the computing node and the amount of computation. By calculating the occupancy rate of each computing node, the computing nodes can be sorted in ascending order of the occupancy rate to obtain the occupancy rate queue.
[0058] In other embodiments, the occupancy rate queue may be implemented in the form of a second ordered array. Each array element in the second ordered array may store identification information such as the serial number of a computing node and its occupancy rate, and the array elements are arranged in ascending order of the occupancy rate.
[0059] In some embodiments, the control node may determine the occupancy rate of each computing node based on the second distance between the allocation time of the assigned tasks in each computing node and the current time, and the number of assigned tasks in each computing node. The allocation time of the assigned tasks may be the time when the control node sends the request information of the assigned tasks to the corresponding computing node. In some embodiments, each computing node may correspond to a task sequence composed of assigned tasks, and each computing node processes them in sequence according to the positions of the assigned tasks in the task sequence. In other embodiments, the correspondence between the computing nodes and the task sequences may be maintained using a dictionary. For example, assume that task0, task1,..., task n is assigned to computing node m (which can be represented by GPU m for example), then computing node m corresponds to the task sequence [task0, task1,..., task n .
[0060] In some embodiments, the smaller the second distance and / or the larger the number of assigned tasks, the larger the occupancy rate of the computing node. According to such a setting, it can be reflected that the query tasks assigned closer to the current time, and the more computing resources are occupied by the computing nodes with more assigned tasks, which is less conducive to processing newly assigned query tasks in a timely manner. Therefore, an occupancy rate sequence can be formed based on the order of the occupancy rates from small to large, so as to ensure that the computing nodes with smaller occupancy rates obtain new computing tasks first, which is conducive to achieving load balancing among the computing nodes.
[0061] In still other embodiments, the occupancy rate can be calculated by the following formula:
[0062]
[0063] where Occupancy m represents the occupancy rate of the m-th computing node, β represents the occupancy rate coefficient, t f represents the preset time period, t represents the current time, task0, task1,..., task n represents the assigned tasks assigned to the m-th computing node, represents the assigned task task i is the allocation time when it is assigned to the m-th computing node. B can be a constant. The "+1" in formula 2 can ensure that the function value of log() is greater than 0, which is convenient for comparing the occupancy rate values. It can be seen from formula 2 that the query tasks assigned closer to the current time occupy more computing resources of the computing node.
[0064] It can be understood that determining the occupancy rate of a computing node based on the second distance and the number of assigned tasks can be implemented not limited to Formula 2, and other functions can also be set so that the smaller the second distance and the larger the number of assigned tasks, the larger the occupancy rate of the computing node.
[0065] As Figure 3 shown, after determining the priority queue and the occupancy rate queue, the process can proceed to step 303, where the control node can assign the query task with the highest priority level in the priority queue to the computing node with the smallest occupancy rate in the occupancy rate queue. For example, in some embodiments, the query task ranked first in the priority queue can be assigned to the computing node ranked first in the occupancy rate queue.
[0066] According to such a setting, it can be ensured that the higher the priority level of the query task that is queried more frequently and the closer the query time is to the current time, and the higher the priority level of the computing node with the smallest resource occupancy rate receiving the task, so as to realize the timely calculation and faster feedback speed of the query task with a high priority level, which is beneficial to improving the utilization rate and calculation efficiency of computing resources to meet the requirements of actual application scenarios.
[0067] As Figure 3 further shown, in some other embodiments, the operation process 300 may further include steps 304-step 308 (shown in the dotted box) to implement iterative processing of the task allocation strategy. Further description will be given below.
[0068] In step 304, after each query task is assigned, the control node can pop the assigned query task from the priority queue. In some embodiments, assigning a query task may be to send the request information of the query task to the corresponding computing node to complete the assignment operation, and the assigned query task becomes the assigned task in the task sequence of the computing node, so that it can be removed from the priority queue to be assigned.
[0069] Next, in step 305, the occupancy rate of each computing node can be updated to obtain the updated occupancy rate of each computing node. In some other embodiments, at each step size in the simulation calculation, the occupancy rate of each computing node in the occupancy rate queue can be updated and calculated once, and the occupancy rate after the update calculation can be called the updated occupancy rate.
[0070] Then, the process can proceed to step 306, where the updated occupancy rates of two adjacent computing nodes sorted in the occupancy rate queue can be compared in sequence to determine whether to update the occupancy rate queue. Comparing the updated occupancy rates of two adjacent computing nodes sorted in sequence can be, for example, comparing the magnitudes of the updated occupancy rates of the first and second sorted computing nodes first, and then comparing the magnitudes of the updated occupancy rates of the second and third sorted computing nodes, and so on.
[0071] In some other embodiments, step 306 can further include: in response to the updated occupancy rate of the first sorted computing node in the occupancy rate queue being less than or equal to the updated occupancy rate of the second sorted computing node, not updating the occupancy rate queue; or in response to the updated occupancy rate of the first sorted computing node in the occupancy rate queue being greater than the updated occupancy rate of the second sorted computing node, swapping the sorting positions of the first sorted computing node and the second sorted computing node, and continuing to compare the currently second sorted computing node and the third sorted computing node until the computing node with the minimum updated occupancy rate is sorted first, thus completing the update of the occupancy rate queue.
[0072] In still some other embodiments, the operation flow 300 may not be limited to including the sequential comparison operation in step 306, and it can also determine whether to update the occupancy rate queue according to the updated occupancy rates of each computing node. For example, in some embodiments, determining whether to update the occupancy rate queue may include: in response to the updated occupancy rate of the first sorted computing node in the occupancy rate queue being the minimum among the updated occupancy rates of each computing node, not updating the occupancy rate queue; or in response to the updated occupancy rate of the first sorted computing node in the occupancy rate queue not being the minimum among the updated occupancy rates of each computing node, updating the occupancy rate queue, and inserting the computing node with the minimum updated occupancy rate into the first position in the occupancy rate queue to complete the update of the occupancy rate queue.
[0073] Furthermore, in the operation flow 300, step 307 can also be executed to determine whether the priority queue is empty. That is, to determine whether there are still unassigned query tasks in the priority queue. In response to the priority queue not being empty, it can return to step 303 to continue execution; in response to the priority queue being empty, step 308 can be executed to continue listening for network information to receive the next query task.
[0074] The above combination Figure 3 has provided an exemplary description of the operation flow for the control node to determine the computing node for executing tasks according to the embodiments of the present disclosure. It can be understood that the above description is exemplary rather than restrictive. For example, step 307 may not be limited to being executed after step 306 as shown in the figure, and it can also be executed, for example, between step 304 and step 305, or can be executed synchronously with step 305 or step 306, etc.
[0075] The above has given an exemplary description of the operation process of the control node in combination with multiple drawings. Next, an exemplary description of the operation process of the computing node will be given in combination with Figure 4 an exemplary description of the operation process of the computing node will be given.
[0076] Figure 4 FIG. shows a schematic diagram of the operation process of the computing node according to an embodiment of the present disclosure. As Figure 4 shown, the operation process 400 may include: In step 401, the memory of the computing node may be initialized. In some embodiments, the computing node includes a CPU and a GPU, and the memory of the CPU and GPU of the computing node may be initialized. For example, necessary information may be added to the memory, and space for storing entity information in the GPU may be allocated. Then, the computing node may wait to receive request information so as to perform corresponding processing according to the type of the received request information.
[0077] In some embodiments, in response to receiving request information for adding a simulation object, step 402 may be executed to add the entity information of the simulation object to be added to the memory of the computing node. In some embodiments, the entity information may include information such as the geographical location, identity ID, characteristics, status, dimensions (length, width, and height), and power of the simulation object. In other embodiments, adding the entity information to the memory of the computing node may be to record the entity information in the memory of the CPU of the computing node and copy the entity information to the GPU of the computing node to achieve the purpose of adding the simulation object.
[0078] In other embodiments, in response to receiving request information for updating a simulation object, step 403 may be executed to update the entity information of the simulation object to be updated stored in the memory of the computing node. Updating the entity information may be to modify the corresponding entity information originally stored in the memory of the computing node (such as the CPU and GPU) to the content specified in the request information to achieve the purpose of updating the simulation object.
[0079] By adding entity information and updating entity information in the memory of the computing node, the computing node can maintain the entity information of the simulation object, so that when electromagnetic simulation calculations need to be performed based on the corresponding simulation object (such as calculating the electromagnetic influence of the simulation object in a certain area), the computing node can quickly access the corresponding entity information for rapid calculation, thereby being able to respond to external query requests in a timely manner, which is beneficial to further improving the calculation efficiency and timely feedback ability of the electromagnetic field strength simulation calculation.
[0080] In still other embodiments, in response to receiving request information for executing a query task, step 404 may be performed to perform corresponding simulation calculations based on the query task. In some embodiments, the computing node includes a CPU and a GPU. The CPU of the computing node may, according to the request information, transmit query conditions and required query data in the query task to the GPU. The GPU may perform corresponding simulation calculations using predefined operators to obtain simulation calculation results. Then, the simulation calculation results may be copied to the CPU of the computing node. After the CPU supplements other information as required, the simulation calculation results and the supplemented other information may be forwarded to the control node together. In other embodiments, the other information supplemented by the CPU may include other calculation parts or other query information other than the GPU calculation part in the query task. In still other embodiments, the GPU in the computing node is used to undertake complex calculations and calculation parts with large amounts of calculations in the simulation calculations, and other calculation parts may be calculated by the CPU.
[0081] The system according to the embodiments of the present disclosure has been described in detail above in conjunction with multiple drawings. It can be understood that the system of the embodiments of the present disclosure is an extensible architecture that can expand the electromagnetic environment simulation calculation from a single machine and single node to multiple machines and multiple nodes. Especially in embodiments where the computing node includes a GPU, by utilizing the parallel computing characteristics of the GPU, the system of the embodiments of the present disclosure can better meet the computing requirements of large-scale real-time simulation, which is beneficial to improving the performance and scalability of the system architecture.
[0082] The present disclosure also provides a method for electromagnetic environment simulation, which can be applied to, for example Figure 1 a system including multiple computing nodes as shown. The method may include: determining a computing node for performing a corresponding operation according to the type of request information related to electromagnetic environment simulation received, so as to send the request information to the determined computing node, such that the computing node performs a corresponding operation based on the received request information.
[0083] In some embodiments, the above method may further include: in response to the type of request information being adding a simulation object or updating a simulation object, sending the request information to each computing node in the system; in response to the type of request information being performing a query task of electromagnetic field strength, determining a computing node for performing the query task based on the priority level of the query task and the occupancy of each computing node in the system.
[0084] In some other embodiments, determining the computing nodes for executing query tasks may include: based on the query weights of the query tasks to be currently assigned, a priority queue for executing each query task can be determined, where the priority queue can be arranged in descending order of query weights; based on the occupancy rates of the computing nodes in the system, an occupancy rate queue of multiple computing nodes can be determined, where the occupancy rate queue is arranged in ascending order of occupancy rates; and assigning the query task with the highest priority level in the priority queue to the computing node with the lowest occupancy rate in the occupancy rate queue.
[0085] In some further embodiments, the method may further include: determining the query weight of the query task based on the first distance between the query time of the query task and the current time and the query frequency of the query task; and / or determining the occupancy rate of each computing node based on the second distance between the assignment time of the tasks already assigned in each computing node and the current time and the number of tasks already assigned in each computing node.
[0086] In some embodiments, the query task may include querying the electromagnetic field strength at position p, and the query weight can be calculated by the following formula: where, represents the query weight, t represents the current time, α represents the weight coefficient, s represents the number of queries of the query task within the preset time period t f and, t i represents the query time of the query task within the preset time period t f .
[0087] In some other embodiments, the occupancy rate can be calculated by the following formula: where, Occupancy m represents the occupancy rate of the m-th computing node, β represents the occupancy rate coefficient, t f represents the preset time period, t represents the current time, task0, task1,..., task n represents the tasks already assigned to the m-th computing node, represents the assignment time when the already assigned task task i is assigned to the m-th computing node.
[0088] In some further embodiments, the method may further include: after each assignment of a query task, popping the assigned query task from the priority queue; updating the occupancy rates of the computing nodes to obtain the updated occupancy rates of the computing nodes; and sequentially comparing the updated occupancy rates of two adjacent computing nodes in the occupancy rate queue to determine whether to update the occupancy rate queue.
[0089] In some embodiments, determining whether to update the occupancy rate queue may further include: in response to the updated occupancy rate of the computing node ranked first in the occupancy rate queue being less than or equal to the updated occupancy rate of the computing node ranked second, not updating the occupancy rate queue; or in response to the updated occupancy rate of the computing node ranked first in the occupancy rate queue being greater than the updated occupancy rate of the computing node ranked second, swapping the sorting positions of the computing node ranked first and the computing node ranked second, and continuing to compare the currently ranked second computing node with the third ranked computing node until the computing node with the minimum updated occupancy rate is ranked first, thereby completing the update of the occupancy rate queue.
[0090] The above method has been described in detail in combination with Figures 1 - 4 any of the systems described above, and will not be elaborated here.
[0091] Figure 5 The schematic block diagram of the device for electromagnetic environment simulation according to the embodiments of the present disclosure is shown. As Figure 5 shown, the device 500 may include a processor 501 and a memory 502. The processor 501 is used to execute program instructions, and the memory 502 stores program instructions for electromagnetic environment simulation. When the program instructions are loaded and run by the processor 501, the processor 501 is caused to execute the foregoing method for electromagnetic environment simulation.
[0092] For example, in some embodiments, the device 500 may be capable of functions such as receiving request information, maintaining entity information, and performing simulation calculations of electromagnetic field strength. Thus, when the device 500 is performing a request task related to electromagnetic environment simulation, it can automatically perform corresponding calculations according to the type of request information, which is beneficial to improving the efficiency and performance of simulation calculations.
[0093] In addition, the present disclosure also provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the foregoing method for electromagnetic environment simulation is implemented.
[0094] Specifically, in this embodiment, the above storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs that can store computer programs.
[0095] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many variations, changes, and alternative approaches may occur to those skilled in the art without departing from the spirit and scope of the present disclosure. It should be understood that various alternatives to the embodiments of the present disclosure described herein may be employed in practicing the present disclosure. The appended claims are intended to define the scope of the present disclosure and thus cover equivalents or alternatives within the scope of these claims.
Claims
1. A system for electromagnetic environment simulation, characterized in that: It includes a control node and multiple computing nodes, The control node is used for sending the request information to each computing node in the system according to the type of the received request information related to the electromagnetic environment simulation, in response to the type of the request information not being a query request, and determining the computing node that performs the corresponding operation in response to the type of the request information being a query request, so as to send the request information to the determined computing node; The computing node is used to perform corresponding operations based on the received request information; The control node asynchronously monitors the query results from the determined computing nodes and forwards the query results to the caller; The control node is further configured to: In response to the type of the request information being to add a simulation object or to update a simulation object, sending the request information to each computing node in the system; or In response to the type of the request information being a task of executing an electromagnetic field strength query, determining a computing node for executing the query task based on a priority level of the query task and an occupancy status of each computing node in the system; The priority level of the query task includes determining a priority queue for executing each query task based on a query weight of each query task to be currently assigned, and further determining a query weight of the query task based on a first distance between a query time of the query task and a current time and a query frequency of the query task; Based on the occupancy of each computing node in the system, the occupancy queue of the multiple computing nodes is determined, including determining the occupancy of each computing node based on a second distance between the allocation time of the allocated tasks in each computing node and the current time and the number of the allocated tasks in each computing node.
2. The system according to claim 1, characterized in that The computing node is further used in performing the corresponding operation: In response to receiving a request for adding a simulation object, adding entity information of the simulation object to be added to the memory of the computing node; In response to receiving request information for updating the simulation object, updating entity information of the simulation object to be updated stored in the memory; In response to receiving request information for executing a query task, a corresponding simulation calculation is executed based on the query task.
3. The system according to claim 1 or 2, characterized in that: The control node is further used in determining the computing node to execute the query task: Based on the query weights of the query tasks to be currently assigned, determining a priority queue for executing each query task, wherein the priority queues are arranged in descending order according to the query weights; Based on the occupancy rate of each computing node in the system, determining an occupancy rate queue of the plurality of computing nodes, wherein the occupancy rate queue is arranged in an ascending order according to the occupancy rate; The query task with the highest priority in the priority queue is assigned to the computing node with the lowest occupancy in the occupancy queue.
4. The system according to claim 3, characterized in that The query task includes querying the electromagnetic field strength at position p, and the query weight is calculated by the following formula: in, represents the query weight, t represents the current time, represents the weight coefficient, s represents the query task in the preset time period t f The number of queries within Indicates that the query task is within the preset time period t f The query time within.
5. The system according to claim 3, characterized in that The occupancy rate is calculated by the following formula: in, represents the occupancy rate of the mth computing node, represents the occupancy factor, represents the preset time period, t represents the current time, , , …, represents the assigned tasks assigned to the mth compute node, Indicates that a task has been assigned The allocation time allocated to the mth computing node.
6. The system according to claim 3, characterized in that The control node is also used for: After each query task is assigned, popping the assigned query task from the priority queue; Updating the occupancy rate of each computing node to obtain an updated occupancy rate of each computing node; The updated occupancy rates of two adjacent computing nodes in the occupancy rate queue are compared in sequence to determine whether to update the occupancy rate queue.
7. The system according to claim 6, characterized in that The control node is further configured to: In response to the updated occupancy of the computing node ranked first in the occupancy queue being less than or equal to the updated occupancy of the computing node ranked second in the occupancy queue, not updating the occupancy queue; or In response to the updated occupancy of the computing node ranked first in the occupancy queue being greater than the updated occupancy of the computing node ranked second, the sorting positions of the computing node ranked first and the computing node ranked second are exchanged, and the comparison between the computing node currently ranked second and the computing node ranked third is continued until the computing node with the smallest updated occupancy is ranked first, thereby completing the update of the occupancy queue.
8. A method for electromagnetic environment simulation, applied to the system for electromagnetic environment simulation according to any one of claims 1 to 7, characterized in that: The method comprises: According to the type of the received request information related to the electromagnetic environment simulation, in response to the type of the request information not being a query request, the request information is sent to each computing node in the system, and in response to the type of the request information being a query request, a computing node that performs a corresponding operation is determined, so that the request information is sent to the determined computing node, so that the computing node performs a corresponding operation based on the received request information; The control node asynchronously monitors the query results from the determined computing nodes and forwards the query results to the caller; The control node is further configured to: In response to the type of the request information being to add a simulation object or to update a simulation object, sending the request information to each computing node in the system; or In response to the type of the request information being a task of executing an electromagnetic field strength query, determining a computing node for executing the query task based on a priority level of the query task and an occupancy status of each computing node in the system; The priority level of the query task includes determining a priority queue for executing each query task based on a query weight of each query task to be currently assigned, and further determining a query weight of the query task based on a first distance between a query time of the query task and a current time and a query frequency of the query task; Based on the occupancy of each computing node in the system, the occupancy queue of the multiple computing nodes is determined, including determining the occupancy of each computing node based on a second distance between the allocation time of the allocated tasks in each computing node and the current time and the number of the allocated tasks in each computing node.
9. The method according to claim 8, characterized in that The computing nodes determined to execute the query task include: Based on the query weights of the query tasks to be currently assigned, determining a priority queue for executing each query task, wherein the priority queues are arranged in descending order according to the query weights; Based on the occupancy rate of each computing node in the system, determining an occupancy rate queue of the plurality of computing nodes, wherein the occupancy rate queue is arranged in an ascending order according to the occupancy rate; The query task with the highest priority in the priority queue is assigned to the computing node with the lowest occupancy in the occupancy queue.
10. The method according to claim 8, characterized in that The query task includes querying the electromagnetic field strength at position p, and the query weight is calculated by the following formula: in, represents the query weight, t represents the current time, represents the weight coefficient, s represents the query task in the preset time period t f The number of queries within Indicates that the query task is within the preset time period t f The query time within.
11. The method according to claim 8, characterized in that The occupancy rate is calculated by the following formula: in, represents the occupancy rate of the mth computing node, represents the occupancy factor, represents the preset time period, t represents the current time, , , …, represents the assigned tasks assigned to the mth compute node, Indicates that a task has been assigned The allocation time allocated to the mth computing node.
12. The method according to claim 9, characterized in that Also includes: After each query task is assigned, popping the assigned query task from the priority queue; Updating the occupancy rate of each computing node to obtain an updated occupancy rate of each computing node; The updated occupancy rates of two adjacent computing nodes in the occupancy rate queue are compared in sequence to determine whether to update the occupancy rate queue.
13. The method according to claim 12, characterized in that Wherein determining whether to update the occupancy queue further comprises: In response to the updated occupancy of the computing node ranked first in the occupancy queue being less than or equal to the updated occupancy of the computing node ranked second in the occupancy queue, not updating the occupancy queue; or In response to the updated occupancy of the computing node ranked first in the occupancy queue being greater than the updated occupancy of the computing node ranked second, the sorting positions of the computing node ranked first and the computing node ranked second are exchanged, and the comparison between the computing node currently ranked second and the computing node ranked third is continued until the computing node with the smallest updated occupancy is ranked first, thereby completing the update of the occupancy queue.
14. A device for electromagnetic environment simulation, characterized in that: include: a processor for executing program instructions; as well as A memory storing the program instructions, which, when loaded and executed by the processor, enables the processor to execute the method according to any one of claims 8 to 13.
15. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by one or more processors, the method according to any one of claims 8 to 13 is implemented.
Citation Information
Patent Citations
Distributed real-time simulation platform
CN113867889A