A calculation method and system for determining the position of a line segment using digital twins

By numbering and locally numbering the tetrahedral units, an extension matrix is ​​constructed and adjusted to a search matrix. Using the initial position and search direction of the target line segment, the tetrahedral unit where the line segment is located is quickly positioned, solving the problem of long search time for line segment positions in the existing technology, and achieving fast and efficient line segment matching.

CN116340713BActive Publication Date: 2025-03-18CHONGQING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310151275.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2025-03-18
Estimated Expiration
2043-02-22

AI Technical Summary

Technical Problem

In the prior art, when searching for line segments of digital twins, exhaustive methods are often used to result in a long calculation time and consume a lot of computing resources.

Method used

By numbering and locally numbering the tetrahedral units, an extension matrix is ​​constructed and adjusted to a search matrix. Using the initial position and search direction of the target line segment, the tetrahedral unit where the line segment is located is quickly positioned.

Benefits of technology

This greatly reduces the number of search operations, significantly speeds up the search speed of line segment positions, and avoids the necessity of traversing all line segments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116340713B_ABST
    Figure CN116340713B_ABST
Patent Text Reader

Abstract

A calculation method and system for determining the position of a line segment by digital twins, including: globally numbering the points of each tetrahedral unit according to the order of tetrahedral unit numbers; locally numbering each point and the six edges in the tetrahedral unit; arranging the global numbers of each point according to the order of tetrahedral unit numbers to obtain an initial matrix, expanding the initial matrix using the tetrahedral unit numbers and the local numbers of the edges, and adjusting the order of each row of the extended matrix to obtain a search matrix; calculating the search start row of the target line segment in the search matrix according to the local number of the first node of the target line segment; determining the search direction according to the global number of the first node and the size of the first element of the search start row; determining the tetrahedral unit number and the local number of the edge where the target line segment is located according to the global number of the first node and the size of the first element of the current search row. The present invention greatly reduces the number of search operations and speeds up the search speed of the line segment location.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of digital twins, and specifically, relates to a calculation method and system for determining the position of a line segment using a digital twin. Background Art

[0002] Digital twin technology is a hyper-realistic simulation that integrates high-performance computing, advanced sensor acquisition, multi-physics field computing and other technologies. It uses multi-domain and multi-scale models, high-precision sensor data and multi-physics field data to mirror the real-time working status of actual equipment.

[0003] In the prior art, the smooth finite element method is often used to solve the mathematical model of the digital twin. The calculation process of the smooth finite element method needs to determine the unit number and the edge number of each line segment. This takes up a large part of the solution calculation time, so it is necessary to complete the position search of all line segments in as little time as possible. The most commonly used method for line segment search at present is the exhaustive method, which compares the target line segment with the line segments of all units one by one. If the exhaustive method is used, the six edges of all tetrahedral units are compared respectively to determine the unit number and the edge number of the unit where the line segment is located. The exhaustive method has many operations in large-scale units, long calculation time, and consumes a lot of computing resources. In the improved method for calculating the matching degree of two line segments, it uses two line segments to construct an equivalent distance as a discriminant to determine whether the two line segments match, but this method still needs to traverse all line segments until a matching line segment that matches the line segment to be matched is found. In essence, it still uses the exhaustive method, which takes a long time to calculate. In the line segment matching method based on single-endpoint feature description, one endpoint of the line segment is used as the main feature point and the other endpoint as the auxiliary feature point to construct a feature description unit. The specific line segment direction is used as the reference direction of the feature unit to construct a feature descriptor for line segment matching. As long as any endpoint of the two line segments can be matched, the two line segments can be matched. However, this method still needs to match the endpoints of all line segments, which consumes a lot of computing resources. Summary of the invention

[0004] In order to solve the deficiencies in the prior art, the present invention provides a calculation method and system for determining the location of a line segment by digital twin, which greatly reduces the number of search operations and speeds up the search speed for the location of the line segment.

[0005] The present invention adopts the following technical solution.

[0006] A calculation method for determining the position of a line segment by a digital twin, comprising:

[0007] Step 1: number all tetrahedral units in the search target, and globally number the points of each tetrahedral unit in sequence according to the numbering sequence of the tetrahedral units; at the same time, locally number each point in any tetrahedral unit, and locally number the six edges of the tetrahedral unit in sequence according to the local number of the point;

[0008] Step 2, arranging the global numbers of each point in the order of tetrahedral unit numbers to obtain a 6n×2 initial matrix, where n represents the number of tetrahedral units;

[0009] Step 3, using the tetrahedral unit number to form a first column vector, using the local number of the edge to form a second column vector, using the first column vector and the second column vector to expand the initial matrix to obtain a 6n×4 expansion matrix;

[0010] Step 4, adjusting the order of the rows of the extended matrix according to the order of the elements in the first column of the extended matrix from small to large, to obtain a search matrix;

[0011] Step 5, obtaining the global numbers of the two points in the target line segment, taking the point with the smaller global number as the first node of the target line segment, calculating the initial position of the target line segment, and determining the search start row in the search matrix;

[0012] Step 6, determine the search direction based on the size relationship between the global number of the first node and the first element of the search start row; determine the tetrahedral unit number and the local number of the edge where the target segment is located based on the size relationship between the global number of the first node and the first element of the current search row.

[0013] Preferably, in step 1, in each tetrahedral unit, the local numbering sequence of the points and the local numbering sequence of the edges are consistent.

[0014] Preferably, in step 2, the global numbers of the two points on the edges locally numbered ① in all tetrahedral units are arranged according to the tetrahedral unit numbers to obtain a first numbered matrix; the global numbers of the two points on the edges locally numbered ② in all tetrahedral units are arranged according to the tetrahedral unit numbers to obtain a second numbered matrix; and so on; ...; until a sixth numbered matrix is ​​obtained; the first numbered matrix to the sixth numbered matrix form a 6n×2 initial matrix, where n represents the number of tetrahedral units.

[0015] Preferably, in step 2, the elements of the first numbered matrix are the global numbers of the points on the edges of all tetrahedral units locally numbered 1, the elements of the second numbered matrix are the global numbers of the points on the edges of all tetrahedral units locally numbered 2, and so on, the elements of the sixth numbered matrix are the global numbers of the points on the edges of all tetrahedral units locally numbered 6.

[0016] Preferably, in step 3, the tetrahedral unit numbers are arranged in order from 1 to n to form the 1st to nth row elements of the first column vector, and then the tetrahedral unit numbers are arranged in order from 1 to n to form the n+1th to 2nth row elements of the first column vector, and so on, to obtain a 6n×1 first column vector.

[0017] Preferably, in step 3, the second column vector is constructed using the local numbers of the edges, wherein the elements of the 1st to nth rows of the second column vector are all 1, the elements of the n+1st to 2nth rows are all 2, and so on, to obtain a 6n×1 second column vector.

[0018] Preferably, the search start row h is calculated as follows:

[0019]

[0020] In the formula,

[0021] i represents the global number of the first node of the target segment,

[0022] M represents the last element of the first column of the search matrix;

[0023] If h contains a decimal point, it is rounded up.

[0024] Preferably, in step 6, if the global number of the first node of the target line segment is greater than the first element of the search start row, then enter the row above the search start row and search upward until the global number of the first node of the target line segment is less than the first element of the current search row, and record the tetrahedral unit number and the local number of the edge where the target line segment is located.

[0025] Preferably, in step 6, if the global number of the first node of the target line segment is smaller than the first element of the search start row, then enter the next row of the search start row and search downward until the global number of the first node of the target line segment is greater than the first element of the current search row, and record the tetrahedral unit number and the local number of the edge where the target line segment is located.

[0026] Preferably, in step 6, if the global number of the first node of the target line segment is equal to the first element of the search start row, then the search is performed simultaneously on the previous row and the next row of the search start row until the global number of the first node of the target line segment is not equal to the first element of the current search row, and the tetrahedral unit number and the local number of the edge where the target line segment is located are recorded.

[0027] A computing system for determining the location of a line segment using a digital twin, comprising: a numbering module, an initial matrix module, an extended matrix module, a search matrix module, a search start line module, and a search execution module;

[0028] A numbering module is used to number all tetrahedral units in the search target, and globally number the points of each tetrahedral unit in sequence according to the numbering sequence of the tetrahedral units; at the same time, each point in any tetrahedral unit is locally numbered, and the six edges of the tetrahedral unit are locally numbered in sequence according to the local number of the point;

[0029] An initial matrix module, used to arrange the global numbers of each point in the order of tetrahedral unit numbers to obtain a 6n×2 initial matrix, where n represents the number of tetrahedral units;

[0030] An extended matrix module, used to form a first column vector using tetrahedral unit numbers, form a second column vector using edge local numbers, and use the first column vector and the second column vector to expand the initial matrix to obtain a 6n×4 extended matrix;

[0031] A search matrix module is used to adjust the order of each row of the extended matrix according to the order of the elements in the first column of the extended matrix from small to large, so as to obtain a search matrix;

[0032] A search start row module is used to obtain the global numbers of two points in the target line segment, take the point with the smaller global number as the first node of the target line segment, calculate the initial position of the target line segment, and determine the search start row in the search matrix;

[0033] The search execution module is used to determine the search direction according to the size relationship between the global number of the first node and the first element of the search start row; and to determine the tetrahedral unit number and the local number of the edge where the target line segment is located according to the size relationship between the global number of the first node and the first element of the current search row.

[0034] A terminal comprises a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of a method.

[0035] A computer-readable storage medium stores a computer program, which implements the steps of the method when executed by a processor.

[0036] The beneficial effect of the present invention is that, compared with the prior art, the present invention proposes a calculation method for quickly determining the position of a line segment, forming a search matrix with all line segments, determining the search start row by calculating the search initial position of the target line segment in the search matrix, and determining the search direction by using the number size of the line segment endpoints. By calculating the search initial position and search direction of the target line segment, it can be ensured that the search start row is close to the position of the matching line segment, thereby greatly reducing the number of searches, completing line segment matching without traversing all line segments, and quickly determining the position of the line segment. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a flow chart of a calculation method for determining the position of a line segment by a digital twin proposed by the present invention;

[0038] Figure 2 is a schematic diagram of the midpoint numbering and edge numbering of tetrahedral units in an embodiment of the present invention;

[0039] Figure 3 is a schematic diagram of the construction sequence of the initial matrix in an embodiment of the present invention;

[0040] Figure 4 is a schematic diagram of expanding an initial matrix to obtain an extended matrix in an embodiment of the present invention;

[0041] Figure 5 is a schematic diagram of adjusting the row position in the extended matrix in an embodiment of the present invention;

[0042] Figure 6 is a schematic diagram of a search target and a target line segment in an embodiment of the present invention;

[0043] Figure 7 Schematic diagram of the midpoint numbering and edge numbering of tetrahedral units within the search target in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only embodiments of a part of the present invention, rather than all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention.

[0045] The present invention proposes a calculation method for determining the position of a line segment using a digital twin, such as Figure 1 As shown, including:

[0046] Step 1: number all tetrahedral units in the search target, and globally number the points of each tetrahedral unit in sequence according to the numbering sequence of the tetrahedral units; at the same time, locally number each point in any tetrahedral unit, and locally number the six edges of the tetrahedral unit in sequence according to the local number of the point.

[0047] In step 1, the local numbering order of the points and the local numbering order of the edges in each tetrahedral unit are consistent.

[0048] In a non-limiting preferred embodiment, the local numbering order of the edges is as follows: Figure 2As shown in the figure, 1, 2, 3, and 4 are local numbers of the points respectively. The edges between point 1 and point 2, point 3, and point 4 are numbered ①, ②, and ③ respectively. The edges between point 2 and point 3 and point 4 are numbered ④ and ⑤ respectively. The edge between point 3 and point 4 is numbered ⑥.

[0049] It can be seen that when there are n tetrahedral units, the local numbering of points in each tetrahedral unit is 1 to 4, and the local numbering of edges is 1 to 6. When there are 1000 nodes constituting n tetrahedral units, the global numbering of the points is obtained by numbering these 1000 nodes in the order of 1 to 1000.

[0050] Step 2, arrange the global numbers of each point in the order of tetrahedral unit numbers to obtain an initial matrix of 6n×2, where n represents the number of tetrahedral units.

[0051] Specifically, the global numbers of the two points on the edges locally numbered ① in all tetrahedral units are arranged according to the tetrahedral unit numbers to obtain the first numbered matrix; the global numbers of the two points on the edges locally numbered ② in all tetrahedral units are arranged according to the tetrahedral unit numbers to obtain the second numbered matrix; and so on; ...; until the sixth numbered matrix is ​​obtained; the first numbered matrix to the sixth numbered matrix form a 6n×2 initial matrix.

[0052] In a non-limiting preferred embodiment, Figure 3 As shown, points 1 and 2 (global numbering) on ​​edge ① of tetrahedral unit No. 1 are in the first row of the matrix, points 2 and 3 (global numbering) on ​​edge ① of tetrahedral unit No. 2 are in the second row of the matrix, ..., it can be seen that the elements of the first-numbered matrix are the global numbers of the points on the edges of all tetrahedral units with local numbering 1, the elements of the second-numbered matrix are the global numbers of the points on the edges of all tetrahedral units with local numbering 2, and so on, the elements of the sixth-numbered matrix are the global numbers of the points on the edges of all tetrahedral units with local numbering 6.

[0053] Step 3, use the tetrahedral unit number to form the first column vector, use the local number of the edge to form the second column vector, use the first column vector and the second column vector to expand the initial matrix to obtain a 6n×4 expanded matrix.

[0054] Specifically, the tetrahedral unit numbers are arranged in order from 1 to n to form the 1st to nth row elements of the first column vector, and then the tetrahedral unit numbers are arranged in order from 1 to n to form the n+1th to 2nth row elements of the first column vector, and so on, to obtain the 6n×1 first column vector.

[0055] Specifically, the local numbers of the edges are used to construct a second column vector, wherein the elements of the 1st to nth rows of the second column vector are all 1, the elements of the n+1th to 2nth rows are all 2, and so on, to obtain a 6n×1 second column vector.

[0056] In a non-limiting preferred embodiment, Figure 4 As shown, the first to sixth rows of the first column vector are 1 to 6, the seventh to twelfth rows are 1 to 6, and so on. The first to sixth rows of the second column vector are all 1, the seventh to twelfth rows are all 2, and so on.

[0057] Step 4, according to the order of the elements in the first column of the extended matrix from small to large, adjust the order of each row of the extended matrix to obtain a search matrix.

[0058] Specifically, Figure 5 As shown, the first row of the extended matrix is ​​[1, 2, 1, 1], the seventh row [1, 3, 1, 2] in the extended matrix is ​​adjusted to the second row position, the original second row [2, 3, 2, 1] of the extended matrix is ​​adjusted to the third row position, and the eighth row [2, 4, 2, 2] of the extended matrix is ​​adjusted to the fourth row position.

[0059] The present invention forms a search matrix with all line segments.

[0060] Step 5, obtain the global numbers of the two points in the target segment, use the point with the smaller global number as the first node of the target segment, calculate the initial position of the target segment, and determine the search start row in the search matrix.

[0061] The following formula calculates the initial position of the target line segment, that is, determines the search start row in the search matrix:

[0062]

[0063] In the formula, i represents the number of the first node of the target segment, M represents the last element of the first column of the search matrix, and if h contains a decimal, it is rounded up. Among them, h represents the approximate number of rows of the target segment in the search matrix. Starting the search from the calculated h will be very close to the search target, thus achieving fast search.

[0064] The present invention determines the search start row by calculating the search initial position of the target line segment in the search matrix.

[0065] Step 6, determine the search direction based on the size relationship between the global number of the first node and the first element of the search start row; determine the tetrahedral unit number and the local number of the edge where the target segment is located based on the size relationship between the global number of the first node and the first element of the current search row.

[0066] Specifically, if the global number of the first node of the target line segment is greater than the first element of the search start row, then enter the row above the search start row and search upward until the global number of the first node of the target line segment is less than the first element of the current search row, and record the tetrahedral unit number and the local number of the edge where the target line segment is located.

[0067] Specifically, if the global number of the first node of the target segment is smaller than the first element of the search start row, then enter the next row of the search start row and search downward until the global number of the first node of the target segment is greater than the first element of the current search row, and record the tetrahedral unit number and the local number of the edge where the target segment is located.

[0068] Specifically, if the global number of the first node of the target line segment is equal to the first element of the search start row, then the search is performed simultaneously on the previous row and the next row of the search start row until the global number of the first node of the target line segment is not equal to the first element of the current search row, and the tetrahedral unit number and the local number of the edge where the target line segment is located are recorded.

[0069] The present invention uses the number size of the line segment endpoints to determine the search direction. By calculating the search initial position and search direction of the target line segment, it can ensure that the search start line is close to the matching line segment position, thereby greatly reducing the number of searches, completing line segment matching without traversing all line segments, and quickly determining the position of the line segment.

[0070] by Figure 6 Taking the search target shown in FIG. 1 as an example, the target line segment is searched, and the search target includes three tetrahedral units. Figure 7 It is the number of each edge and each point obtained after executing step 1.

[0071] Figure 7 The nodes numbered 1, 2, 3, and 4 form the first tetrahedral unit, the nodes numbered 2, 3, 4, and 5 form the second tetrahedral unit, and the nodes numbered 2, 4, 5, and 6 form the third tetrahedral unit; the edge numbers in the first tetrahedral unit include: ①, ②, ③, ④, ⑤, and ⑥; the edge numbers in the second tetrahedral unit include: and The edge numbering for the third tetrahedral element includes: and

[0072] Execute step 2 to obtain an 18×2 initial matrix, as shown in the following formula.

[0073]

[0074] Execute step 3 to obtain an 18×4 expansion matrix, as shown in the following formula.

[0075]

[0076] Execute step 4 to obtain the search matrix, as shown below:

[0077]

[0078] Execute step 5 and get Since h=7.2, the value is rounded up, so h=8, that is, the search starts from the eighth row.

[0079] Execute step 6, compare the number of the first node of the target segment with the first element of the eighth row, the number of the first node of the target segment is equal to the first element of the search start row, search from the search start row to the next row up, until the third row and the twelfth row. Record the tetrahedral unit number and edge number of the target segment, that is, the 3rd and 4th column elements of the fifth row (3, 1), the 3rd and 4th column elements of the sixth row (2, 2), and the 3rd and 4th column elements of the eleventh row (1, 5).

[0080] The larger the calculation scale, the better the acceleration effect achieved by the method proposed in the present invention. Table 1 shows the time taken by different methods to search all line segments of the model.

[0081] Table 1 Comparison of the effects of the exhaustive method and the proposed method

[0082] Number of units Exhaustive search time ( / s) Search time of the proposed method ( / s) Speedup 30302 1.634 0.1695 9.64 90632 13.904 0.817 17.02 301957 251.227 9.409 26.7 975897 2173.918 69.677 31.2 2469938 15705.61 455.235 34.5

[0083] A computing system for determining the location of a line segment using a digital twin, comprising: a numbering module, an initial matrix module, an extended matrix module, a search matrix module, a search start line module, and a search execution module;

[0084] A numbering module is used to number all tetrahedral units in the search target, and globally number the points of each tetrahedral unit in sequence according to the numbering sequence of the tetrahedral units; at the same time, each point in any tetrahedral unit is locally numbered, and the six edges of the tetrahedral unit are locally numbered in sequence according to the local number of the point;

[0085] An initial matrix module, used to arrange the global numbers of each point in the order of tetrahedral unit numbers to obtain a 6n×2 initial matrix, where n represents the number of tetrahedral units;

[0086] An extended matrix module, used to form a first column vector using tetrahedral unit numbers, form a second column vector using edge local numbers, and use the first column vector and the second column vector to expand the initial matrix to obtain a 6n×4 extended matrix;

[0087] A search matrix module is used to adjust the order of each row of the extended matrix according to the order of the elements in the first column of the extended matrix from small to large, so as to obtain a search matrix;

[0088] A search start row module is used to obtain the global numbers of two points in the target line segment, take the point with the smaller global number as the first node of the target line segment, calculate the initial position of the target line segment, and determine the search start row in the search matrix;

[0089] The search execution module is used to determine the search direction according to the size relationship between the global number of the first node and the first element of the search start row; and to determine the tetrahedral unit number and the local number of the edge where the target line segment is located according to the size relationship between the global number of the first node and the first element of the current search row.

[0090] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0091] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0092] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0093] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A calculation method for determining the location of a line segment using a digital twin, characterized in that: include: Step 1: number all tetrahedral units in the search target, and globally number the points of each tetrahedral unit in sequence according to the numbering sequence of the tetrahedral units; at the same time, locally number each point in any tetrahedral unit, and locally number the six edges of the tetrahedral unit in sequence according to the local number of the point; Step 2, arranging the global numbers of each point in the order of tetrahedral unit numbers to obtain a 6n×2 initial matrix, where n represents the number of tetrahedral units; Step 3, using the tetrahedral unit number to form a first column vector, using the local number of the edge to form a second column vector, using the first column vector and the second column vector to expand the initial matrix to obtain a 6n×4 expansion matrix; Step 4, adjusting the order of the rows of the extended matrix according to the order of the elements in the first column of the extended matrix from small to large, to obtain a search matrix; Step 5, obtaining the global numbers of the two points in the target line segment, taking the point with the smaller global number as the first node of the target line segment, calculating the initial position of the target line segment, and determining the search start row in the search matrix; Step 6, determine the search direction based on the size relationship between the global number of the first node and the first element of the search start row; determine the tetrahedral unit number and the local number of the edge where the target segment is located based on the size relationship between the global number of the first node and the first element of the current search row.

2. The calculation method for determining the position of a line segment by digital twin according to claim 1, characterized in that: include: In step 1, the local numbering order of the points and the local numbering order of the edges in each tetrahedral unit are consistent.

3. The calculation method for determining the position of a line segment by digital twin according to claim 1, characterized in that: include: In step 2, the global numbers of the two points on the edges locally numbered ① in all tetrahedral units are arranged according to the tetrahedral unit numbers to obtain the first numbered matrix; the global numbers of the two points on the edges locally numbered ② in all tetrahedral units are arranged according to the tetrahedral unit numbers to obtain the second numbered matrix; and so on; ...; until the sixth numbered matrix is ​​obtained; the first numbered matrix to the sixth numbered matrix form a 6n×2 initial matrix, where n represents the number of tetrahedral units.

4. The calculation method for determining the position of a line segment by a digital twin according to claim 3, characterized in that: include: In step 2, the elements of the first numbered matrix are the global numbers of the points on the edges of all tetrahedral units with local number 1, the elements of the second numbered matrix are the global numbers of the points on the edges of all tetrahedral units with local number 2, and so on. The elements of the sixth numbered matrix are the global numbers of the points on the edges of all tetrahedral units with local number 6.

5. The calculation method for determining the position of a line segment by a digital twin according to claim 3, characterized in that: include: In step 3, the tetrahedral unit numbers are arranged in order from 1 to n to form the 1st to nth row elements of the first column vector, and then the tetrahedral unit numbers are arranged in order from 1 to n to form the n+1th to 2nth row elements of the first column vector, and so on, to obtain the 6n×1 first column vector.

6. The calculation method for determining the position of a line segment by digital twin according to claim 3, characterized in that: include: In step 3, the local number of the edge is used to form a second column vector, where the elements of the 1st to nth rows of the second column vector are all 1, the elements of the n+1th to 2nth rows are 2, and so on, to obtain a 6n×1 second column vector.

7. The calculation method for determining the position of a line segment by digital twin according to claim 1, characterized in that: include: The search start row h is calculated as follows: In the formula, i represents the global number of the first node of the target segment, M represents the last element of the first column of the search matrix; If h contains a decimal point, it is rounded up.

8. The calculation method for determining the position of a line segment by digital twin according to claim 7, characterized in that: include: In step 6, if the global number of the first node of the target segment is greater than the first element of the search start row, enter the row above the search start row and search upward until the global number of the first node of the target segment is less than the first element of the current search row, and record the tetrahedral unit number and the local number of the edge where the target segment is located.

9. The calculation method for determining the position of a line segment by a digital twin according to claim 7, characterized in that: include: In step 6, if the global number of the first node of the target segment is smaller than the first element of the search start row, then enter the next row of the search start row and search downward until the global number of the first node of the target segment is greater than the first element of the current search row, and record the tetrahedral unit number and the local number of the edge where the target segment is located.

10. The calculation method for determining the position of a line segment by digital twin according to claim 7, characterized in that: include: In step 6, if the global number of the first node of the target segment is equal to the first element of the search start row, then the search is performed simultaneously on the previous row and the next row of the search start row until the global number of the first node of the target segment is not equal to the first element of the current search row, and the tetrahedral unit number and the local number of the edge where the target segment is located are recorded.

11. A computing system for determining the position of a line segment using a digital twin, for implementing the method according to any one of claims 1 to 10, characterized in that it comprises: Numbering module, initial matrix module, extended matrix module, search matrix module, search start row module, search execution module; A numbering module is used to number all tetrahedral units in the search target, and globally number the points of each tetrahedral unit in sequence according to the numbering sequence of the tetrahedral units; at the same time, each point in any tetrahedral unit is locally numbered, and the six edges of the tetrahedral unit are locally numbered in sequence according to the local number of the point; An initial matrix module, used to arrange the global numbers of each point in the order of tetrahedral unit numbers to obtain a 6n×2 initial matrix, where n represents the number of tetrahedral units; An extended matrix module, used to form a first column vector using tetrahedral unit numbers, form a second column vector using edge local numbers, and use the first column vector and the second column vector to expand the initial matrix to obtain a 6n×4 extended matrix; A search matrix module is used to adjust the order of each row of the extended matrix according to the order of the elements in the first column of the extended matrix from small to large, so as to obtain a search matrix; A search start row module is used to obtain the global numbers of two points in the target line segment, take the point with the smaller global number as the first node of the target line segment, calculate the initial position of the target line segment, and determine the search start row in the search matrix; The search execution module is used to determine the search direction according to the size relationship between the global number of the first node and the first element of the search start row; and to determine the tetrahedral unit number and the local number of the edge where the target line segment is located according to the size relationship between the global number of the first node and the first element of the current search row.

12. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Method and device for constructing three-dimensional grid model

    CN113128095A

  • Three-dimensional Cohesive unit global embedding method

    CN113283147A