A mapping method, device, and storage medium based on Bluetooth positioning
By adopting a Bluetooth-based mapping method in the sweeping robot, using Bluetooth devices in the building for positioning and map construction, the problem of missing data and poor timeliness of the sweeping robot is solved, and the map accuracy and path planning effect are improved.
Patent Information
- Application Number
- CN202510345234.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The indoor environment is complex and changes quickly, resulting in missing data perceived by sweeping robots and poor timeliness, resulting in low map accuracy and affecting path planning.
Using a map construction method based on Bluetooth positioning, three Bluetooth devices in the building are used as base stations to control the sweeping robot to receive beacon signals, perform positioning and density calculations, build binarized image data and digital twin models, and generate electronic maps.
It improves the accuracy of the map built by the sweeping robot, reduces the accumulation of positioning deviations, ensures the accuracy of the floor plan, improves the timeliness and adaptability of the electronic map, and supports the sweeping robot to plan high-precision paths.
Smart Images

Figure CN119865791B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Bluetooth, and in particular, to a mapping method, device, and storage medium based on Bluetooth positioning. Background Art
[0002] In family life, a sweeping robot is one of the commonly used household appliances. When the sweeping robot starts its initial operation or changes the environment, it uses sensors such as lidar, cameras, infrared sensors, gyroscopes, and accelerometers to sense the indoor environment, such as obstacles, and uses the sensed data to achieve simultaneous localization and mapping (SLAM), so as to plan the cleaning path using the map.
[0003] However, the indoor environment is complex and changes rapidly, resulting in missing and poor timeliness of the sensed data. After the sweeping robot has been operating for a long time, parts (such as pulleys, tracks, etc.) are prone to hair entanglement and wear, and it is easy to accumulate deviations during positioning, resulting in a low accuracy of the map and affecting path planning. Summary of the Invention
[0004] In view of this, the present invention provides a mapping method, device, and storage medium based on Bluetooth positioning to improve the accuracy of constructing a map suitable for the sweeping robot to clean.
[0005] The first aspect of the present invention provides a mapping method based on Bluetooth positioning, including:
[0006] When the sweeping robot performs a cleaning operation in a building, using three Bluetooth devices in the building as base stations, controlling the sweeping robot to receive the Bluetooth beacon signals broadcast by the base stations;
[0007] Positioning the sweeping robot according to the Bluetooth beacon signals to obtain the sweeping coordinates;
[0008] Calculating the density of the sweeping coordinates in the building;
[0009] If the density is greater than or equal to a preset first threshold, constructing binary image data according to the sweeping coordinates;
[0010] Calculating the matching degree between the image data and a preset house type map according to multiple Bluetooth devices;
[0011] Determining the house type map that matches the building among the house type maps with the highest matching degrees;
[0012] Constructing a three-dimensional digital twin model of the building according to the house type map that matches the building;
[0013] Construct an electronic map applicable to the floor cleaning robot to perform cleaning operations based on the digital twin model.
[0014] The second aspect of the present invention provides a mapping device based on Bluetooth positioning, including:
[0015] A signal receiving module, configured to control the floor cleaning robot to receive Bluetooth beacon signals broadcast by the base stations with three Bluetooth devices in the building when the floor cleaning robot performs cleaning operations in the building;
[0016] A robot positioning module, configured to position the floor cleaning robot based on the Bluetooth beacon signals to obtain floor cleaning coordinates;
[0017] A density calculation module, configured to calculate the density of the floor cleaning coordinates in the building;
[0018] An image data construction module, configured to construct binary image data based on the floor cleaning coordinates if the density is greater than or equal to a preset first threshold;
[0019] A matching degree calculation module, configured to calculate the matching degree between the image data and a preset house type map based on multiple Bluetooth devices;
[0020] A house type map determination module, configured to determine the house type map that matches the building among the house type maps with the highest matching degrees;
[0021] A digital twin model construction module, configured to construct a three-dimensional digital twin model of the building based on the house type map that matches the building;
[0022] An electronic map construction module, configured to construct an electronic map applicable to the floor cleaning robot to perform cleaning operations based on the digital twin model.
[0023] The third aspect of the present invention provides an electronic device, and the electronic device includes:
[0024] At least one processor; and
[0025] A memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the mapping method based on Bluetooth positioning as described in the first aspect above.
[0027] The fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the map building method based on Bluetooth positioning as described in the first aspect above.
[0028] The fifth aspect of the present invention provides a computer program product including a computer program, which when executed by a processor implements the map building method based on Bluetooth positioning as described in the first aspect above.
[0029] In this embodiment, when the floor sweeping robot performs a cleaning operation in a building, three Bluetooth devices in the building are used as base stations to control the floor sweeping robot to receive the Bluetooth beacon signals broadcast by the base stations; the floor sweeping robot is positioned based on the Bluetooth beacon signals to obtain the sweeping coordinates; the density of the sweeping coordinates in the building is calculated; if the density is greater than or equal to a preset first threshold, binary image data is constructed based on the sweeping coordinates; the matching degree between the image data and a preset house type map is calculated based on multiple Bluetooth devices; the house type map matching the building is determined from multiple house type maps with the highest matching degrees; a three-dimensional digital twin model of the building is constructed based on the house type map matching the building; and an electronic map suitable for the floor sweeping robot to perform a cleaning operation is constructed based on the digital twin model. In this embodiment, the Bluetooth devices in the building are reused as base stations to position the floor sweeping robot, which can reduce the accumulation of positioning deviations caused by problems such as hair entanglement and wear of the internal parts of the floor sweeping robot. Matching a suitable house type map based on the moving path of the floor sweeping robot can ensure the accuracy of the house type map. Improving the digital twin model based on the house type map and constructing a standardized electronic map based on the digital twin model can increase the information content. The high adaptability of the electronic map to the actual building can improve the timeliness of the electronic map, effectively improve the accuracy of the electronic map, and facilitate the floor sweeping robot to plan a high-precision path.
[0030] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understandable through the following description. Description of the Drawings
[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0032] Figure 1 It is a flowchart of a map building method based on Bluetooth positioning provided in Embodiment 1 of the present invention.
[0033] Figure 2 It is an exemplary diagram of the moving path of a floor cleaning robot provided in the first embodiment of the present invention.
[0034] Figure 3 It is a schematic structural diagram of a mapping device based on Bluetooth positioning provided in the second embodiment of the present invention.
[0035] Figure 4 It is a schematic structural diagram of an electronic device provided in the third embodiment of the present invention. Detailed implementation manners
[0036] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can cover sequences other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0038] First embodiment
[0039] Refer to Figure 1 , which shows a flowchart of a mapping method based on Bluetooth positioning provided in the first embodiment of the present invention. This method can be executed by a mapping device based on Bluetooth positioning. The mapping device based on Bluetooth positioning can be implemented in the form of hardware and / or software, and the mapping device based on Bluetooth positioning can be configured in an electronic device. As Figure 1 shown, this method includes:
[0040] Step 101, when the floor cleaning robot performs a cleaning operation in a building, use three Bluetooth devices in the building as base stations, and control the floor cleaning robot to receive the Bluetooth beacon signals broadcast by the base stations.
[0041] Generally, multiple Bluetooth devices are installed in buildings such as residences. For example, smart ceiling lights, smart table lamps, smart refrigerators, smart speakers, smart air conditioners, etc. These Bluetooth devices mostly belong to the same smart home platform and can be centrally controlled.
[0042] If the sweeping robot initially performs a cleaning operation in the building, it can start the automatic cleaning mode, screen out three Bluetooth devices in the building from dimensions such as the running state and distribution, temporarily set these three Bluetooth devices as Bluetooth base stations, and control the sweeping robot to call the Bluetooth module to receive the Bluetooth beacon signals broadcast by these three base stations.
[0043] In the automatic cleaning mode, the sweeping robot automatically plans the cleaning route to cover all areas in the building, sucks the ground debris into the trash collection box by means such as brushing and vacuuming, and completes the cleaning.
[0044] In an embodiment of the present invention, step 101 may include the following steps:
[0045] Step 1011: Control each Bluetooth device in the building to form a Bluetooth mesh network.
[0046] In this embodiment, Bluetooth devices that support the Bluetooth Mesh protocol are screened out in the building, and each Bluetooth device is added to the Bluetooth Mesh network through configuration work, an address and a key are assigned, and roles such as relay nodes and low-power nodes are assigned according to positioning requirements.
[0047] Step 1012: Locate each Bluetooth device in the Bluetooth mesh network to obtain device coordinates.
[0048] In the Bluetooth Mesh network, the base station is negotiated and the Bluetooth beacon signal is broadcast according to factors such as the status, so as to locate each Bluetooth device according to Bluetooth and obtain the device coordinates of each Bluetooth device.
[0049] Step 1013: Form a device set with any three Bluetooth devices.
[0050] In this embodiment, any three Bluetooth devices can be selected in the Bluetooth Mesh network to form a device set.
[0051] Step 1014: Calculate the dispersion degree of the Bluetooth devices in the building based on the device coordinates in the device set.
[0052] In each device set, the device coordinates of the three Bluetooth devices are statistically analyzed to calculate the dispersion degree of the Bluetooth devices in the building.
[0053] Exemplarily, in a set of devices, calculate the difference between the device coordinates of pairwise Bluetooth devices to obtain the distribution distance between pairwise Bluetooth devices.
[0054] In the set of devices, sum up the distribution distances to obtain the total distance.
[0055] In the set of devices, take the absolute value of the difference between pairwise distribution distances to obtain the distribution offset, and sum up the distribution offsets to obtain the total offset.
[0056] In the set of devices, subtract the product of the total offset and the second weight from the product of the total distance and the first weight to obtain the degree of dispersion of Bluetooth devices in the building.
[0057] In this example, assume that there are Bluetooth device A, Bluetooth device B, and Bluetooth device C in the set of devices. Then, the degree of dispersion of Bluetooth devices in the building can be expressed as:
[0058] Dispersion = w 1 ×(D 1 + D 2 + D 3 ) - w 2 ×(|D 1 - D 2 | + |D 2 - D 3 | + |D 3 - D 1 |);
[0059] where Dispersion is the degree of dispersion, D 1 is the distribution distance between Bluetooth device A and Bluetooth device B, D 2 is the distribution distance between Bluetooth device B and Bluetooth device C, D 3 is the distribution distance between Bluetooth device C and Bluetooth device A, w 1 is the first weight, and w 2 is the second weight.
[0060] Step 1015: Take the three Bluetooth devices within the Bluetooth device with the highest degree of dispersion as base stations, and control the sweeping robot to receive the Bluetooth beacon signals broadcast by the base stations.
[0061] Compare the degrees of dispersion of the three Bluetooth devices in each set of devices, select the three Bluetooth devices within the set of devices with the highest degree of dispersion as base stations, control the base stations to temporarily broadcast Bluetooth beacon signals, and control the sweeping robot to receive the Bluetooth beacon signals broadcast by the base stations.
[0062] In this way, base stations that are as evenly distributed as possible in the base station can be screened out. When the sweeping robot moves in the building, it can receive a relatively high RSSI (Received Signal Strength Indication) of the Bluetooth beacon signal broadcast by the base station, thereby ensuring that the positioning is maintained at a certain accuracy.
[0063] Step 102: Locate the sweeping robot based on the Bluetooth beacon signal to obtain the sweeping coordinates.
[0064] In a specific implementation, a relationship model can be established based on the RSSI and distance of the Bluetooth beacon signal. The RSSI indication values of the Bluetooth beacon signals of the three base stations are substituted into the relationship model to obtain the distance between the sweeping robot and the base station.
[0065] Exemplarily, the relationship model is as follows:
[0066] P(d)=P(d 0 )-10nlog 10 (d / d 0 );
[0067] Where P(d) is the RSSI at a distance d from the base station, P(d 0 ) is the RSSI at a distance d 0 from the base station, and n is the path loss exponent.
[0068] Using algorithms such as trilateration, multilateration, or weighted centroid localization, calculate the sweeping coordinates of the sweeping robot based on the distances between the sweeping robot and each base station.
[0069] As Figure 2 shown, arranging the sweeping coordinates of the sweeping robot in chronological order can form the moving path of the sweeping robot.
[0070] In this embodiment, the Bluetooth devices in the building are temporarily reused as base stations to locate the sweeping robot. Observing the sweeping robot from the outside can reduce the accumulation of positioning errors caused by problems such as hair entanglement and wear of the internal parts of the sweeping robot.
[0071] Step 103: Calculate the density of the sweeping coordinates in the building.
[0072] The sweeping robot moves and cleans the ground in the building, continuously accumulating sweeping coordinates. At this time, according to the distribution of the sweeping coordinates in the building, the density of the sweeping coordinates in the building can be statistically calculated, and the degree to which the sweeping robot detects the building can be judged.
[0073] In a specific implementation, a minimum bounding rectangle can be added to all the floor-sweeping coordinates accumulated currently as a virtual building area, and the virtual building area can reflect the contour structure of the building to a certain extent.
[0074] Count the number of floor-sweeping coordinates and the area of the virtual building area.
[0075] Calculate the ratio between the number of floor-sweeping coordinates and the area as the density of the floor-sweeping coordinates in the building.
[0076] Step 104: If the density is greater than or equal to a preset first threshold, construct binary image data based on the floor-sweeping coordinates.
[0077] Compare the density of the floor-sweeping coordinates in the building with the preset first threshold. If the density of the floor-sweeping coordinates in the building is greater than or equal to the preset first threshold, it means that the density of the floor-sweeping coordinates in the building is relatively high, and the floor-sweeping robot may have detected most areas of the building. Then, different pixel values can be distinguished by the floor-sweeping coordinates, thereby constructing binary image data.
[0078] In a specific implementation, convert the virtual building area into image data.
[0079] In the image data, there are multiple pixel points. Compare the coordinates of each pixel point with the floor-sweeping coordinates.
[0080] If a pixel point is within the floor-sweeping coordinates (i.e., the coordinates of the pixel point are the same as the floor-sweeping coordinates), set the pixel value of this pixel point to 1.
[0081] If a pixel point is not within the floor-sweeping coordinates (i.e., the coordinates of the pixel point are different from the floor-sweeping coordinates), set the pixel value of the pixel point to 0.
[0082] Step 105: Calculate the matching degree between the image data and a preset house type map based on multiple Bluetooth devices.
[0083] In an offline environment, a house type library can be constructed through different forms and channels. A large number of two-dimensional house type maps of buildings are accumulated in the house type library. For example, a real estate agency authorizes the use of the house type maps it constructs, constructs a generator according to the building specifications of the building, and modifies the parameters in the generator (such as the location, attributes, length, and / or width of the rooms, the location and width of the doors), etc.
[0084] In practical applications, multiple Bluetooth devices play the role of anchor points. Combining with the prior knowledge of the Bluetooth devices, the matching degree between the image data and the house type map can be calculated, making the matching degree between the image data and the house type map have a high accuracy.
[0085] Then, the floor plan library can be traversed according to the image data, so as to calculate the matching degree between the image data and the preset floor plan.
[0086] Furthermore, the full set of floor plans in the floor plan library can be traversed according to the image data, or the floor plans that may be suitable can be screened according to factors such as the area of the virtual building area and the longitude and latitude of the sweeping robot, and then matched with the image data, reducing the computational workload of the matching.
[0087] In an embodiment of the present invention, step 105 may include the following steps:
[0088] Step 1051: Load the preset floor plan.
[0089] In this embodiment, the floor plan in the floor plan can be loaded into the memory for waiting for matching. Among them, there are multiple indoor areas with marked attributes in the floor plan, such as the hall, bedroom, toilet, kitchen, balcony, and so on.
[0090] Step 1052: Cluster the sweeping coordinates according to the virtual building area in the image data to obtain multiple sweeping clusters.
[0091] In this embodiment, since the virtual building area can reflect the contour structure of the building to a certain extent, therefore, clustering algorithms such as DBSCAN (Density-Based Spatial Clustering of Applications with Noise) and K-means can be used to cluster the sweeping coordinates in the image data according to the parameters of the virtual building area to obtain multiple sweeping clusters, so that the convergence domain of the sweeping clusters is the indoor area, that is, the goal of clustering is that one or more sweeping clusters converge in the same indoor area, and the sweeping clusters do not cross indoor areas at the same time.
[0092] Taking K-means as an example, a mapping table can be determined; the mapping table contains multiple mapping relationships between the building range and the number of clusters; among them, the building range is positively correlated with the number of clusters, that is, the larger the value of the building range (characterized by the midpoint), the larger the number of clusters, and vice versa, the smaller the value of the building range (characterized by the midpoint), the smaller the number of clusters.
[0093] For example, for buildings with an area of less than 30 square meters (building range), most of them are one-bedroom and one-living-room designs, and the number of clusters can be set to about 4. For buildings with an area of 40 to 70 square meters (building range), most of them are two-bedroom and one-living-room designs, and the number of clusters can be set to about 7, and so on.
[0094] Query the building range where the area of the virtual building area is located in the mapping table as the target range, and use the number of clusters mapped by the target range as the K value to perform K-means clustering on the sweeping coordinates in the image data to obtain multiple sweeping clusters.
[0095] Further, the process of K-means clustering is as follows:
[0096] S1. Initialize K sweeping clusters; the sweeping clusters have center points.
[0097] S2. For each sweeping coordinate, calculate the distance between the sweeping coordinate and the center points of each sweeping cluster, such as the Euclidean distance, etc.
[0098] S3. For each sweeping coordinate, divide the sweeping coordinate into the sweeping cluster with the minimum distance.
[0099] S4. For each sweeping cluster, calculate the average value of all sweeping coordinates within the sweeping cluster, and assign the average value to the center point of the sweeping cluster to update the center point.
[0100] S5. Calculate clustering metrics for the K sweeping clusters, such as SSE (Sum of Squared Errors), CH index (Calinski-Harabasz Index), DB index (Davies-Bouldin Index), etc.
[0101] S5. Determine whether the clustering metrics meet the clustering conditions, such as the clustering metric is less than a certain threshold, the fluctuation range of the clustering metric is less than a certain threshold, etc.; if so, determine that the K sweeping clusters have completed clustering; if not, return to S2.
[0102] Step 1053. Classify the sweeping clusters to obtain the attributes of the sweeping clusters in the house type.
[0103] In this embodiment, traverse each sweeping cluster, and perform multi-classification operations on the sweeping cluster using the parameters of the sweeping cluster itself to obtain the attributes of the sweeping cluster in the house type.
[0104] In specific implementation, a Gradient Boosting Decision Tree (GBDT) trained for the sweeping clusters in an offline environment can be determined. GBDT is an additive model based on the boosting (boosting ensemble method) ensemble learning idea. During training, the forward distribution algorithm is used for greedy learning. Each iteration learns a CART tree (decision tree) to fit the residual between the prediction results of the previous t-1 (t is a positive integer) trees and the true values of the training samples. GBDT has strong interpretability and has better multi-classification effects for sweeping clusters with relatively simple parameters.
[0105] For each sweeping cluster, cluster features can be extracted from the sweeping cluster (including sweeping coordinates).
[0106] Exemplarily, the cluster features include the coordinates of the center point of the sweeping cluster relative to the center point of the virtual building area (i.e., the coordinates of the center point of the sweeping cluster in the coordinate system when the center point of the virtual building area is the origin of the coordinate system), the length and width of the minimum circumscribed rectangle of the sweeping cluster, the number of sweeping coordinates in the sweeping cluster and the area of the sweeping cluster, and so on.
[0107] Input the cluster features into a gradient boosting decision tree for classification to obtain the attributes of the sweeping cluster in the house type.
[0108] Step 1054: Convert the sweeping cluster into a virtual sweeping area.
[0109] In this embodiment, each sweeping cluster can be traversed and normalized to fit the virtual sweeping area for each sweeping cluster.
[0110] In specific implementation, considering that based on Bluetooth positioning, the accuracy is mostly at the meter level, especially the error of non-professional base station positioning is relatively large. Therefore, erosion operation can be performed on the sweeping cluster.
[0111] If the erosion operation is completed, add the minimum circumscribed rectangle to the sweeping cluster as the full-scale sweeping area, and converge the edge of the full-scale sweeping area towards the center by a specified length to obtain the virtual sweeping area.
[0112] In this way, through the erosion operation and the convergence operation, the influence of errors can be reduced, and, in cooperation with the subsequent matching algorithm, the influence on the matching degree between the image data and the house type map is small.
[0113] Step 1055: Under the constraint of minimizing the overlapping range between the virtual sweeping area and the wall of the house type map, align the image data with the house type map so that the attributes of the virtual sweeping area are the same as those of the indoor area.
[0114] In the same two-dimensional vector space, continuously adjust the positions of the image data and the house type map to align the image data with the house type map. There are two alignment objectives. One is to minimize the overlapping range between the virtual sweeping area and the wall of the house type map, and the other is that the attributes of the virtual sweeping area are the same as those of the indoor area.
[0115] Step 1056: If the alignment is completed, project the device coordinates of the Bluetooth device into the image data.
[0116] When the alignment of the image data and the house type map is completed, project the device coordinates of the Bluetooth device into the image data to make it an anchor point.
[0117] Step 1057: If the projection is completed, query the probability that the Bluetooth device appears in the indoor area where the device coordinates are located, and calculate the proportion of the virtual sweeping area in the indoor area.
[0118] In an offline environment, the probabilities of various Bluetooth devices appearing in various areas can be recorded based on prior knowledge and recorded in a configuration file. For example, when the Bluetooth device is a large smart ceiling light, the probability of it appearing in the living room is 70%, in the bedroom is 30%, in the kitchen is 5%, and in the toilet is 5%, and so on.
[0119] In the same two-dimensional vector space, query the probability of the Bluetooth device appearing in the indoor area where the device coordinates are located in the configuration file.
[0120] In the same indoor area, the ratio between the area of all swept areas and the area of the indoor area can be calculated as the proportion of the virtual swept area in the indoor area.
[0121] Step 1058: If the proportion is greater than or equal to a preset second threshold, mark the indoor area as the target area.
[0122] Generally, users will organize the obstacles in the building and use the sweeping robot to move as smoothly as possible to improve the cleaning effect of the building. At this time, the sweeping robot can usually traverse a large part of the indoor area.
[0123] In this case, compare the proportion of the virtual swept area in the indoor area with the preset second threshold.
[0124] If the proportion of the virtual swept area in the indoor area is greater than or equal to the preset second threshold, indicating that the sweeping robot has completed cleaning in this indoor area and the matching between the swept area and the indoor area is confident, then this indoor area can be marked as the target area.
[0125] On the contrary, if the proportion of the virtual swept area in the indoor area is less than the preset second threshold, indicating that the sweeping robot has not completed cleaning in this indoor area and the matching between the swept area and the indoor area is not confident, then this indoor area can be ignored.
[0126] Step 1059: Calculate the matching degree between the image data and the house floor plan based on the probability and the target area.
[0127] In this embodiment, the information of two dimensions, namely the probability of the Bluetooth device appearing in the indoor area where the device coordinates are located and the target area where the sweeping robot has completed cleaning, can be combined, and a statistical algorithm can be used to calculate the matching degree between the image data and the house floor plan.
[0128] Exemplarily, calculate the ratio between the area of all target areas and the area of the house floor plan to obtain the cleaning ratio, and add the product of the average value of the probability and the third weight to the product of the cleaning ratio and the fourth weight to obtain the matching degree between the image data and the house floor plan.
[0129] In this example, assuming that there are Bluetooth device A, Bluetooth device B, and Bluetooth device C in the device set, then the matching degree between the image data and the apartment layout can be expressed as:
[0130] Score = w 3 × ((P 1 + P 2 + P 3 ) / 3) + w 4 × ((S 1 + S 2 + …… + S n ) / S 0 ) ;
[0131] Among them, Score is the matching degree, P 1 is the probability corresponding to Bluetooth device A, P 2 is the probability corresponding to Bluetooth device B, P 3 is the probability corresponding to Bluetooth device C, n is the number of target areas, S 1 is the area of the first target area, S 2 is the area of the second target area, and so on, S n is the area of the nth target area, S 0 is the area of the apartment layout, w 3 is the third weight, w 4 is the fourth weight.
[0132] Step 106: Determine the apartment layout that matches the building among multiple apartment layouts with the highest matching degrees.
[0133] In this embodiment, the apartment layouts can be sorted from high to low according to the matching degree, and multiple apartment layouts with the highest sorting (i.e., multiple apartment layouts with the highest matching degrees) are selected and pushed to the client for rendering and display for the user to browse and compare.
[0134] If the user selects a certain apartment layout on the client and triggers a confirmation operation on the client, then it can be determined that the apartment layout selected by the user is the apartment layout that matches the current building.
[0135] Step 107: Construct a three-dimensional digital twin model of the building based on the apartment layout that matches the building.
[0136] In this embodiment, taking the apartment layout that matches the building as the base map, a three-dimensional digital twin model of the building is constructed and pushed to the client for rendering and display. The client provides an editing component. At this time, the user can call the editing component to edit the digital twin model according to the distribution of objects such as furniture and household appliances in the building, add common objects, and / or generate custom objects to improve the digital twin model.
[0137] In practical applications, the digital twin model can vividly display the status of each intelligent device in the same smart home platform, facilitating users to monitor and manage each intelligent device in the same smart home platform.
[0138] Step 108: Construct an electronic map suitable for the sweeping robot to perform cleaning operations based on the digital twin model.
[0139] After being refined by the user, the three-dimensional digital twin model belongs to a standardized model. The three-dimensional digital twin model (including the objects on the ground in the digital twin model) can be projected onto a two-dimensional plane, thereby constructing an electronic map suitable for the sweeping robot to perform cleaning operations (especially path planning).
[0140] Furthermore, when the user adds objects such as furniture and household appliances to the digital twin model, for some large objects, such as sofas, sideboards, bookcases, air-conditioning cabinets, etc., they can be marked as fixed obstacles on the electronic map. For some small objects, such as dining tables and chairs, dirty clothes baskets, etc., they can be marked as movable obstacles on the electronic map. For obstacles with different attributes (fixed, movable), corresponding algorithms can be designed to plan the path, improving the cleaning efficiency while achieving automatic obstacle avoidance.
[0141] Since the structures such as walls in a building basically do not change, the electronic map remains valid for a long time. The sweeping robot can dynamically adjust the obstacles in the electronic map according to the situation detected during cleaning to maintain the accuracy of the electronic map.
[0142] In this embodiment, when the floor cleaning robot performs a cleaning operation in a building, three Bluetooth devices in the building are used as base stations to control the floor cleaning robot to receive the Bluetooth beacon signals broadcast by the base stations; the floor cleaning robot is positioned based on the Bluetooth beacon signals to obtain the cleaning coordinates; the density of the cleaning coordinates in the building is calculated; if the density is greater than or equal to a preset first threshold, binary image data is constructed based on the cleaning coordinates; the matching degree between the image data and a preset house type map is calculated based on multiple Bluetooth devices; the house type map that matches the building is determined from multiple house type maps with the highest matching degrees; a three-dimensional digital twin model of the building is constructed based on the house type map that matches the building; and an electronic map suitable for the floor cleaning robot to perform a cleaning operation is constructed based on the digital twin model. In this embodiment, the Bluetooth devices in the building are reused as base stations to position the floor cleaning robot, which can reduce the accumulation of positioning deviations caused by problems such as hair entanglement and wear of the internal parts of the floor cleaning robot. Matching a suitable house type map based on the moving path of the floor cleaning robot can ensure the accuracy of the house type map. Improving the digital twin model based on the house type map and constructing a standardized electronic map based on the digital twin model can increase the amount of information. The high adaptability of the electronic map to the actual building can improve the timeliness of the electronic map, effectively improve the accuracy of the electronic map, and facilitate the floor cleaning robot to plan a high-precision path.
[0143] Embodiment 2
[0144] See Figure 3 , which shows a schematic structural diagram of a map building device based on Bluetooth positioning provided in Embodiment 2 of the present invention. As Figure 3 shown, the device includes:
[0145] A signal receiving module 301, configured to, when the floor cleaning robot performs a cleaning operation in a building, use three Bluetooth devices in the building as base stations to control the floor cleaning robot to receive the Bluetooth beacon signals broadcast by the base stations;
[0146] A robot positioning module 302, configured to position the floor cleaning robot based on the Bluetooth beacon signals to obtain the cleaning coordinates;
[0147] A density calculation module 303, configured to calculate the density of the cleaning coordinates in the building;
[0148] An image data construction module 304, configured to, if the density is greater than or equal to a preset first threshold, construct binary image data based on the cleaning coordinates;
[0149] A matching degree calculation module 305, configured to calculate the matching degree between the image data and a preset house type map based on multiple Bluetooth devices;
[0150] The apartment layout diagram determination module 306 is configured to determine the apartment layout diagram that matches the building from among the multiple apartment layout diagrams with the highest matching degree;
[0151] The digital twin model construction module 307 is configured to construct a three-dimensional digital twin model of the building based on the apartment layout diagram that matches the building;
[0152] The electronic map construction module 308 is configured to construct an electronic map suitable for the sweeping robot to perform cleaning operations based on the digital twin model.
[0153] In an embodiment of the present invention, the signal receiving module 301 includes:
[0154] The mesh network formation module is configured to control each Bluetooth device in the building to form a Bluetooth mesh network;
[0155] The Bluetooth device positioning module is configured to position each Bluetooth device in the Bluetooth mesh network to obtain device coordinates;
[0156] The device set formation module is configured to form a device set by any three of the Bluetooth devices;
[0157] The dispersion degree calculation module is configured to calculate the dispersion degree of the Bluetooth devices in the building based on the device coordinates in the device set;
[0158] The robot control module is configured to use the three Bluetooth devices in the device set with the highest dispersion degree as base stations to control the sweeping robot to receive the Bluetooth beacon signals broadcast by the base stations.
[0159] In an embodiment of the present invention, the dispersion degree calculation module is further configured to:
[0160] In the device set, calculate the difference between the device coordinates of every two Bluetooth devices to obtain the distribution distance between every two Bluetooth devices;
[0161] In the device set, sum up the distribution distances to obtain the total distance;
[0162] In the device set, take the absolute value of the difference between every two distribution distances to obtain the distribution offset, and sum up the distribution offsets to obtain the total offset;
[0163] In the device set, subtract the product of the total offset and the second weight from the product of the total distance and the first weight to obtain the dispersion degree of the Bluetooth devices in the building.
[0164] In an embodiment of the present invention, the density calculation module is further configured to:
[0165] Add a minimum bounding rectangle to all the floor-sweeping coordinates as a virtual building area;
[0166] Count the number of the floor-sweeping coordinates and the area of the virtual building area;
[0167] Calculate the ratio between the number of the floor-sweeping coordinates and the area as the density of the floor-sweeping coordinates in the building;
[0168] The image data construction module 304 is further configured to:
[0169] Convert the virtual building area into image data;
[0170] In the image data, if a pixel point is located at the floor-sweeping coordinate, set the pixel value of the pixel point to 1, and if the pixel point is not located at the floor-sweeping coordinate, set the pixel value of the pixel point to 0.
[0171] In an embodiment of the present invention, the matching degree calculation module 305 includes:
[0172] A house type drawing loading module, configured to load a preset house type drawing; multiple indoor areas with marked attributes are provided in the house type drawing;
[0173] A floor-sweeping cluster clustering module, configured to cluster the floor-sweeping coordinates in the image data according to the virtual building area to obtain a plurality of floor-sweeping clusters;
[0174] An attribute classification module, configured to classify the floor-sweeping clusters to obtain the attributes of the floor-sweeping clusters in terms of house type;
[0175] A virtual floor-sweeping area conversion module, configured to convert the floor-sweeping clusters into virtual floor-sweeping areas;
[0176] A house type drawing alignment module, configured to align the image data with the house type drawing under the constraint of minimizing the overlapping range between the virtual floor-sweeping area and the wall of the house type drawing, so that the attributes of the virtual floor-sweeping area are the same as the attributes of the indoor area;
[0177] A coordinate projection module, configured to project the device coordinates of the Bluetooth device into the image data if the alignment is completed;
[0178] A parameter calculation module, configured to query the probability that the Bluetooth device appears in the indoor area where the device coordinates are located and calculate the proportion of the virtual floor-sweeping area in the indoor area if the projection is completed;
[0179] A target area marking module, configured to mark the indoor area as a target area if the ratio is greater than or equal to a preset second threshold;
[0180] A joint calculation module, configured to calculate a matching degree between the image data and the floor plan according to the probability and the target area.
[0181] In an embodiment of the present invention, the floor sweeping cluster clustering module is further configured to:
[0182] Determine a mapping table; the mapping table includes a mapping relationship between multiple building ranges and the number of clusters; the building range is positively correlated with the number of clusters;
[0183] Query, in the mapping table, the building range where the area of the virtual building area is located as a target range;
[0184] Use the number of clusters mapped by the target range as the K value, and perform K-means clustering on the floor sweeping coordinates in the image data to obtain multiple floor sweeping clusters;
[0185] The attribute classification module is further configured to:
[0186] Determine a gradient boosting decision tree;
[0187] Extract cluster features from the floor sweeping clusters; the cluster features include coordinates between the center point of the floor sweeping cluster and the center point of the virtual building area, the length and width of the minimum circumscribed rectangle of the floor sweeping cluster, the number of floor sweeping coordinates in the floor sweeping cluster, and the area of the floor sweeping cluster;
[0188] Input the cluster features into the gradient boosting decision tree for classification to obtain the attributes of the floor sweeping clusters on the floor plan.
[0189] In an embodiment of the present invention, the virtual floor sweeping area conversion module is further configured to:
[0190] Perform an erosion operation on the floor sweeping clusters;
[0191] If the erosion operation is completed, add a minimum circumscribed rectangle to the floor sweeping clusters as the full-scale floor sweeping area;
[0192] Converge the edge of the full-scale floor sweeping area towards the center by a specified length to obtain a virtual floor sweeping area.
[0193] In an embodiment of the present invention, the joint calculation module is further configured to:
[0194] Calculate a ratio between the areas of all the target areas and the area of the floor plan to obtain a cleaning ratio;
[0195] Add the product of the average value of the probability and the third weight to the product of the cleaning ratio and the fourth weight to obtain the matching degree between the image data and the floor plan.
[0196] The map building device based on Bluetooth positioning provided by the embodiments of the present invention can execute the map building method based on Bluetooth positioning provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the map building method based on Bluetooth positioning.
[0197] Embodiment III
[0198] Refer to Figure 4 , which shows a schematic structural diagram of an electronic device provided by an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0199] As Figure 4 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0200] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0201] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the mapping method based on Bluetooth positioning.
[0202] In some embodiments, the mapping method based on Bluetooth positioning can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the mapping method based on Bluetooth positioning described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the mapping method based on Bluetooth positioning by any other suitable means (e.g., by means of firmware).
[0203] The various embodiments of the systems and technologies described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0204] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server.
[0205] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0206] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0207] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0208] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0209] Embodiment 4
[0210] The embodiment of the present invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the map building method based on Bluetooth positioning provided in any embodiment of the present invention.
[0211] In the process of implementing the computer program product, computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0212] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and this is not limited herein.
[0213] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A mapping method based on Bluetooth positioning, characterized in that: include: When the cleaning robot performs a cleaning operation in a building, the three Bluetooth devices in the building are used as base stations to control the cleaning robot to receive Bluetooth beacon signals broadcast by the base stations; Positioning the sweeping robot according to the Bluetooth beacon signal to obtain sweeping coordinates; Adding a minimum bounding rectangle to all the sweeping coordinates as a virtual building area; Counting the number of the sweeping coordinates and the area of the virtual building area; Calculating a ratio between the number of the sweeping coordinates and the area as the density of the sweeping coordinates in the building; If the density is greater than or equal to a preset first threshold, converting the virtual building area into image data; In the image data, if a pixel point is located at the sweeping coordinate, the pixel value of the pixel point is set to 1; if the pixel point is not located at the sweeping coordinate, the pixel value of the pixel point is set to 0; Load the preset floor plan; An indoor area with multiple annotated attributes in the floor plan; Clustering the sweeping coordinates in the image data according to the virtual building area to obtain a plurality of sweeping clusters; Classifying the sweeping clusters to obtain attributes of the sweeping clusters based on the apartment type; Converting the sweeping cluster into a virtual sweeping area; Under the constraint of minimizing the overlapping range between the virtual sweeping area and the wall of the floor plan, aligning the image data with the floor plan so that the attributes of the virtual sweeping area are the same as the attributes of the indoor area; If the alignment is completed, projecting the device coordinates of the Bluetooth device into the image data; If the projection is completed, query the probability that the Bluetooth device appears in the indoor area where the device coordinates are located, and calculate the proportion of the virtual sweeping area in the indoor area; If the proportion is greater than or equal to a preset second threshold, marking the indoor area as a target area; Calculating the degree of matching between the image data and the floor plan according to the probability and the target area; Determining the floor plan that matches the building among the multiple floor plans with the highest matching degree; Constructing a three-dimensional digital twin model of the building according to the floor plan matching the building; An electronic map suitable for the sweeping robot to perform cleaning operations is constructed based on the digital twin model.
2. The method according to claim 1, characterized in that The method of using the three Bluetooth devices in the building as base stations and controlling the sweeping robot to receive Bluetooth beacon signals broadcast by the base stations includes: Controlling various Bluetooth devices in the building to form a Bluetooth mesh network; Positioning each of the Bluetooth devices in the Bluetooth mesh network to obtain device coordinates; Any three of the Bluetooth devices form a device set; In the device set, calculating the dispersion degree of the Bluetooth devices in the building according to the device coordinates; The three Bluetooth devices in the device set with the highest degree of dispersion are used as base stations, and the cleaning robot is controlled to receive the Bluetooth beacon signals broadcast by the base stations.
3. The method according to claim 2, characterized in that The step of calculating the dispersion degree of the Bluetooth devices in the building according to the device coordinates in the device set includes: In the device set, the difference between the device coordinates of two Bluetooth devices is calculated to obtain the distribution distance between two Bluetooth devices; In the device set, summing the distribution distances to obtain a total distance; In the device set, taking absolute values of differences between the distribution distances of each pair to obtain distribution offsets, and summing the distribution offsets to obtain a total offset; In the device set, the product between the total distance and the first weight is subtracted from the product between the total offset and the second weight to obtain the dispersion degree of the Bluetooth devices in the building.
4. The method according to claim 1, characterized in that: The clustering of the sweeping coordinates in the image data according to the virtual building area to obtain a plurality of sweeping clusters includes: Determine a mapping table; the mapping table contains mapping relationships between multiple building ranges and cluster numbers; the building range is positively correlated with the cluster number; Searching the mapping table for the building range where the area of the virtual building area is located as the target range; Taking the number of clusters mapped by the target range as a K value, performing K-means clustering on the sweeping coordinates in the image data to obtain a plurality of sweeping clusters; The classifying the sweeping clusters to obtain the attributes of the sweeping clusters in terms of the apartment type includes: Determine the gradient boosting decision tree; Extracting cluster features from the sweeping cluster; the cluster features include coordinates of the center point of the sweeping cluster relative to the center point of the virtual building area, the length and width of the minimum circumscribed rectangle of the sweeping cluster, the number of sweeping coordinates in the sweeping cluster and the area of the sweeping cluster; The cluster features are input into the gradient boosting decision tree for classification, so as to obtain the attributes of the sweeping cluster in terms of the house type.
5. The method according to claim 4, characterized in that The converting the sweeping cluster into a virtual sweeping area comprises: performing an erosion operation on the sweeping cluster; If the erosion operation is completed, a minimum bounding rectangle is added to the sweeping cluster as the full sweeping area; The edge of the full sweeping area is converged toward the center by a specified length to obtain a virtual sweeping area.
6. The method according to claim 1, characterized in that The calculating the matching degree between the image data and the floor plan according to the probability and the target area includes: Calculating the ratio between the area of all the target areas and the area of the floor plan to obtain a cleaning ratio; The product of the average value of the probability and the third weight is added to the product of the cleaning ratio and the fourth weight to obtain the matching degree between the image data and the floor plan.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the mapping method based on Bluetooth positioning as described in any one of claims 1 to 6 is implemented.
8. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the mapping method based on Bluetooth positioning is implemented as described in any one of claims 1 to 6.
Citation Information
Patent Citations
High-resolution remote sensing image flat-topped building rapid and accurate identification method
CN114241321A
High-precision positioning system and method for automatic parking
CN115629386A