Method and device for determining particle boundary

By automatically determining the particle boundary calculation parameters and performing qualification checks, the problem of low efficiency in particle boundary determination in existing technologies is solved, achieving fast and convenient particle boundary determination that adapts to changes in particle distribution at different times.

CN121859680APending Publication Date: 2026-04-14北京中科三清环境技术有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
北京中科三清环境技术有限公司
Filing Date
2025-12-08
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing methods for determining particle boundaries based on particle position are inefficient and labor-intensive, especially in the case of sudden water pollution incidents where it is difficult to quickly determine the scope of pollution impact.

Method used

By acquiring target particle distribution data, the boundary calculation parameters are automatically determined based on particle distribution characteristics and control parameters. The boundary calculation algorithm is then used to perform a pass/fail check repeatedly until a pass/fail result is obtained. The parameters are dynamically adjusted to adapt to changes in particle distribution at different times.

Benefits of technology

It improves the efficiency of particle boundary determination, reduces computational complexity, saves human resources, and enables convenient and rapid determination of particle boundaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121859680A_ABST
    Figure CN121859680A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and a device for determining a particle boundary, relates to the technical field of water environments, and is used for conveniently and quickly determining the particle boundary. The method comprises the following steps: acquiring target particle distribution data at a first moment, and determining a target value of a boundary calculation parameter of a boundary calculation algorithm based on a particle distribution characteristic and a control parameter represented by the target particle distribution data; executing a boundary calculation algorithm by adopting the target value to obtain a boundary calculation result corresponding to the first moment; circularly executing qualification inspection operation, and ending circulation until a qualified boundary calculation result is obtained or the number of circulation times reaches the maximum number of circulation times; wherein the qualification inspection operation comprises the steps of performing qualification inspection on the boundary calculation result, adding 1 to the cycle index when the qualification inspection is not passed, and executing a boundary calculation algorithm based on the control parameter, the target value and the adjusted target value to obtain the boundary calculation result again.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of water environment technology, and in particular to a method and apparatus for determining particle boundaries. Background Technology

[0002] When a sudden water pollution incident occurs in the surface water environment, it is necessary to quickly determine the scope of the pollution's impact. While particle physics algorithms can rapidly obtain particle positions at different times, these positions alone are insufficient to determine the specific scope of impact. Further determination of particle boundaries based on their positions is required to ascertain the extent of the pollution's influence.

[0003] In existing technologies, methods for determining particle boundaries based on particle position include the Alpha Shapes method. The Alpha Shapes method is a geometric algorithm for extracting point cloud boundaries. Intuitively, the Alpha Shapes method can be understood as "rolling" a circle of radius α across the point cloud to determine which points and line segments belong to the boundary. The Alpha Shapes method requires setting a parameter α, and the final polygon's side length is always less than or equal to α.

[0004] However, due to particle diffusion, the particle distribution is different at different times, and the most suitable parameters are also different at different times. A lot of manual adjustments are needed to determine the parameters at each time, resulting in low efficiency and a large workload in determining the particle boundary. Summary of the Invention

[0005] This application provides a method and apparatus for determining particle boundaries, which automatically determines the boundary calculation parameters at each time step, thereby conveniently and quickly determining the particle boundaries.

[0006] In a first aspect, embodiments of this application provide a method for determining particle boundaries, the method comprising: The target particle distribution data at the first moment is obtained, and the target values ​​of the boundary calculation parameters of the boundary calculation algorithm are determined based on the particle distribution characteristics and control parameters represented by the target particle distribution data. The control parameters are the parameters used to determine the boundary calculation parameters. The boundary calculation algorithm is executed using the target value to obtain the boundary calculation result corresponding to the first time step; The pass / fail check operation is performed repeatedly until a pass / fail boundary calculation result is obtained or the loop count reaches the maximum number of loops. The pass / fail check operation includes: performing a pass / fail check on the boundary calculation result; if the pass / fail check fails, incrementing the loop count by 1; adjusting the target value based on the control parameters; and executing the boundary calculation algorithm with the adjusted target value to obtain the boundary calculation result again.

[0007] In one optional embodiment, the boundary calculation algorithm is the Alpha Shapes method, and the boundary calculation parameters include a radius parameter and a tolerance parameter. The control parameters include the initial value of the radius parameter and the tolerance coefficient. Based on the particle distribution characteristics and control parameters represented by the target particle distribution data, the boundary calculation parameters of the boundary calculation algorithm are determined, including: Based on the coordinate values ​​of each particle in the target particle distribution data, the nearest neighboring particle to each particle is determined, and the distance between each particle and its neighboring particles is used as a candidate distance. Based on the obtained candidate distances, the target distance is determined. Based on the initial values ​​of the target distance and radius parameters, the target value of the radius parameter is obtained; The target value of the tolerance parameter is obtained based on the target value of the radius parameter and the tolerance coefficient.

[0008] In an optional embodiment, the conformity check includes: topology check and coverage check. Therefore, the conformity check of the boundary calculation results includes: If the topology test or the coverage test of the boundary calculation results fails, then the qualification test of the boundary calculation results is deemed to have failed.

[0009] In an optional embodiment, the control parameter further includes: the maximum number of rings, then the method further includes: Based on the boundary calculation results, an undirected graph is constructed. The edges of the undirected graph are the boundary edges included in the boundary calculation results, and the vertices of the undirected graph are the endpoints of the boundary edges. Determine the number of fundamental cyclic bases in an undirected graph; If the number of basic cyclic bases is greater than the maximum number of cycles or equal to 0, the topology test of the boundary calculation results will fail.

[0010] In an optional embodiment, the control parameter further includes: minimum coverage rate, then the method further includes: Each basic cyclic basis is converted into a sub-boundary polygon, and the obtained at least one sub-boundary polygon is merged to obtain at least one target boundary polygon; Based on the coordinate values ​​of each particle contained in the target particle distribution data, determine the particle coverage within at least one target boundary polygon. If the particle coverage is less than the minimum coverage, the coverage test of the boundary calculation results will fail.

[0011] In one optional embodiment, acquiring target particle distribution data at a first moment includes: Obtain the initial particle distribution data at the first moment. The initial particle distribution data includes the coordinates of the spatial position of each particle. The initial particle distribution data is preprocessed to obtain the target particle distribution data. The preprocessing includes coordinate translation processing, which involves traversing the coordinate values ​​of each particle's spatial position, determining the minimum coordinate value, and subtracting the minimum coordinate value from the coordinate values ​​of each particle.

[0012] In an optional embodiment, after performing a conformity check on the boundary calculation results, the method further includes: When the qualification test is passed, a qualified boundary calculation result is obtained, and the point coordinates of at least one target boundary polygon corresponding to the qualified boundary calculation result are obtained. The final boundary calculation result is obtained by adding the minimum coordinate value to the point coordinates of at least one target boundary polygon.

[0013] In one alternative embodiment, the control parameters include an adjustment factor used to adjust the target value of the radius parameter; Based on the control parameters, the target value is adjusted, including: Based on the target value of the radius parameter and the adjustment coefficient, the adjusted target value of the radius parameter is obtained; Based on the target value of the adjusted radius parameter and the tolerance coefficient, the target value of the adjusted tolerance parameter is obtained.

[0014] In an optional embodiment, the method further includes: When the maximum number of iterations is reached, update the control parameters.

[0015] Secondly, embodiments of this application also provide a device for determining particle boundaries, the device comprising: The processing module is used to acquire the target particle distribution data at the first moment, and based on the particle distribution characteristics and control parameters represented by the target particle distribution data, determine the target value of the boundary calculation parameters of the boundary calculation algorithm, wherein the control parameters are the parameters used to determine the boundary calculation parameters. The execution module is used to execute the boundary calculation algorithm with the target value to obtain the boundary calculation result corresponding to the first time step. The inspection module is used to repeatedly perform a pass / fail inspection operation until a pass / fail boundary calculation result is obtained or the loop count reaches the maximum number of loops. The pass / fail inspection operation includes: performing a pass / fail inspection on the boundary calculation result; if the pass / fail inspection fails, incrementing the loop count by 1; adjusting the target value based on the control parameters; and executing the boundary calculation algorithm with the adjusted target value to obtain the boundary calculation result again.

[0016] In one optional embodiment, the boundary calculation algorithm is the Alpha Shapes method, and the boundary calculation parameters include a radius parameter and a tolerance parameter. The control parameters include the initial value of the radius parameter and the tolerance coefficient. When determining the boundary calculation parameters of the boundary calculation algorithm based on the particle distribution characteristics and control parameters represented by the target particle distribution data, the processing module is also used for: Based on the coordinate values ​​of each particle in the target particle distribution data, the nearest neighboring particle to each particle is determined, and the distance between each particle and its neighboring particles is used as a candidate distance. Based on the obtained candidate distances, the target distance is determined. Based on the initial values ​​of the target distance and radius parameters, the target value of the radius parameter is obtained; The target value of the tolerance parameter is obtained based on the target value of the radius parameter and the tolerance coefficient.

[0017] In an optional embodiment, the conformity check includes: topology check and coverage check. When performing a conformity check on the boundary calculation results, the check module is further used for: If the topology test or the coverage test of the boundary calculation results fails, then the qualification test of the boundary calculation results is deemed to have failed.

[0018] In an optional embodiment, the control parameters further include: maximum number of rings, and the inspection module is further configured to: Based on the boundary calculation results, an undirected graph is constructed. The edges of the undirected graph are the boundary edges included in the boundary calculation results, and the vertices of the undirected graph are the endpoints of the boundary edges. Determine the number of fundamental cyclic bases in an undirected graph; If the number of basic cyclic bases is greater than the maximum number of cycles or equal to 0, the topology test of the boundary calculation results will fail.

[0019] In an optional embodiment, the control parameters further include: minimum coverage rate, and the verification module is further configured to: Each basic cyclic basis is converted into a sub-boundary polygon, and the obtained at least one sub-boundary polygon is merged to obtain at least one target boundary polygon; Based on the coordinate values ​​of each particle contained in the target particle distribution data, determine the particle coverage within at least one target boundary polygon. If the particle coverage is less than the minimum coverage, the coverage test of the boundary calculation results will fail.

[0020] In an optional embodiment, when acquiring the target particle distribution data at the first moment, the processing module is further configured to: Obtain the initial particle distribution data at the first moment. The initial particle distribution data includes the coordinates of the spatial position of each particle. The initial particle distribution data is preprocessed to obtain the target particle distribution data. The preprocessing includes coordinate translation processing, which involves traversing the coordinate values ​​of each particle's spatial position, determining the minimum coordinate value, and subtracting the minimum coordinate value from the coordinate values ​​of each particle.

[0021] In an optional embodiment, after performing a conformity check on the boundary calculation results, the inspection module is further configured to: When the qualification test is passed, a qualified boundary calculation result is obtained, and the point coordinates of at least one target boundary polygon corresponding to the qualified boundary calculation result are obtained. The final boundary calculation result is obtained by adding the minimum coordinate value to the point coordinates of at least one target boundary polygon.

[0022] In one alternative embodiment, the control parameters include an adjustment factor used to adjust the target value of the radius parameter; When adjusting the target value based on the control parameters, the inspection module is also used for: Based on the target value of the radius parameter and the adjustment coefficient, the adjusted target value of the radius parameter is obtained; Based on the target value of the adjusted radius parameter and the tolerance coefficient, the target value of the adjusted tolerance parameter is obtained.

[0023] In an optional embodiment, the verification module is further configured to: When the maximum number of iterations is reached, update the control parameters.

[0024] Thirdly, embodiments of this application also provide an electronic device, including: Processor; and Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the particle boundary determination method as described in the first aspect.

[0025] Fourthly, embodiments of this application also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the particle boundary determination method as described in the first aspect.

[0026] Fifthly, this application provides a computer program product that, when invoked by a computer, causes the computer to execute the particle boundary determination method steps as described in the first aspect.

[0027] The beneficial effects of this application are as follows: In the particle boundary determination method provided in this application embodiment, target particle distribution data at a first moment is acquired. Based on the particle distribution characteristics and control parameters represented by the target particle distribution data, the target value of the boundary calculation parameters of the boundary calculation algorithm is determined. Then, the boundary calculation algorithm is executed using the target value to obtain the boundary calculation result corresponding to the first moment. Finally, a pass / fail check operation is performed repeatedly until a pass / fail boundary calculation result is obtained or the loop count reaches the maximum number of loops. The pass / fail check operation includes: performing a pass / fail check on the boundary calculation result; if the pass / fail check fails, the loop count is incremented by 1, and the target value is adjusted based on the control parameters. The boundary calculation algorithm is then executed using the adjusted target value to obtain the boundary calculation result again. In this way, based on the control parameters and the particle distribution characteristics at the first moment, the boundary calculation parameters at the first moment are adaptively determined. Then, the pass / fail check operation is performed repeatedly to further adjust the boundary calculation parameters, quickly obtaining boundary calculation parameters with reasonable values. There is no need for manual debugging of the boundary calculation parameters at each moment, which improves the efficiency of boundary determination and reduces the complexity of boundary calculation parameter determination, saves human resources, and thus achieves convenient and rapid determination of particle boundaries. In this way, by simply using control parameters and combining them with the automatic adjustment of the conformity inspection operation and boundary calculation parameters, the values ​​of the boundary calculation parameters at different times can be dynamically determined.

[0028] Furthermore, other features and advantages of this application will be set forth in the following description and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described herein are used to provide a further understanding of this application, constitute a part of this application, and do not constitute an improper limitation of this application. In the accompanying drawings: Figure 1 This is a schematic diagram of an optional system architecture applicable to the embodiments of this application; Figure 2 A schematic diagram illustrating the implementation process of a method for determining particle boundaries provided in this application embodiment; Figure 3 This is a schematic diagram of another implementation of a method for determining particle boundaries provided in this application. Figure 4 A schematic diagram of a particle boundary determination device provided in an embodiment of this application; Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0030] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0031] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.

[0032] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc., mentioned in this application are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0033] It should be noted that the terms "a" and "a plurality of" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0034] The names of the messages or information exchanged between multiple devices in the embodiments of this application are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0035] The design concept of the embodiments of this application is briefly introduced below: When a sudden water pollution incident occurs in the surface water environment, it is necessary to quickly determine the scope of the pollution's impact in order to take emergency measures and minimize losses. While particle physics algorithms can quickly obtain particle positions at different times, these positions alone are insufficient to determine the specific scope of impact. Further determination of particle boundaries based on their positions is required to define the extent of the pollution's influence.

[0036] In existing technologies, methods for determining particle boundaries based on particle position include: human experience judgment, convex hull method, and Alpha Shapes method.

[0037] One method is manual judgment, which involves drawing boundaries based on experience from a scatter plot. However, for data with a large number of particles distributed over multiple time periods, manual judgment is labor-intensive and time-consuming.

[0038] The convex hull method states that in a real vector space V, for a given set of points X, the intersection S of all convex sets containing X is called the convex hull of X. For a two-dimensional plane, the convex hull is the smallest convex polygon S covering the point set X on the plane. For relatively regular particle distributions in relatively open water, the convex hull method is mature and does not require empirical parameter setting. However, it performs poorly for particles in winding river channels.

[0039] Alpha Shapes is a geometric algorithm for extracting point cloud boundaries. Intuitively, it can be understood as "rolling" a circle of radius α across the point cloud to determine which points and line segments belong to the boundary. Alpha Shapes requires setting a parameter α, and the resulting polygons have sides less than or equal to α. Compared to the convex hull method, Alpha Shapes provides more detailed boundary characterization and performs slightly better for particles within curved channels. However, it requires selecting appropriate parameters based on the actual results. Furthermore, for multi-time-step particle distribution data, due to particle diffusion, the particle distribution varies at different times, and the optimal parameters differ accordingly. Extensive manual debugging is needed to determine the parameters for each time step, resulting in low efficiency and a large workload in determining particle boundaries.

[0040] In view of this, this application proposes a method for determining particle boundaries, which may specifically include: acquiring target particle distribution data at a first moment, and determining the target value of the boundary calculation parameters of the boundary calculation algorithm based on the particle distribution characteristics and control parameters represented by the target particle distribution data; then executing the boundary calculation algorithm with the target value to obtain the boundary calculation result corresponding to the first moment; and finally performing a pass / fail check operation repeatedly until a pass / fail boundary calculation result is obtained or the loop count reaches the maximum loop count. The pass / fail check operation includes: performing a pass / fail check on the boundary calculation result; when the pass / fail check fails, incrementing the loop count by 1, adjusting the target value based on the control parameters, and executing the boundary calculation algorithm with the adjusted target value to obtain the boundary calculation result again.

[0041] Using the above method, based on the control parameters and the particle distribution characteristics at the first moment, the boundary calculation parameters at the first moment are adaptively determined. Then, a pass / fail check operation is performed cyclically to further adjust the boundary calculation parameters, quickly obtaining reasonably valued boundary calculation parameters. This eliminates the need for manual adjustment of the boundary calculation parameters at each moment, improving the efficiency of boundary determination and reducing the complexity of boundary calculation parameter determination, saving manpower, and thus achieving convenient and rapid determination of particle boundaries. In this way, by using control parameters in conjunction with the pass / fail check operation and automatic adjustment of boundary calculation parameters, the values ​​of boundary calculation parameters at different moments can be dynamically determined.

[0042] In particular, the preferred embodiments of this application will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments of this application and the features in the embodiments can be combined with each other without conflict.

[0043] See Figure 1 The diagram illustrates an optional system architecture applicable to an embodiment of this application. This system architecture may include: terminal devices (101a, 101b) and server 102. The terminal devices (101a, 101b) and server 102 can interact via a communication network. The communication network may employ wireless communication or wired communication methods. For example, the terminal devices (101a, 101b) can access the network and communicate with server 102 via cellular mobile communication technology. This cellular mobile communication technology may include, for example, 5G (5th generation mobile networks) or next-generation mobile communication technology. Optionally, the terminal devices (101a, 101b) can access the network and communicate with server 102 via short-range wireless communication. This short-range wireless communication method may include, for example, wireless fidelity (Wi-Fi) technology.

[0044] This application embodiment does not impose any limitation on the number of communication devices involved in the above system architecture. For example, the above system architecture may include more terminal devices, or it may include fewer terminal devices, or it may also include other network devices. Figure 1 As shown, only terminal devices (101a, 101b) and server 102 are described as examples. The following is a brief introduction to the above communication devices and their respective functions.

[0045] A terminal device (101a, 101b) is a device that can provide voice and / or data connectivity to a user, and may be a device that supports wired and / or wireless connections.

[0046] For example, terminal devices (101a, 101b) may include, but are not limited to: mobile phones, tablets, laptops, handheld computers, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminal devices in industrial control, wireless terminal devices in autonomous driving, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, or wireless terminal devices in smart homes, etc.

[0047] In addition, the terminal devices (101a, 101b) may have related clients installed. The client may be software, such as an application (APP), browser, short video software, or webpage, mini-program, etc. It should be noted that the terminal devices (101a, 101b) in this embodiment may be the aforementioned client related to the determination of particle boundaries, which sends particle distribution data files to the server 102.

[0048] Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0049] The method for determining particle boundaries provided by exemplary embodiments of this application will be described below in conjunction with the above-described system architecture and with reference to the accompanying drawings. It should be noted that the above-described system architecture is only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.

[0050] See Figure 2 The diagram shown illustrates the implementation flow of a method for determining particle boundaries according to an embodiment of this application. Taking a server as an example, the specific implementation flow of this method is as follows: S20: Obtain the target particle distribution data at the first moment, and determine the target value of the boundary calculation parameters of the boundary calculation algorithm based on the particle distribution characteristics and control parameters represented by the target particle distribution data.

[0051] Among them, the control parameters are the parameters that determine the boundary calculation parameters. The control parameters include: the initial value and tolerance coefficient of the radius parameter, the maximum number of rings, the minimum coverage, the maximum number of cycles, and the adjustment coefficient; the target particle distribution data includes: the coordinate values ​​of each particle.

[0052] In this embodiment of the application, the first time point is any one of the various time points.

[0053] Optionally, in this application embodiment, to obtain the target particle distribution data at the first moment, a possible implementation is provided, which specifically performs the following operations: S200: Obtain the initial particle distribution data at the first moment.

[0054] The initial particle distribution data includes: the coordinates of the spatial position of each particle; the coordinates include: the x-coordinate and the y-coordinate.

[0055] In this embodiment of the application, the initial particle distribution data at the first moment is obtained from the global particle distribution data file, wherein the global particle distribution data file includes the coordinate values ​​of the spatial position of each particle at each moment.

[0056] S201: Preprocess the initial particle distribution data to obtain the target particle distribution data.

[0057] The preprocessing includes coordinate translation processing, which involves iterating through the coordinates of each particle's spatial position, determining the minimum coordinate value, and subtracting the minimum coordinate value from the coordinates of each particle.

[0058] In this embodiment, the coordinates of the spatial positions of each particle included in the initial particle distribution data are traversed to determine the minimum coordinate value. The minimum coordinate value is then subtracted from the coordinates of the spatial positions of each particle included in the initial particle distribution data to obtain the target particle distribution data after coordinate translation.

[0059] For example, suppose the initial particle distribution data corresponding to timestamp A includes the spatial coordinates of particle 1, particle 2, particle 3, and particle 4. By iterating and comparing, the minimum coordinate value is determined to be the spatial coordinate of particle 1. Then, the spatial coordinate of particle 1 is subtracted from the spatial coordinates of particle 1, particle 2, particle 3, and particle 4 to obtain the target coordinates of particle 1, particle 2, particle 3, and particle 4.

[0060] In this way, by transforming the coordinates, the geographical coordinates with larger values ​​are converted into relatively smaller values, which effectively reduces the precision loss and rounding errors that may occur in subsequent floating-point operations due to the large values, and improves the robustness of the boundary calculation algorithm and the accuracy of the boundary calculation results.

[0061] Additionally, it is worth noting that in this embodiment, the preprocessing also includes deduplication. Before coordinate translation, data in the initial particle distribution data at the first moment that have identical x and y coordinate values ​​need to be removed to ensure that one spatial location corresponds to only one particle.

[0062] Optionally, in this embodiment of the application, another possible implementation is provided for obtaining the target particle distribution data at the first moment, specifically by performing the following operations: S202: Obtain the global particle distribution data file, perform data transformation on the global particle distribution data file, and obtain a pandas DataFrame object.

[0063] The global particle distribution data file format is a comma-separated values ​​(CSV) file.

[0064] S203: Perform deduplication and coordinate translation on the data in the converted global particle distribution data file to obtain the target global particle distribution data file.

[0065] In this embodiment, the deduplication and coordinate translation are performed on the global particle distribution data file. Specifically, data with identical x-coordinate values, y-coordinate values, and timestamps in the global particle distribution data file are deleted. The coordinate values ​​in the global particle distribution data file are traversed to determine the minimum coordinate value. The minimum coordinate value is then subtracted from the coordinate values ​​in the global particle distribution data file to obtain the target global particle distribution data file after coordinate translation.

[0066] S204: Group the target global particle distribution data file according to timestamps to obtain the target particle distribution data corresponding to each time moment, thereby obtaining the target particle distribution data at the first time moment.

[0067] Optionally, in this embodiment, the boundary calculation algorithm is the Alpha Shapes method, or a boundary calculation algorithm derived from other AlphaShapes methods; this embodiment does not impose any limitations on this. When the boundary calculation algorithm is the Alpha Shapes method, the boundary calculation parameters include radius parameters and tolerance parameters.

[0068] The following section uses the Alpha Shapes method as an example to introduce how to determine the target values ​​of the boundary calculation parameters of the boundary calculation algorithm based on the particle distribution characteristics and control parameters characterized by the target particle distribution data: Optionally, in this application embodiment, a possible implementation is provided for determining the target value of the boundary calculation parameter of the boundary calculation algorithm based on the particle distribution characteristics and control parameters characterized by the target particle distribution data. Specifically, the following operations are performed: S205: Based on the coordinate values ​​of each particle contained in the target particle distribution data, determine the nearest neighboring particle to each particle, and use the distance between each particle and its neighboring particles as candidate distances, and determine the target distance based on the obtained candidate distances.

[0069] The target distance can be the median of the candidate distances or the average of the candidate distances; this embodiment does not impose any restrictions on this.

[0070] In this embodiment of the application, a KD tree is established based on the target particle distribution data, and the target distance is calculated based on the KD tree to improve the efficiency of target distance determination.

[0071] S206: Based on the initial values ​​of the target distance and radius parameters, obtain the target value of the radius parameter.

[0072] In this embodiment, the ratio of the initial value of the radius parameter to the target distance is calculated to obtain the target value of the radius parameter.

[0073] In this embodiment, the calculation formula for the target value of the radius parameter can be specifically expressed as follows: α1 = α0 / m. Where α1 is the target value of the radius parameter, α0 is the initial value of the radius parameter, m is the target distance, and the radius parameter is the reciprocal of the rolling sphere radius of the AlphaShapes method, controlling the precision of boundary extraction.

[0074] S207: Based on the target value of the radius parameter and the tolerance coefficient, obtain the target value of the tolerance parameter.

[0075] In this embodiment of the application, the ratio of the tolerance coefficient to the target value of the radius parameter is calculated to obtain the target value of the tolerance parameter.

[0076] In this embodiment of the application, the calculation formula corresponding to the target value of the tolerance parameter can be specifically expressed as follows: b_α1=b / α1, where b_α1 is the target value of the tolerance parameter, b is the tolerance coefficient, which is used to adjust the tolerance range of the boundary calculation algorithm to allow a certain error, and α1 is the target value of the radius parameter.

[0077] In this way, the boundary calculation parameters (radius parameter and tolerance parameter) are dynamically associated with the target distance of the particles, so that the parameter values ​​can be automatically adjusted according to the particle density at each time, which solves the problem that fixed boundary calculation parameters cannot adapt to changes in particle distribution at different times.

[0078] S21: Use the target value to perform the boundary calculation algorithm to obtain the boundary calculation result corresponding to the first time step.

[0079] In this embodiment, using the target values ​​of the radius parameter and the tolerance parameter, the Alpha Shapes method is used to extract the coordinates of the two endpoints of all boundary edges of the coarse boundary from the particle distribution data at the first time step, thus obtaining the boundary calculation results corresponding to the first time step. The boundary calculation results include: each boundary edge and the two endpoints of each boundary edge.

[0080] S22: Execute the pass / fail check operation repeatedly until a pass / fail boundary calculation result is obtained or the loop count reaches the maximum loop count. The pass / fail check operation includes: performing a pass / fail check on the boundary calculation result; if the pass / fail check fails, increment the loop count by 1, adjust the target value based on the control parameters, and execute the boundary calculation algorithm with the adjusted target value to obtain the boundary calculation result again.

[0081] In this embodiment, the qualification check of the boundary calculation results includes: topology structure check and coverage check. If the topology structure check or the coverage check of the boundary calculation results fails, the qualification check of the boundary calculation results is determined to be failed. If both the topology structure check and the coverage check of the boundary calculation results pass, the qualification check of the boundary calculation results is determined to be passed. The topology structure check is used to verify whether the boundary ring corresponding to the boundary calculation results is valid, and the coverage check is used to verify whether the particle coverage of the boundary calculation results meets the standard.

[0082] In this embodiment, when verifying the validity of boundary calculation results, topology verification can be performed first, followed by coverage verification; alternatively, coverage verification can be performed first, followed by topology verification; or both can be performed simultaneously. This embodiment does not impose any restrictions on these methods. Since the computational cost of topology verification is lower than that of coverage verification, it can quickly filter out unqualified boundary calculation results. Therefore, the preferred method of performing topology verification first, followed by coverage verification, is chosen to verify the validity of boundary calculation results, thereby improving overall computational efficiency.

[0083] Optionally, this application provides a possible embodiment for determining the pass / fail inspection result of the boundary calculation result, and the specific process is as follows: SA1: Determine whether the topology check of the boundary calculation result passes. If yes, execute SA2; otherwise, execute SA4.

[0084] Optionally, this application provides a possible embodiment for determining the topology verification result of the boundary calculation result, and the specific process is as follows: SA11: Construct an undirected graph based on the boundary calculation results.

[0085] In this context, the edges of an undirected graph are the boundary edges included in the boundary calculation results, and the vertices of an undirected graph are the endpoints of each boundary edge.

[0086] In this embodiment of the application, the endpoints of each boundary edge included in the boundary calculation result are used as vertices of the undirected graph, and each boundary edge is used as an edge of the undirected graph to form an undirected graph.

[0087] SA12: Determines the number of basic cyclic bases in an undirected graph.

[0088] The basic cyclic basis is a set of simple cycles that form the basis of the graph's cycle space. In other words, any cycle in the graph can be constructed from the basic cyclic basis.

[0089] In this embodiment of the application, all basic cyclic bases in the undirected graph are extracted, and the number of basic cyclic bases is counted.

[0090] SA13: If the number of basic cyclic bases is greater than the maximum number of cycles or equal to 0, the topology test of the boundary calculation results will fail.

[0091] The maximum number of cycles refers to the maximum number of basic cyclic bases allowed in an undirected graph. If the number of basic cyclic bases exceeds the maximum number of cycles, it indicates that the boundary is too fragmented and the boundary calculation parameters need to be adjusted.

[0092] In this embodiment of the application, it is determined whether the number of basic cyclic bases is greater than the maximum number of rings or equal to 0. If the number of basic cyclic bases is greater than the maximum number of rings or equal to 0, the topology verification of the boundary calculation result is determined to be unsuccessful. If the number of basic cyclic bases is not greater than the maximum number of rings and is not equal to 0, the topology verification of the boundary calculation result is determined to be successful.

[0093] This avoids overly fragmented and complex boundaries (too many rings) or unclosed boundaries (zero rings), ensuring the simplicity and usability of the boundary polygons.

[0094] SA2: Determine whether the coverage test of the boundary calculation results passes. If yes, execute SA3; otherwise, execute SA4.

[0095] Optionally, this application provides a possible embodiment for determining the coverage verification result of the boundary calculation result, and the specific process is as follows: SA21: Convert each basic cyclic basis into a sub-boundary polygon, and merge the obtained at least one sub-boundary polygon to obtain at least one target boundary polygon.

[0096] In this way, at least one closed target boundary polygon can be obtained, so that the output boundary result is a closed figure, which is convenient for subsequent use in determining the scope of pollution.

[0097] SA22: Determine the particle coverage within at least one target boundary polygon based on the coordinate values ​​of each particle contained in the target particle distribution data.

[0098] In this embodiment of the application, based on the coordinate values ​​of each particle contained in the target particle distribution data, each particle is spatially connected to at least one target boundary polygon, the coverage number of particles contained in at least one target boundary polygon is determined, and the ratio of the coverage number to the total number of particles is calculated to obtain the particle coverage rate.

[0099] SA23: If the particle coverage is less than the minimum coverage, the coverage test of the boundary calculation results will fail.

[0100] The minimum coverage rate refers to the minimum proportion of particle points that should be covered by at least one target boundary polygon. For example, it can be 95%. If the particle coverage rate is lower than the minimum coverage rate, it means that the boundary calculation results are inaccurate.

[0101] In this embodiment of the application, it is determined whether the particle coverage rate is less than the minimum coverage rate. If the particle coverage rate is less than the minimum coverage rate, the coverage rate test of the boundary calculation result is determined to be unsuccessful. If the particle coverage rate is not less than the minimum coverage rate, the coverage rate test of the boundary calculation result is determined to be successful.

[0102] This mandates that at least one target boundary polygon must contain the vast majority of particles, preventing the generation of invalid boundaries that are too small or severely missing, and ensuring that the boundary results can truly reflect the range of influence of pollutants.

[0103] SA3: The qualification test of the boundary calculation results has been passed.

[0104] In this embodiment of the application, if the topology test of the boundary calculation result passes and the coverage test of the boundary calculation result passes, then the qualification test of the boundary calculation result is determined to be passed.

[0105] SA4: The qualification test for the boundary calculation results failed.

[0106] In this embodiment of the application, if the topology test of the boundary calculation result fails or the coverage test of the boundary calculation result fails, then the qualification test of the boundary calculation result is determined to be unsuccessful.

[0107] Optionally, in this embodiment, the conformity inspection may also include compactness inspection, etc., and this embodiment does not impose any limitations on this. The compactness inspection refers to calculating the ratio of the area to the perimeter of each of at least one target boundary polygon to obtain the compactness of each of the at least one target boundary polygon. When the compactness of each of the at least one target boundary polygon is greater than a compactness threshold, the compactness inspection is deemed to have passed, thus ensuring that compact target boundary polygons are identified. Furthermore, it is worth noting that in this embodiment, there is no restriction on the inspection priority of compactness inspection, topology inspection, and coverage inspection; they can be performed in parallel or according to a set priority.

[0108] In this embodiment, the conformity inspection operation is described. The specific process of a single conformity inspection operation is as follows: S220: Determine if the current loop count has reached the maximum loop count. If yes, execute S221; otherwise, execute S222.

[0109] S221: End the loop and update the control parameters.

[0110] The current loop count is the loop count corresponding to the current control parameter. If the control parameter is updated, the current loop count is reset to zero and the counting starts again.

[0111] In addition, it is worth noting that in the embodiments of this application, in addition to updating the control parameters when the current loop count reaches the maximum loop count, the control parameters can also be updated when the visualization results are not ideal.

[0112] In this embodiment, the control parameters are updated, and the target value of the boundary calculation parameters of the boundary calculation algorithm is determined based on the particle distribution characteristics represented by the target particle distribution data and the updated control parameters. Then, the boundary calculation algorithm is executed using the target value to obtain the boundary calculation result corresponding to the first moment. The pass / fail check operation is performed repeatedly until a pass / fail boundary calculation result is obtained or the number of iterations reaches the maximum number of iterations, at which point the loop ends.

[0113] Optionally, in this embodiment, the updated control parameters can be updated manually or automatically, and this embodiment does not impose any limitations on this. Optionally, the automatic update method can be based on a historical control parameter library to determine the updated control parameters, or it can be based on the reasons for the failure of each pass / fail inspection operation corresponding to the current control parameters to determine the updated control parameters. Specifically, when determining the updated control parameters based on the historical control parameter library, the historical control parameter library stores each historical successful case. A historical successful case includes: the corresponding historical control parameter and the corresponding particle distribution characteristic. The particle distribution characteristic at the current first moment is matched with each historical particle distribution characteristic, and the historical control parameter corresponding to the matched historical particle distribution characteristic is selected as the updated control parameter. Specifically, when determining the updated control parameters based on the reasons for the failure of each pass / fail inspection operation corresponding to the current control parameters, the reasons for the failure of each pass / fail inspection operation are analyzed, and based on the analysis results, the initial value of the radius parameter is reduced or the tolerance coefficient is increased. For example, if the reason for multiple failures in the pass / fail operation is that the number of basic loop bases is equal to 0, then the initial value of the radius parameter is reduced; if the reason for multiple failures in the pass / fail operation is that the number of basic loop bases is greater than the maximum number of loops, then the initial value of the radius parameter is reduced; if the reason for multiple failures in the pass / fail operation is that the particle coverage is less than the minimum coverage, then the initial value of the radius parameter is reduced or the tolerance coefficient is increased.

[0114] This sets a termination condition for the loop, preventing it from getting stuck in an infinite loop when a satisfactory boundary calculation result cannot be obtained. At the same time, updating the control parameters greatly enhances the system's potential to handle extreme or abnormal situations and improves the stability of the boundary calculation algorithm.

[0115] S222: Perform a pass / fail check on the boundary calculation results at this time. Determine whether the pass / fail check on the boundary calculation results is passed. If yes, execute S223; otherwise, execute S224.

[0116] In this embodiment of the application, after obtaining the boundary calculation result at this time, a qualification check is performed on the boundary calculation result at this time.

[0117] S223: End the loop and use the boundary calculation result at this point as the qualified boundary calculation result.

[0118] Optionally, in this embodiment of the application, if the preprocessing includes coordinate translation processing, then after obtaining the qualified boundary calculation results, coordinate restoration processing is performed.

[0119] In this embodiment of the application, the coordinate restoration process is as follows: obtain the point coordinates of at least one target boundary polygon corresponding to the qualified boundary calculation result, and add the minimum coordinate value to the point coordinates of at least one target boundary polygon to obtain the final boundary calculation result.

[0120] In this way, the translated coordinates are restored to their true coordinates, so that the final output target boundary polygon can be used directly in real application scenarios, ensuring the practicality of the method and the usability of the output results.

[0121] The final boundary calculation results include the endpoint coordinates of at least one edge of the target boundary polygon at the first moment.

[0122] Optionally, in this embodiment of the application, after obtaining the final boundary calculation result, a drawing can be performed based on the point coordinates of at least one target boundary polygon and the coordinate values ​​of the spatial position of each particle, and the result drawing can be visualized.

[0123] Furthermore, the final boundary calculation results at each time point are aggregated, and the aggregated boundary calculation results are converted into JSON format to generate a boundary information JSON file that can be read by other programs.

[0124] S224: Increment the current loop count by 1, adjust the target value based on the control parameters, and execute the boundary calculation algorithm with the adjusted target value to obtain the boundary calculation result again.

[0125] In this embodiment, the current loop count is incremented by 1, and the target value is adjusted based on the control parameters, as well as the target value adjusted by the radius parameter and the target value adjusted by the tolerance parameter. The Alpha Shapes method is used to extract the coordinates of the two endpoints of all boundary edges of the coarse boundary for the particle distribution data at the first moment, and the boundary calculation results are obtained again.

[0126] Optionally, this application provides a possible embodiment for adjusting the target value based on control parameters, and the specific process is as follows: SB1: Based on the target value of the radius parameter and the adjustment coefficient, obtain the adjusted target value of the radius parameter.

[0127] In this embodiment, the target value of the radius parameter is calculated by multiplying the target value of the radius parameter by the adjustment coefficient to obtain the adjusted target value of the radius parameter.

[0128] In this embodiment of the application, the calculation formula corresponding to the target value of the adjusted radius parameter can be specifically expressed as follows: α2=α1×m p Where α2 is the target value of the adjusted radius parameter, α1 is the target value of the radius parameter, and m p This is an adjustment factor used to adjust the value of the radius parameter for dynamic scaling.

[0129] Optionally, in this embodiment, the target value of the radius parameter can be calculated using the following formula: α = (α0 × m p c ) / m, where α is the target value of the current radius parameter, and m p The adjustment coefficient is m, which is the target distance, and c is the current loop count.

[0130] SB2: Based on the target value of the adjusted radius parameter and the tolerance coefficient, obtain the target value of the adjusted tolerance parameter.

[0131] In this embodiment of the application, the ratio of the tolerance coefficient to the target value of the adjusted radius parameter is calculated to obtain the target value of the adjusted tolerance parameter.

[0132] In this embodiment of the application, the calculation formula corresponding to the target value of the adjusted tolerance parameter can be specifically expressed as follows: b_α2=b / α2, where b_α2 is the target value of the adjusted tolerance parameter, b is the tolerance coefficient, and α2 is the target value of the adjusted radius parameter.

[0133] Optionally, in this embodiment, the target value of the tolerance parameter can be specifically expressed as follows: b_α=b / α, where b_α is the current target value of the tolerance parameter, b is the tolerance coefficient, and α is the current target value of the radius parameter.

[0134] In this way, by introducing an adjustment coefficient, the boundary calculation parameters are not changed blindly during the adjustment process of the cyclic boundary calculation parameters. Instead, the radius parameters are fine-tuned according to a preset ratio (such as scaling), which improves the success rate and efficiency of the adjustment.

[0135] Furthermore, in this embodiment of the application, after obtaining the boundary calculation results again, the next qualification inspection operation is performed.

[0136] Based on the above embodiments, see Figure 3 The diagram shown illustrates another implementation flow of a method for determining particle boundaries provided in this application. The specific implementation flow is as follows: S30: Set control parameters.

[0137] In this embodiment of the application, the control parameters include: the initial value and tolerance coefficient of the radius parameter, the maximum number of rings, the minimum coverage, the maximum number of cycles, and the adjustment coefficient.

[0138] S31: Obtain the target particle distribution data at the first moment, and determine the target distance based on the target particle distribution data.

[0139] In this embodiment of the application, based on the coordinate values ​​of each particle contained in the target particle distribution data, the nearest neighboring particle to each particle is determined, and the distance between each particle and its neighboring particles is used as a candidate distance. Based on the obtained candidate distances, the target distance is determined.

[0140] S32: Determine if the current loop count is less than the maximum loop count. If yes, execute S33; otherwise, execute S313.

[0141] S33: Based on the target distance and control parameters, determine the target value of the boundary calculation parameters of the Alpha Shapes method, and use the target value to execute the Alpha Shapes method to obtain the boundary calculation result corresponding to the first time step.

[0142] In this embodiment, the target value of the radius parameter is obtained based on the initial values ​​of the target distance and radius parameters, and the target value of the tolerance parameter is obtained based on the target value of the radius parameter and the tolerance coefficient.

[0143] S34: Based on the boundary calculation results, construct an undirected graph and determine the number of basic cyclic bases in the undirected graph.

[0144] In this embodiment of the application, the edges of the undirected graph are the boundary edges included in the boundary calculation results, and the vertices of the undirected graph are the endpoints of the boundary edges.

[0145] S35: Determine if the number of basic loop bases is greater than the maximum number of loops or equal to 0. If yes, execute S36; otherwise, execute S37.

[0146] S36: Increment the current loop count by 1.

[0147] S37: Convert each basic cyclic basis into a sub-boundary polygon, and merge the obtained at least one sub-boundary polygon to obtain at least one target boundary polygon.

[0148] S38: Based on the coordinate values ​​of each particle contained in the target particle distribution data, determine the particle coverage within at least one target boundary polygon.

[0149] S39: Determine if the particle coverage is less than the minimum coverage. If yes, execute S36; otherwise, execute S310.

[0150] S310: Determine whether the output boundary calculation result is a multipolygon. If yes, execute S311; otherwise, execute S312.

[0151] Here, multipolygon refers to the boundary calculation result containing multiple boundary polygons.

[0152] S311: Decompose the boundary calculation results into multiple boundary polygons.

[0153] S312: Output the coordinates of at least one point of the boundary polygon.

[0154] S313: Update control parameters.

[0155] Furthermore, based on the same technical concept, embodiments of this application provide a particle boundary determination device, which is used to implement the above-described method flow of embodiments of this application. For example, see [link to relevant documentation]. Figure 4 As shown, the particle boundary determination device 400 may include: a processing module 401, an execution module 402, and a verification module 403, wherein: The processing module 401 is used to acquire the target particle distribution data at the first moment, and determine the target value of the boundary calculation parameter of the boundary calculation algorithm based on the particle distribution characteristics and control parameters characterized by the target particle distribution data, wherein the control parameter is the parameter used to determine the boundary calculation parameter. Execution module 402 is used to execute the boundary calculation algorithm with the target value to obtain the boundary calculation result corresponding to the first moment; The inspection module 403 is used to repeatedly perform the conformity inspection operation until a qualified boundary calculation result is obtained or the number of iterations reaches the maximum number of iterations. The conformity inspection operation includes: performing a conformity inspection on the boundary calculation result; when the conformity inspection fails, incrementing the number of iterations by 1; adjusting the target value based on the control parameters; and using the adjusted target value to execute the boundary calculation algorithm to obtain the boundary calculation result again.

[0156] In one optional embodiment, the boundary calculation algorithm is the Alpha Shapes method, and the boundary calculation parameters include a radius parameter and a tolerance parameter. The control parameters include the initial value of the radius parameter and the tolerance coefficient. When determining the boundary calculation parameters of the boundary calculation algorithm based on the particle distribution characteristics and control parameters represented by the target particle distribution data, the processing module 401 is also used for: Based on the coordinate values ​​of each particle in the target particle distribution data, the nearest neighboring particle to each particle is determined, and the distance between each particle and its neighboring particles is used as a candidate distance. Based on the obtained candidate distances, the target distance is determined. Based on the initial values ​​of the target distance and radius parameters, the target value of the radius parameter is obtained; The target value of the tolerance parameter is obtained based on the target value of the radius parameter and the tolerance coefficient.

[0157] In an optional embodiment, the conformity check includes: topology check and coverage check. When performing a conformity check on the boundary calculation results, the check module 403 is further used for: If the topology test or the coverage test of the boundary calculation results fails, then the qualification test of the boundary calculation results is deemed to have failed.

[0158] In an optional embodiment, the control parameters further include: maximum number of rings, and the inspection module 403 is further configured to: Based on the boundary calculation results, an undirected graph is constructed. The edges of the undirected graph are the boundary edges included in the boundary calculation results, and the vertices of the undirected graph are the endpoints of the boundary edges. Determine the number of fundamental cyclic bases in an undirected graph; If the number of basic cyclic bases is greater than the maximum number of cycles or equal to 0, the topology test of the boundary calculation results will fail.

[0159] In an optional embodiment, the control parameters further include: minimum coverage rate, and the verification module 403 is further configured to: Each basic cyclic basis is converted into a sub-boundary polygon, and the obtained at least one sub-boundary polygon is merged to obtain at least one target boundary polygon; Based on the coordinate values ​​of each particle contained in the target particle distribution data, determine the particle coverage within at least one target boundary polygon. If the particle coverage is less than the minimum coverage, the coverage test of the boundary calculation results will fail.

[0160] In an optional embodiment, when acquiring the target particle distribution data at the first moment, the processing module 401 is further configured to: Obtain the initial particle distribution data at the first moment. The initial particle distribution data includes the coordinates of the spatial position of each particle. The initial particle distribution data is preprocessed to obtain the target particle distribution data. The preprocessing includes coordinate translation processing, which involves traversing the coordinate values ​​of each particle's spatial position, determining the minimum coordinate value, and subtracting the minimum coordinate value from the coordinate values ​​of each particle.

[0161] In an optional embodiment, after performing a conformity check on the boundary calculation results, the inspection module 403 is further configured to: When the qualification test is passed, a qualified boundary calculation result is obtained, and the point coordinates of at least one target boundary polygon corresponding to the qualified boundary calculation result are obtained. The final boundary calculation result is obtained by adding the minimum coordinate value to the point coordinates of at least one target boundary polygon.

[0162] In one alternative embodiment, the control parameters include an adjustment factor used to adjust the target value of the radius parameter; When adjusting the target value based on the control parameters, the inspection module 403 is also used for: Based on the target value of the radius parameter and the adjustment coefficient, the adjusted target value of the radius parameter is obtained; Based on the target value of the adjusted radius parameter and the tolerance coefficient, the target value of the adjusted tolerance parameter is obtained.

[0163] In an optional embodiment, the inspection module 403 is further configured to: When the maximum number of iterations is reached, update the control parameters.

[0164] Based on the description of the method and apparatus embodiments above, an exemplary embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform the method according to an embodiment of the present invention.

[0165] This application also provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this application.

[0166] This application also provides a computer program product, including a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this application.

[0167] See Figure 5 The diagram shown below illustrates the structure of an electronic device 500 that can serve as a server or client in this application, and is an example of a hardware device that can be applied to various aspects of this application. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.

[0168] like Figure 5As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data required for the operation of the device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0169] Multiple components in electronic device 500 are connected to I / O interface 505, including: input unit 506, output unit 507, storage unit 508, and communication unit 509. Input unit 506 can be any type of device capable of inputting information to electronic device 500. Input unit 506 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 507 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 508 may include, but is not limited to, disks and optical discs. Communication unit 509 allows electronic device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and / or chipsets, such as Bluetooth devices, WiFi devices, worldwide interoperability for microwave access (WiMax) devices, cellular communication devices, and / or the like.

[0170] The computing unit 501 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the above-described method for determining particle boundaries can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. In some embodiments, the computing unit 501 can be configured to perform the above-described method for determining particle boundaries by any other suitable means (e.g., by means of firmware).

[0171] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0172] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM) or flash memory, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0173] As used in this application, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device, PLD) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0174] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0175] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0176] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0177] Furthermore, it should be understood that the above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of this invention are still within the scope of this application.

Claims

1. A method for determining particle boundaries, characterized in that, include: The target particle distribution data at the first moment is obtained, and the target value of the boundary calculation parameter of the boundary calculation algorithm is determined based on the particle distribution characteristics and control parameters characterized by the target particle distribution data, wherein the control parameter is the parameter used to determine the boundary calculation parameter; The boundary calculation algorithm is executed using the target value to obtain the boundary calculation result corresponding to the first time step; The pass / fail check operation is performed repeatedly until a pass / fail boundary calculation result is obtained or the loop count reaches the maximum loop count, at which point the loop ends. The pass / fail check operation includes: performing a pass / fail check on the boundary calculation result; if the pass / fail check fails, incrementing the loop count by 1; adjusting the target value based on the control parameter; and executing the boundary calculation algorithm with the adjusted target value to obtain the boundary calculation result again.

2. The method as described in claim 1, characterized in that, The boundary calculation algorithm is the Alpha Shapes method, and the boundary calculation parameters include a radius parameter and a tolerance parameter. The control parameters include the initial value of the radius parameter and the tolerance coefficient. The step of determining the boundary calculation parameters of the boundary calculation algorithm based on the particle distribution characteristics and control parameters characterized by the target particle distribution data includes: Based on the coordinate values ​​of each particle contained in the target particle distribution data, the nearest neighboring particle to each particle is determined, and the distance between each particle and its neighboring particles is used as a candidate distance. Based on the obtained candidate distances, the target distance is determined. Based on the target distance and the initial value of the radius parameter, the target value of the radius parameter is obtained; The target value of the tolerance parameter is obtained based on the target value of the radius parameter and the tolerance coefficient.

3. The method as described in claim 1, characterized in that, The qualification inspection includes: topology structure inspection and coverage inspection. Therefore, the qualification inspection of the boundary calculation results includes: If the topology verification of the boundary calculation result fails or the coverage verification of the boundary calculation result fails, then the qualification verification of the boundary calculation result is determined to be unsuccessful.

4. The method as described in claim 3, characterized in that, The control parameters also include: maximum number of rings, then the method further includes: Based on the boundary calculation results, an undirected graph is constructed, wherein the edges of the undirected graph are the boundary edges included in the boundary calculation results, and the vertices of the undirected graph are the endpoints of the boundary edges. Determine the number of basic cyclic bases in the undirected graph; If the number of basic cyclic bases is greater than the maximum number of cycles or equal to 0, then the topology verification of the boundary calculation result is determined to be unsuccessful.

5. The method as described in claim 4, characterized in that, The control parameters also include: minimum coverage rate, then the method further includes: Each basic cyclic basis is converted into a sub-boundary polygon, and the obtained at least one sub-boundary polygon is merged to obtain at least one target boundary polygon; Based on the coordinate values ​​of each particle contained in the target particle distribution data, the particle coverage rate within the at least one target boundary polygon is determined. If the particle coverage is less than the minimum coverage, then the coverage test of the boundary calculation result is determined to be unsuccessful.

6. The method as described in claim 1, characterized in that, The acquisition of the target particle distribution data at the first moment includes: Acquire the initial particle distribution data at the first moment, wherein the initial particle distribution data includes: the coordinate values ​​of the spatial position of each particle; The initial particle distribution data is preprocessed to obtain the target particle distribution data. The preprocessing includes coordinate translation processing, which involves traversing the coordinate values ​​of the spatial positions of each particle, determining the minimum coordinate value, and subtracting the minimum coordinate value from the coordinate values ​​of each particle.

7. The method as described in claim 6, characterized in that, After performing a conformity check on the boundary calculation results, the process also includes: When the qualification test is passed, a qualified boundary calculation result is obtained, and the point coordinates of at least one target boundary polygon corresponding to the qualified boundary calculation result are obtained. The minimum coordinate value is added to the point coordinates of the at least one target boundary polygon to obtain the final boundary calculation result.

8. The method as described in claim 2, characterized in that, The control parameters include adjustment coefficients, which are used to adjust the target value of the radius parameter. The step of adjusting the target value based on the control parameters includes: Based on the target value of the radius parameter and the adjustment coefficient, the adjusted target value of the radius parameter is obtained; Based on the adjusted target value of the radius parameter and the tolerance coefficient, the adjusted target value of the tolerance parameter is obtained.

9. The method as described in claim 1, characterized in that, The method further includes: When the number of iterations reaches the maximum number of iterations, the control parameters are updated.

10. A device for determining particle boundaries, characterized in that, include: The processing module is used to acquire the target particle distribution data at the first moment, and determine the target value of the boundary calculation parameter of the boundary calculation algorithm based on the particle distribution characteristics and control parameters characterized by the target particle distribution data, wherein the control parameter is the parameter used to determine the boundary calculation parameter; The execution module is used to execute the boundary calculation algorithm using the target value to obtain the boundary calculation result corresponding to the first time step; The verification module is used to repeatedly perform a pass / fail verification operation until a pass / fail boundary calculation result is obtained or the loop count reaches the maximum loop count. The pass / fail verification operation includes: performing a pass / fail verification on the boundary calculation result; if the pass / fail verification fails, incrementing the loop count by 1; adjusting the target value based on the control parameters; and executing the boundary calculation algorithm with the adjusted target value to obtain the boundary calculation result again.