A RoboBuilder model building method and device, terminal equipment and storage medium

By using the RoboBuilder model building method and employing feature point matching and a two-stage filtering strategy, the problem of low efficiency in building blocks in existing technologies is solved, and an efficient and accurate virtual building block experience is achieved.

CN121074337BActive Publication Date: 2026-02-17GUANGZHOU JOINMAX DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511613244.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-17
Estimated Expiration
2045-11-06

Smart Images

  • Figure CN121074337B_ABST
    Figure CN121074337B_ABST
Patent Text Reader

Abstract

The application discloses a RoboBuilder model building method and device, terminal equipment and storage medium. The method comprises the following steps: if a historical matching building block model in a last time building matching result exists in a second candidate building block set, the historical matching building block model is taken as a matching building block model; if the historical matching building block model in the last time building matching result does not exist in the second candidate building block set, one other building block model with the smallest relative distance from the picked building block model is determined from the second candidate building block set as the matching building block model; and the picked building block model and the matching building block model are combined and built. The application realizes fast reading of model feature point information from the memory, and then adopts a corresponding building matching strategy according to the model feature point type, so that the accuracy and efficiency of the RoboBuilder model building are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model building, and more particularly to a RoboBuilder model building method, apparatus, terminal device and storage medium. Background Technology

[0002] Virtual building technology for building blocks, as an important application at the intersection of computer-aided design (CAD) and augmented reality (AR), has developed rapidly in recent years with the popularization of digital creative education and the growth in demand for virtual construction. This technology aims to simulate the physical properties and connection logic of physical building blocks through a computer system, enabling users to achieve a similar building experience in a virtual environment. It is widely used in STEM education, product prototyping, and creative entertainment.

[0003] Existing grid-aligned building methods, such as Minecraft-style block building systems, align block positions using preset grid coordinates. While these methods are computationally efficient, they completely ignore the unique connection features of blocks (such as pin holes and pivot holes), failing to simulate the diverse connection methods of real blocks. Users need to make frequent manual adjustments, resulting in low building efficiency. Summary of the Invention

[0004] This invention provides a RoboBuilder model building method, apparatus, terminal device, and storage medium. It quickly reads model feature point information from memory and then adopts a corresponding building matching strategy according to the model feature point type, which greatly improves the accuracy and efficiency of building various types of models.

[0005] To achieve the above objectives, a first aspect of this application provides a RoboBuilder model building method, comprising:

[0006] Calculate the model projections of the picked block model and other block models in the scene on the screen, and determine the intersection relationship between the picked block model and each other block model based on the model projections;

[0007] Select all other block models that intersect with the picked block model to form a first candidate block set;

[0008] Based on the feature points of the picked block model, a target feature point is determined; all other block models containing the target feature point and satisfying the preset matching conditions are selected from the first candidate block set as the second candidate block set;

[0009] If the historical matching block model in the previous matching result exists in the second candidate block set, the historical matching block model is used as the matching block model; if the historical matching block model in the previous matching result does not appear in the second candidate block set, one other block model with the smallest relative distance to the picked block model is determined from the second candidate block set as the matching block model.

[0010] The picked block model and the matching block model are combined and assembled.

[0011] In one possible implementation of the first aspect, before calculating the model projections of the picked block model and other block models in the scene onto the screen, and determining the intersection relationships between the picked block model and each of the other block models based on the model projections, the specific steps include:

[0012] Read the feature point configuration files of the picked block model and other block models in the scene;

[0013] In the data structure of the feature point configuration file, a HashSet collection is used instead of a List collection;

[0014] The feature point configuration file is written into memory.

[0015] In one possible implementation of the first aspect, writing the feature point configuration file into memory specifically includes:

[0016] When the picked-up block model is dragged, a ray is constructed from the camera to the mouse, and the intersection of the ray and the horizontal plane of the floor where the picked-up block model is located is recorded.

[0017] Move the picked block model to the intersection point and adjust the position of the intersection point accordingly.

[0018] In one possible implementation of the first aspect, determining the target feature point based on the feature points of the picked block model, and selecting all other block models containing the target feature point and satisfying preset matching conditions from the first candidate block set as the second candidate block set, specifically includes:

[0019] If the feature point of the picked block model is of the pin type, the pin hole type feature point is the target feature point; if the feature point of the picked block model is of the pin hole type, the pin type feature point is the target feature point.

[0020] Based on the direction vector of the feature point of the picked block model and the direction vector of each target feature point in the first candidate block set, the angle between the direction vector of the feature point of the picked block model and the direction vector of the target feature point is calculated as the first angle;

[0021] If the first included angle is less than a preset first included angle threshold, and the distance between the projection points of the picked block model feature point and the target feature point on the screen is less than a preset first projection threshold, then the other block models corresponding to the target feature point are added to the second candidate block set.

[0022] In one possible implementation of the first aspect, determining the target feature point based on the feature points of the picked block model, and selecting all other block models containing the target feature point and satisfying preset matching conditions from the first candidate block set as the second candidate block set, specifically includes:

[0023] If the feature point of the picked block model is of the shaft type, the feature point of the shaft hole type is the target feature point; if the feature point of the picked block model is of the shaft hole type, the feature point of the shaft type is the target feature point.

[0024] Based on the direction vector of the feature point of the picked block model and the direction vector of each target feature point in the first candidate block set, the angle between the direction vector of the feature point of the picked block model and the direction vector of the target feature point is calculated as the second angle;

[0025] If the second included angle is less than a preset second included angle threshold or greater than a preset third included angle threshold, and the projection line segment of the direction vector of the picked block model feature point and the direction vector of the target feature point on the screen satisfies the intersection condition, then the other block model corresponding to the target feature point is added to the second candidate block set.

[0026] In one possible implementation of the first aspect, determining the target feature point based on the feature points of the picked block model, and selecting all other block models containing the target feature point and satisfying preset matching conditions from the first candidate block set as the second candidate block set, specifically includes:

[0027] If the feature point of the picked block model is a tire, and the hub type is the target feature point; if the feature point of the picked block model is a hub type, and the tire type is the target feature point;

[0028] Based on the direction vector of the feature point of the picked block model and the direction vector of each target feature point in the first candidate block set, the angle between the direction vector of the feature point of the picked block model and the direction vector of the target feature point is calculated as the third angle;

[0029] If the third included angle is less than the preset fourth included angle threshold, and the size of the picked block model feature point is the same as that of the target feature point, and the width of the picked block model feature point is the same as that of the target feature point, and the distance between the projection points of the picked block model feature point and the target feature point on the screen is less than the preset second projection threshold, then the other block models corresponding to the target feature point are added to the second candidate block set.

[0030] In one possible implementation of the first aspect, determining the target feature point based on the feature points of the picked block model, and selecting all other block models containing the target feature point and satisfying preset matching conditions from the first candidate block set as the second candidate block set, specifically includes:

[0031] If the feature point of the picked block model is a universal wheel ball, the universal wheel hub type feature point is the target feature point; if the feature point of the picked block model is a universal wheel hub type, the universal wheel ball type feature point is the target feature point.

[0032] Obtain the size of the feature point of the picked block model and the size of each target feature point in the first candidate block set. If the size of the feature point of the picked block model is the same as the size of the target feature point, and the distance between the projection point of the picked block model feature point and the target feature point on the screen is less than a preset third projection threshold, add the other block model corresponding to the target feature point to the second candidate block set.

[0033] A second aspect of this application provides a RoboBuilder model building apparatus, comprising:

[0034] The intersection determination module is used to calculate the model projections of the picked block model and other block models in the scene on the screen, and determine the intersection relationship between the picked block model and each other block model based on the model projections.

[0035] The first candidate module is used to select all other block models that intersect with the picked block model to form a first candidate block set;

[0036] The second candidate module is used to determine the target feature point based on the feature points of the picked block model; and to select all other block models that contain the target feature point and meet the preset matching conditions from the first candidate block set as the second candidate block set.

[0037] The model matching module is used to select the historical matching block model as the matching block model if the historical matching block model in the previous matching result exists in the second candidate block set; and to determine the other block model with the smallest relative distance to the picked block model from the second candidate block set as the matching block model if the historical matching block model in the previous matching result does not appear in the second candidate block set.

[0038] The model building module is used to combine and build the picked block model and the matching block model.

[0039] A third aspect of this application provides a terminal device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement a RoboBuilder model building method as described above.

[0040] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a RoboBuilder model building method as described above.

[0041] Compared to existing technologies, this invention employs a two-stage screening mechanism from "first candidate set to second candidate set." First, it uses a simple and quick projection intersection to filter potentially connectable blocks (first candidate set), and then uses complex feature point matching for fine-tuning (second candidate set). This cascaded screening strategy avoids the high computational cost of performing full feature point matching on all blocks. When screening elements in the second candidate set, it prioritizes blocks and feature points that are identical to those matched previously. This is useful when users frequently need to continuously connect blocks at the same position during construction (e.g., stacking blocks, building chains). By remembering historical matching states, it can predict the user's next action. In continuous stacking scenarios, users do not need to realign each time; dragging a picked-up block will snap it to the previously stacked position, reducing repetitive operations and significantly improving construction efficiency. Attached Figure Description

[0042] Figure 1 This is a flowchart illustrating a RoboBuilder model building method according to an embodiment of the present invention;

[0043] Figure 2 This is a schematic diagram of the structure of a RoboBuilder model building device provided in an embodiment of the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] Please see Figure 1 An embodiment of the present invention provides a RoboBuilder model building method, comprising:

[0046] S10. Calculate the model projections of the picked block model and other block models in the scene on the screen, and determine the intersection relationship between the picked block model and each other block model based on the model projections.

[0047] S11. Select all other block models that intersect with the picked block model to form a first candidate block set.

[0048] S12. Determine the target feature point based on the feature points of the picked block model; select all other block models containing the target feature point and satisfying the preset matching conditions from the first candidate block set as the second candidate block set.

[0049] S13. If the historical matching block model in the previous matching result exists in the second candidate block set, the historical matching block model is used as the matching block model; if the historical matching block model in the previous matching result does not appear in the second candidate block set, one other block model with the smallest relative distance to the picked block model is determined from the second candidate block set as the matching block model.

[0050] S14. Combine and build the picked block model and the matching block model.

[0051] Step S10 first calculates the projection of the blocks onto the screen and determines their intersection relationships. This design is based on the priority of human visual cognition: when building, users first focus on the visible positional relationships of the blocks on the screen, rather than abstract 3D spatial coordinates. By projecting the 3D scene onto the 2D screen space, the user's visual focus is simulated, concentrating on the blocks that may connect from the user's current perspective.

[0052] Steps S11 and S12 employ a two-stage filtering mechanism: "first candidate set → second candidate set." This is based on the engineering concept of hierarchical processing of computational complexity: first, possible connected blocks are filtered out through simple and fast projection intersection (first candidate set); then, a more complex feature point matching process is used for fine-tuning (second candidate set). This cascaded filtering strategy avoids the high computational cost of performing full feature point matching on all blocks. Users are almost unaware of the system filtering process when dragging blocks, only experiencing a natural snapping effect when they are close to the correct position. This design allows the system to run smoothly on resource-constrained mobile devices, enabling users to enjoy a high-quality building experience anytime, anywhere.

[0053] Step S13 prioritizes matching blocks and feature points identical to those used in the previous match. This is based on the design principle of operational continuity: users often need to continuously connect blocks in the same position during the building process (such as stacking blocks or building chains). By remembering the matching results of previous builds, the system can predict the user's next action and try to match it accordingly to ensure operational continuity. In continuous stacking scenarios, users do not need to realign each time; the system automatically snaps new blocks to the previously stacked positions, reducing repetitive operations. This "memory-based" matching makes building complex structures easy and simple, allowing users to focus more on the creative idea itself rather than the operational details.

[0054] Step S14 combines the matching results. The matched block model serves as the best match. Based on the position of the matched block model, the picked block model is moved to the corresponding position and combined. Rotation and alignment can be performed as needed before combining.

[0055] It's important to note that if a matching block model cannot be found in S13, the skip grid function will be enabled, aligning the position of the picked block model to grid coordinates based on unit distance. When the user confirms the placement of the block (by clicking the left mouse button), the block will be placed on the floor.

[0056] The five steps are not isolated but form an organic and collaborative RoboBuilder model building system: S10's priority selection provides the foundation, S11-S12's two-stage selection optimizes computational efficiency, S13's historical matching mechanism maintains operational continuity, and S14's precise combination completes the building process. These steps support each other and work together to construct a highly realistic virtual building environment.

[0057] In summary, this embodiment enables the model building system to reach new levels in terms of performance, accuracy, and user experience, providing reliable technical support for digital creative education and virtual construction.

[0058] For example, before calculating the model projections of the picked block model and other block models in the scene onto the screen, and determining the intersection relationship between the picked block model and each of the other block models based on the model projections, the process specifically includes:

[0059] Read the feature point configuration files of the picked block model and other block models in the scene.

[0060] In the data structure of the feature point configuration file, a HashSet collection is used instead of a List collection.

[0061] The feature point configuration file is written into memory.

[0062] The time complexity of a lookup operation in a List collection is O(n), and the lookup time increases linearly with the number of feature points. The average time complexity of a lookup operation in a HashSet collection is O(1), and the lookup time is basically unaffected by the number of feature points. In the feature point matching process, each drag operation may involve dozens of feature point queries. Using HashSet can reduce the time of a single query from milliseconds to microseconds, and the improvement in query efficiency directly translates into an improvement in system responsiveness.

[0063] It is important to note that the feature point configuration file includes the following feature point information: feature point position (offset relative to the model center point), feature point type (shaft, pin, shaft hole, pin hole, tire, wheel hub, swivel wheel hub, swivel ball), feature point direction, feature point length (shaft type specific), feature point size (tire, wheel hub, swivel wheel hub, swivel ball specific), and feature point width (tire, wheel hub specific).

[0064] During initial setup, the feature point configuration file of all blocks in the set can be read first and stored in memory. When needed, it can be used directly, thereby reducing repeated calculations each time it is used and greatly improving the speed of setup and matching.

[0065] For example, writing the feature point configuration file into memory specifically includes:

[0066] When the picked-up block model is dragged, a ray is constructed from the camera to the mouse, and the intersection of the ray and the horizontal plane of the floor where the picked-up block model is located is recorded.

[0067] Move the picked block model to the intersection point and adjust the position of the intersection point accordingly.

[0068] Construct a ray from the camera to the mouse and calculate its intersection with the horizontal plane of the floor. Move the block model to this intersection point, ensuring that the vertical axis coordinates conform to the floor plane constraints. All dragged blocks remain on the same horizontal plane with a height deviation of less than 0.01%, eliminating height fluctuations caused by changes in viewing angle in traditional methods.

[0069] It should be noted that the feature point information is read in advance, and the position data is the offset value relative to the center point of the block, which is stored in the block object. When the position of the feature point is needed, the actual coordinates of the feature point in the world coordinates can be calculated based on the block angle, the block's world coordinates, and the feature point offset value.

[0070] The aforementioned technological improvements work together to enable the system to provide a stable and reliable drag-and-drop experience, laying an accurate positional foundation for subsequent feature point matching and block connection. The technical solution is based on standard 3D interaction practices and has been reasonably optimized for block-building scenarios, achieving an effective balance between positioning accuracy, computational efficiency, and user experience.

[0071] For example, the step of determining the target feature point based on the feature points of the picked block model, and selecting all other block models containing the target feature point and satisfying the preset matching conditions from the first candidate block set as the second candidate block set, specifically includes:

[0072] If the feature point of the picked block model is of the pin type, the pin hole type feature point is the target feature point; if the feature point of the picked block model is of the pin hole type, the pin type feature point is the target feature point.

[0073] Based on the direction vectors of the picked block model feature points and the direction vectors of each target feature point in the first candidate block set, the angle between the direction vector of the picked block model feature point and the direction vector of the target feature point is calculated as the first angle. This step calculates the actual position and orientation of the feature point in world coordinates based on the feature point offset value and the block rotation angle.

[0074] If the first included angle is less than a preset first included angle threshold, and the distance between the projection points of the picked block model feature point and the target feature point on the screen is less than a preset first projection threshold, then the other block models corresponding to the target feature point are added to the second candidate block set.

[0075] This solution features a dedicated processing mechanism for matching feature points of pin / pin hole types. Through complementary type matching and verification conditions, it achieves accurate and efficient matching.

[0076] The verification conditions include: first angle verification, checking whether the angle between the direction vectors of the pin and the pin hole is less than the first angle threshold; and projection distance verification, checking whether the distance between the projection points of the two on the screen is less than the first projection threshold. Generally, when the first angle threshold is set to 45°, the matching accuracy is better. When the projection threshold is set to the size of one unit (1 grid corresponds to 1 cm) of projection at this viewpoint, the false matching rate and the false negative rate are optimally balanced. Both conditions must be met simultaneously for a match to be considered valid.

[0077] The above-described method implementations, through type filtering and efficient geometric calculations, ensure that matching time is kept within a reasonable range, adapting to scenarios of varying complexity. The appropriately set thresholds accurately simulate the connection tolerances of solid building blocks, providing a physically intuitive building experience.

[0078] For example, the step of determining the target feature point based on the feature points of the picked block model, and selecting all other block models containing the target feature point and satisfying the preset matching conditions from the first candidate block set as the second candidate block set, specifically includes:

[0079] If the feature point of the picked block model is of the shaft type, the feature point of the shaft hole type is the target feature point; if the feature point of the picked block model is of the shaft hole type, the feature point of the shaft type is the target feature point.

[0080] Based on the direction vector of the feature point of the picked block model and the direction vector of each target feature point in the first candidate block set, the angle between the direction vector of the feature point of the picked block model and the direction vector of the target feature point is calculated as the second angle.

[0081] If the second included angle is less than a preset second included angle threshold or greater than a preset third included angle threshold, and the projection line segment of the direction vector of the picked block model feature point and the direction vector of the target feature point on the screen satisfies the intersection condition, then the other block model corresponding to the target feature point is added to the second candidate block set.

[0082] This solution features a dedicated processing mechanism for feature point matching of shaft / shaft hole types. Through parallel / anti-parallel verification and projection line segment intersection checks, it solves the special technical challenges of shaft connections.

[0083] Set a second included angle threshold (which can be set to 40°~50°) to verify parallelism, and set a third included angle threshold (which can be set to 130°~140°) to verify anti-parallelism. The two angles are complementary angles, covering the positive and negative insertion of the covering axis.

[0084] The combined effect of technological improvements has enabled virtual matching of shaft / hole connections to achieve accuracy and reliability approaching that of physical building blocks. Compared to pin / hole matching, the shaft / hole matching mechanism is specifically optimized for the unique requirements of shaft connections, accurately identifying both parallel and anti-parallel valid connection states while avoiding invalid oblique insertions, providing users with a consistent and predictable mechanism assembly experience. This technical solution achieves an effective balance between matching accuracy and computational efficiency based on the accurate application of the physical characteristics of physical shaft-hole connections.

[0085] For example, the step of determining the target feature point based on the feature points of the picked block model, and selecting all other block models containing the target feature point and satisfying the preset matching conditions from the first candidate block set as the second candidate block set, specifically includes:

[0086] If the feature point of the picked block model is a tire, the hub type is the target feature point; if the feature point of the picked block model is a hub type, the tire type is the target feature point.

[0087] Based on the direction vectors of the feature points of the picked block model and the direction vectors of each target feature point in the first candidate block set, the angle between the direction vector of the feature point of the picked block model and the direction vector of the target feature point is calculated as the third angle.

[0088] If the third included angle is less than the preset fourth included angle threshold, and the size of the picked block model feature point is the same as that of the target feature point, and the width of the picked block model feature point is the same as that of the target feature point, and the distance between the projection points of the picked block model feature point and the target feature point on the screen is less than the preset second projection threshold, then the other block models corresponding to the target feature point are added to the second candidate block set.

[0089] This solution employs a specialized processing mechanism for feature point matching of tire / rim types, and ensures the physical feasibility of the setup through multi-condition verification.

[0090] The third angle verification checks whether the angle between the tire and the rim direction vectors is less than a threshold; size matching verification checks whether the dimensions of the two are consistent; width matching verification checks whether the widths of the two are consistent; projection distance verification checks whether the distance between the projection points of the two on the screen is less than a threshold; all conditions must be met simultaneously for a valid match to be considered valid. Size and width verification simulates the physical compatibility requirements of a physical tire / rim, the angle threshold simulates the rotational tolerance during tire installation, and the projection threshold simulates the installation distance tolerance between the tire and the rim. Rigorous size and width verification ensures the physical feasibility of the connection, fundamentally avoiding incorrect assembly of incompatible parts.

[0091] The combined effect of these technological improvements enables virtual matching of tire / rim connections to achieve accuracy and reliability approaching that of physical building blocks. Compared to matching mechanisms such as pin / hole and axle / hole, tire / rim matching places particular emphasis on strict matching of physical dimensions while allowing for greater angular tolerance, accurately reflecting the characteristics of tire installation in physical building blocks. This technical solution achieves an effective balance between matching accuracy and computational efficiency based on the accurate application of the physical characteristics of physical tire / rim connections.

[0092] For example, the step of determining the target feature point based on the feature points of the picked block model, and selecting all other block models containing the target feature point and satisfying the preset matching conditions from the first candidate block set as the second candidate block set, specifically includes:

[0093] If the feature point of the picked block model is a universal wheel ball, the universal wheel hub type feature point is the target feature point; if the feature point of the picked block model is a universal wheel hub type, the universal wheel ball type feature point is the target feature point.

[0094] Obtain the size of the feature point of the picked block model and the size of each target feature point in the first candidate block set. If the size of the feature point of the picked block model is the same as the size of the target feature point, and the distance between the projection point of the picked block model feature point and the target feature point on the screen is less than a preset third projection threshold, add the other block model corresponding to the target feature point to the second candidate block set.

[0095] This solution features a dedicated processing mechanism for feature point matching of universal wheel ball / hub types. Through size matching and projection distance verification, it achieves accurate identification of universal wheel connections.

[0096] Size matching verification: Checks if the dimensions of the omnidirectional wheel ball bearings and the wheel hub are consistent; Projection distance verification: Checks if the distance between the projected points of the two on the screen is less than a threshold. Both conditions must be met simultaneously for a valid match to be considered valid. The size verification simulates the physical compatibility requirements of a physical omnidirectional wheel, while the projection threshold simulates the installation distance tolerance between the omnidirectional wheel ball bearings and the wheel hub. This accurate handling of the special requirements for omnidirectional wheel connections (size matching takes precedence, angle is not a requirement) provides a building experience that conforms to physical characteristics.

[0097] The combined effect of these technological improvements enables the virtual matching of caster wheel connections to achieve accuracy and reliability approaching that of physical building blocks. Compared to matching mechanisms such as pin / hole and shaft / hole, the caster wheel matching mechanism places particular emphasis on strict dimensional matching while omitting angle verification, accurately reflecting the physical characteristics of a physical caster wheel—its dimensions must match precisely, but its direction can be freely adjusted. Based on the accurate application of the physical characteristics of physical caster wheel connections, this technical solution achieves an effective balance between matching accuracy and computational efficiency, providing users with a consistent and predictable experience in building caster wheel models.

[0098] Compared to existing technologies, the above embodiments employ a two-stage screening mechanism from "first candidate set to second candidate set." First, a simple and quick projection intersection is used to screen potentially connectable blocks (first candidate set). Then, a more complex feature point matching process is used for fine-tuning (second candidate set). This cascaded screening strategy avoids the high computational cost of performing full feature point matching on all blocks. When screening elements in the second candidate set, blocks and feature points identical to those matched previously are prioritized. This is useful when users frequently need to continuously connect blocks at the same position during construction (e.g., stacking blocks, building chains). By remembering historical matching states, the system can predict the user's next action. In continuous stacking scenarios, users do not need to realign each time; dragging a picked-up block will snap it to the previously stacked position, reducing repetitive operations and significantly improving construction efficiency.

[0099] Please see Figure 2 One embodiment of this application provides a RoboBuilder model building device, including: an intersection determination module 20, a first candidate module 21, a second candidate module 22, a model matching module 23, and a model building module 24.

[0100] The intersection determination module 20 is used to calculate the model projections of the picked block model and other block models in the scene on the screen, and determine the intersection relationship between the picked block model and each other block model based on the model projections.

[0101] The first candidate module 21 is used to select all the other block models that intersect with the picked block model to form a first candidate block set.

[0102] The second candidate module 22 is used to determine the target feature point based on the feature points of the picked block model; and to select all other block models that contain the target feature point and meet the preset matching conditions from the first candidate block set as the second candidate block set.

[0103] The model matching module 23 is used to select the historical matching block model as the matching block model if the historical matching block model in the previous matching result exists in the second candidate block set; and to determine another block model from the second candidate block set that has the smallest relative distance to the picked block model as the matching block model if the historical matching block model in the previous matching result does not appear in the second candidate block set.

[0104] The model building module 24 is used to combine and build the picked block model and the matching block model.

[0105] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the RoboBuilder model building device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be elaborated upon here.

[0106] Compared to existing technologies, this embodiment employs a two-stage screening mechanism from "first candidate set to second candidate set." First, it uses a simple and quick projection intersection to screen potentially connectable blocks (first candidate set), and then uses complex feature point matching for fine-tuning (second candidate set). This cascaded screening strategy avoids the high computational cost of performing full feature point matching on all blocks. When screening elements in the second candidate set, blocks and feature points identical to those matched previously are prioritized. This is useful because users often need to continuously connect blocks at the same position during construction (e.g., stacking blocks, building chains). By remembering historical matching states, the system can predict the user's next action. In continuous stacking scenarios, users do not need to realign each time; dragging a picked-up block will snap it to the previously stacked position, reducing repetitive operations and significantly improving construction efficiency.

[0107] One embodiment of this application provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the RoboBuilder model building method as described above.

[0108] One embodiment of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the RoboBuilder model building method as described above.

[0109] The computer device may be a smartphone, tablet, desktop computer, or cloud server, among other computing devices. This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the figures are merely examples of computer devices and do not constitute a limitation on the computer device. It may include more or fewer components than illustrated, or a combination of certain components, or different components, such as input / output devices, network access devices, etc.

[0110] The processor referred to can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0111] In some embodiments, the memory may be an internal storage unit of the computer device, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units of the computer device. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been output or will be output.

[0112] This application provides a computer program product that, when run on a computer device, enables the computer device to execute the steps described in the various method embodiments above.

[0113] In the several embodiments provided in this application, it will be understood that each block in the flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.

[0114] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0115] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A RoboBuilder model building method, characterized in that, The application comprises the following steps: calculating the model projection of the picked-up building block model and other building block models in the scene on the screen, determining the intersection relationship between the picked-up building block model and each other building block model according to the model projection; selecting all the other building block models intersecting with the picked-up building block model to form a first candidate building block set; determining a target feature point according to the feature points of the picked-up building block model, and selecting all the other building block models containing the target feature point and satisfying a preset matching condition from the first candidate building block set as a second candidate building block set; if the historical matching building block model in the last building matching result exists in the second candidate building block set, the historical matching building block model is taken as a matching building block model; if the historical matching building block model in the last building matching result does not exist in the second candidate building block set, an other building block model with the smallest relative distance from the picked-up building block model is determined from the second candidate building block set as a matching building block model; combining the picked-up building block model and the matching building block model for building; Before the step of calculating the model projection of the picked-up building block model and other building block models in the scene on the screen, and determining the intersection relationship between the picked-up building block model and each other building block model according to the model projection, the application specifically comprises the following steps: reading the feature point configuration file of the picked-up building block model and other building block models in the scene; using a HashSet set to replace a List set in the data structure of the feature point configuration file; writing the feature point configuration file into the memory; After the step of writing the feature point configuration file into the memory, the application specifically comprises the following steps: when the picked-up building block model is dragged, a ray is constructed from the camera to the mouse direction, and the intersection point of the ray and the floor level where the picked-up building block model is located is recorded; moving the picked-up building block model to the intersection point and determining the position of the intersection point.

2. A RoboBuilder modeling method according to claim 1, wherein, The application specifically comprises the following steps in the step of determining a target feature point according to the feature points of the picked-up building block model, and selecting all the other building block models containing the target feature point and satisfying a preset matching condition from the first candidate building block set as a second candidate building block set: if the feature points of the picked-up building block model are pin type, the pin hole type feature points are target feature points; if the feature points of the picked-up building block model are pin hole type, the pin type feature points are target feature points; calculating the included angle between the direction vector of the feature points of the picked-up building block model and the direction vector of each target feature point in the first candidate building block set as a first included angle; if the first included angle is smaller than a preset first included angle threshold, and the distance between the projection points of the feature points of the picked-up building block model and the target feature points on the screen is smaller than a preset first projection threshold, the other building block model corresponding to the target feature point is added to the second candidate building block set.

3. The RoboBuilder modeling method of claim 1, wherein, The target feature point is determined according to the picked-up building block model feature point, and all the other building block models containing the target feature point and satisfying a preset matching condition are selected from the first candidate building block set as a second candidate building block set, specifically including: If the picked-up building block model feature point is a shaft type, a shaft hole type feature point is the target feature point; if the picked-up building block model feature point is a shaft hole type, a shaft type feature point is the target feature point; A second included angle between the direction vector of the picked-up building block model feature point and the direction vector of each target feature point in the first candidate building block set is calculated as the second included angle. If the second included angle is less than a preset second included angle threshold or greater than a preset third included angle threshold, and a projection line segment of the direction vector of the picked-up building block model feature point and the direction vector of the target feature point on the screen satisfies an intersection condition, the other building block model corresponding to the target feature point is added to the second candidate building block set; the second included angle threshold is less than the third included angle threshold, and the second included angle threshold and the third included angle threshold are complementary angles.

4. The RoboBuilder modeling method of claim 1, wherein, The target feature point is determined according to the picked-up building block model feature point, and all the other building block models containing the target feature point and satisfying a preset matching condition are selected from the first candidate building block set as a second candidate building block set, specifically including: If the picked-up building block model feature point is a tire, a hub type is the target feature point; if the picked-up building block model feature point is a hub type, a tire type is the target feature point; A third included angle between the direction vector of the picked-up building block model feature point and the direction vector of each target feature point in the first candidate building block set is calculated as the third included angle. If the third included angle is less than a preset fourth included angle threshold, and the picked-up building block model feature point and the target feature point are of the same size, and the picked-up building block model feature point and the target feature point are of the same width, and a projection point distance between the picked-up building block model feature point and the target feature point on the screen is less than a preset second projection threshold, the other building block model corresponding to the target feature point is added to the second candidate building block set.

5. The RoboBuilder modeling method of claim 1, wherein, The target feature point is determined according to the picked-up building block model feature point, and all the other building block models containing the target feature point and satisfying a preset matching condition are selected from the first candidate building block set as a second candidate building block set, specifically including: If the picked-up building block model feature point is a universal wheel ball, a universal wheel hub type feature point is the target feature point; if the picked-up building block model feature point is a universal wheel hub type, a universal wheel ball type feature point is the target feature point; Obtain the size of the feature point of the picked block model and the size of each target feature point in the first candidate block set. If the size of the feature point of the picked block model is the same as the size of the target feature point, and the distance between the projection point of the picked block model feature point and the target feature point on the screen is less than a preset third projection threshold, add the other block model corresponding to the target feature point to the second candidate block set.

6. A RoboBuilder model building device, characterized by, include: The intersection determination module is used to calculate the model projections of the picked block model and other block models in the scene on the screen, and determine the intersection relationship between the picked block model and each other block model based on the model projections. The first candidate module is used to select all other block models that intersect with the picked block model to form a first candidate block set; The second candidate module is used to determine the target feature point based on the feature points of the picked block model; and to select all other block models that contain the target feature point and meet the preset matching conditions from the first candidate block set as the second candidate block set. The model matching module is used to select the historical matching block model as the matching block model if the historical matching block model in the previous matching result exists in the second candidate block set; and to determine the other block model with the smallest relative distance to the picked block model from the second candidate block set as the matching block model if the historical matching block model in the previous matching result does not appear in the second candidate block set. The model building module is used to combine and build the picked block model and the matching block model; Before calculating the model projections of the picked block model and other block models in the scene onto the screen, and determining the intersection relationships between the picked block model and each of the other block models based on the model projections, the process specifically includes: Read the feature point configuration files of the picked block model and other block models in the scene; In the data structure of the feature point configuration file, a HashSet collection is used instead of a List collection; Write the feature point configuration file into memory; After writing the feature point configuration file into memory, the specific steps include: When the picked-up block model is dragged, a ray is constructed from the camera to the mouse, and the intersection of the ray and the horizontal plane of the floor where the picked-up block model is located is recorded. Move the picked block model to the intersection point and adjust the position of the intersection point accordingly.

7. A terminal device, characterized by comprising: The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement a RoboBuilder model building method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements a RoboBuilder model building method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Building block building method and intelligent terminal

    CN115797608A

  • Programming building block sharing method and device, equipment, medium and program product

    CN119938021A