Equipment positioning method and device, electronic equipment and storage medium

Through automated room division and equipment positioning methods, the problem of low manual operation efficiency in the existing technology is solved, and intelligent whole-house smart home appliance configuration is realized, which improves efficiency and saves costs.

CN119420799AInactive Publication Date: 2025-02-11GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1

Patent Information

Application Number
CN202411541667.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the method of manually dividing room and positioning equipment requires a lot of manpower and is very inefficient.

Method used

By obtaining the initial floor plan of the target place, dividing the area based on the floor plan, determining the location of the equipment, and automatically determining the target room where the equipment is located based on the room and the location of the equipment.

Benefits of technology

Intelligent room division and equipment positioning are realized, manual operation is reduced, labor costs are saved, and the efficiency of whole-house smart home appliance configuration is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420799A_ABST
    Figure CN119420799A_ABST
Patent Text Reader

Abstract

The invention provides an equipment positioning method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an initial house type image of a target place; region division is carried out on the target place based on the initial house type image to obtain corresponding room division data, and the room division data comprises at least one room and the room position of each room; determining a device position corresponding to each device in the target place; and for each device, based on the device position of the device and the room position of each room, determining a target room where the device is located in the at least one room. Therefore, intelligent room division of the target place and intelligent positioning of the equipment in the target place are realized, and the whole process does not need manual operation, so that the labor cost is saved, and the efficiency of intelligent home appliance configuration of the whole house is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and in particular to a device positioning method, apparatus, electronic device and storage medium. Background Art

[0002] With the development of the Internet of Things, smart home appliances have gradually become popular in various usage scenarios of daily life. At present, when configuring smart home appliances for the whole house, users need to divide the target place (such as office, residence, etc.) according to the actual situation, and obtain the area where each room in the target place is located. Then, users match the room where each smart home appliance is located according to the device location, realize the correspondence between the device and the room, and further complete the configuration of smart home appliances for the whole house on this basis.

[0003] However, this method of manually dividing rooms and positioning equipment requires a lot of manpower and is very inefficient. Summary of the invention

[0004] The present application provides a device positioning method, apparatus, electronic device and storage medium to solve the problem that the manual room division and device positioning in the prior art requires a lot of manpower and is very inefficient.

[0005] In a first aspect, the present application provides a device positioning method, comprising:

[0006] Obtaining an initial floor plan of the target location;

[0007] Based on the initial floor plan, the target place is divided into regions to obtain corresponding room division data, wherein the room division data includes at least one room and the room location of each room;

[0008] Determine a device location corresponding to each device in the target location;

[0009] For each device, based on the device position of the device and the room position of each room, a target room where the device is located is determined in at least one room.

[0010] In a possible implementation, the step of dividing the target place into areas based on the initial floor plan to obtain corresponding room division data includes:

[0011] Acquire at least one dividing line input by a user for the initial floor plan;

[0012] Based on at least one of the dividing lines, dividing at least one of the first room areas in the initial floor plan to obtain a corresponding second room area;

[0013] For each second room area, performing an area completion operation on the second room area to obtain a corresponding third room area;

[0014] The target floor plan formed by all the third room areas is determined as the room division data.

[0015] In a possible implementation manner, dividing at least one of the first room areas in the initial floor plan based on at least one dividing line to obtain a corresponding second room area includes:

[0016] Setting a unique area color for each first room area on the initial floor plan, and setting a boundary color for the area boundary of each first room area, wherein the boundary color is different from the area color of each first room area;

[0017] For each dividing line, based on the colors of each point on the dividing line, the area color of each first room area and the boundary color, determine the target room area where the dividing line is located in at least one of the first room areas, and two intersection points between the dividing line and the target room area;

[0018] Calculate based on the coordinates of the two intersection points to obtain a corresponding first slope formula;

[0019] Based on the straight line corresponding to the first slope formula, the first room area is divided into two second room areas.

[0020] In a possible implementation, the determining, based on the colors of the points on the dividing line, the area color of each first room area, and the boundary color, the target room area where the dividing line is located in at least one of the first room areas, and the two intersection points of the dividing line and the target room area include:

[0021] Calculate based on the starting point coordinates and the end point coordinates of the dividing line to obtain a second slope formula corresponding to the dividing line;

[0022] Traversing the horizontal coordinate based on the second slope formula to obtain a plurality of reference points on the dividing line;

[0023] Determine at least one color value corresponding to the plurality of reference points and the number of reference points corresponding to each color value, and determine the color value with the largest number of corresponding points as the target color value;

[0024] The first room area whose corresponding area color is consistent with the target color value is determined as the target room area;

[0025] The reference points whose corresponding color values ​​are consistent with the boundary color are determined as the two intersection points of the dividing line and the target room area.

[0026] In a possible implementation manner, performing a region completion operation on the second room region to obtain a corresponding third room region includes:

[0027] Determine two target corner points from the plurality of corner points of the second room area, wherein the two target corner points are diagonal points to each other;

[0028] A rectangular area is constructed based on the two diagonal points, and a region padding operation is performed on the second room area based on the rectangular area to obtain a corresponding third room area.

[0029] In a possible implementation manner, determining the device location corresponding to each device in the target location includes:

[0030] Obtaining the location coordinates of a preset terminal device in the target location;

[0031] Activate the Bluetooth function of all devices in the target location;

[0032] Control the terminal device to repeatedly perform the following steps until all devices are positioned: determine three unpositioned devices to be determined among all devices, receive Bluetooth signals of the three devices to be determined, and determine the angle of each device to be determined relative to the terminal device based on the Bluetooth signals, and detect the signal strength of each device to be determined relative to the terminal device;

[0033] For each device to be determined, determining a device distance between the device to be determined and the terminal device based on a signal strength of the device to be determined;

[0034] Substitute the location coordinates of the terminal device and the angles and device distances of the three devices to be determined relative to the terminal device into a trigonometric function to obtain the device location of each device to be determined in the target location.

[0035] In a possible implementation, determining the device distance between the device and the terminal device based on the signal strength of the device includes:

[0036] Substitute the signal strength of the device into the following formula to obtain the device distance between the device and the terminal device. The formula is as follows:

[0037] L=10 (A·RSSI+B) (Formula 1);

[0038] Where L is the device distance, RSSI is the signal strength, A is a constant related to the attenuation factor of signal propagation, and B is a constant related to the initial strength of the signal and the reference distance.

[0039] In a second aspect, the present application provides a device positioning apparatus, comprising:

[0040] A floor plan acquisition module is used to acquire an initial floor plan of a target location;

[0041] A region division module, configured to divide the target place into regions based on the initial floor plan to obtain corresponding room division data, wherein the room division data includes at least one room and a room location of each of the rooms;

[0042] A location determination module, used to determine the device location corresponding to each device in the target location;

[0043] The room determination module is used to determine, for each device, a target room where the device is located in at least one room based on the device position of the device and the room position of each room.

[0044] In a possible implementation manner, the region division module is specifically used to:

[0045] Acquire at least one dividing line input by a user for the initial floor plan;

[0046] Based on at least one of the dividing lines, dividing at least one of the first room areas in the initial floor plan to obtain a corresponding second room area;

[0047] For each second room area, performing an area completion operation on the second room area to obtain a corresponding third room area;

[0048] The target floor plan formed by all the third room areas is determined as the room division data.

[0049] In a possible implementation manner, the region division module is further used to:

[0050] Setting a unique area color for each first room area on the initial floor plan, and setting a boundary color for the area boundary of each first room area, wherein the boundary color is different from the area color of each first room area;

[0051] For each dividing line, based on the colors of each point on the dividing line, the area color of each first room area and the boundary color, determine the target room area where the dividing line is located in at least one of the first room areas, and two intersection points between the dividing line and the target room area;

[0052] Calculate based on the coordinates of the two intersection points to obtain a corresponding first slope formula;

[0053] Based on the straight line corresponding to the first slope formula, the first room area is divided into two second room areas.

[0054] In a possible implementation manner, the region division module is further used to:

[0055] Calculate based on the starting point coordinates and the end point coordinates of the dividing line to obtain a second slope formula corresponding to the dividing line;

[0056] Traversing the horizontal coordinate based on the second slope formula to obtain a plurality of reference points on the dividing line;

[0057] Determine at least one color value corresponding to the plurality of reference points and the number of reference points corresponding to each color value, and determine the color value with the largest number of corresponding points as the target color value;

[0058] The first room area whose corresponding area color is consistent with the target color value is determined as the target room area;

[0059] The reference points whose corresponding color values ​​are consistent with the boundary color are determined as the two intersection points of the dividing line and the target room area.

[0060] In a possible implementation manner, the region division module is further used to:

[0061] Determine two target corner points from the plurality of corner points of the second room area, wherein the two target corner points are diagonal points to each other;

[0062] A rectangular area is constructed based on the two diagonal points, and a region padding operation is performed on the second room area based on the rectangular area to obtain a corresponding third room area.

[0063] In a possible implementation manner, the location determination module is specifically configured to:

[0064] Obtaining the location coordinates of a preset terminal device in the target location;

[0065] Activate the Bluetooth function of all devices in the target location;

[0066] Control the terminal device to repeatedly perform the following steps until all devices are positioned: determine three unpositioned devices to be determined among all devices, receive Bluetooth signals of the three devices to be determined, and determine the angle of each device to be determined relative to the terminal device based on the Bluetooth signals, and detect the signal strength of each device to be determined relative to the terminal device;

[0067] For each device to be determined, determining a device distance between the device to be determined and the terminal device based on a signal strength of the device to be determined;

[0068] Substitute the location coordinates of the terminal device and the angles and device distances of the three devices to be determined relative to the terminal device into a trigonometric function to obtain the device location of each device to be determined in the target location.

[0069] In a possible implementation manner, the location determination module is further configured to:

[0070] Substitute the signal strength of the device into the following formula to obtain the device distance between the device and the terminal device. The formula is as follows:

[0071] L=10 (A·RSSI+B) (Formula 1);

[0072] Where L is the device distance, RSSI is the signal strength, A is a constant related to the attenuation factor of signal propagation, and B is a constant related to the initial strength of the signal and the reference distance.

[0073] In a third aspect, the present application provides a device, comprising: a processor and a memory, wherein the processor is used to execute a device positioning program stored in the memory to implement the device positioning method described in any one of the first aspects.

[0074] In a fourth aspect, the present application provides a storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the device positioning method described in any one of the first aspects.

[0075] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application first obtains the initial floor plan of the target place, and divides the target place into areas based on the initial floor plan to obtain corresponding room division data, wherein the room division data includes at least one room and the room position of each room, then determines the device position corresponding to each device in the target place, and finally, for each device, based on the device position of the device and the room position of each room, determines the target room where the device is located in at least one room. Thus, intelligent room division of the target place and intelligent positioning of the devices in the target place are realized, and the whole process does not require manual operation, thereby saving labor costs and improving the efficiency of whole-house smart home appliance configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0077] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0078] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0079] Figure 1 A flow chart of an embodiment of a device positioning method provided in an embodiment of the present application;

[0080] Figure 2 A flowchart of an embodiment of the present application providing an embodiment of dividing the target place into areas based on the initial floor plan to obtain corresponding room division data;

[0081] Figure 3 This is an example of an initial floor plan;

[0082] Figure 4 is an example of a target floor plan;

[0083] Figure 5 A flowchart of an embodiment of determining a device location corresponding to each device in the target location provided in an embodiment of the present application;

[0084] Figure 6 A block diagram of an embodiment of a device positioning device provided in an embodiment of the present application;

[0085] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0086] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0087] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0088] In order to solve the technical problem that the manual room division and device positioning in the prior art requires a lot of manpower and is very inefficient, the present application provides a device positioning method that can realize intelligent room division of the target place and intelligent positioning of the device in the target place. The whole process does not require manual operation, thereby saving labor costs and improving the efficiency of whole-house smart appliance configuration.

[0089] Figure 1 A flow chart of an embodiment of a device positioning method provided in an embodiment of the present application.

[0090] like Figure 1 As shown, the method comprises the following steps:

[0091] Step 101, obtaining an initial floor plan of a target location;

[0092] Target places refer to places where whole-house smart appliances need to be configured, such as residences, office buildings, shopping malls, etc.

[0093] In the embodiment of the present application, a scanning device with a patrol scanning function (such as a sweeping robot) can be used to patrol and scan, walk on the ground, and record the activity trajectory to obtain the initial floor plan of the target place. The floor plan takes the starting point of the scanning device as the origin and records the initial room division of the target place scanned by the scanning device. In other words, the location of each room in the initial floor plan is the coordinate recorded with the starting point of the scanning device as the origin. The coordinates mentioned here refer to the screen coordinates when the floor plan is displayed on the terminal screen.

[0094] Step 102: Divide the target place into areas based on the initial floor plan to obtain corresponding room division data, wherein the room division data includes at least one room and the room location of each room.

[0095] Room division data refers to data obtained by dividing the target place into regions according to the actual room conditions in the target place, including at least one room and the room location of each room.

[0096] In an embodiment of the present application, the above-mentioned initial floor plan can be further processed to achieve accurate division of the room conditions in the target place and obtain corresponding room division data. In this way, the room division data can be used to prepare for subsequent device positioning, so as to facilitate the corresponding marking of each device in the target place and the room where it is located.

[0097] As for how to divide the target place into areas based on the initial floor plan to obtain corresponding room division data, it will be described in detail through the following embodiments and will not be described in detail here.

[0098] Step 103: Determine the device location corresponding to each device in the target location.

[0099] The device location refers to the location coordinates of the corresponding device in the target location.

[0100] In actual applications, a target location is equipped with multiple smart devices. For example, when the target location is a residence, it may include smart devices such as a television, a refrigerator, a washing machine, and an air conditioner; when the target location is an office, it may include smart devices such as a projector, a computer, a refrigerator, and an air conditioner, and so on.

[0101] In the embodiment of the present application, the location coordinates of each device in the target location can be intelligently determined through the Bluetooth function of the mobile device (such as a mobile phone) and the Bluetooth function of each device in the target location.

[0102] As for how to determine the device position corresponding to each device in the target location, it will be described in detail through the embodiments below and will not be described in detail here.

[0103] Step 104: For each device, based on the device location of the device and the room location of each room, determine a target room where the device is located in at least one room.

[0104] In an embodiment of the present application, after determining the room location of each room in the target place and the device location of each device, the device can be matched with the room through the room location and the device location to determine the target room where each device is located.

[0105] In the application, a unique room name can be set for each room. For each device, after determining the target room corresponding to the device, the room name of the target room is assigned to the device, thereby completing the marking of the room area information of the device.

[0106] For example, if the device A is located in the room location area of ​​room 1, then room 1 can be determined as the target room where device A is located. Therefore, the room name "1" of room 1 is assigned to device A.

[0107] The technical solution provided by the embodiment of the present application first obtains the initial floor plan of the target place, and divides the target place into areas based on the initial floor plan to obtain corresponding room division data, wherein the room division data includes at least one room and the room position of each room, then determines the device position corresponding to each device in the target place, and finally, for each device, based on the device position of the device and the room position of each room, determines the target room where the device is located in at least one room. Thus, intelligent room division of the target place and intelligent positioning of the devices in the target place are realized, and the whole process does not require manual operation, thereby saving labor costs and improving the efficiency of whole-house smart home appliance configuration.

[0108] Figure 2 A flowchart of an embodiment of the present application is provided for dividing the target place into areas based on the initial floor plan to obtain corresponding room division data. Figure 2 The process shown in Figure 1 Based on the process shown, the following steps are included:

[0109] Step 201: Obtain at least one dividing line input by the user for the initial floor plan.

[0110] Step 202: based on at least one of the dividing lines, divide at least one of the first room areas in the initial floor plan to obtain a corresponding second room area.

[0111] For ease of understanding, step 201 and step 202 are described in a unified manner as follows:

[0112] The above initial floor plan contains the first room area corresponding to each room. Figure 3 As shown, it is an example of an initial floor plan, wherein A1 to A7 are areas corresponding to 7 rooms scanned by a scanning device.

[0113] In the application, the first room area of ​​each room scanned by the scanning device may not match the actual area. Therefore, in the embodiment of the present application, the user can input a dividing line for further dividing the corresponding first room area on the initial floor plan according to the actual situation, such as Figure 3 The dotted line shown in FIG. 8 can be used to divide the first room area A1 into two upper and lower second room areas.

[0114] Specifically, step 202 may include the following steps:

[0115] Step A1: setting a unique area color for each first room area on the initial floor plan, and setting a boundary color for the area boundary of each first room area, wherein the boundary color is different from the area color of each first room area.

[0116] For example, you can Figure 3 The A1 area in the example is set to green, the A2 area is set to purple, the A3 area is set to blue, and so on, different colors are set for A1-A7. The area boundaries of each area can be set to a unified color that is different from the area colors of each area, such as black.

[0117] It can be understood that the area color and boundary color set for each room area refers to the color displayed when the floor plan is displayed on the terminal screen.

[0118] Step A2: For each dividing line, based on the colors of each point on the dividing line, the area color of each first room area and the boundary color, determine the target room area where the dividing line is located in at least one of the first room areas, as well as the two intersection points of the dividing line and the target room area.

[0119] Specifically, step A2 may include the following steps: performing calculations based on the starting point coordinates and the ending point coordinates of the dividing line to obtain a second slope formula corresponding to the dividing line, traversing the horizontal coordinate based on the second slope formula to obtain multiple reference points on the dividing line, determining at least one color value corresponding to the multiple reference points and the number of reference points corresponding to each color value, and determining the color value with the largest number of corresponding values ​​as the target color value, determining the first room area whose corresponding area color is consistent with the target color value as the target room area, and determining the reference point whose corresponding color value is consistent with the boundary color as the two intersection points of the dividing line and the target room area.

[0120] In this implementation, first obtain the horizontal and vertical coordinate values ​​of the starting point X1 (x1, y1) and the end point X2 (x2, y2) of the dividing line, substitute the coordinates of these two points into the slope formula y=ax+b, calculate, and obtain a=a1, b=b1, thereby obtaining the second slope formula y=a1x+b1. Then, traverse the X value from 0, obtain its Y value, obtain the corresponding point, and determine the first room area where it is located (that is, the first room area with the same corresponding color value) according to the color value of the point on the initial floor plan. Similarly, traverse from X2 to 0 to determine the area where each point on the straight line is located. Then, the first room area where most of the length of the dividing line is located, that is, the area containing the most reference points, is determined as the corresponding target room area. For example, 90% of the reference points on the dividing line are located in area A1, and 10% of the points are located in area A2, then area A1 is determined to be the target room area. Finally, the reference points whose corresponding color values ​​are consistent with the boundary color are determined as the two intersection points of the dividing line and the target room area.

[0121] Step A3: Calculate based on the coordinates of the two intersection points to obtain a corresponding first slope formula.

[0122] Step A4: Divide the first room area into two second room areas based on the straight line corresponding to the first slope formula.

[0123] In this embodiment, after determining the two intersection points, the coordinates of the two points are substituted into the slope formula y=ax+b, and a=a2 and b=b2 are obtained, thereby obtaining the first slope formula y=a2x+b2. The straight line corresponding to the first slope formula is used to divide the first room area into two second room areas.

[0124] Figure 4 The figure shows an example of a target floor plan obtained after processing the initial floor plan. Figure 4 As shown, the area A1 is divided into two second room areas, area A11 and area A12, by a dividing straight line in the area A1.

[0125] It can be understood that, for the first room area that the user does not draw a straight line, the corresponding second room area is still itself.

[0126] Through this solution, users can further divide the initial floor plan according to the actual room conditions in the target place, so as to obtain more accurate division data.

[0127] Step 203: For each second room area, perform an area completion operation on the second room area to obtain a corresponding third room area.

[0128] Step 204: determine the target floor plan formed by all the third room areas as the room division data.

[0129] For ease of understanding, step 203 and step 204 are described uniformly below:

[0130] In an embodiment of the present application, step 203 may include the following steps: determining two target corner points from multiple corner points of the second room area, wherein the two target corner points are diagonal points of each other, constructing a rectangular area based on the two diagonal points, and performing a region completion operation on the second room area based on the rectangular area to obtain a corresponding third room area.

[0131] In this embodiment, for the room area with gaps scanned by the scanning device, a rectangular area can be delineated by two diagonal points (for example, the upper left corner point and the lower right corner point), and the rectangular area can be filled with the color corresponding to the room area to implement the filling operation on the room area to fill the missing area of ​​the room caused by the occupancy of the ground.

[0132] For example, Figure 3 The A1, A5, A6, and A7 areas shown in the figure are areas with gaps. For each area, a rectangular area is defined by its upper left corner and lower right corner to implement the area filling operation, and the following is obtained: Figure 4 Floor plan shown.

[0133] It can be understood that, for the second room area which is a rectangle itself, the filling step can be skipped, and the third room area corresponding to the second room area is itself.

[0134] Finally, the target floor plan formed by all the third room areas is determined as the room division data, thereby obtaining the room division data ultimately used for device positioning.

[0135] pass Figure 2 The process shown can first divide the corresponding room areas in the initial floor plan based on the dividing lines input by the user, so that the room division situation conforms to the actual situation of the target place, and then fill in the missing room areas caused by ground occupancy, so as to make the final room division data more accurate.

[0136] Figure 5 A flowchart of an embodiment of the present application for determining a device location corresponding to each device in the target location. Figure 5 The process shown in Figure 1 Based on the process shown, the following steps are included:

[0137] Step 501: obtaining the location coordinates of a preset terminal device in the target location;

[0138] Step 502: Activate the Bluetooth function of all devices in the target location;

[0139] Step 503: Control the terminal device to repeatedly perform the following steps until all devices are positioned: determine three unpositioned devices to be determined among all devices, receive Bluetooth signals of the three devices to be determined, and determine an angle between each device to be determined and the terminal device based on the Bluetooth signals, and detect the signal strength of each device to be determined relative to the terminal device;

[0140] Step 504: for each device to be determined, determine the device distance between the device to be determined and the terminal device based on the signal strength of the device to be determined;

[0141] Step 505: Substitute the location coordinates of the terminal device and the angles and device distances of the three devices to be determined relative to the terminal device into a trigonometric function to obtain the device location of each device to be determined in the target location.

[0142] For ease of understanding, steps 501 to 505 are described in a unified manner as follows:

[0143] The terminal device, generally a mobile terminal, is used to measure the distance and angle of each device in the target location relative to it, such as a mobile phone, tablet computer, etc.

[0144] In the embodiment of the present application, first, the terminal device can be placed at the starting point of the scanning device, so that the position coordinates of the terminal device can be directly determined as the origin coordinates (0, 0).

[0145] Then, all the smart devices that need to be located in the target location are powered on, and the Bluetooth function of each smart device is turned on to make it emit a Bluetooth hotspot. The terminal device receives the Bluetooth signals of three smart devices that have not been located (i.e., the devices to be determined) each time, and determines the angle of each smart device relative to the terminal device through the Bluetooth direction finding function, and calculates the distance between each smart device and the terminal device according to the strength of the device signal RSSI.

[0146] Next, for each smart device, the device distance (in meters) between the smart device and the terminal device is determined according to the signal strength of the smart device. Specifically, the signal strength of the device is substituted into the following formula to obtain the device distance between the device and the terminal device. The formula is as follows: L = 10 (A·RSSI+B) (Formula 1);

[0147] Where L is the device distance, RSSI is the signal strength, A is a constant related to the attenuation factor of signal propagation, and B is a constant related to the initial strength of the signal and the reference distance.

[0148] In applications, the A parameter is mainly related to the attenuation factor of signal propagation. For example, the signal will be attenuated due to factors such as obstacles. The B parameter is related to the initial strength of the signal and the reference distance. It includes the influence of factors such as the transmitting power and antenna gain of the transmitter on the signal strength at a specific reference distance.

[0149] Assuming that in the current environment, A=-59dBm / m, B=20dBm, and the signal strength RSSI of device B=-70, the device distance LB of device B relative to the terminal device is 10(-59·-70+20)≈10(4100)≈1.26×1040 meters.

[0150] After obtaining the location distances and angles of the three devices, the location coordinates of device 1 (a1, a1), device 2 (a2, a2), and device 3 (a3, a3) can be calculated through trigonometric functions, and so on, until all the smart devices that need to be located in the target location are located.

[0151] After obtaining the position coordinates of device 1, the color value of the same coordinates of device 1 on the terminal screen displaying the room division data can be obtained, so that the room corresponding to the color value can be determined as the room where device 1 is located. The name of the room is assigned to device 1, thereby completing the marking of the room area information of device 1 and realizing its positioning.

[0152] pass Figure 5 The process shown can receive the Bluetooth signals of each device in the target location through the terminal device, and determine the angle and device distance of each device relative to the terminal device based on the Bluetooth signal. Then, the position coordinates of each device are determined through trigonometric functions to achieve intelligent positioning of the device, thereby saving labor costs and improving device positioning efficiency.

[0153] Figure 6 This is a block diagram of an embodiment of a device positioning device provided in an embodiment of the present application. Figure 6 As shown, the device comprises:

[0154] A floor plan acquisition module 61 is used to acquire an initial floor plan of a target location;

[0155] A region division module 62 is used to divide the target place into regions based on the initial floor plan to obtain corresponding room division data, wherein the room division data includes at least one room and a room location of each of the rooms;

[0156] A location determination module 63, used to determine the device location corresponding to each device in the target location;

[0157] The room determination module 64 is configured to determine, for each device, a target room where the device is located in at least one room based on the device location of the device and the room location of each room.

[0158] In a possible implementation manner, the region division module is specifically used to:

[0159] Acquire at least one dividing line input by a user for the initial floor plan;

[0160] Based on at least one of the dividing lines, dividing at least one of the first room areas in the initial floor plan to obtain a corresponding second room area;

[0161] For each second room area, performing an area completion operation on the second room area to obtain a corresponding third room area;

[0162] The target floor plan formed by all the third room areas is determined as the room division data.

[0163] In a possible implementation manner, the region division module is further used to:

[0164] Setting a unique area color for each first room area on the initial floor plan, and setting a boundary color for the area boundary of each first room area, wherein the boundary color is different from the area color of each first room area;

[0165] For each dividing line, based on the colors of each point on the dividing line, the area color of each first room area and the boundary color, determine the target room area where the dividing line is located in at least one of the first room areas, and two intersection points between the dividing line and the target room area;

[0166] Calculate based on the coordinates of the two intersection points to obtain a corresponding first slope formula;

[0167] Based on the straight line corresponding to the first slope formula, the first room area is divided into two second room areas.

[0168] In a possible implementation manner, the region division module is further used to:

[0169] Calculate based on the starting point coordinates and the end point coordinates of the dividing line to obtain a second slope formula corresponding to the dividing line;

[0170] Traversing the horizontal coordinate based on the second slope formula to obtain a plurality of reference points on the dividing line;

[0171] Determine at least one color value corresponding to the plurality of reference points and the number of reference points corresponding to each color value, and determine the color value with the largest number of corresponding points as the target color value;

[0172] The first room area whose corresponding area color is consistent with the target color value is determined as the target room area;

[0173] The reference points whose corresponding color values ​​are consistent with the boundary color are determined as the two intersection points of the dividing line and the target room area.

[0174] In a possible implementation manner, the region division module is further used to:

[0175] Determine two target corner points from the plurality of corner points of the second room area, wherein the two target corner points are diagonal points to each other;

[0176] A rectangular area is constructed based on the two diagonal points, and a region padding operation is performed on the second room area based on the rectangular area to obtain a corresponding third room area.

[0177] In a possible implementation manner, the location determination module is specifically configured to:

[0178] Obtaining the location coordinates of a preset terminal device in the target location;

[0179] Activate the Bluetooth function of all devices in the target location;

[0180] Control the terminal device to repeatedly perform the following steps until all devices are positioned: determine three unpositioned devices to be determined among all devices, receive Bluetooth signals of the three devices to be determined, and determine the angle of each device to be determined relative to the terminal device based on the Bluetooth signals, and detect the signal strength of each device to be determined relative to the terminal device;

[0181] For each device to be determined, determining a device distance between the device to be determined and the terminal device based on a signal strength of the device to be determined;

[0182] Substitute the location coordinates of the terminal device and the angles and device distances of the three devices to be determined relative to the terminal device into a trigonometric function to obtain the device location of each device to be determined in the target location.

[0183] In a possible implementation manner, the location determination module is further configured to:

[0184] Substitute the signal strength of the device into the following formula to obtain the device distance between the device and the terminal device. The formula is as follows:

[0185] L=10 (A·RSSI+B) (Formula 1);

[0186] Where L is the device distance, RSSI is the signal strength, A is a constant related to the attenuation factor of signal propagation, and B is a constant related to the initial strength of the signal and the reference distance.

[0187] like Figure 7 As shown, an embodiment of the present application provides a device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0188] Memory 113, used for storing computer programs;

[0189] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the device positioning method provided by any of the above method embodiments, including:

[0190] Obtaining an initial floor plan of the target location;

[0191] Based on the initial floor plan, the target place is divided into regions to obtain corresponding room division data, wherein the room division data includes at least one room and the room location of each room;

[0192] Determine a device location corresponding to each device in the target location;

[0193] For each device, based on the device position of the device and the room position of each room, a target room where the device is located is determined in at least one room.

[0194] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the device positioning method provided in any of the aforementioned method embodiments are implemented.

[0195] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0196] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0197] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0198] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A device positioning method, characterized in that: The method comprises: Obtaining an initial floor plan of the target location; Based on the initial floor plan, the target place is divided into regions to obtain corresponding room division data, wherein the room division data includes at least one room and the room location of each room; Determine a device location corresponding to each device in the target location; For each device, based on the device position of the device and the room position of each room, a target room where the device is located is determined in at least one room.

2. The method according to claim 1, characterized in that: The initial floor plan includes at least one first room area, and the area division of the target place based on the initial floor plan to obtain corresponding room division data includes: Acquire at least one dividing line input by a user for the initial floor plan; Based on at least one of the dividing lines, dividing at least one of the first room areas in the initial floor plan to obtain a corresponding second room area; For each second room area, performing an area completion operation on the second room area to obtain a corresponding third room area; The target floor plan formed by all the third room areas is determined as the room division data.

3. The method according to claim 2, characterized in that The step of dividing at least one of the first room areas in the initial floor plan based on at least one of the dividing lines to obtain a corresponding second room area includes: Setting a unique area color for each first room area on the initial floor plan, and setting a boundary color for the area boundary of each first room area, wherein the boundary color is different from the area color of each first room area; For each dividing line, based on the colors of each point on the dividing line, the area color of each first room area and the boundary color, determine the target room area where the dividing line is located in at least one of the first room areas, and two intersection points between the dividing line and the target room area; Calculate based on the coordinates of the two intersection points to obtain a corresponding first slope formula; Based on the straight line corresponding to the first slope formula, the first room area is divided into two second room areas.

4. The method according to claim 3, characterized in that The determining, based on the colors of the points on the dividing line, the area color of each first room area and the boundary color, in at least one of the first room areas, a target room area where the dividing line is located, and two intersection points between the dividing line and the target room area, comprises: Calculate based on the starting point coordinates and the end point coordinates of the dividing line to obtain a second slope formula corresponding to the dividing line; Traversing the horizontal coordinate based on the second slope formula to obtain a plurality of reference points on the dividing line; Determine at least one color value corresponding to the plurality of reference points and the number of reference points corresponding to each color value, and determine the color value with the largest number of corresponding points as the target color value; The first room area whose corresponding area color is consistent with the target color value is determined as the target room area; The reference points whose corresponding color values ​​are consistent with the boundary color are determined as the two intersection points of the dividing line and the target room area.

5. The method according to claim 2, characterized in that: The performing a region completion operation on the second room region to obtain a corresponding third room region includes: Determine two target corner points from the plurality of corner points of the second room area, wherein the two target corner points are diagonal points to each other; A rectangular area is constructed based on the two diagonal points, and a region padding operation is performed on the second room area based on the rectangular area to obtain a corresponding third room area.

6. The method according to claim 1, characterized in that The determining of the device location corresponding to each device in the target location includes: Obtaining the location coordinates of a preset terminal device in the target location; Activate the Bluetooth function of all devices in the target location; Control the terminal device to repeatedly perform the following steps until all devices are positioned: determine three unpositioned devices to be determined among all devices, receive Bluetooth signals of the three devices to be determined, and determine the angle of each device to be determined relative to the terminal device based on the Bluetooth signals, and detect the signal strength of each device to be determined relative to the terminal device; For each device to be determined, determining a device distance between the device to be determined and the terminal device based on a signal strength of the device to be determined; Substitute the location coordinates of the terminal device and the angles and device distances of the three devices to be determined relative to the terminal device into a trigonometric function to obtain the device location of each device to be determined in the target location.

7. The method according to claim 6, characterized in that The determining the device distance between the device and the terminal device based on the signal strength of the device includes: Substitute the signal strength of the device into the following formula to obtain the device distance between the device and the terminal device. The formula is as follows: L=10 (A·RSSI+B) (Formula 1); Where L is the device distance, RSSI is the signal strength, A is a constant related to the attenuation factor of signal propagation, and B is a constant related to the initial strength of the signal and the reference distance.

8. A device positioning device, characterized in that: The device comprises: A floor plan acquisition module is used to acquire an initial floor plan of a target location; A region division module, configured to divide the target place into regions based on the initial floor plan to obtain corresponding room division data, wherein the room division data includes at least one room and a room location of each of the rooms; A location determination module, used to determine the device location corresponding to each device in the target location; The room determination module is used to determine, for each device, a target room where the device is located in at least one room based on the device position of the device and the room position of each room.

9. A device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a device positioning program stored in the memory to implement the device positioning method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the device positioning method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Visual display method and device for smart home, storage medium and electronic device

    CN112732380A

  • Home equipment binding method and electronic equipment

    CN115174299A

  • Information processing method, host device and mobile device

    CN117692265A

  • Smart home layout diagram generation method and apparatus and computer readable storage medium

    WO2023124076A1

Cited By

  • Equipment management method and device, electronic equipment and storage medium

    CN120263633A

  • Device management method, device, electronic device, and storage medium

    CN120263633B