Indoor positioning path optimization method, electronic device and computer readable storage medium
By applying SDN technology and triangulation operations in electronic devices, path optimization and path compensation are performed, which solves the problems of coordinate information loss and route errors caused by uneven signal strength distribution in existing indoor positioning technology, and achieves more accurate Indoor positioning path optimization.
Patent Information
- Application Number
- CN202010754192.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-30
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When the existing indoor positioning technology deals with uneven distribution of signal strength, it leads to loss of coordinate information and large route errors, resulting in flight overflow.
By applying software-defined network (SDN) technology in electronic devices, triangulation operations are used to obtain the center points and edge midpoints of multiple triangles, which are used as a basis for compensation to perform path optimization and perform path compensation when the signal strength distribution is uneven. operate.
It effectively reduces route errors, avoids the loss of coordinate information, and solves positioning problems caused by uneven signal strength distribution.
Smart Images

Figure CN114061578B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to industrial Internet of Things technology, and in particular to an indoor positioning path optimization method, an electronic device and a computer-readable storage medium based on software defined networking (SDN). Background Art
[0002] The known indoor positioning technology optimizes the positioning result by obtaining the intersection of the connection between the previous coordinate point and the current coordinate point and the obstacle area to replace the current coordinate. The known indoor positioning technology uses the intersection of the connection between the previous point and the current point and the obstacle area to replace the current point, without considering the relationship between time and distance, resulting in a large error. The data optimization method of the known indoor positioning technology only considers the replacement of the current point, without fully comparing the distance relationship between the replacement point and the previous point, resulting in a fly-over in the front-end display. Summary of the invention
[0003] In view of the above, it is necessary to provide an indoor positioning path optimization method, an electronic device and a computer-readable storage medium, which provide a method for realizing indoor positioning path optimization. The problem of coordinate information loss caused by uneven signal strength distribution can be avoided through optimization.
[0004] An embodiment of the present invention provides an indoor positioning path optimization method, which is applied to an electronic device, and the method includes: obtaining a planned path based on possible coordinate points of the electronic device, and the planned path forms an irregular polygon; performing a triangulation operation on the planned path to obtain multiple triangles, and calculating the center point and the midpoint of each triangle to obtain a coordinate point set S; obtaining the current coordinate point of the electronic device; determining whether the current coordinate point is within the planned path; if the current coordinate point is within the planned path, calculating the time difference T between the previous coordinate point of the electronic device and the current coordinate point; determining whether T is greater than a preset time; if T is greater than the preset time, calculating the distance D between the previous coordinate point of the electronic device and the current coordinate point; determining whether D is greater than a preset distance; if D is greater than the preset distance, performing a compensation operation to add a coordinate point; and if D is not greater than the preset distance, not performing the compensation operation.
[0005] An embodiment of the present invention further provides an electronic device, including a path planning module, a path triangulation module, a judgment module and a path compensation module.
[0006] The path planning module is used to obtain a planned path according to possible coordinate points of the electronic device, and the planned path forms an irregular polygon.
[0007] The path triangulation module is used to perform triangulation operations on the planned path, obtain multiple triangles, and calculate the center point and the midpoint of each triangle to obtain a coordinate point set S.
[0008] The judgment module is used to obtain the current coordinate point of the electronic device, determine whether the current coordinate point is within the planned path, and if the current coordinate point is within the planned path, calculate the time difference T between the previous coordinate point of the electronic device and the current coordinate point, and determine whether T is greater than the preset time. If T is greater than the preset time, calculate the distance D between the previous coordinate point of the electronic device and the current coordinate point, and determine whether D is greater than the preset distance.
[0009] The path compensation module is used to perform a compensation operation to add a coordinate point when D is greater than the preset distance, and not perform the compensation operation when D is not greater than the preset distance.
[0010] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the steps of the indoor positioning path optimization method as described above are implemented.
[0011] The indoor positioning path optimization method, electronic device and computer-readable storage medium of the embodiments of the present invention provide a method for realizing indoor positioning path optimization, which uses triangulation to take the center point and the midpoint of the edge as the compensation basis, reduces the route error, and uses path compensation to effectively solve the problem of coordinate information loss caused by uneven distribution of signal strength. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 Schematic diagram of an indoor positioning path optimization method according to an embodiment of the present invention.
[0013] Figure 2 It is a flowchart of the steps of the indoor positioning path optimization method according to an embodiment of the present invention.
[0014] Figure 3 4 is a flow chart of the steps of the path triangulation method according to an embodiment of the present invention.
[0015] Figure 4 Schematic diagram of the path triangulation effect of an embodiment of the present invention.
[0016] Figure 5 is a flow chart of the steps of the path compensation method according to an embodiment of the present invention.
[0017] Figure 6 It is a schematic diagram of the path compensation effect of an embodiment of the present invention.
[0018] Figure 7 Schematic diagram of the hardware architecture of the electronic device according to an embodiment of the present invention.
[0019] Figure 8 is a functional block diagram of an electronic device according to an embodiment of the present invention.
[0020] Main component symbols
[0021] Current coordinate point A..E Previous coordinate point P Electronic Devices 200 processor 210 Memory 220 Indoor positioning path optimization system 230 Path planning module 310 Path triangulation module 320 Judgment module 330 Path compensation module 340
[0022] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0023] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0024] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0026] It should be noted that the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0027] Figure 1 It is a schematic diagram of real-time coordinate presentation of a positioning point according to an embodiment of the present invention. Figure 1 The possible coordinates of the current coordinate point of the electronic device during real-time positioning are presented, and these points need to be optimized accordingly through path compensation.
[0028] Figure 2This is a flowchart of the steps of the indoor positioning path optimization method in an embodiment of the present invention, which is applied to an electronic device. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0029] Step S101 , obtaining a planned path according to possible coordinate points of the electronic device, wherein the planned path forms an irregular polygon.
[0030] Step S102, triangulate the planned path to obtain multiple triangles, and calculate the center point and the midpoint of each triangle to obtain a coordinate point set S.
[0031] Step S103, obtaining the current coordinate point of the electronic device.
[0032] Step S104, determining whether the current coordinate point is within the planned path.
[0033] Step S105, if the current coordinate point is not within the planned path, then obtain the coordinate point closest to the current coordinate point in the coordinate point set S, called the nearest coordinate point, and use the nearest coordinate point as the current coordinate point of the electronic device, and then calculate the time difference T between the previous coordinate point of the electronic device and the current coordinate point (step S106).
[0034] Step S106 , if the current coordinate point is within the planned path, then calculating the time difference T between the previous coordinate point of the electronic device and the current coordinate point.
[0035] Step S107, determining whether T is greater than 1 second.
[0036] Step S108 , if T is greater than 1 second, calculate the distance D between the previous coordinate point of the electronic device and the current coordinate point.
[0037] Step S109, determining whether D is greater than 60 cm.
[0038] Step S110 , if D is greater than 60 cm, a compensation operation is performed to add coordinate points.
[0039] Step S111: if D is not greater than 60 cm, no compensation operation is performed.
[0040] Step S112: if T is not greater than 1 second, calculate the distance D between the previous coordinate point and the current coordinate point of the electronic device.
[0041] Step S113, determining whether D is greater than 60 cm.
[0042] Step S114, if D is greater than 60 cm, the current coordinate point is discarded. If D is not greater than 60 cm, the compensation operation is not performed to add the coordinate point (step S111).
[0043] Figure 3 The present invention is a flowchart of the path triangulation method according to an embodiment of the present invention, which is applied to an electronic device. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0044] Step S201, acquiring the planned path according to possible coordinate points of the electronic device, wherein the planned path forms an irregular polygon.
[0045] Step S202, obtaining a coordinate point set P in the order of the coordinate points on the planned path.
[0046] Step S203, determining whether the length Len of the coordinate point set P is greater than 3. If the length Len is not greater than 3, then the process ends.
[0047] Step S204: if the length Len is greater than 3, three consecutive coordinate points are taken to determine whether a triangle can be formed. If a triangle cannot be formed, the process ends.
[0048] Step S205, calculating the number of intersections COUNT between the connection of the first coordinate point and the third coordinate point and the planned path.
[0049] Step S206 , determining whether the intersection point count COUNT is equal to 2 (COUNT=2?). If the intersection point count COUNT is not equal to 2, then returning to step S203 , determining whether the length Len of the coordinate point set P is greater than 3.
[0050] Step S207: if the number of intersection points COUNT is equal to 2, calculate the center point of the triangle.
[0051] Step S208, determine whether the center point is within the planned path. If the center point is not within the planned path, return to step S203 to determine whether the length Len of the coordinate point set P is greater than 3.
[0052] Step S209: If the center point is within the planned path, it means that the triangle is qualified, and the center point and the side midpoint of the triangle are added to the coordinate point set S.
[0053] Step S210: remove the first coordinate point from the coordinate point set P.
[0054] Figure 4 FIG. 1 is a schematic diagram of the path triangulation effect of an embodiment of the present invention. Figure 4 As shown, the points on the graph represent the center points and edge midpoints of the triangle, and these point sets S constitute the basis for path optimization.
[0055] Figure 5The following is a flow chart of the path compensation method according to an embodiment of the present invention, which is applied to an electronic device. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted.
[0056] Step S301, obtaining the coordinate point set S.
[0057] Step S302: adding the current coordinate point of the electronic device to the coordinate point set S.
[0058] Step S303: Set the supplementary point list as a path list pathList, and add the previous coordinate point of the electronic device to the path list pathList.
[0059] Step S304 , calculating the distance G between the last coordinate point in the path list pathList and all the coordinate points in the coordinate point set S, and the distance H between the current coordinate point of the electronic device and all the coordinate points in the coordinate point set S.
[0060] Step S305, calculating F(G+H) to generate an open coordinate point set list openList.
[0061] Step S306: Arrange all coordinate points in the open coordinate point set list openList in ascending order.
[0062] Step S307 , connecting the last coordinate point in the path list pathList with the first coordinate point in the open coordinate point set list openList.
[0063] Step S308, determine whether the connection is within the planned path. If the connection is not within the planned path, return to step S307.
[0064] Step S309: if the link is within the planned path, add the first coordinate point of the open coordinate point set list openList to the path list pathList.
[0065] Step S310 , determining whether the first coordinate point in the open coordinate point set list openList is the current coordinate point of the electronic device.
[0066] Step S311, if the first coordinate point in the open coordinate point set list openList is not the current coordinate point of the electronic device, delete the first coordinate point in the open coordinate point set list openList in the coordinate point set S, and then return to step S307.
[0067] Step S312: if the first coordinate point in the open coordinate point set list openList is the current coordinate point of the electronic device, then the process ends and the path list pathList is returned.
[0068] Figure 6 FIG. 1 is a schematic diagram of the path compensation effect of an embodiment of the present invention. Figure 6 As shown in the figure, P is the previous coordinate point and C is the current coordinate point. Since C is not in the path, point D, which is closest to point C, is taken as the current coordinate point. After path optimization and compensation, the route from point P to point D is obtained, that is, P>A>B>D.
[0069] Figure 7 2 is a schematic diagram of the hardware architecture of the electronic device of the embodiment of the present invention. The electronic device 200, but not limited to, can communicate with each other through the system bus to connect the processor 210, the memory 220 and the indoor positioning path optimization system 230. Figure 7 The electronic device 200 is shown only with components 210 - 230 , but it is understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0070] The memory 220 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 220 can be an internal storage unit of the electronic device 10, such as a hard disk or memory of the electronic device 200. In other embodiments, the memory can also be an external storage device of the electronic device 200, such as a plug-in hard disk equipped on the electronic device 200, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. Of course, the memory 220 can also include both the internal storage unit of the electronic device 200 and its external storage device. In this embodiment, the memory 220 is generally used to store the operating system and various application software installed in the electronic device 200, such as the program code of the indoor positioning path optimization system 230. In addition, the memory 220 can also be used to temporarily store various data that have been output or will be output.
[0071] The processor 210 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 210 is generally used to control the overall operation of the electronic device 200. In this embodiment, the processor 210 is used to run the program code stored in the memory 220 or process data, for example, to run the indoor positioning path optimization system 230, etc.
[0072] It should be noted that Figure 7 The electronic device 200 is merely illustrated as an example. In other embodiments, the electronic device 200 may also include more or fewer components, or have a different component configuration.
[0073] Figure 8 2 is a functional block diagram of an electronic device according to an embodiment of the present invention, which is used to perform an indoor positioning path optimization method. The indoor positioning path optimization method according to the embodiment of the present invention can be implemented by a computer program in a storage medium, for example, a memory 220 in the electronic device 200. When the computer program implementing the method of the present invention is loaded into the memory 220 by the processor 210, the processor 210 of the electronic device 200 is driven to perform the indoor positioning path optimization method according to the embodiment of the present invention.
[0074] The electronic device 200 according to the embodiment of the present invention includes a path planning module 310 , a path triangulation module 320 , a determination module 330 and a path compensation module 340 .
[0075] The path planning module 310 obtains a planned path according to possible coordinate points of the electronic device, and the planned path forms an irregular polygon.
[0076] The path triangulation module 320 performs triangulation operation on the planned path, obtains multiple triangles, and calculates the center point and the side midpoint of each triangle to obtain a coordinate point set S.
[0077] The judgment module 330 obtains the current coordinate point of the electronic device and determines whether the current coordinate point is within the planned path. If the current coordinate point is not within the planned path, the coordinate point (the nearest coordinate point) closest to the current coordinate point is obtained in the coordinate point set S, and the nearest coordinate point is used as the current coordinate point of the electronic device. The time difference T between the previous coordinate point of the electronic device and the current coordinate point is then calculated. If the current coordinate point is within the planned path, the time difference T between the previous coordinate point of the electronic device and the current coordinate point is calculated, and it is determined whether T is greater than 1 second. If T is greater than 1 second, the distance D between the previous coordinate point of the electronic device and the current coordinate point is calculated, and it is determined whether D is greater than 60 centimeters.
[0078] If D is greater than 60 centimeters, the path compensation module 340 performs a compensation operation to add coordinate points, and if D is not greater than 60 centimeters, no compensation operation is performed.
[0079] If T is not greater than 1 second, the determination module 330 calculates the distance D between the previous coordinate point and the current coordinate point of the electronic device. The determination module 330 determines whether D is greater than 60 cm, and if D is greater than 60 cm, the current coordinate point is discarded, and if D is not greater than 60 cm, the compensation operation is not performed.
[0080] The path triangulation module 320 performs path triangulation operations as follows:
[0081] Acquire the planned path according to possible coordinate points of the electronic device, wherein the planned path forms an irregular polygon;
[0082] Obtain a coordinate point set P in the order of the coordinate points on the planned path;
[0083] Determine whether the length Len of the coordinate point set P is greater than 3. If the length Len is not greater than 3, end this process;
[0084] If the length Len is greater than 3, three consecutive coordinate points are taken to determine whether a triangle can be formed. If a triangle cannot be formed, this process ends;
[0085] Calculate the number of intersections between the connection of the first coordinate point and the third coordinate point and the planned path COUNT;
[0086] Determine whether the number of intersection points COUNT is equal to 2 (COUNT=2?). If the number of intersection points COUNT is not equal to 2, return to step S203 to determine whether the length Len of the coordinate point set P is greater than 3;
[0087] Calculate the center point of the triangle;
[0088] Determine whether the center point is within the planned path. If the center point is not within the planned path, determine whether the length Len of the coordinate point set P is greater than 3;
[0089] If the center point is within the planned path, indicating that the triangle is qualified, then the center point and the side midpoint of the triangle are added to the coordinate point set S; and
[0090] The first coordinate point is removed from the coordinate point set P.
[0091] The path compensation module 340 performs the compensation operation as follows:
[0092] Get the coordinate point set S;
[0093] Add the current coordinate point of the electronic device to the coordinate point set S;
[0094] The supplementary point list is set as the path list pathList, and the previous coordinate point of the electronic device is added to the path list pathList;
[0095] Calculate the distance G between the last coordinate point in the path list pathList and all coordinate points in the coordinate point set S, and the distance H between the current coordinate point of the electronic device and all coordinate points in the coordinate point set S;
[0096] Calculate F(G+H) to generate an open coordinate point set list openList;
[0097] Arrange all coordinate points in the open coordinate point set list openList in ascending order;
[0098] Connect the last coordinate point in the path list pathList with the first coordinate point in the open coordinate point set list openList;
[0099] Determine whether the connection is within the planned path;
[0100] If the line is within the planned path, add the first coordinate point of the open coordinate point set list openList to the path list pathList;
[0101] Determine whether the first coordinate point in the open coordinate point set list openList is the current coordinate point of the electronic device;
[0102] If the first coordinate point in the open coordinate point set list openList is not the current coordinate point of the electronic device, deleting the first coordinate point in the open coordinate point set list openList from the coordinate point set S; and
[0103] If the first coordinate point in the open coordinate point set list openList is the current coordinate point of the electronic device, then this process ends and the path list pathList is returned.
[0104] If the module / unit integrated in the electronic device 200 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0105] It is understandable that the module division described above is only a logical function division, and there may be other division methods in actual implementation. In addition, the functional modules in each embodiment of the present application may be integrated in the same processing unit, or each module may exist physically separately, or two or more modules may be integrated in the same unit. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0106] The indoor positioning path optimization method, electronic device and computer-readable storage medium of the embodiment of the present invention adopts the central point and the midpoint of the edge as the compensation basis by triangulation, thereby reducing the route error. In addition, the path compensation is adopted to effectively solve the problem of coordinate information loss caused by uneven distribution of signal strength.
[0107] For ordinary technicians in this field, other corresponding changes or adjustments can be made according to actual needs generated by combining the technical solutions and technical concepts provided by the embodiments of the present invention, and these changes and adjustments should all fall within the scope of protection of the claims of the present invention.
Claims
1. An indoor positioning path optimization method, applied to an electronic device, characterized in that: The method comprises: Acquire a planned path according to possible coordinate points of the electronic device, the planned path forming an irregular polygon; Perform triangulation on the planned path to obtain multiple triangles, and calculate the center point and edge midpoint of each triangle to obtain a coordinate point set S; Obtaining the current coordinate point of the electronic device; Determine whether the current coordinate point is within the planned path; If the current coordinate point is within the planned path, calculating a time difference T between the previous coordinate point of the electronic device and the current coordinate point; Determine whether T is greater than the preset time; If T is greater than the preset time, calculating the distance D between the previous coordinate point of the electronic device and the current coordinate point; Determine whether D is greater than a preset distance; If D is greater than the predetermined distance, a compensation operation is performed to add coordinate points; and If D is not greater than the preset distance, the compensation operation is not performed; The triangulation operation on the planned path also includes: obtaining a coordinate point set P in the order of coordinate points on the planned path, determining whether the length Len of the coordinate point set P is greater than a first default value, if the length Len is greater than the first default value, selecting three consecutive coordinate points from the coordinate point set P, and determining whether the three consecutive coordinate points can form a triangle, if the three consecutive coordinate points can form a triangle, calculating the number of intersections COUNT of the connection between the first coordinate point and the third coordinate point in the three consecutive coordinate points and the planned path, determining whether the number of intersections COUNT is equal to a second default value, if the number of intersections COUNT is equal to the second default value, calculating the center point of the triangle, determining whether the center point is within the planned path, if the center point is within the planned path, adding the center point and the midpoint of the side of the triangle to the coordinate point set S, and removing the first coordinate point from the coordinate point set P.
2. The indoor positioning path optimization method according to claim 1, characterized in that: Also includes: If the current coordinate point is not within the planned path, the coordinate point closest to the current coordinate point is obtained from the coordinate point set S, and the closest coordinate point is used as the current coordinate point of the electronic device.
3. The indoor positioning path optimization method according to claim 2, characterized in that: Also includes: If T is not greater than the preset time, calculating the distance D between the previous coordinate point and the current coordinate point of the electronic device; Determine whether D is greater than the preset distance; If D is greater than the preset distance, the current coordinate point is discarded; and If D is not greater than the preset distance, the compensation operation is not performed.
4. The indoor positioning path optimization method according to claim 3, characterized in that: The compensation operation also includes: Add the current coordinate point of the electronic device to the coordinate point set S; The supplementary point list is set as the path list pathList, and the previous coordinate point of the electronic device is added to the path list pathList; Calculate the distance G between the last coordinate point in the path list pathList and all coordinate points in the coordinate point set S, and the distance H between the current coordinate point of the electronic device and all coordinate points in the coordinate point set S; Calculate F(G+H) to generate an open coordinate point set list openList; Arrange all coordinate points in the open coordinate point set list openList in ascending order; Connect the last coordinate point in the path list pathList with the first coordinate point in the open coordinate point set list openList; Determine whether the connection is within the planned path; If the line is within the planned path, add the first coordinate point of the open coordinate point set list openList to the path list pathList; Determine whether the first coordinate point in the open coordinate point set list openList is the current coordinate point of the electronic device; If the first coordinate point in the open coordinate point set list openList is not the current coordinate point of the electronic device, deleting the first coordinate point in the open coordinate point set list openList from the coordinate point set S; and If the first coordinate point in the open coordinate point set list openList is the current coordinate point of the electronic device, then this process ends and the path list pathList is returned.
5. An electronic device, characterized in that: include: A path planning module, used for acquiring a planned path according to possible coordinate points of the electronic device, wherein the planned path forms an irregular polygon; The path triangulation module is used to perform triangulation operations on the planned path, obtain multiple triangles, and calculate the center point and the midpoint of each triangle to obtain a coordinate point set S; a determination module, used to obtain the current coordinate point of the electronic device, determine whether the current coordinate point is within the planned path, if the current coordinate point is within the planned path, calculate the time difference T between the previous coordinate point of the electronic device and the current coordinate point, determine whether T is greater than a preset time, if T is greater than the preset time, calculate the distance D between the previous coordinate point of the electronic device and the current coordinate point, and determine whether D is greater than a preset distance; and A path compensation module, configured to perform a compensation operation to add a coordinate point when D is greater than the preset distance, and not perform the compensation operation when D is not greater than the preset distance; The path triangulation module is also used to obtain a coordinate point set P in the order of coordinate points on the planned path, determine whether the length Len of the coordinate point set P is greater than a first default value, if the length Len is greater than the first default value, select three consecutive coordinate points from the coordinate point set P, and determine whether the three consecutive coordinate points can form a triangle, if the three consecutive coordinate points can form a triangle, calculate the number of intersections COUNT of the connection between the first coordinate point and the third coordinate point in the three consecutive coordinate points and the planned path, determine whether the number of intersections COUNT is equal to a second default value, if the number of intersections COUNT is equal to the second default value, calculate the center point of the triangle, determine whether the center point is within the planned path, if the center point is within the planned path, add the center point and the midpoint of the side of the triangle to the coordinate point set S, and remove the first coordinate point from the coordinate point set P.
6. The electronic device as claimed in claim 5, characterized in that: Also includes: If T is not greater than the preset time, the determination module calculates the distance D between the previous coordinate point of the electronic device and the current coordinate point, determines whether D is greater than the preset distance, and discards the current coordinate point when D is greater than the preset distance; and If D is not greater than the preset distance, the path compensation module does not perform the compensation operation.
7. The electronic device according to claim 6, wherein: The path compensation module further includes the following steps in performing the compensation operation: Add the current coordinate point of the electronic device to the coordinate point set S; The supplementary point list is set as the path list pathList, and the previous coordinate point of the electronic device is added to the path list pathList; Calculate the distance G between the last coordinate point in the path list pathList and all coordinate points in the coordinate point set S, and the distance H between the current coordinate point of the electronic device and all coordinate points in the coordinate point set S; Calculate F(G+H) to generate an open coordinate point set list openList; Arrange all coordinate points in the open coordinate point set list openList in ascending order; Connect the last coordinate point in the path list pathList with the first coordinate point in the open coordinate point set list openList; Determine whether the connection is within the planned path; If the line is within the planned path, add the first coordinate point of the open coordinate point set list openList to the path list pathList; Determine whether the first coordinate point in the open coordinate point set list openList is the current coordinate point of the electronic device; If the first coordinate point in the open coordinate point set list openList is not the current coordinate point of the electronic device, deleting the first coordinate point in the open coordinate point set list openList in the coordinate point set S; and If the first coordinate point in the open coordinate point set list openList is the current coordinate point of the electronic device, then this process ends and the path list pathList is returned.
8. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the steps of the indoor positioning path optimization method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Path planning method, apparatus, electronic device, and storage medium
CN109118007A
An AGV path calculation method based on an unmanned cabin and an AGV driving path control method
CN109726841A