A method for caching electromagnetic space field strength and related products

By dividing grid elements in the electromagnetic space and establishing a local cache and target field strength storage structure, the field of cache and update electromagnetic sources is strong and small, and the problem of low efficiency in the field strength update and query operation in the existing technology is solved, and the effect of rapid query and update is achieved.

CN117951180BActive Publication Date: 2025-03-28JOINT WARFARE COLLEGE NAT DEFENSE UNIV OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410139271.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2025-03-28
Estimated Expiration
2044-01-31

AI Technical Summary

Technical Problem

The prior art has high cost in the updating and querying of electromagnetic space field strength, low efficiency, and it is difficult to quickly obtain the maximum field strength value.

Method used

By discretely dividing the electromagnetic space into multiple grid elements, each grid element contains a local cache structure and a target field strength storage structure, calculate and cache the field strength of the electromagnetic source, determine the target field strength value and information according to classification conditions, and perform cache updates to achieve rapid query and update.

Benefits of technology

It effectively reduces the update cost under target field strength operation, improves query efficiency, and can quickly obtain the maximum field strength value, which is suitable for high-speed calculations in complex electromagnetic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117951180B_ABST
    Figure CN117951180B_ABST
Patent Text Reader

Abstract

The present application discloses a method and related products for caching electromagnetic space field strength. The method includes: dividing the electromagnetic space into discrete parts to form multiple discrete grid elements; calculating the field strength of all electromagnetic sources in the electromagnetic space, and classifying the field strength according to the target classification conditions; determining the target field strength values ​​and the corresponding first field strength information of the preset number before the field strength is sorted under the corresponding classification conditions based on the classification results; caching the target field strength value and the corresponding first field strength information to a local cache structure, and storing the field strength other than the target field strength value and the corresponding second field strength information to the target field strength storage structure to initialize the field strength storage structure; and responsive to the target field strength operation, caching and updating the initialized field strength storage structure to realize the caching operation of the electromagnetic space field strength. By using the scheme of the present application, the update cost under the target field strength operation can be effectively reduced, and the query efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the field of electromagnetic space warfare technology. More specifically, the present application relates to a method, device and computer-readable storage medium for caching electromagnetic space field strength. Background Art

[0002] The electromagnetic space environment includes information such as signal characteristics and signal density superimposed in a specific area by electromagnetic waves radiated by electronic equipment in space, which contains important combat information in modern warfare. Among them, the electromagnetic space field strength is the core of the electromagnetic space environment and is of great significance to combat. In the electromagnetic combat space environment, it is necessary to calculate the maximum value (such as the maximum value) of the electromagnetic signal strength of electromagnetic signals in different frequency bands at a certain location, and it is necessary to quickly query and obtain the maximum value. However, in the prior art, the update (such as insertion, deletion, etc.) of the maximum value of the field strength is computationally expensive, and the efficiency of querying the maximum value index is low.

[0003] In view of this, there is an urgent need to provide a solution for caching electromagnetic space field strength, so as to cache a preset number of maximum field strength values ​​at the same time, thereby effectively reducing the update cost under the target field strength operation and improving the query efficiency. Summary of the invention

[0004] In order to at least solve one or more of the technical problems mentioned above, the present application proposes a solution for caching electromagnetic space field strength in multiple aspects.

[0005] In a first aspect, the present application provides a method for caching field strength in an electromagnetic space, comprising: dividing the electromagnetic space into discrete units to form a plurality of discrete grid elements having a field strength storage structure, wherein the field strength storage structure comprises a local cache structure and a corresponding target field strength storage structure; calculating the field strengths of all electromagnetic sources in the electromagnetic space, and classifying the field strengths according to target classification conditions; determining a preset number of target field strength values ​​and corresponding first field strength information before sorting the field strengths under the corresponding classification conditions based on the classification results; caching the target field strength values ​​and the corresponding first field strength information to the local cache structure, and storing the field strengths other than the target field strength values ​​and the corresponding second field strength information to the target field strength storage structure to initialize the field strength storage structure; and, in response to a target field strength operation, caching and updating the initialized field strength storage structure to implement caching of the electromagnetic space field strength.

[0006] In one embodiment, the target classification condition includes at least the party and frequency band of the electromagnetic source, the first field strength information and the second field strength information both include at least the party and frequency, and the target field strength operation includes at least a field strength insertion operation, a field strength deletion operation or a field strength query operation.

[0007] In another embodiment, in response to the target field strength operation being the field strength insertion operation, the cache update of the initialized field strength storage structure includes: comparing the field strength value to be inserted with the last field strength value in the target field strength value under the corresponding classification condition in the local cache structure; and updating the local cache structure and / or the target field strength storage structure according to the comparison result to cache update the initialized field strength storage structure.

[0008] In another embodiment, updating the local cache structure and / or the target field strength storage structure according to the comparison result to perform a cache update on the initialized field strength storage structure includes: in response to the field strength value to be inserted being less than the last field strength value among the target field strength values ​​under the corresponding classification conditions in the local cache structure, storing the field strength value to be inserted and the corresponding field strength information in the target field strength storage structure to perform a cache update on the initialized field strength storage structure; or in response to the field strength value to be inserted being greater than the last field strength value among the target field strength values ​​under the corresponding classification conditions in the local cache structure, inserting the field strength value to be inserted into the local cache structure in order of size, and moving the last field strength value in the local cache structure into which the field strength value to be inserted is inserted into the target field strength storage structure to perform a cache update on the initialized field strength storage structure.

[0009] In another embodiment, in response to the target field strength operation being the field strength deletion operation, the cache update of the initialized field strength storage structure includes: determining whether the field strength value to be deleted is stored in the local cache structure; in response to the field strength value to be deleted not being stored in the local cache structure, deleting the field strength value to be deleted; or in response to the field strength value to be deleted being stored in the local cache structure, determining whether the local cache structure is empty after deleting the field strength value to be deleted; and updating the local cache structure and / or the target field strength storage structure according to the determination result to perform a cache update on the initialized field strength storage structure.

[0010] In another embodiment, updating the local cache structure and / or the target field strength storage structure according to the judgment result to perform a cache update on the initialized field strength storage structure includes: in response to the local cache structure being non-empty after deleting the field strength value to be deleted, exiting the field strength deletion operation; or in response to the local cache structure being empty after deleting the field strength value to be deleted, comparing the number of field strengths in the target field strength storage structure with the preset number; and updating the local cache structure and / or the target field strength storage structure according to the comparison result of the number of field strengths in the target field strength storage structure with the preset number to perform a cache update on the initialized field strength storage structure.

[0011] In another embodiment, updating the local cache structure and / or the target field strength storage structure according to the comparison result between the number of field strengths in the target field strength storage structure and the preset number to cache update the initialized field strength storage structure includes: in response to the number of field strengths in the target field strength storage structure being greater than or equal to the preset number, selecting a preset number of field strengths from the target field strength storage structure before field strength magnitude sorting and storing them in the local cache structure after deleting the field strength value to be deleted; or in response to the number of field strengths in the target field strength storage structure being less than the preset number, storing the field strengths in the target field strength storage structure according to the field strength magnitudes in the local cache structure after deleting the field strength value to be deleted, performing zero padding operation and updating the maximum value pointer of the local cache structure to cache update the initialized field strength storage structure.

[0012] In another embodiment, in response to the target field strength operation being the field strength query operation, the cache update of the initialized field strength storage structure includes: querying whether the maximum value pointer of the local cache structure is empty; in response to the maximum value pointer of the local cache structure being non-empty, returning the maximum value of the field strength pointed to by the maximum value pointer of the local cache structure; or in response to the maximum value pointer of the local cache structure being empty, returning an empty set of field strengths.

[0013] In a second aspect, the present application provides a device for caching electromagnetic space field strength, comprising: a processor; and a memory, wherein program instructions for caching electromagnetic space field strength are stored, and when the program instructions are executed by the processor, the device implements multiple embodiments of the aforementioned first aspect.

[0014] In a third aspect, the present application provides a computer-readable storage medium having stored thereon computer-readable instructions for caching electromagnetic space field strengths. When the computer-readable instructions are executed by one or more processors, multiple embodiments of the aforementioned first aspect are implemented.

[0015] Through the scheme for caching the field strength of the electromagnetic space provided above, the embodiment of the present application is to divide the electromagnetic space into multiple discrete cells, each of which contains a field strength storage structure formed by a local cache structure and a corresponding target field strength storage structure. By storing the target field strength values ​​of a preset number of the field strengths of all electromagnetic sources in the electromagnetic space before the field strengths are sorted under the corresponding classification conditions and the corresponding first field strength information into the local cache structure, the remaining field strengths and the corresponding second field strength information are stored in the target field strength storage structure, so that the maximum value of the field strength can be updated quickly under the target field strength operation. Based on this, the embodiment of the present application can cache a preset number of maximum field strength values ​​at the same time, thereby effectively reducing the update cost under the target field strength operation, and improving the query efficiency, which is conducive to improving the high-speed calculation of complex electromagnetic environment reconnaissance, detection and other actions. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0017] Figure 1 is an exemplary flowchart showing a method for caching electromagnetic space field strength according to an embodiment of the present application;

[0018] Figure 2 is an exemplary schematic diagram showing discrete division of electromagnetic space according to an embodiment of the present application;

[0019] Figure 3 is an exemplary flowchart showing an exemplary process of performing a field strength insertion operation according to an embodiment of the present application;

[0020] Figure 4 is an exemplary flowchart showing an exemplary process of performing a field strength deletion operation according to an embodiment of the present application;

[0021] Figure 5 is an exemplary flowchart showing an exemplary process of performing a field strength query operation according to an embodiment of the present application;

[0022] Figure 6 is an exemplary flowchart showing an overall process for caching electromagnetic space field strength according to an embodiment of the present application;

[0023] Figure 7 This is an exemplary structural block diagram of a device for caching electromagnetic space field strength according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0025] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present application indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0026] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0027] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0028] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.

[0029] Figure 1 FIG. 1 is an exemplary flowchart of a method 100 for caching electromagnetic space field strength according to an embodiment of the present application. Figure 1As shown in , at step S101, the electromagnetic space is discretely divided to form a plurality of discrete cells having a field strength storage structure, wherein the field strength storage structure includes a local cache structure and a corresponding target field strength storage structure. In one implementation scenario, the two-dimensional electromagnetic space or the three-dimensional electromagnetic space can be quantitatively modeled by adopting a rasterization method, for example, to achieve non-overlapping and non-omission splicing on the two-dimensional plane or the three-dimensional space, thereby discretely dividing the electromagnetic space. In some embodiments, the aforementioned rasterized graphic is a discrete cell, and the rasterized graphic can be, for example, an equilateral triangle, a square (for example Figure 2 In some implementation scenarios, the size (including, for example, the side length, the distance between opposite sides, or the distance between diagonals, etc.) and the number of each discrete cell can be set based on the simulation granularity.

[0030] In each of the above discrete cells, there is a field strength storage structure, and the field strength storage structure may include a local cache structure and a corresponding target field strength storage structure to store the corresponding field strength magnitude and field strength information. In an implementation scenario, the aforementioned field strength storage structure may adopt a dynamic array, a linked list, a heap, etc.; the aforementioned local cache structure may be, for example, an array or a priority queue, etc. In addition, the local cache structure also includes a maximum value pointer, which points to the maximum value of the field strength in the local cache structure.

[0031] Next, at step S102, the field strengths of all electromagnetic sources in the electromagnetic space are calculated, and the field strengths are classified according to the target classification conditions. In some embodiments, the aforementioned target classification conditions may include the party and frequency band of the electromagnetic source. It can be understood that in the electromagnetic space combat simulation, usually in a multi-party confrontation mode, each party has a large number of equipment (i.e., electromagnetic sources) that generate electromagnetic signals, and the combat party to which the equipment belongs is the party of the electromagnetic source. Therefore, the electromagnetic space usually includes multiple parties of electromagnetic sources and multiple frequency bands. In the implementation scenario, the field strengths of the same party and the same frequency band among the field strengths of all electromagnetic sources are classified into one category, and then the field strengths in each category are sorted from large to small.

[0032] Further, at step S103, a preset number of target field strength values ​​and corresponding first field strength information before the field strength magnitude sorting under the corresponding classification condition are determined based on the classification result. That is, the field strength magnitudes of the same subordinate party and the same frequency band are sorted from large to small, and the field strength values ​​of the preset number before the field strength sorting are determined as the target field strength values, and the corresponding first field strength information is obtained. In some embodiments, the aforementioned preset number is a constant, and the aforementioned first field strength information includes the subordinate party and frequency corresponding to the target field strength value. As an example, assuming that the preset number is k, the k field strength values ​​with the largest field strength in the same subordinate party and the same frequency band are taken as the target field strength values, and the subordinate party and frequency corresponding to each target field strength value are the first field strength information.

[0033] After determining the above-mentioned target field strength value, at step S104, the target field strength value and the corresponding first field strength information are cached in a local cache structure, and the field strength values ​​other than the target field strength value and the corresponding second field strength information are stored in the target field strength storage structure to initialize the field strength storage structure. In an implementation scenario, the field strength values ​​of a preset number (e.g., k) before the field strength is sorted are stored in a local cache structure from large to small, and the maximum field strength value is pointed to via the maximum value pointer BufferMax. The field strength values ​​other than the preset number and the corresponding second field strength information are stored in the target field strength storage structure to complete the initialization of the field strength storage structure. In some embodiments, the aforementioned second field strength information is the party and frequency corresponding to the field strength other than the target field strength value. In other words, the k values ​​with the largest field strength are stored in the local cache structure from large to small, and the maximum field strength value is pointed to via the maximum value pointer BufferMax. The remaining field strength values ​​and their field strength information are stored in the target field strength storage structure.

[0034] As can be seen from the previous text, the electromagnetic space usually includes multiple electromagnetic source parties and multiple frequency bands, where the field strengths of the same party and the same frequency band are classified into one category. Therefore, each discrete cell can also include multiple local cache structures and corresponding target field strength storage structures to respectively store the target field strength values ​​and residual field strength values ​​under different categories.

[0035] Based on the initialized field strength storage structure, at step S105, in response to the target field strength operation, the initialized field strength storage structure is cached and updated to implement a cache operation for the electromagnetic space field strength. In one embodiment, the aforementioned target field strength operation may include, for example, one or more of a field strength insertion operation, a field strength deletion operation, or a field strength query operation. For example, when inserting a new field strength, deleting an existing field strength, or querying the maximum field strength, the initialized field strength storage structure is updated by inserting a new field strength in the local cache structure and / or the target field strength storage structure, deleting an existing field strength, and querying the maximum field strength in real time, so as to implement a cache operation for the electromagnetic space field strength. More details about the aforementioned update will be discussed later in conjunction with Figure 3-Figure 6 Describe in detail.

[0036] In combination with the above description, it can be known that the embodiment of the present application forms a plurality of discrete cells by discretely dividing the electromagnetic space, and setting one or more local cache structures and corresponding target field strength storage structures in each discrete cell to store the target field strength values ​​and the remaining field strength values ​​of the maximum field strength of a preset number of fields under a certain frequency band of a certain party and their respective field strength information. Based on this, the embodiment of the present application can cache a preset number of maximum field strength values ​​at the same time, thereby effectively reducing the update cost under the target field strength operation, so that the maximum field strength can be updated quickly under the target field strength operation (such as field strength insertion operation, field strength deletion operation or field strength query operation, etc.), improve the query efficiency, and thus help to improve the high-speed calculation of complex electromagnetic environment reconnaissance, detection and other actions.

[0037] Figure 2 FIG. 1 is an exemplary schematic diagram showing discrete division of electromagnetic space according to an embodiment of the present application. Figure 2 The gridded graphics are exemplarily shown as squares, and the electromagnetic space is discretized into multiple discrete cells through multiple square grids, and each square grid represents a discrete cell. In an implementation scenario, each discrete cell includes at least one field strength storage structure 201, and the field strength storage structure 201 may include a local cache structure 202 and a corresponding target field strength storage structure 203. The number of the field strength storage structures 201 can be set according to the party and frequency band of the electromagnetic source. In some embodiments, the aforementioned field strength storage structure may adopt a dynamic array, a linked list, a heap, etc., and the aforementioned local cache structure may be, for example, an array or a priority queue.

[0038] As mentioned above, by calculating the magnitude of the field strength of all electromagnetic sources in the electromagnetic space, and classifying the magnitude of the field strength according to, for example, the belonging direction and frequency band of the electromagnetic source, the magnitude of the field strength of the same belonging direction and the same frequency band among the magnitude of the field strength of all electromagnetic sources is classified into one category. In an exemplary scenario, the belonging direction of two electromagnetic sources is shown in the figure, wherein the triangle in the figure represents the belonging direction of one electromagnetic source, the belonging direction is located at the center of the circular area in the figure, and the grayscale of the circular area gradually fades from the center to the circumference, indicating that the field strength gradually decays from the center to the circumference. The concave hexagon represents the belonging direction of another electromagnetic source, wherein the fan-shaped area represents the field strength area generated by the electromagnetic source corresponding to the belonging direction, and the grayscale of the fan-shaped area gradually fades from the center of the fan-shaped circle to the fan-shaped arc, indicating that the field strength gradually decays from the center of the fan-shaped circle to the fan-shaped arc. In this scenario, the magnitude of the field strength of the same frequency band under the two belonging directions can be classified into one category respectively.

[0039] Next, the field strengths in each category are sorted from large to small, and the top k field strength values ​​and their corresponding field strength information are stored in the local cache structure 201, and the remaining field strength values ​​and their corresponding field strength information are stored in the target field strength storage structure 202. The figure only shows the field strength values ​​by way of example, for example, k field strength values ​​64, 52, 36, 36, etc. in the local cache structure 201, and the remaining field strength values ​​24, 18, 4, 15, 32, etc. in the target field strength storage structure 202. Furthermore, the figure also shows a maximum value pointer BufferMax (for example, as shown by arrow A in the figure), which points to the maximum field strength value 64 in the local cache structure 201. Based on this, the embodiment of the present application can cache k maximum field strength values ​​at the same time, thereby effectively reducing the update cost of insertion or deletion, and improving query efficiency.

[0040] Figure 3 FIG. 1 is an exemplary flowchart showing the execution of a field strength insertion operation according to an embodiment of the present application. Figure 3 As shown in , at step S301, the field intensity value to be inserted is compared with the last field intensity value in the target field intensity value under the corresponding classification condition in the local cache structure, so as to update the local cache structure and / or the target field intensity storage structure according to the comparison result, so as to perform cache update on the initialized field intensity storage structure. Specifically, by comparing the newly inserted field intensity value with the last field intensity value in the local cache structure (that is, the minimum field intensity value in the local cache structure), the local cache structure and / or the target field intensity storage structure are updated according to the magnitude relationship between the newly inserted field intensity value and the minimum field intensity value in the local cache structure.

[0041] In one embodiment, at step S302, in response to the field intensity value to be inserted being less than the last field intensity value in the target field intensity value under the corresponding classification condition in the local cache structure, the field intensity value to be inserted and the corresponding field intensity information are stored in the target field intensity storage structure to perform a cache update on the initialized field intensity storage structure. At step S303, in response to the field intensity value to be inserted being greater than the last field intensity value in the target field intensity value under the corresponding classification condition in the local cache structure, the field intensity value to be inserted is inserted into the local cache structure in order of size, and the last field intensity value in the local cache structure into which the field intensity value to be inserted is inserted is moved into the target field intensity storage structure to perform a cache update on the initialized field intensity storage structure. That is, when the newly inserted field intensity value is less than the minimum field intensity value in the local cache structure, the newly inserted field intensity value is stored in the target field intensity storage structure to implement a cache update. When the newly inserted field strength value is greater than the minimum field strength value in the local cache structure, the newly inserted field strength value is inserted into the local cache structure in order of size, and the minimum field strength value is moved into the target field strength storage structure for storage to achieve cache update.

[0042] Figure 4 FIG. 1 is an exemplary flowchart showing the execution of a field strength deletion operation according to an embodiment of the present application. Figure 4 As shown in, at step S401, it is determined whether the field intensity value to be deleted is stored in the local cache structure. In one embodiment, at step S402, in response to the field intensity value to be deleted not being stored in the local cache structure, the field intensity value to be deleted is deleted. That is, if the field intensity value to be deleted does not exist in the local cache structure, the field intensity value to be deleted is directly deleted. At step S403, in response to the field intensity value to be deleted being stored in the local cache structure, it is determined whether the local cache structure after deleting the field intensity value to be deleted is empty, and then the local cache structure and / or the target field intensity storage structure are updated according to the determination result to perform a cache update on the initialized field intensity storage structure. That is, if the field intensity value to be deleted exists in the local cache structure, it is determined whether the field intensity value still exists in the local cache structure after deleting the corresponding field intensity, and then cache update is implemented.

[0043] Specifically, at step S404, in response to the local cache structure being non-empty after deleting the field strength value to be deleted, the field strength deletion operation is exited. That is, when there are other field strength values ​​in the local cache structure after deleting the corresponding field strength, the field strength deletion operation is directly exited. At step S405, in response to the local cache structure being empty after deleting the field strength value to be deleted, the number of field strengths in the target field strength storage structure is compared with a preset number, so as to update the local cache structure and / or the target field strength storage structure according to the comparison result of the number of field strengths in the target field strength storage structure and the preset number, so as to perform a cache update on the initialized field strength storage structure. In other words, when there are no other field strength values ​​in the local cache structure after deleting the corresponding field strength, it is necessary to perform a cache update according to the relationship between the number of field strengths in the target field strength storage structure and the preset number.

[0044] In one embodiment, at step S406, in response to the number of field strengths in the target field strength storage structure being greater than or equal to a preset number, a preset number of field strengths before the field strength magnitude sorting is selected from the target field strength storage structure and stored in a local cache structure after the field strength values ​​to be deleted are deleted. For example, taking the preset number as k as an example, when the number of field strengths in the target field strength storage structure is greater than or equal to k, the k values ​​with the largest field strength magnitudes in the target field strength storage structure are stored in descending order in the local cache structure after the field strength values ​​to be deleted are deleted.

[0045] Further, at step S407, in response to the number of field strengths in the target field strength storage structure being less than a preset number, the field strengths in the target field strength storage structure are stored in the local cache structure after the field strength value to be deleted is deleted according to the field strength size, and a zero padding operation is performed and a maximum value pointer of the local cache structure is updated to cache the initialized field strength storage structure. For example, taking the preset number k as an example, when the number of field strengths in the target field strength storage structure is less than k, all field strengths in the target field strength storage structure are stored in the local cache structure after the field strength value to be deleted is deleted from large to small, and the remaining positions are filled with 0, and the maximum value pointer points to the updated field strength maximum value.

[0046] Figure 5 FIG. 1 is an exemplary flowchart showing an exemplary process of performing a field strength query operation according to an embodiment of the present application. Figure 5 As shown in, at step S501, it is queried whether the maximum value pointer of the local cache structure is empty. That is, it is determined whether the maximum value of the field intensity pointed to by the maximum value pointer of the local cache structure has a value. In one embodiment, at step S502, in response to the maximum value pointer of the local cache structure being non-empty, the maximum value of the field intensity pointed to by the maximum value pointer of the local cache structure is returned. That is, when the maximum value of the field intensity pointed to by the maximum value pointer of the local cache structure has a value, the value (that is, the maximum value of the field intensity) is obtained. At step S503, in response to the maximum value pointer of the local cache structure being empty, an empty set of field intensity is returned. That is, when the maximum value of the field intensity pointed to by the maximum value pointer of the local cache structure has no value, an empty set is obtained.

[0047] Figure 6 FIG. 1 is an exemplary flow chart showing an overall exemplary process for caching electromagnetic space field strength according to an embodiment of the present application. Figure 6 As shown in , at step S601, the electromagnetic space is discretely divided to form discrete cells. Each discrete cell may include at least one field strength storage structure, which may include a local cache structure and a corresponding target field strength storage structure. The aforementioned discrete division may be based on a gridding method (e.g., regular triangles, squares, and regular hexagons). The aforementioned field strength storage structure may adopt a dynamic array, a linked list, a heap, etc.; the aforementioned local cache structure may be, for example, an array or a priority queue, etc.

[0048] Next, at step S602, the field strengths of all electromagnetic sources in the electromagnetic space are calculated and the k values ​​with the largest field strengths under the corresponding classification conditions and their corresponding field strength information are determined, and at step S603, the k values ​​and their corresponding field strength information are cached to the local cache structure, and the remaining field strength values ​​are stored in the target field strength storage structure to initialize the field strength storage structure and the maximum value pointer BufferMax.

[0049] Further, at step S604, in the execution of the field strength insertion operation, at step S605, it is determined whether the newly inserted field strength value is greater than the minimum field strength value in the local cache structure. In an implementation scenario, when the newly inserted field strength value is greater than the minimum field strength value in the local cache structure, at step S606, the newly inserted field strength value is inserted into the local cache structure in order of size, and the minimum field strength value is moved into the target field strength storage structure for storage, and at step S620, the maximum value pointer BufferMax is updated to point to the maximum field strength value. When the newly inserted field strength value is less than the minimum field strength value in the local cache structure, at step S607, the newly inserted field strength value is stored in the target field strength storage structure, and at step S620, the maximum value pointer BufferMax is updated to point to the maximum field strength value.

[0050] Further, at step S608, a field strength deletion operation is performed. First, at step S609, it is determined whether the field strength value to be deleted is stored in the local cache structure. If the field strength value to be deleted does not exist in the local cache structure, at step S610, the field strength value to be deleted is directly deleted. If the field strength value to be deleted exists in the local cache structure, at step S611, it is determined whether there is still a field strength value in the local cache structure after deleting the corresponding field strength (i.e., whether the local cache structure is empty after deleting the corresponding field strength). Specifically, when there are other field strength values ​​in the local cache structure after deleting the corresponding field strength, at step S612, the field strength deletion operation is directly exited. When there are no other field strength values ​​in the local cache structure after deleting the corresponding field strength, at step S613, it is determined whether the number of field strengths in the target field strength storage structure is greater than or equal to k.

[0051] More specifically, when the number of field strengths in the target field strength storage structure is greater than or equal to k, at step S614, the k values ​​with the largest field strengths in the target field strength storage structure are stored in descending order in the local cache structure after the field strength value to be deleted is deleted. When the number of field strengths in the target field strength storage structure is less than k, at step S615, all field strengths in the target field strength storage structure are stored in descending order in the local cache structure after the field strength value to be deleted is deleted, and the remaining positions are filled with 0, and at step S620, the maximum value pointer BufferMax is updated to point to the maximum value of the field strength.

[0052] Further, at step S616, a field intensity query operation is performed, and at step S617, whether the maximum value pointer of the local cache structure is empty is queried. When the maximum value pointer of the local cache structure is not empty, at step S618, the maximum value of the field intensity pointed to by the maximum value pointer of the local cache structure is returned. When the maximum value pointer of the local cache structure is empty, at step S619, an empty set is returned.

[0053] Figure 7FIG. 7 is an exemplary structural block diagram of a device 700 for performing a cache operation on electromagnetic space field strength according to an embodiment of the present application. Figure 7 As shown in , the device 700 of the present application may include a processor 701 and a memory 702, wherein the processor 701 and the memory 702 communicate with each other through a bus. The memory 702 stores program instructions for caching electromagnetic space field strength. When the program instructions are executed by the processor 701, the method steps described in the above text in combination with the accompanying drawings are implemented: the electromagnetic space is discretely divided to form a plurality of discrete grids with a field strength storage structure, wherein the field strength storage structure includes a local cache structure and a corresponding target field strength storage structure; the field strength of all electromagnetic sources in the electromagnetic space is calculated, and the field strength is classified according to the target classification condition; based on the classification result, a preset number of target field strength values ​​and corresponding first field strength information before the field strength is sorted under the corresponding classification condition are determined; the target field strength value and the corresponding first field strength information are cached to the local cache structure, and the field strength other than the target field strength value and the corresponding second field strength information are stored to the target field strength storage structure to initialize the field strength storage structure; and in response to the target field strength operation, the initialized field strength storage structure is cached and updated to implement the caching operation of the electromagnetic space field strength.

[0054] According to the above description in combination with the accompanying drawings, those skilled in the art can also understand that the embodiments of the present application can also be implemented by a software program. Therefore, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores computer-readable instructions for caching electromagnetic space field strength. When the computer-readable instructions are executed by one or more processors, the present application in combination with the accompanying drawings can be implemented. Figure 1 The described method is used to cache the electromagnetic space field strength.

[0055] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0056] It should be noted that although the operations of the method of the present application are described in a specific order in the accompanying drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.

[0057] It should be understood that when the terms "first", "second", "third" and "fourth" are used in the claims, the specification and the drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0058] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0059] Although the implementation methods of the present application are as above, the contents described are only examples adopted to facilitate the understanding of the present application, and are not intended to limit the scope and application scenarios of the present application. Any technician in the technical field described in the present application can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present application, but the scope of patent protection of the present application shall still be subject to the scope defined in the attached claims.

Claims

1. A method for caching electromagnetic space field strength, characterized in that: include: Discretely divide the electromagnetic space to form a plurality of discrete cells having a field strength storage structure, wherein the field strength storage structure includes a local cache structure and a corresponding target field strength storage structure; Calculating the magnitudes of the field strengths of all electromagnetic sources in the electromagnetic space, and classifying the magnitudes of the field strengths according to target classification conditions; Determine, based on the classification result, a preset number of target field strength values ​​and corresponding first field strength information before sorting the field strength under the corresponding classification conditions; caching the target field strength value and the corresponding first field strength information into the local cache structure, and storing the field strength values ​​other than the target field strength value and the corresponding second field strength information into the target field strength storage structure, so as to initialize the field strength storage structure; as well as In response to the target field strength operation, the initialized field strength storage structure is cached and updated to implement the cache operation of the electromagnetic space field strength; The target classification condition includes at least the party and frequency band of the electromagnetic source, and the first field strength information and the second field strength information both include at least the party and frequency; the field strengths of the same party and the same frequency band are classified into one category, and then the field strengths in each category are sorted from large to small; each discrete cell also includes multiple local cache structures and corresponding target field strength storage structures to respectively store target field strength values ​​and residual field strength values ​​under different categories; The step of updating the cache of the initialized field strength storage structure in response to the target field strength operation includes: Compare the field strength value to be inserted with the last field strength value in the target field strength value under the corresponding classification condition in the local cache structure, or determine whether the field strength value to be deleted is stored in the local cache structure, or query whether the maximum value pointer of the local cache structure is empty, so as to update the local cache structure and / or the target field strength storage structure according to the comparison result.

2. The method according to claim 1, characterized in that in, The target field strength operation includes at least one or more of a field strength insertion operation, a field strength deletion operation or a field strength query operation.

3. The method according to claim 2, characterized in that In response to the target field strength operation being the field strength insertion operation, updating the cache of the initialized field strength storage structure includes: Comparing the field intensity value to be inserted with the last field intensity value among the target field intensity values ​​under the corresponding classification condition in the local cache structure; and The local cache structure and / or the target field strength storage structure are updated according to the comparison result, so as to perform cache update on the initialized field strength storage structure.

4. The method according to claim 3, characterized in that Wherein updating the local cache structure and / or the target field strength storage structure according to the comparison result to cache update the initialized field strength storage structure includes: In response to the field intensity value to be inserted being less than the last field intensity value in the target field intensity values ​​under the corresponding classification condition in the local cache structure, storing the field intensity value to be inserted and the corresponding field intensity information into the target field intensity storage structure to perform a cache update on the initialized field intensity storage structure; or In response to the field strength value to be inserted being greater than the last field strength value in the target field strength values ​​under the corresponding classification conditions in the local cache structure, the field strength value to be inserted is inserted into the local cache structure in order of size, and the last field strength value in the local cache structure into which the field strength value to be inserted is inserted is moved into the target field strength storage structure to perform a cache update on the initialized field strength storage structure.

5. The method according to claim 2, characterized in that: In response to the target field strength operation being the field strength deletion operation, updating the cache of the initialized field strength storage structure includes: Determining whether the field strength value to be deleted is stored in the local cache structure; In response to the field intensity value to be deleted not being stored in the local cache structure, deleting the field intensity value to be deleted; or In response to the field intensity value to be deleted being stored in the local cache structure, determining whether the local cache structure is empty after deleting the field intensity value to be deleted; The local cache structure and / or the target field strength storage structure are updated according to the judgment result, so as to perform cache update on the initialized field strength storage structure.

6. The method according to claim 5, characterized in that Wherein updating the local cache structure and / or the target field strength storage structure according to the judgment result to cache update the initialized field strength storage structure includes: In response to the local cache structure being non-empty after deleting the field strength value to be deleted, exiting the field strength deletion operation; or In response to the local cache structure being empty after deleting the field strength value to be deleted, comparing the number of field strengths in the target field strength storage structure with the preset number; and The local cache structure and / or the target field strength storage structure is updated according to a comparison result between the number of field strengths in the target field strength storage structure and the preset number, so as to perform cache update on the initialized field strength storage structure.

7. The method according to claim 6, characterized in that Wherein updating the local cache structure and / or the target field strength storage structure according to the comparison result of the number of field strengths in the target field strength storage structure and the preset number to cache update the initialized field strength storage structure includes: In response to the number of field strengths in the target field strength storage structure being greater than or equal to the preset number, selecting a preset number of field strengths before the field strengths are sorted from the target field strength storage structure and storing them in the local cache structure after deleting the field strength value to be deleted; or In response to the number of field strengths in the target field strength storage structure being less than the preset number, the field strengths in the target field strength storage structure are stored according to the field strengths in the local cache structure after the field strength values ​​to be deleted are deleted, and a zero padding operation is performed and a maximum value pointer of the local cache structure is updated to perform a cache update on the initialized field strength storage structure.

8. The method according to claim 2, characterized in that: In response to the target field strength operation being the field strength query operation, updating the cache of the initialized field strength storage structure includes: Query whether the maximum value pointer of the local cache structure is empty; In response to the maximum value pointer of the local cache structure being non-null, returning the maximum value of the field intensity pointed to by the maximum value pointer of the local cache structure; or In response to the maximum value pointer of the local cache structure being empty, an empty set of field strengths is returned.

9. A device for caching electromagnetic space field strength, characterized in that: include: processor; as well as A memory, wherein program instructions for caching electromagnetic space field strength are stored, and when the program instructions are executed by the processor, the device implements the method according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: Computer-readable instructions for caching electromagnetic space field strength are stored thereon, and when the computer-readable instructions are executed by one or more processors, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Index generation method and device for field intensity information

    CN116579167A

  • Radio communication apparatus and method thereof

    US20100141394A1