Real-time roaming path optimization method, system and equipment based on three-dimensional building scene
By using segmented cutting method and improved Bellman-Ford algorithm to optimize the roaming path in three-dimensional architectural scenarios, the problems of low roaming path generation efficiency and relying on manual path selection in the existing technology are solved, and efficient and accurate roaming path planning is achieved. .
Patent Information
- Application Number
- CN202411173433.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the generation of roaming paths of three-dimensional building scenes is low, and it relies on manual selection and path recording, resulting in large manual workload, strong subjectivity, low efficiency and poor effect.
The real-time roaming path optimization method based on three-dimensional architectural scenes is adopted. By positioning the roaming starting point and target point, the roaming path is generated and optimized using the segmented cutting method and the improved Bellman-Ford algorithm, and the curve smoothing optimization is performed through the least squares method.
It realizes efficient, accurate and elegant roaming path planning, reduces manual workload, eliminates errors caused by proficiency, and improves the effect and efficiency of three-dimensional scene roaming.
Smart Images

Figure CN119516093A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of roaming path optimization, and in particular to a real-time roaming path optimization method, system and device based on a three-dimensional building scene. Background Art
[0002] Three-dimensional building scene technology is a cutting-edge technology that has rapidly developed in the past two decades. It organically combines the three industries of architecture, engineering and construction, and accurately displays the virtual digital model of the building. It can assist designers, construction personnel, etc. in visualizing the buildings to be built, thereby identifying potential design and operation problems, and can even play a role in project delivery and monitoring the entire life cycle of the project. At the same time, it integrates multiple technologies such as machine graphics, human-computer interaction and data monitoring, and realizes the purpose of requesting users to view and dynamically monitor scene information in real time through virtual digital models. Real-time roaming based on three-dimensional building scenes is the best expression and auxiliary means in terms of unblocking communication channels among all parties involved in the project, unblocking the expression of design intent and enhancing the preview of construction effects, and assisting in architectural design briefing and project construction effect preview.
[0003] Prior art 1, application number CN202111608582.8 discloses a method for automatically constructing a three-dimensional building scene, including obtaining remote sensing image data and vector data; extracting community zoning boundaries and building outline data; based on remote sensing image data and building outline data, using them to obtain building classification prediction results; based on classification prediction results and building sample data, obtaining new building data; based on new building data and vector data, obtaining building outline vector data, and generating a two-dimensional building information model based on it and remote sensing image data; matching in a three-dimensional building model library based on the two-dimensional building information model, obtaining a building model whose matching value meets a preset threshold as a three-dimensional building model. Although the comprehensive use of remote sensing image data, vector data and three-dimensional building model library realizes the automatic construction of high-quality urban-level three-dimensional building scenes, improves the utilization rate of building model data accumulated during the three-dimensional scene construction process, and enhances the position matching accuracy of batch construction of building models. However, data processing is cumbersome and overly dependent on the accuracy of the model, resulting in a low path generation rate.
[0004] Prior art 2, application number CN202211708777.4 discloses a roaming path planning method for a mine digital twin system based on a differential evolution algorithm. According to the longitudinal section diagram inside the mine, a grid data model under a specified mine rasterization density is used to represent the map environment, and the reachable path points in the mine are represented as a rasterized mine reachable position matrix through discrete grids; the optimization objectives and constraints of the task are determined; the improved differential evolution algorithm is used to solve the optimal mine digital twin system roaming path planning scheme, which can replace the fixed differential strategy with the ability to adaptively select from 4 differential strategies by taking advantage of the characteristics of the differential evolution algorithm's strong global convergence ability, high robustness, and no need to use the characteristic information of the problem, and at the same time add polynomial mutation as an additional mutation method to improve the algorithm's ability to jump out of the local optimum. Although the technical problems of the roaming path planning method in the prior art that it is easy to fall into the local optimal solution and the convergence speed are full are solved. However, the path planning process is complicated, resulting in a high time cost, and also puts forward better requirements for operators.
[0005] Prior art three, application number CN202111151452.6 discloses a path roaming method for Web-side three-dimensional scene posture adaptation that takes into account terrain undulations, including: obtaining existing element graphics in the ecological space, the existing element graphics in the ecological space have continuous XY coordinate points; using the Douglas node suction algorithm to simplify the existing element graphics in the ecological space, and retaining the nodes as automatic roaming path nodes; based on the automatic roaming path nodes, combined with the terrain data in the three-dimensional scene, the roaming posture parameters of each frame of the three-dimensional scene during the roaming process are calculated in real time; in the Web-side browser, each frame of the three-dimensional scene is rendered and refreshed in real time to complete the process of automatic roaming along the automatic roaming path nodes without relying on manual roaming records. Although automatic roaming browsing can be quickly carried out based on different ecological space elements, and the three-dimensional scene picture is normal, timely undulating and smoothly turning throughout the journey, the path automatic roaming effect of the Web-side three-dimensional map is improved. However, it cannot be combined with actual engineering applications, and roaming path optimization is not implemented.
[0006] At present, the roaming algorithm for three-dimensional building scenes mostly adopts the mode of manual path selection and path recording, which has a large manual workload and strong subjectivity, and the smoothness of path selection depends on the manual operation proficiency of personnel, which is inefficient and has poor effect. Therefore, the present invention proposes a path optimization method based on the starting point and the target point, which intelligently generates a smooth, beautiful, optimized and intelligent roaming path in the three-dimensional building scene according to the roaming starting point and the target point; combined with actual engineering applications, it reduces manual workload and eliminates manual errors caused by proficiency. On the basis of the existing roaming algorithm, the roaming path optimization algorithm of the three-dimensional building scene is further improved, with high path generation efficiency and accurate positioning calculation, which will effectively and significantly improve the roaming effect of the three-dimensional scene, and there are no application cases in this regard in the current industry. Summary of the invention
[0007] The main purpose of the present invention is to provide a real-time roaming path optimization method, system and equipment based on three-dimensional building scenes to solve the problems in the prior art of large manual workload and strong subjectivity of the path, the smoothness of path selection depends on the manual operation proficiency of the personnel, low efficiency and poor effect.
[0008] To achieve the above object, the present invention provides the following technical solutions:
[0009] A real-time roaming path optimization method based on a three-dimensional building scene, the real-time roaming path optimization method comprising:
[0010] Locate the location information of the roaming starting point and the target point, select the roaming starting point and the target point in the drawn three-dimensional simulated building scene, and obtain the three-dimensional coordinate location information of the starting point and the target point respectively;
[0011] According to the obtained three-dimensional coordinate position information, a global roaming path from the roaming starting point to the target point is generated by the segment cutting method. Each segment path passes through each key point of the roaming path, i.e., the opening, in turn, and finally connects into a complete and continuous roaming path;
[0012] Based on the generated roaming path, the shortest path is solved, and the improved Bellman-Ford algorithm is used to optimize the roaming path. The shortest roaming path is optimized for curve smoothing. In three-dimensional coordinates, the least squares curve fitting method is used to generate a smooth curve passing through key points. At the same time, the three-dimensional geometric position information of the roaming path is generated and recorded.
[0013] Generate a roaming path visual file associated with the scene along the data, and calculate the scene information that needs to be displayed during the roaming process according to the visual aesthetics algorithm, including three-dimensional geometric information, roaming path information and key points. Then, display the roaming scene in accordance with human visual aesthetics, that is, reconstruct the scene based on the roaming path visual file.
[0014] As a further improvement of the present invention, a machine learning method is used to analyze the user's clicking habits in the three-dimensional building scene to predict the selection of the starting point and the target point, including:
[0015] In a 3D building scene, record the user's click events, including the coordinate information of the starting point and the target point, timestamp, the user's navigation path and the mouse movement trajectory; collect data related to the building scene, and protect the layout, spatial distribution and building characteristics of the scene;
[0016] Extract key features from the collected data to protect the user's click frequency in the 3D building scene, the spatial distance between the starting point and the target point, and the user's historical selection pattern; use the chi-square test to select features that have a significant impact on the prediction results;
[0017] Select a machine learning model decision tree and divide the collected user data into training set, validation set and test set in a ratio of 8:1:1; use the training set to train the selected machine learning model and use the validation set to adjust the hyperparameters; use the test set to evaluate the trained machine learning model and calculate the accuracy and recall set F1 score indicators.
[0018] As a further improvement of the present invention, obtaining the three-dimensional coordinate position information of the starting point and the target point includes:
[0019] Create a roaming path information data stack;
[0020] Determine whether the roaming start point and target point are legal. If the roaming start point and target point are located on a wall or other fixed obstacles, or if the distance between the start point / target point and the surrounding obstacles is less than half of the single flow of people, it is considered invalid.
[0021] After determining the roaming start point and target point, add the roaming start point to the path stack and mark the roaming start point as a passed point.
[0022] As a further improvement of the present invention, a complete and continuous roaming path is connected, including:
[0023] Create a roaming path key point data stack, and add the roaming path starting point to the stack, numbered as 1, calculate the azimuth of the target point based on the roaming starting point, determine all key points in the building scene by the roaming path key point determination method, and add them to the key point stack after numbering them in sequence; when determining the key points, check whether there are new key points in combination with real-time monitoring data, and then add them to the key point stack;
[0024] Find the key point closest to the roaming starting point along the azimuth, and determine whether the two are connected. When determining the connection with the starting point, update the key point information in the stack in time to ensure that the path planning is based on the latest information. If so, draw the roaming path from the roaming starting point to the key point. Otherwise, continue to find the second closest key point, and so on, and mark the current key point as a passed point.
[0025] The segmented roaming path information is added to the path stack, and the key point at this time is marked as the current local point. It is determined whether there is a wall or obstacle between the local point and the roaming target point. If there is still an obstacle, the iterative segment cutting method is continued to draw the segmented roaming path from the local point to the key point, and the segmented roaming path is added to the path stack; otherwise, the segmented roaming path from the local point to the roaming target point is drawn; in the segmented path planning process, the new environment between the local point and the target point is dynamically evaluated, possible obstacles are updated and adjusted, and the latest path is drawn;
[0026] The segmented roaming path is added to the path stack to complete the continuous roaming path from the roaming starting point to the target point, and the target point is added to the key point stack and numbered n; after completing the path from the starting point to the target point, the newly identified key points are marked as a reference for the system's future path planning and form a feedback mechanism.
[0027] As a further improvement of the present invention, judging whether the hole meets the key point of the roaming path includes:
[0028] Traverse to find the 3D coordinate position information of all openings in the building scene, and determine whether all openings meet the key point standard. The specific standard is that when its width is greater than 0.55 meters, the opening is judged to meet the standard and is numbered i+1. Otherwise, it is filtered out, and the center coordinates of the opening are recorded as the position information of the key point, and added to the key point stack. Finally, the key point is numbered n-1;
[0029] Traverse the key point stack along the azimuth direction to find the key point closest to the current point. If the distance from the current point to the key point is smooth, draw the roaming path from the current point to the key point; otherwise, select the next closest key point, and so on;
[0030] If the path from this site to other key points other than its parent site is blocked, return to the parent site, select the key point next to the parent site to find the path, and so on, mark the key point as a passed point, add the segmented roaming path from this site to the key point to the path stack, and mark the current key point as the current site.
[0031] As a further improvement of the present invention, an improved Bellman-Ford algorithm is used to optimize the roaming path, including:
[0032] Create a distance array dis of the key points of the path. If the number of elements in the key point stack is n, the length of the array is n. Each element of the array represents the distance from the starting point of the roaming path to the numbered key point, and dis[1] = 0;
[0033] According to the roaming path calculated in step S2, the dis array is initialized, that is, each element of the array is the distance from the roaming starting point to each key point in S2, and the value of the unconnected node is ∞;
[0034] Select the node m with the smallest element in the array, find all the exit nodes i of the node, compare the sizes of dis[i] and dis[m]+dis[m→i], if the former is larger, update the corresponding element in the array to dis[m]+dis[m→i]; otherwise, keep the original value; repeat this step, traverse all nodes in the array, solve the shortest roaming path value, and record the shortest roaming path.
[0035] As a further improvement of the present invention, generating three-dimensional geometric position information of the roaming path includes:
[0036] Extract the position information in the key point stack as the observation point of the roaming path (x i ,y i ,z i ), assuming that there exists a theoretical function F = f((x, y), w) such that all observation points in the key point stack are infinitely close to the theoretical function;
[0037] The objective function is defined as the sum of squares of the difference between the observation point and the theoretical function value. For n groups of observation points, the optimization goal is
[0038] While smoothing the roaming path, there are certain constraints due to the presence of walls and other obstacles inside the simulated building. The specific constraints are: 2d[(x,y)→obstacle]≥0.55. The theoretical function of the optimization target under the constraints is solved to obtain the fitted smooth curve roaming path.
[0039] As a further improvement of the present invention, the smooth curve optimization includes:
[0040] Deploy multiple sensors in three-dimensional building scenes, including lidar, cameras, and depth sensors, to collect real-time environmental data inside the building; use computer vision to identify obstacles, such as walls, furniture, and equipment; establish an obstacle type database, classify the collected obstacle information, and determine its type, shape, and approximate size; integrate the on-site obstacle background with the dynamic environment, and update the obstacle location and category in real time;
[0041] Monitor the environment in real time according to the preset cycle and record the changes in the position of obstacles. Use drones to continuously track the changes in buildings. Input this monitoring data into the system. Dynamically adjust the constraints in the optimization process according to the identified obstacle types, and set the impact of different types of obstacles on the path: set stricter safety distances for walls and large objects; set smaller safety distances for small objects such as chairs and tables.
[0042] Calculate the safe distance between the user and the obstacle in real time, and dynamically monitor safety based on the user's current speed, direction of movement, and type of obstacle; adjust the safety boundary conditions for path generation based on the current environmental status to ensure that the user remains safe during roaming; add dynamic constraint detection to the Bellman-Ford algorithm in roaming path planning, and re-evaluate the constraints of the key points involving the obstacle whenever a new obstacle is detected or the obstacle changes; use recursive or iterative methods to update the path in real time to ensure path safety and smoothness; based on the user's real-time feedback and obstacle data, use the regenerated path algorithm to instantly adjust the user's roaming path when the user approaches an obstacle to avoid potential risks; when the user faces turning or obstacle avoidance, the algorithm recommends the optimal safe path and displays it in real time on the roaming interface.
[0043] To achieve the above object, the present invention also provides the following technical solutions:
[0044] A real-time roaming path optimization system based on a three-dimensional building scene, which is applied to the real-time roaming path optimization method based on a three-dimensional building scene, and the real-time roaming path optimization system based on a three-dimensional building scene comprises:
[0045] The scene modeling and data input module is responsible for drawing and constructing three-dimensional simulated building scenes, including the modeling of buildings, roads, and openings;
[0046] The path planning module is responsible for receiving the three-dimensional coordinate position information of the starting point and the target point, and using the segment cutting method to generate a global roaming path from the starting point to the target point, including determining and connecting the key points of each roaming path;
[0047] The path optimization module is responsible for receiving the global roaming path generated by the path planning module, optimizing the path using the improved Bellman-Ford algorithm, finding the shortest path, optimizing the shortest path by using the least square method to smooth the curve, generating a smooth and practical roaming path, and recording and saving the three-dimensional geometric position information of the optimized roaming path;
[0048] The visual processing and display module is responsible for generating scene-associated roaming path visual files based on the optimized roaming path and three-dimensional scene data, and reconstructing the scene, combining the roaming path with the three-dimensional scene, and displaying the roaming process in a way that conforms to human visual aesthetics.
[0049] To achieve the above-mentioned purpose, the present invention also provides the following technical solution: an electronic device, comprising a processor and a memory coupled to the processor, the memory storing program instructions that can be executed by the processor; when the processor executes the program instructions stored in the memory, the real-time roaming path optimization method based on the three-dimensional building scene is implemented.
[0050] The present invention realizes efficient, accurate and elegant roaming path planning through the synergy of four steps in the real-time roaming path optimization method based on three-dimensional architectural scenes. It not only improves the roaming experience of users in three-dimensional architectural scenes, but also promotes the application of technology in the fields of virtual reality (VR), augmented reality (AR) and architectural visualization, and promotes the exploration of more new application scenarios with both intuitiveness and interaction. Overall, this method can greatly improve the dynamic interaction mode of architectural planning, design and display, and provide users with high-quality visual and operational experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of the steps of an embodiment of a real-time roaming path optimization method based on a three-dimensional building scene of the present invention;
[0052] Figure 2 A schematic diagram of an embodiment of a real-time roaming path optimization method based on a three-dimensional building scene of the present invention;
[0053] Figure 3 A schematic flow chart of steps for obtaining three-dimensional coordinate position information of a starting point and a target point in an embodiment of a real-time roaming path optimization method based on a three-dimensional building scene of the present invention;
[0054] Figure 4 A schematic flow chart of steps for connecting a complete and continuous roaming path according to an embodiment of a real-time roaming path optimization method based on a three-dimensional building scene of the present invention;
[0055] Figure 5 A schematic flow chart of the steps of determining whether a hole meets the key points of a roaming path in an embodiment of a real-time roaming path optimization method based on a three-dimensional building scene of the present invention;
[0056] Figure 6 A schematic flow chart of the steps of optimizing the roaming path using an improved Bellman-Ford algorithm in one embodiment of the real-time roaming path optimization method based on a three-dimensional building scene of the present invention;
[0057] Figure 7 A schematic flow chart of steps for generating three-dimensional geometric position information of a roaming path according to an embodiment of a real-time roaming path optimization method based on a three-dimensional building scene of the present invention;
[0058] Figure 8 A schematic flow chart of the steps of calculating the scene information to be displayed during the roaming process according to an embodiment of the real-time roaming path optimization method based on a three-dimensional building scene of the present invention;
[0059] Fig. 9 A schematic diagram of functional modules of an embodiment of a real-time roaming path optimization system based on a three-dimensional building scene of the present invention;
[0060] Fig.10 It is a structural schematic diagram of an embodiment of an electronic device of the present invention;
[0061] Fig.11 It is a schematic structural diagram of an embodiment of the storage medium of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] The terms "first", "second" and "third" in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as "first", "second" and "third" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
[0064] Reference to an "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0065] like Figure 1 As shown, this embodiment provides an embodiment of a real-time roaming path optimization method based on a three-dimensional building scene. In this embodiment, the real-time roaming path optimization method based on a three-dimensional building scene specifically includes the following steps:
[0066] Step S1: Locate the position information of the roaming starting point and the target point, select the roaming starting point and the target point in the drawn three-dimensional simulated building scene, and obtain the three-dimensional coordinate position information of the starting point and the target point respectively;
[0067] Step S2: Based on the obtained three-dimensional coordinate position information, a global roaming path from the roaming starting point to the target point is generated by a segmented cutting method, and each segmented path passes through each roaming path key point (i.e., opening, referred to as key point) in sequence and is finally connected into a complete and continuous roaming path;
[0068] Step S3: continue to solve the shortest path based on the generated roaming path, use the improved Bellman-Ford algorithm to optimize the roaming path, perform curve smoothing optimization on the shortest roaming path, use the least squares curve fitting method to generate a smooth curve passing through key points in three-dimensional coordinates, and generate and record the three-dimensional geometric position information of the roaming path;
[0069] Step S4: Generate a scene-associated roaming path visual file along the data of S3, calculate the scene information that needs to be displayed during the roaming process according to the visual aesthetics algorithm, including three-dimensional geometric information, roaming path information and key points, and then display the roaming scene in accordance with human visual aesthetics, that is, reconstruct the scene based on the roaming path visual file.
[0070] Preferably, step S1 of this embodiment locates the location information of the roaming starting point and the target point. By locating the starting point and the target point, clear three-dimensional coordinate information is generated, which is the basis for the entire path generation; it ensures high-precision location data for the three-dimensional building scene, laying the foundation for subsequent algorithms. The significance achieved: it provides an accurate starting point and end point for the construction of the entire roaming path, thereby ensuring the reliability of the path planning results; it effectively responds to the needs of users, so that they can realize customized roaming according to specific starting points and targets. Step S2 generates a global roaming path. The roaming path generated by the segmented cutting method is connected into a complete travel path through key points (such as openings); it ensures that each key point passed by the path is a valid structure, ensuring safety and walking smoothness. The significance achieved: it ensures the natural and smooth flow of the path in three-dimensional space, and improves the basis for subsequent path optimization; it effectively accommodates key points in a variety of scenarios, which helps users to achieve convenient navigation in complex architectural environments. Step S3 optimizes the roaming path. Through the improved Bellman-Ford algorithm, the global roaming path is further solved and optimized to ensure that the path is shortest and efficient. The least squares method is used for curve fitting to make the path smooth in three-dimensional coordinates and more consistent with the real environment. The significance achieved: reduce the time cost of users in the roaming process, making the path more practical; through smoothing optimization, the visual experience in the virtual roaming process is improved, making the path more natural and avoiding visual discomfort caused by drastic changes. Step S4 generates a scene-related roaming path visual file, calculates the display information in the roaming process based on the visual aesthetic algorithm, ensures that the key points and the path are effectively integrated; performs scene display that matches the user's visual experience, and creates an interactive visual scene. The significance achieved: through excellent visual design and interface layout, enhance the user's sense of immersion and participation, which is conducive to a better understanding of three-dimensional architectural space; ensure that users can quickly obtain the required information and make decisions more easily, and optimize the overall experience.
[0071] In summary, the entire real-time roaming path optimization method based on three-dimensional building scenes in this embodiment realizes efficient, accurate and elegant roaming path planning through the synergy of these four steps. It not only improves the user's roaming experience in three-dimensional building scenes, but also promotes the application of technology in virtual reality (VR), augmented reality (AR) and architectural visualization, and promotes the exploration of more new application scenarios with both intuitiveness and interaction. Overall, this method can greatly improve the dynamic interaction mode of architectural planning, design and display, and provide users with high-quality visual and operational experience.
[0072] This embodiment assists BIM design, design visualization disclosure in construction projects, and construction effect detection, and is applied to real-time optimization calculation of roaming paths in three-dimensional building scenes; through user interaction, a starting point and a target point are selected in a three-dimensional simulated building scene, and a segment cutting method is used to divide the path into multiple segments according to the spatial structure in the building, each segment is connected to one or more key points, and these segments are connected in sequence to form a global path from the starting point to the target point; the improved Bellman-Ford algorithm is used to calculate the shortest path from the starting point to the target point, and then the least squares method is used to perform curve smoothing optimization on the shortest path; based on the optimized roaming path and three-dimensional scene data, combined with a visual aesthetic algorithm, the three-dimensional geometric information, roaming path information, and key points that need to be displayed during the roaming process are calculated (for details, refer to the attached Figure 2 ).
[0073] In summary, this embodiment proposes a path optimization method based on a starting point and a target point, which intelligently generates a smooth, beautiful, optimized and intelligent roaming path in a three-dimensional building scene according to the roaming starting point and the target point; combined with actual engineering applications, it reduces manual workload and eliminates manual errors caused by proficiency. On the basis of the existing roaming algorithm, the roaming path optimization algorithm of the three-dimensional building scene is further improved, and the path generation efficiency is high and the positioning calculation is accurate, which will effectively and significantly improve the roaming effect of the three-dimensional scene.
[0074] Furthermore, in step S1, using a machine learning method to analyze the user's clicking habits in the three-dimensional building scene to predict the selection of the starting point and the target point specifically includes the following steps:
[0075] In a 3D building scene, record the user's click events, including the coordinate information of the starting point and the target point, timestamp, the user's navigation path and the mouse movement trajectory; collect data related to the building scene, and protect the layout, spatial distribution and building characteristics of the scene;
[0076] Extract key features from the collected data to protect the user's click frequency in the 3D building scene, the spatial distance between the starting point and the target point, the user's historical selection pattern, etc.; use the chi-square test to select features that have a significant impact on the prediction results;
[0077] Select a machine learning model decision tree and divide the collected user data into training set, validation set, and test set in a ratio of 8:1:1; use the training set to train the selected machine learning model and use the validation set to adjust the hyperparameters; use the test set to evaluate the trained machine learning model and calculate indicators such as accuracy and recall set F1 score.
[0078] Preferably, the recording of the user's click events in this embodiment records the user's click events in real time in the three-dimensional building scene, including the three-dimensional coordinates of the starting point and the target point, timestamp, navigation path, mouse movement trajectory and other information, forming a rich user behavior data set; by recording the user's click behavior, the system can fully understand the user's interaction mode in a specific environment; it provides sufficient data support for subsequent analysis and model training, so that the prediction model can be trained based on real user behavior. Collect data related to the building scene to obtain information such as the layout, spatial distribution, and building characteristics of the building scene, and provide context information for user click judgment. The significance achieved: Combine user behavior with environmental characteristics to provide a more comprehensive input for the model, so that it can understand the possible click points of users in different environments. This can improve the adaptability of the model to different spaces and enhance the accuracy of prediction. Feature extraction and selection Extract important features that affect user behavior from the collected data, such as the user's click frequency in the three-dimensional scene, the spatial distance between the starting point and the target point, the user's historical selection pattern, etc.; use statistical methods such as chi-square test to select features that have a significant impact on the prediction results to further optimize the model input. Significance achieved: Through feature selection, the data dimensions that need to be processed by model training can be reduced, the computational complexity can be reduced, and the model efficiency can be improved; at the same time, by selecting influential features, the accuracy of the model's prediction of real user behavior can be increased. Data set partitioning divides the collected user data into training set, validation set, and test set, usually in a ratio of 8:1:1. This approach ensures the effectiveness of the model. Significance achieved: By partitioning the data set, the generalization ability of the model can be effectively evaluated, and it can be ensured that the model will not memorize the training data during the training process but learn the potential laws of the data, which can improve the performance of the model on unknown data. Model training, using the training set to train the selected decision tree model, optimize the model weights, and learn the laws of user selection of starting points and target points; use the validation set to adjust hyperparameters and optimize model performance. Significance achieved: Through training and tuning, the decision tree model can learn complex user behavior patterns, thereby accurately predicting possible user behaviors, making the system personalized and intelligent, and improving user experience. Model evaluation, using the test set to evaluate the trained model, calculate indicators such as accuracy, recall, and F1 score to test model performance. Significance achieved: Through accurate evaluation indicators, the effectiveness of the model in practical applications can be verified, which can ensure the reliability of the model in real scenarios. This lays the foundation for the launch of the model and future optimization.
[0079] In summary, through these steps, the machine learning method of this embodiment can effectively analyze the user's clicking habits in the three-dimensional building scene to accurately predict the user's starting point and target point selection. This process not only achieves a deep understanding of user behavior, but also improves the accuracy and adaptability of the prediction model by combining environmental characteristics. This data-driven approach enables the system to adapt to different users and environmental conditions in real time, thereby significantly improving the user experience.
[0080] Furthermore, if Figure 3 As shown, the process of obtaining the three-dimensional coordinate position information of the starting point and the target point in step S1 specifically includes the following steps:
[0081] Step S11: creating a roaming path information data stack (referred to as path stack);
[0082] Step S12: Determine whether the positions of the roaming start point and the target point are legal. When the roaming start point and the target point are located on a wall or other fixed obstacles, or the distance between the start point / target point and the surrounding obstacles is less than half of the single flow of people, it is considered invalid (in this algorithm, if there is no special definition, the default single flow of people is 0.55 meters per share in this embodiment);
[0083] Step S13: After determining the roaming start point and the target point, the roaming start point is added to the path stack, and the roaming start point is marked as a passed point.
[0084] Preferably, step S11 of this embodiment creates a roaming path information data stack (path stack), establishes the path stack as a data structure, and is used to store key points and path information in the roaming path; the path stack allows the dynamic addition and removal of points in the roaming path, which is convenient for subsequent path expansion and debugging. Significance achieved: It helps to effectively manage and track path information, especially in complex building structures, so that changes and selections of paths can be easily viewed; it provides operational flexibility for subsequent steps, so that the generation and adjustment of roaming paths can be modified in real time according to user needs or environmental changes. Step S12 determines whether the positions of the roaming starting point and the target point are legal, and through logical judgment, ensures that the roaming starting point and the target point are not located on the wall or other obstacles, thereby ensuring the safety of the roaming process; calculates the distance between the starting point and the target point and the surrounding obstacles, and if it is less than half of the single flow of people, it is judged to be illegal. Significance achieved: By setting reasonable rules and standards, it is ensured that the roaming path is feasible, and unexpected situations and incoherence in the virtual environment are reduced; prevents users from encountering unnecessary obstacles during roaming, improves the overall user experience, and makes the roaming process appear real and natural. Step S13 determines the starting point and the target point and adds them to the path stack. The legal roaming starting point that has been checked is added to the path stack and marked as a point that has been passed. The current legal starting point is recorded as the basis for subsequent path calculation. Significance achieved: By confirming and recording the legal points, the foundation for path planning is laid, and clear starting point information is provided for subsequent path optimization and calculation. The information of the passed points is maintained to facilitate subsequent path generation and navigation, making the overall process coherent and traceable, thereby improving the level of system intelligence.
[0085] In summary, this series of steps in this embodiment ensures the legitimacy of the roaming path while dynamically managing and storing path information through the path stack. Through effective condition judgment and structural design, the user's safe and efficient roaming in complex three-dimensional building scenes is ensured, and the flexibility and user experience of the system are increased. Not only does the system enhance the effectiveness of user guidance, but it also provides strong data support for the real-time display and path optimization of three-dimensional scenes, and provides an important technical basis for related fields such as architectural design and virtual reality. Before the path planning begins, the stack needs to be initialized to ensure that the path node information is ready to be stored, to ensure that the starting point and the target point are not located in an unreachable area, and to consider whether there is enough space around the starting point and the target point for the mobile object to pass through; once the starting point and the target point are verified to be legal, the path planning algorithm can start to execute, and marking the passed point is to avoid repeated visits to the point in subsequent path searches, which helps to reduce the search space and improve the efficiency of the algorithm. This embodiment creates a data stack to store path information, verify the legitimacy of the starting point and the target point, and initialize the path search process, which is conducive to reducing the search space and improving the efficiency of the algorithm, and can effectively generate a safe and reasonable roaming path.
[0086] Furthermore, if Figure 4 As shown, the steps of connecting into a complete and continuous roaming path in step S2 specifically include the following steps:
[0087] Step S21: Create a roaming path key point data stack (referred to as key point stack), and add the roaming path starting point to the stack, numbered as 1, calculate the azimuth of the target point based on the roaming starting point, determine all key points in the building scene by the roaming path key point determination method, and add them to the key point stack after numbering them in sequence; when determining the key points, check whether there are new key points in combination with the real-time monitoring data, and then add them to the key point stack;
[0088] Step S22: find the key point closest to the roaming starting point along the azimuth, and determine whether the two are connected. When determining the connection with the starting point, timely update the key point information in the stack to ensure that the path planning is based on the latest information; if so, draw the roaming path from the roaming starting point to the key point; otherwise, continue to find the second closest key point, and so on, and mark the current key point as a passed point;
[0089] Step S23: adding the segmented roaming path information to the path stack, and marking the key point at this time as the current local position, judging whether there is a wall or obstacle between the local position and the roaming target point, if there is still an obstacle, continuing to use the iterative segment cutting method to draw a segmented roaming path from the local position to the key point, and adding the segmented roaming path to the path stack; otherwise, drawing a segmented roaming path from the local position to the roaming target point; in the process of segmented path planning, dynamically evaluating the new environment between the local position and the target point, updating and adjusting possible obstacle points, and drawing the latest path;
[0090] Step S24: Add the segmented roaming path to the path stack to complete the continuous roaming path from the roaming starting point to the target point, and add the target point to the key point stack, numbered n; after completing the path from the starting point to the target point, mark the newly identified key points as a reference for the system's future path planning, and form a feedback mechanism.
[0091] Preferably, step S21 of this embodiment creates a key point stack and determines the key points. The key point stack is created to facilitate the storage of all key node information in the roaming path and ensure the organization of the data; all key points in the building scene are identified by the coordinates and azimuth of the starting point, and these key points are numbered in sequence. The significance achieved: by structurally managing the key point information, it is helpful for the efficiency and accuracy of the algorithm in subsequent path finding; the numbered key points can help the user or the operating system to quickly understand the path selection process and the key node positions passed in the subsequent path optimization. Step S22 finds the nearest key point and judges the patency, finds the key point closest to the roaming starting point along the azimuth, and checks the patency between the two, and identifies potential obstacles through the path planning algorithm; if it is patency, a roaming path from the starting point to the key point is generated; if it is not patency, continue to find the next closest key point. The significance achieved: by finding the nearest key point, the short-distance priority selection of the path can be achieved, thereby improving the roaming efficiency; this mechanism ensures that obstacles in the building structure are effectively avoided during the path selection process, reducing the user's loss and inconvenience. Step S23 adds the segmented roaming path and determines whether it is unobstructed, adds the determined segmented route information to the path stack, and marks the current key point as the local point; checks whether there are obstacles between the current local point and the target point. If there are obstacles, use the iterative segment cutting method to continue drawing the path. The significance achieved: allows the path to be dynamically constructed and adjusted, adjusts the direction according to the environment intelligently, and enhances the adaptability of path planning; after running to this step, it can be confirmed that the subsequent path is valid, avoiding unexpected obstacles between the key point and the target point, and further improving the user experience. Step S24 completes the path construction and key point numbering, and finally integrates the segmented roaming path information into the path stack to generate a complete and orderly roaming path from the starting point to the target point; adds the target point to the key point stack and numbers it (n), formally completing the closed loop of the path. The significance achieved: ensures that the entire path is continuous and logically seamless from the starting point to the end point, providing users with a concise and clear roaming path; provides complete basic data for subsequent path optimization, display and user interaction, and improves the overall performance and reliability of the system.
[0092] In summary, the process of this embodiment realizes the generation of unimpeded roaming paths by orderly connecting the starting point and the target point. Through the identification and stack management of key points, the judgment of path patency and the construction of dynamic paths, not only the adaptability of the system to three-dimensional building scenes is improved, but also the navigation experience of users is optimized. On the whole, the roaming path connection method provides strong support for virtual reality, augmented reality and architectural visualization applications, and promotes the development of human-computer interaction and intelligent navigation technology. The roaming starting point is added to the stack as the first key point and numbered, and the azimuth of the target point relative to the starting point is calculated. Through the roaming path key point determination method, all key points in the building scene are identified and numbered, and the azimuth of the target point is used as the search direction. From the starting point, the nearest key point is found along the direction, and it is judged whether the starting point and the key point are unobstructed. If not, the next closest key point is searched. If it is normal, the roaming path is drawn, and the continuous roaming path from the starting point to the target point is completed through continuous iteration.
[0093] This embodiment provides users with an effective solution for navigating in complex building scenes by identifying key points, checking passability, drawing segmented roads, and ensuring the continuity and passability of the path.
[0094] Furthermore, if Figure 5 As shown, the process of determining whether the hole meets the key point of the roaming path in step S2 specifically includes the following steps:
[0095] Step S25: traverse to find the three-dimensional coordinate position information of all openings in the building scene, and determine whether all openings meet the key point standard. The specific standard is that when its width is greater than 0.55 meters, the opening is judged to meet the standard and is numbered i+1. Otherwise, it is filtered out, and the center coordinates of the opening are recorded as the position information of the key point, and added to the key point stack. Finally, the key point is numbered n-1;
[0096] Step S26: traverse the key point stack along the azimuth direction to find the key point closest to the current position. If the distance from the current position to the key point is smooth, draw a roaming path from the current position to the key point; otherwise, select the next closest key point, and so on;
[0097] Step S27: If the path from this site to other key points except its parent site is blocked, return to the parent site, select the key point next to the parent site to find the path, and so on, mark the key point as a passed point, add the segmented roaming path from this site to the key point to the path stack, and mark the current key point as the current site.
[0098] Preferably, step S25 of this embodiment traverses the openings in the building scene and judges the standard, traverses all the openings in the scene and obtains their three-dimensional coordinates to form a complete opening data set; the width of each opening is measured, and only the openings with a width greater than 0.55 meters will be regarded as valid key points, and they will be numbered and added to the key point stack. The significance achieved: through strict standardized judgment, it is ensured that only qualified openings are taken into consideration, reducing redundant and invalid data in path planning; a more reasonable key point set is provided for subsequent steps, which helps to increase the feasibility of path planning and enhance the accuracy and practicality of the virtual environment. Step S26 finds the nearest key point and draws a path, traverses the key point stack along the azimuth direction, calculates the distance to the current position, and finds the nearest key point; confirms the patency from the current position to the key point, and draws the path. The significance achieved: by giving priority to the nearest key point, the path planning is ensured to be the shortest and most direct in space, and the user's roaming experience is improved; by verifying the patency, it is ensured that the probability of the user encountering obstacles during the roaming process is reduced, and the safety is improved. Step S27 handles the blocked path selection. If the path from the current site to other key points is blocked, fall back to the parent site and reselect the next closest key point for path search; add the segmented roaming path from the current site to the key point to the path stack, and update the current site information. Significance achieved: Ensure the flexibility of the path selection process, and quickly find alternative paths in the case of impassable paths, thereby improving the adaptability of the system; by marking the key points that have been passed and updating the current site, ensure the continuity and effective tracking of the path, and optimize the user experience.
[0099] In summary, in the entire process of judging whether the opening meets the key points, this embodiment not only improves the feasibility and fluency of the roaming path through systematic opening traversal, key point selection and path drawing, but also enhances the robustness of the system through a good error handling mechanism. It ensures that in complex building scenes, users can perform three-dimensional roaming smoothly and unimpeded, giving full play to the advantages of virtual reality technology. In addition, this process is particularly important for the visualization of architectural design and physical space, providing users with a high-quality interactive experience, and also laying the foundation for subsequent path optimization and augmented reality technology applications.
[0100] This embodiment provides a more comprehensive and flexible solution for roaming path planning by comprehensively considering openings, obstacles, and continuity and passability of paths in architectural scenes; by screening key points, finding the nearest passable path, and backtracking and path adjustment mechanisms, it ensures that the ultimately generated roaming path meets actual needs and has high feasibility.
[0101] Furthermore, if Figure 6As shown, the improved Bellman-Ford algorithm is used to optimize the roaming path in step S3, which specifically includes the following steps:
[0102] Step S31: Create a distance array dis of key points on the path. If the number of elements in the key point stack is n, the length of the array is n. Each element of the array represents the distance from the starting point of the roaming path to the numbered key point, and dis[1]=0.
[0103] Step S32: Initialize the dis array according to the roaming path calculated in step S2, that is, each element of the array is the distance from the roaming starting point to each key point in S2, and the value of the unconnected node is ∞;
[0104] Step S33: Select the node m with the smallest element in the array, find all the exit nodes i of the node, compare the sizes of dis[i] and dis[m]+dis[m→i], if the former is larger, update the corresponding element in the array to dis[m]+dis[m→i]; otherwise, keep the original value; repeat this step, traverse all nodes in the array, solve the shortest roaming path value, and record the shortest roaming path.
[0105] Preferably, step S31 of this embodiment creates a distance array dis of the key points of the path, creates a distance array dis of length n, which is used to store the distance from the starting point of the roaming path to each numbered key point, and the initial value is set to 0 (the distance from the starting point to itself is 0), and the distances of other points will be updated through subsequent steps; each element in the dis array represents the currently known minimum distance from the starting point to the corresponding key point. The significance achieved: a basic data container is provided for the subsequent algorithm steps, so that the path calculation process can be carried out efficiently; by clearly marking the distance status of the starting point, it is convenient for subsequent dynamic updates and subsequent logical judgments. Step S32 initializes the dis array, and updates the value of the dis array according to the roaming path calculated in step S2 (that is, the distance from the roaming starting point to each key point); assigns ∞ to the unconnected nodes, indicating that these key points are currently unreachable. The significance achieved: by transferring the initial information to the dis array, it is ensured that the path data can reflect the latest status in the subsequent optimization; marking the unreachable nodes as ∞ provides the algorithm with information about the final path selection, which helps to avoid considering invalid connections in iterative calculations. Step S33 traverses and updates the dis array, selects the node m with the smallest element value in the dis array, and then compares and updates the values in the dis array for all its exit nodes i. That is, if the path through node m to i is shorter, update the value of dis[i]; this process is repeated until the minimum path value of each node is fully updated. Significance achieved: This step is the core of the Bellman-Ford algorithm. Through continuous comparison and updating, the shortest path from the starting point to all key points is found, effectively realizing path optimization; by minimizing the node update method, a more efficient roaming path is constructed, optimizing the calculation time and avoiding unnecessary calculations as much as possible, thereby improving the overall execution efficiency of the algorithm.
[0106] In summary, the entire step of the improved Bellman-Ford algorithm is adopted in this embodiment, which not only enhances the effect of path optimization, but also improves the execution efficiency of the algorithm and the accuracy of the final result through effective data structure setting and dynamic updating. The algorithm is particularly suitable for processing graphs with negative weight edges, but in the optimization of roaming paths, it is mainly reflected in the full consideration of each key point and its connection relationship. Through these steps, the overall optimization of the roaming path can be ensured, so that users can get a smoother experience in practical applications, especially in complex three-dimensional environments, such as virtual reality or augmented reality technology applications. This also lays a good foundation for subsequent directional navigation and path guidance, and improves the intelligence level and usability of the system.
[0107] This embodiment creates an array, solves the shortest value of the roaming path according to the calculated roaming path, and records the shortest roaming path.
[0108] Furthermore, if Figure 7 As shown, the process of generating the three-dimensional geometric position information of the roaming path in step S3 specifically includes the following steps:
[0109] Step S34: Extract the position information in the key point stack as the observation point (x i ,y i ,z i ), assuming that there exists a theoretical function F = f((x, y), w) such that all observation points in the key point stack are infinitely close to the theoretical function;
[0110] Step S35: define the objective function as the sum of squares of the difference between the observation point and the theoretical function value. For n groups of observation points, the optimization objective is
[0111] Step S36: While smoothing the roaming path, there are certain constraints due to the presence of walls and other obstacles inside the simulated building. The specific constraints are: 2d[(x,y)→obstacle]≥0.55. The theoretical function of the optimization target under the constraints is solved to obtain the fitted smooth curve roaming path.
[0112] Preferably, step S34 of this embodiment extracts the position information in the key point stack. The three-dimensional coordinate information of all key points is extracted from the key point stack as the observation points of the roaming path; assuming that there is a theoretical function that represents the spatial relationship related to the path, the function can be used to describe the idealized positions of all observation points in the key point stack. Significance achieved: This process provides basic data for subsequent path generation and optimization, that is, the three-dimensional positions of all key points, which are the basis for determining the roaming route; by introducing the theoretical function (F), it provides a basis for mathematical modeling and optimization of the path, and combining the actual points with the theoretical model, the performance of the path can be improved to make it more reasonable. Step S35 defines the objective function and optimizes it. The objective function is defined as the sum of squares of the difference between the observation point and the theoretical function value. This objective function is used to measure the error between the actual observation point and the theoretical function; using this objective function, an optimization algorithm (such as the least squares method) can be used to find a solution to make the path smoother and more coherent. Significance achieved: By optimizing the objective function, the deviation between the observation point and the theoretical function can be effectively reduced, so that the generated roaming path is closer to the ideal state, and the smoothness and naturalness of the path are improved; the path optimization problem is mathematized, so that the numerical solution and optimization algorithm can be applied to fine-tune the path and enhance the accuracy of the path. Step S36 solves the optimization target under the constraint conditions, determines the constraint conditions, and ensures that the walls and obstacles inside the building are taken into account during the optimization process, which ensures that a safe distance is maintained between the path and the obstacles; under the premise of considering these constraints, the optimization result of the theoretical function is solved to obtain a fitted smooth curve roaming path. Significance achieved: By considering the obstacles in reality, the generated roaming path is ensured to be both reasonable and feasible, and the situation of crossing walls or obstacles is prevented; ensuring the safe distance between the path and the environment not only improves the user experience, but also increases the reliability and practicality of digital roaming.
[0113] In summary, this embodiment effectively generates a roaming path of three-dimensional geometric position information by extracting key point information, defining optimization goals, and considering actual constraints. The implementation of each step enhances the accuracy, smoothness, and practical feasibility of path generation, making the end user's roaming experience in a three-dimensional environment smoother and more comfortable. This series of steps lays a good foundation for realizing intelligent navigation of complex architectural scenes, and also provides rich data support for subsequent possible path optimization and user interaction. Ultimately, the goal is to improve the overall level of virtual reality technology applications through more intelligent path planning.
[0114] This embodiment extracts the position information in the key point stack as the observation point of the roaming path, defines the objective function as the sum of squares of the difference between the observation point and the theoretical function value, and considers the constraints while smoothing the roaming path. Through mathematical optimization methods, the theoretical function of the optimization target under the constraints is solved.
[0115] Furthermore, the process of smooth curve optimization in step S36 specifically includes the following steps:
[0116] Step S361: deploy multiple sensors in the three-dimensional building scene, including laser radar, camera, depth sensor, etc., to collect real-time environmental data inside the building; use computer vision to identify obstacles, and identify different types of obstacles such as walls, furniture, and equipment; establish an obstacle type database, classify the collected obstacle information, and determine its type, shape, and approximate size; integrate the on-site obstacle background with the dynamic environment, and update the obstacle position and category in real time;
[0117] Step S362: Monitor the environment in real time according to the preset cycle and record the changes in the position of obstacles, and use drones to continuously track the changes in buildings; input this monitoring data into the system; dynamically adjust the constraints in the optimization process according to the identified obstacle types. Set the impact of different types of obstacles on the path: set a stricter safety distance for walls and large objects; set a smaller safety distance for small objects such as chairs and tables;
[0118] Step S363: Calculate the safe distance between the user and the obstacle in real time, and dynamically monitor the safety based on the user's current speed, direction of movement, and type of obstacle; adjust the safety boundary conditions for path generation based on the current environmental status to ensure that the user remains safe during roaming; add dynamic constraint detection to the Bellman-Ford algorithm in roaming path planning, and re-evaluate the constraints of the key points involving the obstacle whenever a new obstacle is detected or the obstacle changes; use a recursive or iterative method to update the path in real time to ensure the safety and smoothness of the path; based on the user's real-time feedback and obstacle data, use the regenerated path algorithm to instantly adjust the user's roaming path when the user approaches an obstacle to avoid potential risks; when the user faces turning or obstacle avoidance, the algorithm recommends the optimal safe path and displays it in real time on the roaming interface.
[0119] Preferably, in step S361 of this embodiment, environmental data collection and obstacle identification, laser radar, camera and depth sensor are deployed to obtain three-dimensional environmental data inside the building in real time; obstacles are classified and identified using computer vision technology, and an obstacle type database is established to determine the type, shape and location of obstacles. Significance: The collection of real-time environmental data can help the system accurately understand the current building scene and provide basic data for subsequent path optimization; through obstacle classification, the complexity of the environment can be better understood, the type of challenge can be evaluated, and subsequent path planning can effectively avoid collisions. Step S362 real-time monitoring and dynamic constraint adjustment, monitor the dynamic changes of obstacles according to a preset period, and provide efficient environmental tracking even when using drones; according to environmental monitoring information, the reasonable safety distance related to obstacles is dynamically adjusted, and different constraints are set for large, medium and small objects. Significance: Ensure the system's real-time response to environmental changes and reduce the risk of path failure caused by constantly changing obstacles; setting different safety distance strategies helps to optimize feasible paths and avoid unnecessary detours while protecting user safety. Step S363: Safety distance calculation and dynamic path adjustment. The real-time safety distance between the user and the obstacle is calculated, and safety monitoring is performed based on the user's current speed and direction of movement. Dynamic constraint detection and path update mechanisms ensure that the path can be adjusted immediately when encountering new obstacles to avoid risks. The optimal path is recommended through algorithms and displayed on the user interface to help users make decisions. Significance: Real-time safety monitoring can reduce the probability of accidents and ensure the safety of users during path roaming. The dynamic path adjustment mechanism improves the system's resilience, enabling it to adapt to different environments and user behaviors. Through a smoother user experience and timely navigation feedback, it enhances user trust and satisfaction.
[0120] In summary, the entire process of this embodiment forms a highly automated and intelligent path optimization system, which continuously monitors and identifies obstacles, dynamically adjusts constraints, and provides real-time feedback on the information required by users. In terms of technical implementation, the entire process relies on real-time processing of multiple sensor data, efficient path planning algorithms, and in-depth application of computer vision technology. Comprehensive significance: It enhances the dynamic adaptability of the roaming path, effectively avoids safety hazards of users in complex environments, improves the real-time and accuracy of path planning, and ensures that users can have a smooth experience in a three-dimensional building environment; supports human-computer interaction in more complex scenes, promotes the development of intelligent building technology, and enhances the intelligence of building roaming systems. Through the careful planning of the above steps, the smooth curve optimization scheme can not only improve the safety and feasibility of path planning, but also provide intelligence and fluency in the user's roaming experience, making it an important part of the future building intelligent navigation system.
[0121] Furthermore, if Figure 8 As shown, the process of calculating the scene information that needs to be displayed during the roaming process in step S4 specifically includes the following steps:
[0122] Step S41: Generate visual width scene information in the current plane of the building scene along the roaming path, and the visual width value defaults to 0.55 meters;
[0123] Step S42: Generate visual height scene information in the current plane of the building scene along the roaming path, and the default value of the visual height is 1.75 meters;
[0124] Step S43: Combine the visual width and visual height scene information to generate global scene information, including three-dimensional geometric position information, roaming path information and key point information.
[0125] Preferably, step S41 of this embodiment generates visual width scene information, and generates visual width scene information in the current plane of the building scene along the roaming path. The default width value is set to 0.55 meters. When observing and roaming, the corresponding field of view will be displayed based on this width. Significance achieved: Visual width information can help ensure that users have enough sense of space during roaming, avoid visual oppression, and improve user immersion and comfort; through a clear definition of visual width, the display of each scene is ensured to be within a reasonable visual reference range, thereby enhancing the realism of the scene performance. Step S42 generates visual height scene information, and generates visual height scene information in the current plane of the building scene along the roaming path. The default value of visual height is set to 1.75 meters; this height is intended to simulate the height of human sight, so that the observation of the scene is closer to reality. Significance achieved: The information on visual height takes into account the natural height of human viewing of buildings and environments, so that the visual presentation is consistent with human experience and enhances the realism of the virtual environment; by setting a suitable visual height, the user's interaction and experience in roaming are more in line with natural behavior habits, thereby enhancing the sense of participation. Step S43 generates global scene information, combining the visual width and visual height information to generate global scene information; this global information includes three-dimensional geometric position information, roaming path information and key point information, providing users with a complete scene data view. Significance achieved: By integrating information of different dimensions, users can obtain a clear and coherent overall scene map, helping them to better understand the surrounding environment during roaming; the generated global scene information provides rich information support, providing the necessary data foundation for subsequent applications, such as navigation, scene rendering or user experience optimization.
[0126] In summary, through the synergy of these three steps, the entire process of this embodiment is dedicated to creating a comprehensive architectural scene display information. Each step contributes to the user's roaming experience, ensuring that the information finally presented to the user is both complete and in line with the actual visual experience. The definition of the overall visual width and height enhances the sense of immersion, making the user's experience in the virtual environment more humane; the generated global scene information enhances the interactivity between the scene and the user, making the virtual reality environment more attractive and practical; this process not only involves the generation of scene information, but also provides data support for subsequent scene analysis, adjustment, and user interaction design, which has important applications in architectural visualization, interior design, virtual reality and other fields. Ultimately, the implementation of the entire process will provide users with a real, intuitive and consistent roaming experience, and enhance the application value of virtual reality technology at the technical and experience levels.
[0127] This embodiment constructs a global scene model containing multi-dimensional information by generating and combining visual width and visual height scene information, thereby providing the necessary data basis for various application scenarios.
[0128] Furthermore, the process of reconstructing the scene based on the roaming path visual file in step S4 specifically includes the following steps:
[0129] Step S44: using wearable technology (such as smart bracelets, AR glasses) combined with sensors (such as accelerometers, gyroscopes) on the user's mobile device to monitor the user's body dynamics and behavior patterns; collecting the user's location information, posture, movement (such as gestures, walking speed, turning, etc.) and visual focus (using a camera to monitor the user's viewing direction) in real time; and classifying the user's behavior through a machine learning algorithm, such as walking, pausing, turning, and focusing;
[0130] Step S45: Collect the geographic information of the three-dimensional building scene, the location of obstacles and the user's current environment (such as noise, lighting changes, etc.); automatically adjust the geometric information involved in the scene, the location and type of important obstacles based on sensor feedback and user behavior.
[0131] Step S46: During the user experience, the user immediately gives feedback on his / her perception through the interface of the mobile device or wearable device, such as satisfaction, comprehensibility and content of interest to the scene; analyze the user's voice feedback; analyze the user's emotional state through the changes in his / her facial expressions to determine his / her acceptance of the current scene;
[0132] Step S47: Integrate user behavior and feedback data, generate a user portrait based on user preferences, behavior and feedback information, and provide more personalized scene layout and information display.
[0133] Preferably, step S44 of this embodiment is user dynamic monitoring, which uses wearable technology (such as smart bracelets, AR glasses) and sensors (such as accelerometers, gyroscopes) to achieve real-time monitoring of the user's body dynamics, behavior patterns and spatial positions; monitor the user's viewing direction through the camera to obtain the user's visual focus; use machine learning algorithms to analyze and classify the collected behavior data to identify the user's current state and behavior (such as walking, pausing, turning, etc.). Significance: This step ensures that the system can respond dynamically based on the user's actual movement state, thereby improving interactivity and personalized user experience; real-time monitoring can provide basic data for subsequent scene adjustments, helping the system to accurately grasp the user's behavioral habits and preferences. Step S45 is scene information collection and adjustment, which collects the geographic information, obstacle locations and environmental conditions (such as noise, lighting, etc.) of the three-dimensional building scene in real time to establish a comprehensive environmental model; according to sensor data and user behavior, automatically adjust and optimize the geometric information, obstacle locations and types in the three-dimensional scene. Significance: Ensure that the system can maintain an accurate understanding of static and dynamic environmental changes, thereby providing a safe and smooth experience when users roam; this step provides dynamic, real-time updated basic data for the next step of scene reconstruction, making the scene more in line with the user's current needs and expectations. Step S46 User feedback collection and analysis: Through the interface of mobile devices or wearable devices, users can instantly feedback their perceptions and obtain information on satisfaction, comprehensibility and content of interest to the scene; voice analysis technology and facial expression recognition technology are used to analyze the user's emotional state and judge their acceptance of the scene. Significance: Realize two-way interaction between users and the system, enhance user participation and sense of belonging to the scene; by analyzing user feedback and emotional state, potential problems and needs can be identified, so that the usability of the scene and user satisfaction are continuously improved. Step S47 User portrait generation and personalized display: Integrate the collected user behavior data and feedback information, and generate user portraits based on algorithms; provide users with personalized scene layout and information display based on user preferences and historical behaviors, so that each user can get tailored content during the experience. Significance: Personalized display can significantly improve the user's immersion and satisfaction during roaming, help users better understand and enjoy their environment, and increase the fun and meaning of the experience; overall, the generation and application of user portraits enables the entire system to have learning and adaptive capabilities, providing an enhanced intelligent way for future interactions.
[0134] In summary, through the design and implementation of these four steps, this embodiment forms a feedback closed loop in the scene reconstruction process, making the user's roaming experience in the three-dimensional building environment more controllable, comfortable and personalized. Relying on advanced sensing technology, machine learning algorithms and data analysis technology, the system can not only adapt to the changing environment and user needs in real time, but also respond quickly based on the user's immediate reaction, thereby improving the user's overall experience satisfaction. Ultimately, this pioneering dynamic interactive experience and personalized service will promote the development of smart buildings and AR / VR fields.
[0135] Furthermore, the present invention introduces an optimization algorithm for a roaming path of a three-dimensional building scene: in the three-dimensional building scene, according to the roaming starting point and the target point, a smooth roaming path that conforms to visual aesthetics is automatically generated and optimized. Two points A and B are selected from the three-dimensional building scene, and a roaming path between the two points is automatically generated and optimized. The steps for implementing the optimization method of the entire roaming path are as follows:
[0136] S1: Locate the starting point and target point of the roaming. Select the starting point A and target point B of the roaming in the drawn three-dimensional simulated building scene, and obtain the three-dimensional coordinate position information of the starting point A and the target point B respectively. The process is as follows:
[0137] (1) Creating a roaming path information data stack, referred to as a path stack;
[0138] (2) Determine whether the positions of the roaming starting point A and the target point B are legal. When the roaming starting point A and the target point B are located on a wall or other fixed obstacles, or the distance between the starting point A / target point B and the surrounding obstacles is less than 0.275 meters, it is considered invalid;
[0139] (3) After determining the roaming starting point A and the target point B, add the roaming starting point A to the stack;
[0140] (4) Mark the roaming starting point A as a passed point;
[0141] S2: Based on the three-dimensional coordinate position information generated by S1, a global roaming path from the roaming starting point A to the target point B is generated by the segment cutting method. Each segment path passes through each key point K (i.e., the hole, referred to as the key point) in turn, and finally connected into a complete and continuous roaming path L. The specific steps are as follows:
[0142] (1) Create a roaming path key point data stack (referred to as key point stack) and add the roaming path starting point A to the stack;
[0143] (2) Calculate the azimuth angle θ of the target point B based on the roaming starting point;
[0144] (3) Determine all key points in the building scene by the roaming path key point determination method, and add them to the key point stack after numbering them in sequence;
[0145] (4) Find the key point K closest to the roaming starting point A along the azimuth angle θ i , determine whether the two are connected. If so, draw the roaming path from the roaming starting point to the key point; otherwise, continue to find the second closest key point, and then infer the same way;
[0146] (5) Mark the current key point K i For it has passed;
[0147] (6) Add the segmented roaming path information to the path stack and mark the key point K at this time i is the current local point C i ;
[0148] (7) Determine the current site C i Check whether there is a wall or obstacle between the roaming target point B. If there is still an obstacle, continue with steps (8)-(9). Otherwise, continue with step (10).
[0149] (8) Iterative segment cutting method draws the segmented roaming path from the current point to the key point;
[0150] (9) Add the segmented roaming path to the path stack;
[0151] (10) Draw the current site C i The segmented roaming path to the roaming target point B;
[0152] (11) Add the segmented roaming path to the path information stack to complete the continuous roaming path from the roaming starting point A to the target point B;
[0153] (12) Add the target point B to the key point stack with the number n;
[0154] Doors and openings are key points of the roaming path, and their location information needs to be accurately marked. However, doors are also a subset of openings, that is, doors are embedded in openings. Therefore, this system only needs to determine whether the openings meet the key points. The specific determination steps are as follows:
[0155] (1) Traverse and find the three-dimensional coordinate location information of all openings in the building scene;
[0156] (2) Determine whether all openings meet the key point standard. The specific standard is that when its width is greater than 0.55 meters, the opening is judged to meet the standard and is numbered i+1. Otherwise, it is filtered out.
[0157] (3) The center coordinates of the hole (x i ,yi , z i ) is recorded as the position information of the key point and added to the key point stack. The final key point number is n-1;
[0158] The steps of segment cutting method are:
[0159] (1) Traverse the key point stack along the azimuth angle θ and find the distance C from the current point i The closest key point K i If the distance from this point to the key point is smooth, draw this point C i To the key point K i Otherwise, the second closest key point is selected and the same is applied;
[0160] (2) If the current site C i To its paternal locus C i-1 If all other key points are blocked, return to the parent site C. i-1 , select the key point that is the second closest to the paternal site to find the path, and then infer the path;
[0161] (3) Mark the key point K i For it has passed;
[0162] (4) Change the current site C i To the key point K i The segmented roaming path is added to the path stack and the current key point K is marked i is the current local point;
[0163] S3: Solve the shortest path for the roaming path generated by S2 and use the Bellman-Ford algorithm to optimize the roaming path. The steps are as follows:
[0164] (1) Create a distance array dis of the key points of the path. If the number of elements in the key point stack is n, the length of the array is n. Each element dis[i] of the array represents the distance from the starting point A of the roaming path to the key point i, and dis[1] = 0;
[0165] (2) Initialize the dis array based on the roaming path calculated by S2. That is, each element of the array is the distance from the roaming starting point B in S2 to each key point i, and the value of the unconnected node is ∞;
[0166] (3) Select the node m with the smallest element in the array, find all the exit nodes j of this node, compare the size of dis[i] and dis[m]+dis[m→j], if the former is larger, update the corresponding element dis[i] in the array to dis[m]+dis[m→j]; otherwise, keep the original value;
[0167] (4) Repeat step (3), traverse all nodes in the array, solve the shortest roaming path, and record the shortest roaming path;
[0168] S4: Perform curve smoothing optimization on the shortest roaming path solved in S3. In the three-dimensional coordinates, the least squares curve fitting is used to generate a smooth curve S passing through the key point K. At the same time, the three-dimensional geometric position information of the roaming path is generated and recorded. The steps are as follows:
[0169] (1) Extract the position information in the key point stack as the observation point of the roaming path (x i ,y i , z i );
[0170] (2) Assume that there exists a theoretical function F = f((x, y), w) such that all observation points in the key point stack are infinitely close to the theoretical function;
[0171] (3) The objective function is defined as the sum of squares of the difference between the observation point and the theoretical function value. For n groups of observation points, the optimization objective is
[0172] (4) While smoothing the roaming path, there are certain constraints due to the presence of walls and other obstacles inside the simulated building. The specific constraints are: 2d[(x, y)→obstacle]≥0.55;
[0173] (5) Solve the theoretical function of the optimization target under the constraint conditions and obtain the fitted smooth curve roaming path;
[0174] S5: Generate a scene-associated roaming path visual file based on the data in S4. According to the visual aesthetics algorithm, calculate the scene information that needs to be displayed during the roaming process, including 3D geometric information, roaming path information, and key points Ki. The steps are as follows:
[0175] (1) Generate visual width scene information in the current plane of the building scene along the roaming path. The default visual width value is 0.55 meters;
[0176] (2) Generate visual height scene information in the current plane of the building scene along the roaming path, with the default value of the visual height being 1.75 meters;
[0177] (3) Combine visual width and visual height scene information to generate global scene information, including 3D geometric position information, roaming path information, and key point information;
[0178] S6: Display the data in S5 in a roaming scene that conforms to human visual aesthetics, that is, reconstruct the scene based on the roaming path visual file.
[0179] like Fig. 9As shown, this embodiment also provides an embodiment of a real-time roaming path optimization system based on a three-dimensional building scene. In this embodiment, the real-time roaming path optimization system based on a three-dimensional building scene is applied to the real-time roaming path optimization method based on a three-dimensional building scene in the above embodiment. The real-time roaming path optimization system based on a three-dimensional building scene includes a scene modeling and data input module 1, a path planning module 2, a path optimization module 3, and a visual processing and display module 4;
[0180] Among them, the scene modeling and data input module 1 is responsible for drawing and constructing a three-dimensional simulated architectural scene, including the modeling of elements such as buildings, roads, and openings; the path planning module 2 is responsible for receiving the three-dimensional coordinate position information of the starting point and the target point, and using the segmented cutting method to generate a global roaming path from the starting point to the target point, including determining and connecting each roaming path key point; the path optimization module 3 receives the global roaming path generated by the path planning module 2, optimizes the path using the improved Bellman-Ford algorithm, finds the shortest path, uses the least squares method to perform curve smoothing optimization on the shortest path, generates a smooth and practical roaming path, and records and saves the three-dimensional geometric position information of the optimized roaming path; the visual processing and display module 4 generates a scene-associated roaming path visual file based on the optimized roaming path and three-dimensional scene data, and reconstructs the scene, combines the roaming path with the three-dimensional scene, and displays the roaming process in a way that conforms to human visual aesthetics.
[0181] Preferably, the scene modeling and data input module 1 of this embodiment uses computer graphics and three-dimensional modeling software to convert elements such as buildings in the real world into virtual three-dimensional models. The path planning module 2 uses a segmented cutting method to search for a feasible path from a starting point to a target point in three-dimensional space. During the search, important key points are identified and marked, and then these points are connected in sequence to form a complete roaming path. The initially generated roaming path is optimized using an improved Bellman-Ford algorithm to find the shortest path, and the shortest path is smoothed using the least squares method. Then, based on the characteristics of human visual perception and aesthetic principles, the scene information that needs to be displayed during the roaming process is calculated and determined.
[0182] The scene modeling and data input module 1 of this embodiment draws and constructs a complete three-dimensional scene including elements such as buildings, roads, and openings, making it highly realistic; receives and processes necessary input data, and abstracts various elements in the actual scene into a usable three-dimensional model. The significance achieved: Provides a real and detailed environment so that users feel as if they are in the actual space when roaming, thereby enhancing the sense of immersion; serves as the basis for path planning and optimization, ensuring that the system has accurate scene information when performing roaming path analysis. The path planning module 2 uses the segmented cutting method to successfully connect the key points in the path according to the starting point and target point specified by the user, and draws a complete path from the starting point to the end point; identifies and marks key path nodes in the scene to construct reference points for the roaming path. The significance achieved: Ensure that the generated path is feasible and safe by accurately locating and connecting key points, and avoid problems such as collisions; provide a preliminary path framework for the subsequent path optimization module to ensure the efficiency and accuracy of optimization. The path optimization module 3 uses the improved Bellman-Ford algorithm to optimize the path and quickly find the shortest and safest path; the least square method is used to smoothly optimize the generated path, making the path more natural and smooth, in line with the user's movement habits. The significance achieved: ensure that the user's action route is as short and smooth as possible, reduce walking time, avoid unnecessary turns, and improve efficiency; the optimized roaming path is smoother, reducing sharp turns or unnatural paths, making the roaming experience more comfortable and humane. The visual processing and display module 4 generates a scene-related visual information file based on the optimized roaming path and three-dimensional scene data, which can adapt to the user's visual habits and aesthetic needs; the optimized roaming path is combined with the three-dimensional scene for dynamic visual display. The significance achieved: through high-quality visual display, the user's roaming process is more attractive, improving the visual experience and deep immersion; through visual reconstruction, users can more intuitively understand the relationship between the path and the scene, making it easier for them to interact and enhance the experience.
[0183] In summary, the entire system of this embodiment realizes a highly optimized and user-friendly real-time roaming experience by coordinating the technical effects of each module. Each module plays its own advantages and provides users with an accurate, smooth and beautiful path roaming experience, making the system have important application potential in the fields of architectural visualization, interior design and virtual reality.
[0184] This embodiment proposes a path optimization system based on a starting point and a target point, which intelligently generates a smooth, beautiful, optimized and intelligent roaming path in a three-dimensional building scene according to the roaming starting point and the target point; combined with actual engineering applications, it reduces manual workload and eliminates manual errors caused by proficiency. On the basis of the existing roaming algorithm, the roaming path optimization algorithm of the three-dimensional building scene is further improved, the path generation efficiency is high, and the positioning calculation is accurate, which will effectively and significantly improve the roaming effect of the three-dimensional scene.
[0185] like Fig.10 As shown, this embodiment provides an embodiment of an electronic device. In this embodiment, the electronic device 8 includes a processor 51 and a memory 52 coupled to the processor 51.
[0186] The memory 52 stores program instructions for implementing the real-time roaming path optimization method based on a three-dimensional building scene according to any of the above embodiments.
[0187] The processor 51 is used to execute the program instructions stored in the memory 52 to implement a real-time roaming path optimization system based on a three-dimensional building scene.
[0188] The processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having the ability to process signals. The processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0189] Further, Fig.11 The schematic diagram of the structure of the storage medium of an embodiment of the present invention is that the storage medium 6 of the embodiment of the present application stores program instructions 61 that can implement all the above methods, wherein the program instructions 61 can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.
[0190] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0191] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units. The above is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present invention.
[0192] The specific implementation methods of the invention are described in detail above, but they are only examples, and the invention is not limited to the specific implementation methods described above. For those skilled in the art, any equivalent modification or substitution of the invention is also within the scope of the invention, therefore, the equalization, modification, improvement, etc. made without departing from the spirit and principle of the invention should be included in the scope of the invention.
Claims
1. A real-time roaming path optimization method based on a three-dimensional building scene, characterized in that the real-time roaming path optimization method comprises: Locate the location information of the roaming starting point and the target point, select the roaming starting point and the target point in the drawn three-dimensional simulated building scene, and obtain the three-dimensional coordinate location information of the starting point and the target point respectively; According to the obtained three-dimensional coordinate position information, a global roaming path from the roaming starting point to the target point is generated by the segment cutting method. Each segment path passes through each key point of the roaming path, i.e., the opening, in turn, and finally connects into a complete and continuous roaming path; Based on the generated roaming path, the shortest path is solved, and the improved Bellman-Ford algorithm is used to optimize the roaming path. The shortest roaming path is optimized for curve smoothing. In three-dimensional coordinates, the least squares curve fitting method is used to generate a smooth curve passing through key points. At the same time, the three-dimensional geometric position information of the roaming path is generated and recorded. Generate a roaming path visual file associated with the scene along the data, and calculate the scene information that needs to be displayed during the roaming process according to the visual aesthetics algorithm, including three-dimensional geometric information, roaming path information and key points. Then, display the roaming scene in accordance with human visual aesthetics, that is, reconstruct the scene based on the roaming path visual file.
2. The real-time roaming path optimization method based on a three-dimensional building scene according to claim 1 is characterized in that: Machine learning methods are used to analyze users’ clicking habits in 3D building scenes to predict the selection of starting and target points, including: In a 3D building scene, record the user's click events, including the coordinate information of the starting point and the target point, timestamp, the user's navigation path and the mouse movement trajectory; collect data related to the building scene, and protect the layout, spatial distribution and building characteristics of the scene; Extract key features from the collected data to protect the user's click frequency in the 3D building scene, the spatial distance between the starting point and the target point, and the user's historical selection pattern; use the chi-square test to select features that have a significant impact on the prediction results; Select a machine learning model decision tree and divide the collected user data into training set, validation set and test set in a ratio of 8:1:1; use the training set to train the selected machine learning model and use the validation set to adjust the hyperparameters; use the test set to evaluate the trained machine learning model and calculate the accuracy and recall set F1 score indicators.
3. The real-time roaming path optimization method based on a three-dimensional building scene according to claim 1 is characterized in that obtaining the three-dimensional coordinate position information of the starting point and the target point includes: Create a roaming path information data stack; Determine whether the roaming start point and target point are legal. If the roaming start point and target point are located on a wall or other fixed obstacles, or if the distance between the start point / target point and the surrounding obstacles is less than half of the single flow of people, it is considered invalid. After determining the roaming start point and target point, add the roaming start point to the path stack and mark the roaming start point as a passed point.
4. The real-time roaming path optimization method based on a three-dimensional building scene according to claim 1, characterized in that the roaming path is connected into a complete and continuous path, comprising: Create a roaming path key point data stack, and add the roaming path starting point to the stack, numbered as 1, calculate the azimuth of the target point based on the roaming starting point, determine all the key points in the building scene by the roaming path key point determination method, and add them to the key point stack after numbering them in sequence; When determining key points, check whether new key points appear in combination with real-time monitoring data, and then add them to the key point stack; Find the key point closest to the roaming starting point along the azimuth, and determine whether the connection between the two is unobstructed. When determining the connection with the starting point, update the key point information in the stack in a timely manner to ensure that the path planning is based on the latest information; If yes, draw the roaming path from the roaming starting point to the key point; otherwise, continue to find the second closest key point, and so on, and mark the current key point as a passed point; The segmented roaming path information is added to the path stack, and the key point at this time is marked as the current local point. It is determined whether there is a wall or obstacle between the local point and the roaming target point. If there is still an obstacle, the iterative segment cutting method is continued to draw the segmented roaming path from the local point to the key point, and the segmented roaming path is added to the path stack; otherwise, the segmented roaming path from the local point to the roaming target point is drawn; in the segmented path planning process, the new environment between the local point and the target point is dynamically evaluated, possible obstacles are updated and adjusted, and the latest path is drawn; Add the segmented roaming path to the path stack to complete the continuous roaming path from the roaming starting point to the target point, and add the target point to the key point stack with the number n; After completing the path from the starting point to the target point, the newly identified key points are marked as a reference for the system's future path planning and form a feedback mechanism.
5. The real-time roaming path optimization method based on a three-dimensional building scene according to claim 1 is characterized in that judging whether the opening meets the key points of the roaming path comprises: Traverse to find the 3D coordinate position information of all openings in the building scene, and determine whether all openings meet the key point standard. The specific standard is that when its width is greater than 0.55 meters, the opening is judged to meet the standard and is numbered i+1. Otherwise, it is filtered out, and the center coordinates of the opening are recorded as the position information of the key point, and added to the key point stack. Finally, the key point is numbered n-1; Traverse the key point stack along the azimuth direction to find the key point closest to the current point. If the distance from the current point to the key point is smooth, draw the roaming path from the current point to the key point; otherwise, select the next closest key point, and so on; If the path from this site to other key points other than its parent site is blocked, return to the parent site, select the key point next to the parent site to find the path, and so on, mark the key point as a passed point, add the segmented roaming path from this site to the key point to the path stack, and mark the current key point as the current site.
6. The real-time roaming path optimization method based on a three-dimensional building scene according to claim 1 is characterized in that the roaming path is optimized using an improved Bellman-Ford algorithm, comprising: Create a distance array dis of the key points of the path. If the number of elements in the key point stack is n, the length of the array is n. Each element of the array represents the distance from the starting point of the roaming path to the numbered key point, and dis[1] = 0; According to the roaming path calculated in step S2, the dis array is initialized, that is, each element of the array is the distance from the roaming starting point to each key point in S2, and the value of the unconnected node is ∞; Select the node m with the smallest element in the array, find all the exit nodes i of the node, compare the sizes of dis[i] and dis[m]+dis[m→i], if the former is larger, update the corresponding element in the array to dis[m]+dis[m→i]; otherwise, keep the original value; repeat this step, traverse all nodes in the array, solve the shortest roaming path value, and record the shortest roaming path.
7. The real-time roaming path optimization method based on a three-dimensional building scene according to claim 1 is characterized in that: Generate 3D geometric position information of the roaming path, including: Extracting the position information in the key point stack as the observation point of the roaming path, so that all the observation points in the key point stack are infinitely close to the theoretical function; Define the objective function as the sum of squares of differences from the observed point to the theoretical function value; While smoothing the roaming path, due to the presence of walls and other obstacles inside the simulated building, the theoretical function of the optimization target under the constraint conditions is solved to obtain the fitted smooth curve roaming path.
8. The real-time roaming path optimization method based on a three-dimensional building scene according to claim 1 is characterized in that: Smooth curve optimization, including: Deploy multiple sensors in three-dimensional building scenes, protect lidar, cameras and depth sensors, and collect real-time environmental data inside the building; use computer vision to identify obstacles, and identify different types of obstacles such as walls, furniture and equipment; establish an obstacle type database, classify the collected obstacle information, and determine its type, shape and size; integrate the on-site obstacle background with the dynamic environment, and update the obstacle location and category in real time; Monitor the environment in real time according to the preset cycle and record the changes in the position of obstacles. Use drones to continuously track the changes in buildings. Input this monitoring data into the system. Dynamically adjust the constraints in the optimization process according to the identified obstacle types, and set the impact of different types of obstacles on the path: set a safe distance for walls and large objects; set a safe distance for small objects such as chairs and tables. Calculate the safe distance between the user and the obstacle in real time, and dynamically monitor safety based on the user's current speed, direction of movement, and type of obstacle; adjust the safety boundary conditions for path generation based on the current environmental status to ensure that the user remains safe during roaming; add dynamic constraint detection to the Bellman-Ford algorithm in roaming path planning, and re-evaluate the constraints of the key points involving the obstacle whenever a new obstacle is detected or the obstacle changes; use recursive or iterative methods to update the path in real time to ensure path safety and smoothness; based on the user's real-time feedback and obstacle data, use the regenerated path algorithm to instantly adjust the user's roaming path when the user approaches an obstacle; when the user faces a turn or obstacle avoidance, the algorithm recommends the optimal safe path and displays it in real time on the roaming interface.
9. A real-time roaming path optimization system based on a three-dimensional building scene, which is applied to the real-time roaming path optimization method based on a three-dimensional building scene as claimed in any one of claims 1 to 8, characterized in that: The real-time roaming path optimization system based on three-dimensional building scenes includes: The scene modeling and data input module is responsible for drawing and constructing three-dimensional simulated building scenes, including the modeling of buildings, roads, and openings; The path planning module is responsible for receiving the three-dimensional coordinate position information of the starting point and the target point, and using the segment cutting method to generate a global roaming path from the starting point to the target point, including determining and connecting the key points of each roaming path; The path optimization module is responsible for receiving the global roaming path generated by the path planning module, optimizing the path using the improved Bellman-Ford algorithm, finding the shortest path, optimizing the shortest path by using the least square method to smooth the curve, generating a smooth and practical roaming path, and recording and saving the three-dimensional geometric position information of the optimized roaming path; The visual processing and display module is responsible for generating scene-associated roaming path visual files based on the optimized roaming path and three-dimensional scene data, and reconstructing the scene, combining the roaming path with the three-dimensional scene, and displaying the roaming process in a way that conforms to human visual aesthetics.
10. An electronic device, characterized in that: It includes a processor and a memory coupled to the processor, wherein the memory stores program instructions that can be executed by the processor; when the processor executes the program instructions stored in the memory, the real-time roaming path optimization method based on a three-dimensional building scene as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
A Web-based 3D scene pose adaptation method that takes into account terrain undulations
CN113870429B
Automatic Construction Method and System for Architectural 3D Scenes
CN113989680B
Mine digital twin system roaming path planning method based on differential evolution algorithm
CN116341775A
Cited By
Green infrastructure spatial layout optimization system and method based on improved multi-objective optimization algorithm
CN120278318A