Near-field scanning method and device, equipment and storage medium
By implementing a new near-field scanning method in the controller of the near-field scanning system, using electromagnetic field information and scanning probability to determine the scanning point, the problem of long-term use of traditional near-field scanning technology is solved and efficient near-field Scan, reducing time and cost.
Patent Information
- Application Number
- CN202411477723.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-14
AI Technical Summary
Traditional near-field scanning technology takes a long time, increasing the time cost of production and testing processes in industrial applications, and increasing the cost of testing hardware equipment through hardware improvement, but the effect is not obvious.
By implementing a new near-field scanning method in the controller of the near-field scanning system, the electromagnetic field information of each first scanning point in the two-dimensional grid is obtained, the gradient information and scanning probability are determined based on the electromagnetic field information, and the next scan is determined, and the next scan is determined. The electromagnetic field distribution of the target scanning area is finally determined until the number of scans meets the preset conditions.
It effectively shortens the time-consuming of near-field scanning, improves the efficiency of near-field scanning, reduces the time cost of near-field scanning, and does not need to increase the cost of testing hardware equipment.
Smart Images

Figure CN119438752A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of microwave measurement technology, and in particular to a near-field scanning method, device, equipment and storage medium. Background Art
[0002] As an effective and convenient measurement method, near-field scanning (NFS) can intuitively obtain the distribution of electromagnetic fields and determine radiation hotspots, and is widely used in electromagnetic compatibility testing areas. However, traditional near-field scanning technology is time-consuming, which increases the time cost of production and testing processes in industrial applications.
[0003] In the prior art, the time consumption of near-field scanning is reduced by increasing the sampling rate of the test equipment or increasing the moving rate of the displacement mechanism. However, the current method of improving hardware will increase the cost of the test hardware equipment and has little effect on accelerating the test progress. Summary of the invention
[0004] Based on this, it is necessary to provide a near-field scanning method, device, equipment and storage medium that can effectively shorten the time consumption of near-field scanning in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a near-field scanning method, which is used in a controller of a near-field scanning system, wherein the near-field scanning system includes a controller, a spectrum analyzer, a displacement mechanism, and a scanning probe, wherein the controller is connected to the spectrum analyzer and the displacement mechanism, and the displacement mechanism is connected to the scanning probe, and is used to move under the drive of the controller to drive the scanning probe to move within a target scanning area, and the method includes:
[0006] Acquire electromagnetic field information of each first scanning point in a two-dimensional grid, the two-dimensional grid is determined according to a target scanning area, and the number of the first scanning points is less than the total number of grid points in the two-dimensional grid;
[0007] Determine the gradient information and scanning probability of each first scanning point according to each electromagnetic field information, wherein the gradient information is used to indicate the direction in which the electromagnetic field change in the target scanning area meets a preset threshold;
[0008] Determine a plurality of second scanning points for the next scan according to each gradient information and the scanning probability until the number of scans meets a preset condition;
[0009] The electromagnetic field distribution of the target scanning area is determined according to the electromagnetic field information of each scanning point in the two-dimensional grid.
[0010] In one embodiment, determining the gradient information and the scanning probability of each first scanning point according to each electromagnetic field information includes:
[0011] The gradient information of each first scanning point is determined according to a preset discrete gradient operator and each electromagnetic field information; and the scanning probability of each first scanning point is determined according to a softmax function and each electromagnetic field information.
[0012] In one embodiment, the gradient information includes a gradient value and a gradient direction, and determining a plurality of second scanning points for the next scan according to each gradient information and the scanning probability includes:
[0013] A plurality of basic scanning points are determined from the first scanning points according to the gradient value and the scanning probability, wherein the number of the basic scanning points is less than the number of the first scanning points; a plurality of second scanning points are determined according to the gradient direction of each basic scanning point and the moving step length of the displacement mechanism; and each second scanning point is scanned.
[0014] In one embodiment, determining a plurality of second scanning points for the next scan according to each gradient information and the scanning probability until the number of scans meets a preset condition includes:
[0015] Acquire electromagnetic field information of each second scanning point; update the first scanning point according to each second scanning point to increase the number of first scanning points; determine the second scanning point of the next scan according to the updated electromagnetic field information of the first scanning point, until the number of scans meets the preset conditions.
[0016] In one embodiment, obtaining electromagnetic field information of each first scanning point in a two-dimensional grid includes:
[0017] The two-dimensional grid of the target scanning area is determined according to the size of the target scanning area and the moving step length of the displacement mechanism; a plurality of first scanning points are selected in the two-dimensional grid, and the electromagnetic field information of each first scanning point is determined.
[0018] In one embodiment, selecting a plurality of first scanning points in a two-dimensional grid and determining electromagnetic field information of each first scanning point includes:
[0019] The number of first scanning points is obtained; the position information of each first scanning point in the two-dimensional grid is determined according to a preset random algorithm; and each first scanning point is scanned to determine the electromagnetic field information of each first scanning point.
[0020] In one embodiment, scanning each first scanning point to determine the electromagnetic field information of each first scanning point includes:
[0021] The displacement mechanism is driven according to each position information, so that the scanning probe scans each first scanning point in sequence; the induced voltage of each first scanning point is obtained, and the electromagnetic field information of each first scanning point is determined according to each induced voltage.
[0022] In a second aspect, the present application further provides a near-field scanning device, which is arranged in a controller of a near-field scanning system. The near-field scanning system includes a controller, a spectrum analyzer, a displacement mechanism and a scanning probe. The controller is connected to the spectrum analyzer and the displacement mechanism. The displacement mechanism is connected to the scanning probe and is used to move under the drive of the controller to drive the scanning probe to move within a target scanning area. The device includes:
[0023] An acquisition module, used to acquire electromagnetic field information of each first scanning point in a two-dimensional grid, the two-dimensional grid is determined according to a target scanning area, and the number of the first scanning points is less than the total number of grid points in the two-dimensional grid;
[0024] A first determination module is used to determine the gradient information and the scanning probability of each first scanning point according to each electromagnetic field information, wherein the gradient information is used to indicate the direction in which the electromagnetic field change in the target scanning area meets a preset threshold;
[0025] A second determination module, used to determine a plurality of second scanning points for the next scan according to each gradient information and the scanning probability, until the number of scans meets a preset condition;
[0026] The third determination module determines the electromagnetic field distribution of the target scanning area according to the electromagnetic field information of each scanning point in the two-dimensional grid.
[0027] In one of the embodiments, the first determination module is specifically used to determine the gradient information of each first scanning point according to a preset discrete gradient operator and each electromagnetic field information; and determine the scanning probability of each first scanning point according to a softmax function and each electromagnetic field information.
[0028] In one of the embodiments, the gradient information includes a gradient value and a gradient direction. The second determination module is specifically used to determine multiple basic scanning points from the first scanning points based on the gradient value and the scanning probability, and the number of basic scanning points is less than the number of first scanning points; determine multiple second scanning points based on the gradient direction of each basic scanning point and the moving step length of the displacement mechanism; and scan each second scanning point.
[0029] In one embodiment, the second determination module is specifically used to obtain the electromagnetic field information of each second scanning point; update the first scanning point according to each second scanning point to increase the number of first scanning points; determine the second scanning point for the next scan according to the electromagnetic field information of the updated first scanning point, until the number of scans meets the preset conditions.
[0030] In one of the embodiments, the acquisition module is specifically used to determine a two-dimensional grid of the target scanning area according to the size of the target scanning area and the moving step of the displacement mechanism; select multiple first scanning points in the two-dimensional grid, and determine the electromagnetic field information of each first scanning point.
[0031] In one of the embodiments, the acquisition module is specifically used to obtain the number of first scanning points; determine the position information of each first scanning point in the two-dimensional grid according to a preset random algorithm; and scan each first scanning point to determine the electromagnetic field information of each first scanning point.
[0032] In one of the embodiments, the acquisition module is specifically used to drive the displacement mechanism according to each position information, so that the scanning probe scans each first scanning point in turn; obtain the induced voltage of each first scanning point, and determine the electromagnetic field information of each first scanning point according to each induced voltage.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, any of the methods described in the first aspect is implemented.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the methods described in the first aspect above.
[0035] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements any of the methods described in the first aspect above.
[0036] The above-mentioned near-field scanning method, device, equipment and storage medium are used in the controller of the near-field scanning system, and the near-field scanning system includes a controller, a spectrum analyzer, a displacement mechanism and a scanning probe. The controller is connected to the spectrum analyzer and the displacement mechanism, and the displacement mechanism is connected to the scanning probe and is used to move under the drive of the controller to drive the scanning probe to move in the target scanning area. First, the electromagnetic field information of each first scanning point in the two-dimensional grid is obtained, and the two-dimensional grid is determined according to the target scanning area, and the number of first scanning points is less than the total number of grid points in the two-dimensional grid; then, the gradient information and scanning probability of each first scanning point are determined according to each electromagnetic field information, and the gradient information is used to indicate the direction in which the electromagnetic field change in the target scanning area meets the preset threshold; again, multiple second scanning points for the next scan are determined according to each gradient information and scanning probability, until the number of scans meets the preset conditions; finally, the electromagnetic field distribution of the target scanning area is determined according to the electromagnetic field information of each scanning point in the two-dimensional grid. In this way, the position with higher electromagnetic field intensity in the target scanning area can be determined through the electromagnetic field information and scanning probability of the first scanning point, and the scanning points at the position with higher electromagnetic field intensity can be scanned, skipping the background area. There is no need to scan all scanning points in the target scanning area. In this way, the number of scanning points in the near-field scanning process can be reduced, thereby improving the efficiency of near-field scanning and reducing the time consumed by near-field scanning. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0038] FIG1 is a diagram of an application environment of a near-field scanning method according to an embodiment;
[0039] FIG2 is a schematic diagram of a near-field scanning method according to an embodiment;
[0040] FIG3 is a schematic flow chart of a step of determining gradient information and scanning probability of each first scanning point in one embodiment;
[0041] FIG4 is a schematic flow chart of a step of determining a plurality of second scanning points for the next scan in one embodiment;
[0042] FIG5 is a schematic flow chart of a near-field scanning method in another embodiment;
[0043] FIG6 is a schematic flow chart of a step of acquiring electromagnetic field information of each first scanning point in a two-dimensional grid in one embodiment;
[0044] FIG7 is a schematic flow chart of a step of determining electromagnetic field information of each first scanning point in one embodiment;
[0045] FIG8 is a schematic flow chart of the step of determining electromagnetic field information of each first scanning point in another embodiment;
[0046] FIG9 is a schematic flow chart of a near-field scanning method in another embodiment;
[0047] FIG10 is a block diagram of a near-field scanning device according to an embodiment;
[0048] FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] Nowadays, electronic products are gradually moving towards high frequency. In the production and reliability analysis of electronic products, electromagnetic compatibility (EMC) is one of the important standards for evaluating the reliability of electronic equipment. Before the product is launched on the market, the electromagnetic radiation of the device needs to be evaluated. The near-field scanning method (NFS) is an important diagnostic method for electromagnetic compatibility problems in international use. As an effective and convenient measurement method, the near-field scanning method is used to detect electromagnetic radiation. The device to be tested is placed very close to the radiation source, and then the detector is used to measure the intensity and distribution of the electromagnetic field of the device to be tested. This method can help determine whether the device to be tested generates bad electromagnetic radiation during operation, and can help identify and solve potential interference problems. Since the near-field scanning method can intuitively obtain the distribution of the electromagnetic field and determine the radiation hotspot, it is widely used in the electromagnetic compatibility detection area. However, traditional near-field scanning technology is time-consuming. In common electromagnetic compatibility experiments, the near-field measurement time is usually between ten minutes and dozens of hours, which depends on many factors (including the scanned spectrum range, scanning bandwidth, the movement rate of the test platform and the data acquisition time of the test equipment). This greatly reduces the efficiency of the test and does not meet the needs of fast and efficient positioning.
[0051] In the prior art, the time consumption of near-field scanning is reduced by increasing the sampling rate of the test equipment or increasing the moving rate of the displacement mechanism. However, the current method of improving hardware will increase the cost of the test hardware equipment and has no obvious effect on accelerating the progress of near-field scanning.
[0052] In view of this, an embodiment of the present application provides a near-field scanning method that can effectively shorten the time consumption of near-field scanning. The near-field scanning method provided in the embodiment of the present application can be applied to a near-field scanning system 100 as shown in Figure 1, wherein the near-field scanning system 100 includes a controller 110, a spectrometer 120, a displacement mechanism 130, and a scanning probe 140. The controller 110 is connected to the spectrometer 120 and the displacement mechanism 130, and the displacement mechanism 130 is connected to the scanning probe 140. The displacement mechanism 130 is used to move under the drive of the controller 110 to drive the scanning probe 140 to move within the target scanning area. The controller 110 and the spectrometer 120 can be connected via a coaxial cable connection line, and the spectrometer 120 and the scanning probe 140 can also be connected via a coaxial cable connection line.
[0053] In an exemplary embodiment, as shown in FIG2 , a near-field scanning method is provided, which is described by taking the method applied to the controller 110 in FIG1 as an example, and includes the following steps 201 to 204. Among them:
[0054] S201, obtaining electromagnetic field information of each first scanning point in a two-dimensional grid.
[0055] The two-dimensional grid is determined according to the target scanning area, and the number of the first scanning points is less than the total number of grid points in the two-dimensional grid.
[0056] Optionally, the target scanning area may be the device to be tested, or some components in the device to be tested.
[0057] Optionally, when determining the two-dimensional grid according to the target scanning area, the size of the target scanning area (which may be the length and width of the target scanning area) may be acquired, and the target scanning area may be divided according to a preset two-dimensional grid interval.
[0058] In one possible implementation, the preset two-dimensional grid interval can be determined based on the moving step of the displacement mechanism. For example, the preset two-dimensional grid interval can be the moving step or an integer multiple of the moving step. The embodiment of the present application does not limit this. It can be understood that the moving step of the displacement mechanism can be determined first, and then the two-dimensional grid interval can be determined based on the moving step. It can also be adjusted according to the moving step of the displacement mechanism after the two-dimensional grid interval is obtained.
[0059] In another possible implementation, the total number of grid points may be preset first, and a preset two-dimensional grid interval may be determined according to the size of the target scanning area and the preset total number of grid points, and then the target scanning area may be divided according to the two-dimensional grid interval.
[0060] Optionally, the first scanning point can be any grid point in the two-dimensional grid. During the first scan, the first scanning point can be randomly selected from the two-dimensional grid, and the first scanning point can be scanned to obtain the electromagnetic field information of the first scanning point; in subsequent scans, the first scanning point can be all the grid points that have been scanned, or it can be the grid point of the last scan, and the embodiment of the present application does not limit this.
[0061] Optionally, the electromagnetic field information of each first scanning point may include the electromagnetic field strength of the first scanning point at multiple scanning frequencies, or the electromagnetic field strength at a preset scanning frequency may be used as the electromagnetic field information of the first scanning point, which is not limited to the embodiments of the present application.
[0062] S202, determining the gradient information and the scanning probability of each first scanning point according to each electromagnetic field information.
[0063] The gradient information is used to indicate the direction in which the electromagnetic field change in the target scanning area meets a preset threshold.
[0064] Optionally, the gradient information may be a vector operator, which may represent the direction and magnitude of the maximum change of the electromagnetic field in the target scanning area.
[0065] In one possible implementation, the gradient information of each first scanning point can be determined based on the electromagnetic field information of each first scanning point and a gradient operator, wherein the gradient operator can be used to measure the change in the intensity value in a planar two-dimensional electromagnetic field, and the gradient operator can be a Sobel operator, a Prewitt operator, a Laplacian operator, a Canny operator, etc. The embodiment of the present application does not limit the specific form of the gradient operator.
[0066] Optionally, the Sobel operator is a combination of Gaussian smoothing and differential operations, and has strong noise resistance. The Prewitt operator has certain noise suppression capabilities and can also reduce the impact of noise. The Canny operator uses a Gaussian filter to smooth the electromagnetic field information and can also effectively remove noise. The Laplacian operator identifies intensity changes in a two-dimensional grid by calculating the second-order derivative of the electromagnetic field information.
[0067] In another possible implementation, the gradient information of a first scanning point can be determined based on the electromagnetic field information of two first scanning points on the left and right of the first scanning point. The gradient information of the first scanning point can be obtained by dividing the difference between the electromagnetic field information of the two left and right scanning points by 2.
[0068] Optionally, in the initial stage, that is, before the first scan, there is no electromagnetic field information. For all grid points in the two-dimensional grid, the probability of each grid point can be calculated using uniform distribution. The initial probability of each grid point is , m×n can be the total number of grids in the two-dimensional grid. After obtaining the electromagnetic field information of the first scanning point, the scanning probability of each first scanning point can be updated according to the electromagnetic field information of each first scanning point. It can be understood that since the electromagnetic field information of each scanning point is different, the scanning probability of each first scanning point is also different.
[0069] Optionally, the scanning probability of each first scanning point may be determined according to a ratio of the electromagnetic field information of the first scanning point to the sum of the electromagnetic field information of all first scanning points.
[0070] S203, determining a plurality of second scanning points for the next scan according to each gradient information and the scan probability, until the number of scans meets a preset condition.
[0071] Optionally, the gradient information may include a gradient magnitude and a gradient direction.
[0072] In one possible implementation, multiple second scanning points for the next scan can be determined based on each gradient information and the scanning probability in the following manner: multiple basic scanning points are determined from multiple first scanning points based on the gradient value and the scanning probability of the first scanning point, where it can be understood that the number of basic scanning points is less than the number of first scanning points, and then multiple second scanning points are determined on a two-dimensional grid along the gradient direction of each basic scanning point with each basic scanning point as the starting point.
[0073] In another possible implementation, multiple second scanning points for the next scan can be determined based on the gradient information and the scanning probability in the following manner: randomly select multiple candidate scanning points other than the first scanning point in a two-dimensional grid, and determine multiple basic scanning points from the multiple first scanning points based on the gradient value of the first scanning point and the scanning probability, and use the candidate scanning points in the gradient direction of the first scanning point as the second scanning point.
[0074] Optionally, the scanning number satisfying the preset condition may be that the scanning number is greater than or equal to a scanning number threshold, and the scanning number threshold may be pre-set or adaptively adjusted.
[0075] Optionally, if the scanning number threshold is adaptively adjusted, its adjustment method is described as follows: after a scan is completed, the electromagnetic field distribution of the target scanning area is determined based on the electromagnetic field information of each scanning point. The scanning point may include a first scanning point and a second scanning point. If the resolution of the obtained electromagnetic field distribution meets the preset resolution, the current scanning number is used as the scanning number threshold. At this time, there is no need to determine the second scanning point and execute the scanning process; if the resolution of the obtained electromagnetic field distribution does not meet the preset resolution, the sum of the current scanning number and the preset scanning number increment is used as the scanning number threshold, and multiple second scanning points and the electromagnetic field information of each second scanning point are continued to be determined until the resolution of the electromagnetic field distribution meets the preset resolution.
[0076] S204, determining the electromagnetic field distribution of the target scanning area according to the electromagnetic field information of each scanning point in the two-dimensional grid.
[0077] Optionally, the scanning points may include a first scanning point and a second scanning point. During each scanning process, the electromagnetic field information of each scanning point is stored. After the number of scans meets a preset condition, the electromagnetic field distribution of the target scanning area is determined based on the stored electromagnetic field information of each scanning point.
[0078] Optionally, each scanning point may be an area with a strong electromagnetic field intensity in the target scanning area. Therefore, when determining the electromagnetic field distribution of the target scanning area, the electromagnetic field information of each scanning point may be directly used as the electromagnetic field distribution of the target scanning area. Interpolation processing may also be performed based on a two-dimensional interpolation algorithm and the electromagnetic field information of each scanning point to obtain the electromagnetic field information of all grid points in the target scanning area, and then the electromagnetic field distribution of the target scanning area is determined based on the electromagnetic field information of all grid points.
[0079] The above-mentioned near-field scanning method is used in the controller of the near-field scanning system, and the near-field scanning system includes a controller, a spectrum analyzer, a displacement mechanism and a scanning probe. The controller is connected to the spectrum analyzer and the displacement mechanism, and the displacement mechanism is connected to the scanning probe, and is used to move under the drive of the controller to drive the scanning probe to move in the target scanning area. First, the electromagnetic field information of each first scanning point in the two-dimensional grid is obtained, wherein the two-dimensional grid is determined according to the target scanning area, and the number of first scanning points is less than the total number of grid points in the two-dimensional grid; then, the gradient information and scanning probability of each first scanning point are determined according to each electromagnetic field information, wherein the gradient information is used to indicate the direction in which the electromagnetic field change in the target scanning area meets the preset threshold; again, multiple second scanning points for the next scan are determined according to each gradient information and scanning probability, until the number of scans meets the preset conditions; finally, the electromagnetic field distribution of the target scanning area is determined according to the electromagnetic field information of each scanning point in the two-dimensional grid. In this way, the position with higher electromagnetic field intensity in the target scanning area can be determined through the electromagnetic field information and scanning probability of the first scanning point, and the scanning points at the position with higher electromagnetic field intensity are scanned, skipping the background area, and there is no need to scan all scanning points in the target scanning area. In this way, the number of scanning points in the near-field scanning process can be reduced while ensuring the quality of the near-field scanning, thereby improving the efficiency of the near-field scanning and reducing the time consumed for the near-field scanning.
[0080] In an exemplary embodiment, as shown in FIG3 , optionally, determining the gradient information and the scanning probability of each first scanning point according to each electromagnetic field information includes the following steps 301 to 302 . Among them:
[0081] S301, determining the gradient information of each first scanning point according to a preset discrete gradient operator and each electromagnetic field information.
[0082] Optionally, the electromagnetic field information of each first scanning point may be the electromagnetic field strength of each first scanning point at a preset frequency. The electromagnetic field strength may include magnetic field strength and electric field strength. The magnetic field strength may be used to evaluate the magnetic field radiation generated by the device to be tested or the device in the device to be tested in the target scanning area, and to detect possible magnetic field interference or leakage; the electric field strength may be used to evaluate the electric field radiation generated by the device to be tested or the device in the device to be tested in the target scanning area, and to detect possible electric field interference or leakage.
[0083] Exemplarily, the preset discrete gradient operator may be a Sobel operator, which uses a 3×3 convolution kernel to approximate the gradient. It is understandable that the embodiment of the present application does not limit the size of the convolution kernel, which may be increased or decreased according to usage.
[0084] Optionally, when determining the gradient information of each first scanning point according to a preset discrete gradient operator, the gradient component in the horizontal direction and the gradient component in the vertical direction of each first scanning point can be calculated separately, and then the gradient component in the horizontal direction and the gradient component in the vertical direction can be merged to obtain the gradient information of each first scanning point.
[0085] Optionally, the convolution kernel of the Sobel operator in the horizontal direction is as follows:
[0086]
[0087] The horizontal gradient component G of the first scanning point x (x,y) can be calculated by the following formula:
[0088]
[0089] Among them, I(x, y) is the electromagnetic field information of the first scanning point, I(x-1, y-1) is the electromagnetic field information of the scanning point to the lower left of the first scanning point in the two-dimensional grid, I(x-1, y) is the electromagnetic field information of the scanning point to the left of the first scanning point in the two-dimensional grid, I(x-1, y+1) is the electromagnetic field information of the scanning point to the upper left of the first scanning point in the two-dimensional grid, I(x+1, y) is the electromagnetic field information of the scanning point to the right of the first scanning point in the two-dimensional grid, and I(x+1, y+1) is the electromagnetic field information of the scanning point to the upper right of the first scanning point in the two-dimensional grid.
[0090] Optionally, the convolution kernel of the Sobel operator in the vertical direction is as follows:
[0091]
[0092] The vertical gradient component G of the first scanning point y (x,y) can be expressed by the following formula:
[0093]
[0094] In a possible implementation, after determining the gradient components in the horizontal direction and the vertical direction of the first scanning point, the gradient value grad_magnitude of the first scanning point can be determined by the following formula:
[0095]
[0096] In another possible implementation, after determining the gradient components in the horizontal direction and the vertical direction of the first scanning point, the gradient value grad_magnitude of the first scanning point may also be determined by the following formula:
[0097]
[0098] Optional, gradient direction It can be determined according to the following formula:
[0099]
[0100] S302, determining the scanning probability of each first scanning point according to the softmax function and each electromagnetic field information.
[0101] Optionally, the electromagnetic field information of each first scanning point may be subjected to an exponential operation through a softmax function, so that larger values may be amplified and smaller values may be suppressed, thereby skipping background areas with smaller electromagnetic field information.
[0102] Optionally, after obtaining the scanning probability of each first scanning point, the scanning probability of each first scanning point may be determined by the following formula:
[0103]
[0104] in, ) is the scanning probability of the first scanning grid located at the position (x, y) of the two-dimensional grid, Represents an exponential function.
[0105] The above method determines the gradient information of each first scanning point according to a preset discrete gradient operator and each electromagnetic field information, and determines the scanning probability of each first scanning point according to the softmax function and each electromagnetic field information. In this way, the position with a larger electromagnetic field intensity in the target scanning area can be determined according to the gradient information and the scanning probability, and the scanning points at the position with a larger electromagnetic field intensity are scanned, skipping the background area, which can reduce the number of scanning points in the near-field scanning process, thereby improving the efficiency of near-field scanning.
[0106] In an exemplary embodiment, as shown in FIG4 , optionally, the gradient information includes a gradient value and a gradient direction, and a plurality of second scanning points for the next scan are determined according to each gradient information and the scanning probability, including the following steps 401 to 403. Among them:
[0107] S401, determining a plurality of basic scanning points from the first scanning point according to the gradient value and the scanning probability.
[0108] The number of basic scanning points is smaller than the number of first scanning points.
[0109] Optionally, a basic scanning point may be determined from a plurality of first scanning points according to the gradient value and the scanning probability of each first scanning point.
[0110] In one possible implementation, mathematical operations can be performed based on the gradient value and the scanning probability of each first scanning point. For example, the gradient value and the scanning probability of each first scanning point are added or multiplied to obtain a target value of each first scanning point. Then, the first scanning points are sorted in positive order according to the target value, and based on the number of basic scanning points, the first scanning point in front is selected from the sorted first scanning points as the basic scanning point.
[0111] In another possible implementation, multiple first scanning points whose gradient values and / or scanning probabilities are greater than a preset threshold may be used as basic scanning points. For example, the first scanning point whose gradient value is greater than the preset gradient threshold may be used as the basic scanning point, or the first scanning point whose scanning probability is greater than the preset probability may be used as the basic scanning point, or the first scanning point whose gradient value is greater than the preset gradient threshold and whose scanning probability is greater than the preset probability may be used as the basic scanning point. Mathematical operations may also be performed based on the gradient values and scanning probabilities of each first scanning point to obtain a target value for each first scanning point, and the first scanning point whose target value is greater than the preset target threshold may be used as the basic scanning point.
[0112] S402, determining a plurality of second scanning points according to the gradient direction of each basic scanning point and the moving step length of the displacement mechanism.
[0113] Optionally, after the basic scanning points are determined, the number of the second scanning points may be less than or equal to the number of the basic scanning points. It is understandable that one basic scanning point corresponds to at most one second scanning point.
[0114] Optionally, the second scanning point may be a grid point in the two-dimensional grid that has not been scanned.
[0115] Optionally, starting from the basic scanning point, move a moving step along the gradient direction of the basic scanning point. If the grid point reached has not been scanned, the grid point is used as the second scanning point. If the grid point reached is the first scanning point, continue to move a moving step along the gradient direction until the grid point reached has not been scanned or reaches the edge of the two-dimensional grid.
[0116] S403, scanning each second scanning point.
[0117] Optionally, the method of scanning each second scanning point is consistent with the method of scanning each first scanning point in step 201, which is not described in detail in the embodiment of the present application.
[0118] In the above method, multiple basic scanning points are determined from the first scanning points according to the gradient value and the scanning probability, multiple second scanning points are determined according to the gradient direction of each basic scanning point and the moving step length of the displacement mechanism, and each second scanning point is scanned. In this way, the position with a larger electromagnetic field intensity in the target scanning area can be determined, and the scanning points at the position with a larger electromagnetic field intensity can be scanned, and the background area can be skipped, so that the number of scanning points in the near-field scanning process can be reduced, thereby improving the efficiency of the near-field scanning.
[0119] In an exemplary embodiment, as shown in FIG5 , optionally, multiple second scanning points for the next scan are determined according to each gradient information and the scanning probability until the number of scans meets a preset condition, including the following steps 501 to 503. Among them:
[0120] S501, acquiring electromagnetic field information of each second scanning point.
[0121] Optionally, after scanning each second scanning point, the electromagnetic field strength of each second scanning point at a preset frequency is obtained.
[0122] S502: Update the first scanning points according to the second scanning points to increase the number of the first scanning points.
[0123] Optionally, a first scanning point set may be established based on the first scanning point, and the second scanning point after scanning may be added to the first scanning point set, so as to determine the second scanning point for the next scan based on the second scanning point after scanning and the previous first scanning point.
[0124] S503, determining a second scanning point for the next scan according to the updated electromagnetic field information of the first scanning point, until the number of scans meets a preset condition.
[0125] Optionally, the updated first scanning point may be a scanned grid point in the two-dimensional grid.
[0126] Optionally, the scanning probability of the first scanning point is updated according to the updated electromagnetic field information of the first scanning point, and the second scanning point for the next scan is determined according to the gradient information and scanning probability of each first scanning point. The specific determination method is consistent with that in steps 401 to 403 and will not be repeated in the embodiments of the present application.
[0127] In an exemplary embodiment, as shown in FIG6 , optionally, obtaining electromagnetic field information of each first scanning point in a two-dimensional grid includes the following steps 601 to 602 . Among them:
[0128] S601, determining a two-dimensional grid of the target scanning area according to the size of the target scanning area and the moving step length of the displacement mechanism.
[0129] Optionally, in the target scanning area, the smaller the moving step size is, the more grid points there are in the two-dimensional grid, and the higher the scanning accuracy is.
[0130] Optionally, after the size of the target scanning area is acquired, the target scanning area may be divided into two-dimensional grids according to the moving step length, and the grid interval in the two-dimensional grid may be the moving step length.
[0131] Optionally, the moving step may be a scanning step of the scanning probe, that is, each time the shift mechanism moves a moving step, the scanning probe will scan the grid points directly below the shift mechanism.
[0132] S602, selecting a plurality of first scanning points in a two-dimensional grid, and determining electromagnetic field information of each first scanning point.
[0133] Optionally, after determining the two-dimensional grid, the target scanning area can be scanned based on the two-dimensional grid. The embodiment of the present application is an embodiment of acquiring electromagnetic field information of each first scanning point when scanning the target scanning area for the first time.
[0134] Optionally, the first scanning point may be pre-set, and when the target area is scanned for the first time, the pre-set first scanning point and the position information of each first scanning point may be obtained from a configuration file or a database.
[0135] Optionally, after selecting a plurality of first scanning points, each first scanning point may be scanned by a scanning probe to determine the electromagnetic field information of each first scanning point.
[0136] The above-mentioned method determines the two-dimensional grid of the target scanning area according to the size of the target scanning area and the moving step length of the displacement mechanism, selects multiple first scanning points in the two-dimensional grid, and determines the electromagnetic field information of each first scanning point. The electromagnetic field information of the first scanning point can be determined, so that the second scanning point for the next scan can be determined according to the electromagnetic field information of the first scanning point. Scanning all grid points in the two-dimensional grid can be avoided, and the efficiency of near-field scanning can be improved.
[0137] In an exemplary embodiment, as shown in FIG7 , optionally, selecting a plurality of first scanning points in a two-dimensional grid and determining the electromagnetic field information of each first scanning point includes the following steps 701 to 702 . Among them:
[0138] S701, obtaining the number of first scanning points.
[0139] Optionally, the number of first scanning points can be determined by obtaining a preset value, or can be determined based on the total number of grid points in the two-dimensional grid. It can be understood that when the total number of grid points in the two-dimensional grid is large, the number of first scanning points can be appropriately increased. Exemplarily, the number of first scanning points can be determined by obtaining the ratio of the preset number of first scanning points to the total number of grid points in the two-dimensional grid.
[0140] S702: Determine the position information of each first scanning point in the two-dimensional grid according to a preset random algorithm.
[0141] In a possible implementation manner, a plurality of random numbers may be generated according to a preset random number algorithm, and a plurality of first scanning points and position information of each first scanning point may be determined from a two-dimensional grid according to the random numbers.
[0142] In another possible implementation, multiple first scanning points can be determined based on Poisson disk sampling. An initial point can be randomly set from a two-dimensional grid, and a circular area with a radius r is generated with the initial point as the center. Then, a new point is randomly sampled in the circular area, and the sampled point is used as a first scanning point. By continuously repeating this process, the first scanning points that meet the quantity requirements can be obtained, and the position information of each first scanning point can be determined. By determining the first scanning point in the manner adopted by the Poisson disk, the distribution of the first scanning points can be made more uniform while maintaining randomness, which can make up for the shortcomings of random sampling.
[0143] S703, scanning each first scanning point to determine the electromagnetic field information of each first scanning point.
[0144] Optionally, as shown in FIG8 , scanning each first scanning point to determine the electromagnetic field information of each first scanning point includes the following steps 801 to 802. Among them:
[0145] S801, driving the displacement mechanism according to each position information, so that the scanning probe scans each first scanning point in sequence.
[0146] Optionally, the distance that the displacement mechanism needs to move may be determined based on the position information of each first scanning point and the current position information of the displacement mechanism, and the displacement mechanism may be driven in combination with the moving step length.
[0147] Optionally, when driving the shift mechanism to scan each first scanning point, the fastest moving route can be determined according to a preset path optimization algorithm, and each first scanning point can be scanned in sequence according to the moving route.
[0148] S802, acquiring the induced voltage of each first scanning point, and determining the electromagnetic field information of each first scanning point according to each induced voltage.
[0149] Optionally, each first scanning point is scanned by a scanning probe, and the principle of determining the electromagnetic field information of each first scanning point is as follows: according to Faraday's electromagnetic induction constant, the changing magnetic field in each scanning point passes through the magnetic ring of the scanning probe, which will cause the magnetic flux of the magnetic ring to change, and then generate an induced electromotive force. Therefore, during the scanning process, after the induced voltage of the scanning probe is obtained through the spectrum analyzer, the electromagnetic field information of each first scanning point can be determined based on the corresponding relationship between the induced voltage and the electromagnetic field strength.
[0150] By obtaining the number of first scanning points, the position information of each first scanning point in the two-dimensional grid is determined according to a preset random algorithm, and each first scanning point is scanned to determine the electromagnetic field information of each first scanning point. By first determining the electromagnetic field information of the first scanning point, and then determining the second scanning point for the next scan according to the electromagnetic field information of the first scanning point, scanning of all grid points in the two-dimensional grid can be avoided, and the number of scanning points in the near-field scanning process can be reduced, thereby improving the efficiency of the near-field scanning.
[0151] As an optional implementation, as shown in FIG9 , the near-field scanning method provided in the embodiment of the present application may include the following specific steps:
[0152] S901, determining a two-dimensional grid of the target scanning area according to the size of the target scanning area and the moving step length of the displacement mechanism.
[0153] The two-dimensional grid is determined according to the target scanning area, and the number of the first scanning points is less than the total number of grid points in the two-dimensional grid.
[0154] S902, obtaining the number of first scanning points.
[0155] S903: Determine the position information of each first scanning point in the two-dimensional grid according to a preset random algorithm.
[0156] S904, driving the displacement mechanism according to each position information, so that the scanning probe scans each first scanning point in sequence.
[0157] S905, acquiring the induced voltage of each first scanning point, and determining the electromagnetic field information of each first scanning point according to each induced voltage.
[0158] S906, determining the gradient information of each first scanning point according to a preset discrete gradient operator and each electromagnetic field information.
[0159] The gradient information is used to indicate the direction in which the electromagnetic field change in the target scanning area meets a preset threshold, and the gradient information includes a gradient value and a gradient direction.
[0160] S907, determining the scanning probability of each first scanning point according to the softmax function and each electromagnetic field information.
[0161] S908, determining a plurality of basic scanning points from the first scanning points according to the gradient value and the scanning probability.
[0162] The number of basic scanning points is smaller than the number of first scanning points.
[0163] S909, determining a plurality of second scanning points according to the gradient direction of each basic scanning point and the moving step length of the displacement mechanism.
[0164] S910, scanning each second scanning point to obtain electromagnetic field information of each second scanning point.
[0165] S911, update the first scanning points according to each second scanning point to increase the number of first scanning points.
[0166] S912, determine whether the number of scans meets the preset conditions. If the number of scans does not meet the preset conditions, execute steps 906 to 911. If the number of scans meets the preset conditions, execute step 913.
[0167] S913, determining the electromagnetic field distribution of the target scanning area according to the electromagnetic field information of each scanning point in the two-dimensional grid.
[0168] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0169] Based on the same inventive concept, the embodiment of the present application also provides a near-field scanning device for implementing the near-field scanning method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more near-field scanning device embodiments provided below can refer to the above limitations on the near-field scanning method, and will not be repeated here.
[0170] In an exemplary embodiment, as shown in FIG10 , a near-field scanning device 1000 is provided, which is arranged in a controller of a near-field scanning system. The near-field scanning system includes a controller, a spectrum analyzer, a displacement mechanism and a scanning probe. The controller is connected to the spectrum analyzer and the displacement mechanism. The displacement mechanism is connected to the scanning probe and is used to move under the drive of the controller to drive the scanning probe to move within a target scanning area. The near-field scanning device includes: an acquisition module 1001, a first determination module 1002, a second determination module 1003 and a third determination module 1004, wherein:
[0171] An acquisition module 1001 is used to acquire electromagnetic field information of each first scanning point in a two-dimensional grid, where the two-dimensional grid is determined according to a target scanning area, and the number of the first scanning points is less than the total number of grid points in the two-dimensional grid;
[0172] A first determination module 1002 is used to determine the gradient information and the scanning probability of each first scanning point according to each electromagnetic field information, wherein the gradient information is used to indicate the direction in which the electromagnetic field change in the target scanning area meets a preset threshold;
[0173] A second determination module 1003 is used to determine a plurality of second scanning points for the next scan according to each gradient information and the scanning probability, until the number of scans meets a preset condition;
[0174] The third determination module 1004 determines the electromagnetic field distribution of the target scanning area according to the electromagnetic field information of each scanning point in the two-dimensional grid.
[0175] In an exemplary embodiment, the first determination module 1002 is specifically configured to determine the gradient information of each first scanning point according to a preset discrete gradient operator and each electromagnetic field information; and determine the scanning probability of each first scanning point according to a softmax function and each electromagnetic field information.
[0176] In an exemplary embodiment, the gradient information includes a gradient value and a gradient direction. The second determination module 1003 is specifically used to determine multiple basic scanning points from the first scanning points according to the gradient value and the scanning probability, and the number of basic scanning points is less than the number of first scanning points; determine multiple second scanning points according to the gradient direction of each basic scanning point and the moving step length of the displacement mechanism; and scan each second scanning point.
[0177] In an exemplary embodiment, the second determination module 1003 is specifically used to obtain the electromagnetic field information of each second scanning point; update the first scanning point according to each second scanning point to increase the number of first scanning points; determine the second scanning point for the next scan according to the electromagnetic field information of the updated first scanning point, until the number of scans meets the preset conditions.
[0178] In an exemplary embodiment, the acquisition module 1001 is specifically used to determine a two-dimensional grid of the target scanning area according to the size of the target scanning area and the moving step of the displacement mechanism; select multiple first scanning points in the two-dimensional grid, and determine the electromagnetic field information of each first scanning point.
[0179] In an exemplary embodiment, the acquisition module 1001 is specifically used to obtain the number of first scanning points; determine the position information of each first scanning point in the two-dimensional grid according to a preset random algorithm; and scan each first scanning point to determine the electromagnetic field information of each first scanning point.
[0180] In an exemplary embodiment, the acquisition module 1001 is specifically used to drive the displacement mechanism according to each position information, so that the scanning probe scans each first scanning point in turn; obtain the induced voltage of each first scanning point, and determine the electromagnetic field information of each first scanning point according to each induced voltage.
[0181] Each module in the near-field scanning device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0182] In an exemplary embodiment, a computer device is provided, which may be an industrial computer, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the near-field scanning method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a near-field scanning method is implemented.
[0183] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0184] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps described in any of the above method embodiments when executing the computer program.
[0185] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps described in any of the above method embodiments are implemented.
[0186] In an exemplary embodiment, a computer program product is provided, including a computer program, which implements the steps described in any of the above method embodiments when executed by a processor.
[0187] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0188] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0189] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A near-field scanning method, characterized in that: In a controller for a near-field scanning system, the near-field scanning system comprises a controller, a spectrum analyzer, a displacement mechanism and a scanning probe, the controller is connected to the spectrum analyzer and the displacement mechanism, the displacement mechanism is connected to the scanning probe and is used to move under the drive of the controller to drive the scanning probe to move within a target scanning area, the method comprises: Acquire electromagnetic field information of each first scanning point in a two-dimensional grid, wherein the two-dimensional grid is determined according to the target scanning area, and the number of the first scanning points is less than the total number of grid points in the two-dimensional grid; Determine the gradient information and the scanning probability of each of the first scanning points according to each of the electromagnetic field information, wherein the gradient information is used to indicate the direction in which the electromagnetic field change in the target scanning area meets a preset threshold; Determining a plurality of second scanning points for the next scan according to each of the gradient information and the scanning probability until the number of scans meets a preset condition; The electromagnetic field distribution of the target scanning area is determined according to the electromagnetic field information of each scanning point in the two-dimensional grid.
2. The method according to claim 1, characterized in that The step of determining the gradient information and the scanning probability of each of the first scanning points according to each of the electromagnetic field information comprises: Determining the gradient information of each of the first scanning points according to a preset discrete gradient operator and each of the electromagnetic field information; The scanning probability of each of the first scanning points is determined according to the softmax function and the electromagnetic field information.
3. The method according to claim 1, characterized in that The gradient information includes a gradient value and a gradient direction, and the determining of a plurality of second scanning points for the next scanning according to each of the gradient information and the scanning probability includes: Determine a plurality of basic scanning points from the first scanning points according to the gradient value and the scanning probability, wherein the number of the basic scanning points is less than the number of the first scanning points; Determine a plurality of second scanning points according to the gradient direction of each of the basic scanning points and the moving step length of the displacement mechanism; Scan each of the second scanning points.
4. The method according to claim 3, characterized in that The step of determining a plurality of second scanning points for the next scanning according to each of the gradient information and the scanning probability until the number of scanning times meets a preset condition comprises: Acquiring electromagnetic field information of each of the second scanning points; updating the first scanning points according to each of the second scanning points to increase the number of the first scanning points; The second scanning point for the next scan is determined according to the updated electromagnetic field information of the first scanning point until the number of scans meets the preset condition.
5. The method according to claim 1, characterized in that The step of obtaining electromagnetic field information of each first scanning point in the two-dimensional grid includes: Determining a two-dimensional grid of the target scanning area according to the size of the target scanning area and the moving step length of the displacement mechanism; A plurality of first scanning points are selected in the two-dimensional grid, and electromagnetic field information of each of the first scanning points is determined.
6. The method according to claim 5, characterized in that The step of selecting a plurality of first scanning points in the two-dimensional grid and determining electromagnetic field information of each of the first scanning points includes: Get the number of the first scanning points; Determine the position information of each of the first scanning points in the two-dimensional grid according to a preset random algorithm; Scan each of the first scanning points to determine the electromagnetic field information of each of the first scanning points.
7. The method according to claim 6, characterized in that The scanning of each of the first scanning points to determine the electromagnetic field information of each of the first scanning points includes: Driving the displacement mechanism according to each of the position information so that the scanning probe scans each of the first scanning points in sequence; The induced voltage of each first scanning point is acquired, and the electromagnetic field information of each first scanning point is determined according to each induced voltage.
8. A near-field scanning device, characterized in that: The device is arranged in a controller of a near-field scanning system, wherein the near-field scanning system comprises a controller, a spectrum analyzer, a displacement mechanism and a scanning probe, wherein the controller is connected to the spectrum analyzer and the displacement mechanism, and the displacement mechanism is connected to the scanning probe and is used to move under the drive of the controller to drive the scanning probe to move within a target scanning area. The device comprises: An acquisition module, used to acquire electromagnetic field information of each first scanning point in a two-dimensional grid, wherein the two-dimensional grid is determined according to the target scanning area, and the number of the first scanning points is less than the total number of grid points in the two-dimensional grid; A first determination module, configured to determine the gradient information and the scanning probability of each of the first scanning points according to each of the electromagnetic field information, wherein the gradient information is used to indicate the direction in which the electromagnetic field change in the target scanning area meets a preset threshold; A second determination module, used for determining a plurality of second scanning points for the next scan according to each of the gradient information and the scanning probability, until the number of scans meets a preset condition; The third determination module determines the electromagnetic field distribution of the target scanning area according to the electromagnetic field information of each scanning point in the two-dimensional grid.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.