Abnormal path identification method and apparatus, and electronic device
By identifying the map errors built by the guide robot during the navigation process, and using image recognition technology to determine whether the image is a critical or abnormal image, the problem of inaccurate navigation routes is solved, and more efficient path adjustment and navigation accuracy are achieved.
Patent Information
- Application Number
- CN202411894750.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
AI Technical Summary
When building a map, the guide robot causes errors due to external or internal factors, which in turn affects the accuracy of the navigation route.
By obtaining the environmental and historical images of the target device at the target position, we judge whether the image is a key image, and judge whether the image is an abnormal image based on the similarity, thereby determining whether there is an abnormality in the movement path.
Improve the accuracy of navigation routes, timely discover and adjust abnormalities in the moving path, and reduce navigation errors.
Smart Images

Figure CN119810460A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and more specifically, to a method, device and electronic device for identifying abnormal paths. Background Art
[0002] In order to facilitate some people to conduct business in financial institutions, some financial institutions have begun to use guide robots to provide one-to-one services for the visually impaired. In order to ensure that the guide robots can serve customers normally and stably, accurate path planning and safe navigation are particularly important, especially to ensure that the visually impaired can reach their destination safely and accurately.
[0003] The guide robot will determine the route to be moved according to the business handled by the user. Usually, the guide robot needs to build a map of the moving route by itself. However, due to various external or internal factors during the movement of the guide robot, there will be errors between the constructed map and the actual route, which will lead to the inability to guarantee the accuracy of the navigation route when guiding the user.
[0004] Currently, no effective solution has been proposed to the problem in the related art that errors exist when guide devices construct maps, resulting in low accuracy of navigation routes. Summary of the invention
[0005] The main purpose of the present application is to provide a method, device and electronic device for identifying abnormal paths, so as to solve the problem in the related art that the accuracy of the navigation route is low due to errors when the guide device constructs the map.
[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for identifying an abnormal path is provided. The method comprises: obtaining an environmental image collected by a target device at a target position to obtain a first image, and obtaining multiple historical images collected by the target device in a historical period, wherein each historical image is a key image; selecting a historical image with the shortest collection time interval with the first image from multiple historical images to obtain a second image, and judging whether the first image is a key image based on the first image and the second image; if the first image is a key image, selecting a candidate image from the historical images, and judging whether the first image is an abnormal image based on the similarity between the candidate image and the first image; if the first image is an abnormal image, determining that there is an abnormality in the moving path of the target device.
[0007] Optionally, judging whether the first image is a key image based on the first image and the second image includes: calculating the Euclidean distance between the first image and the second image, and obtaining the time difference between the first image and the second image; when the time difference is greater than or equal to a preset time difference, and the Euclidean distance is greater than or equal to a preset distance, judging whether the first image is a key image based on the similarity between the first image and the second image; when the time difference is less than the preset time difference, or the Euclidean distance is less than the preset distance, determining that the first image is not a key image.
[0008] Optionally, judging whether the first image is a key image based on the similarity between the first image and the second image includes: acquiring feature points in the first image to obtain multiple first image feature points, and acquiring feature points in the second image to obtain multiple second image feature points; calculating the similarity between the multiple first image feature points and the multiple second image feature points to obtain a first similarity; when the first similarity is greater than or equal to a first preset similarity, determining that the first image is a key image; when the first similarity is less than the first preset similarity, determining that the first image is not a key image.
[0009] Optionally, selecting candidate images from historical images includes: sorting multiple historical images in chronological order to obtain a target image sequence; grouping the target image sequence according to a binary search method to obtain multiple groups of image sequences; obtaining an image located in the middle position of each group of image sequences to obtain M third images, and calculating the similarity between the first image and each third image to obtain M second similarities; obtaining the maximum similarity among the M second similarities, and determining the image sequence where the maximum similarity lies as the updated target image sequence, and repeatedly performing the step of grouping the target image sequence according to a binary search method to obtain multiple groups of image sequences until there is only one image in the target image sequence to obtain a fourth image; and determining the fourth image as the candidate image.
[0010] Optionally, judging whether the first image is an abnormal image based on the similarity between the candidate image and the first image includes: acquiring feature points in the first image to obtain multiple first image feature points, and acquiring feature points in the candidate image to obtain multiple third image feature points; calculating the similarity between the multiple first image feature points and the multiple third image feature points to obtain a third similarity; when the third similarity is greater than or equal to a second preset similarity, determining that the first image is an abnormal image; when the third similarity is less than the second preset similarity, determining that the first image is not an abnormal image.
[0011] Optionally, after acquiring the environmental image captured by the target device at the target position to obtain the first image, the method further includes: acquiring feature points in the first image to obtain multiple first image feature points; determining the number of first image feature points to obtain a target number; when the target number is greater than or equal to a preset number, executing the step of acquiring multiple historical images captured by the target device within a historical period; when the target number is less than a preset number, determining that the first image is not a key image.
[0012] Optionally, the method further includes: when the first image is not a key image, controlling the target device to continue moving according to the current posture information, and executing the step of acquiring the environment image captured by the target device at the target position at the next image capture position.
[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a device for identifying an abnormal path is provided. The device includes: a first acquisition unit, which is used to acquire an environmental image collected by a target device at a target position to obtain a first image, and to acquire multiple historical images collected by the target device in a historical period, wherein each historical image is a key image; a first judgment unit, which is used to select a historical image with the shortest acquisition time interval with the first image from multiple historical images to obtain a second image, and to judge whether the first image is a key image based on the first image and the second image; a second judgment unit, which is used to select a candidate image from the historical images if the first image is a key image, and to judge whether the first image is an abnormal image based on the similarity between the candidate image and the first image; a first determination unit, which is used to determine that there is an abnormality in the moving path of the target device if the first image is an abnormal image.
[0014] In an embodiment of the present application, an environmental image captured by a target device at a target position is obtained to obtain a first image, and multiple historical images captured by the target device within a historical period are obtained, wherein each historical image is a key image; a historical image with the shortest acquisition time interval with the first image is selected from multiple historical images to obtain a second image, and whether the first image is a key image is determined based on the first image and the second image; when the first image is a key image, a candidate image is selected from the historical images, and whether the first image is an abnormal image is determined based on the similarity between the candidate image and the first image; when the first image is an abnormal image, a method of determining that there is an abnormality in the moving path of the target device is determined, by identifying whether the environmental image captured at the target position is a key image, and comparing the key image with the historical image, while reducing the number of images that need to be compared, it is ensured that the key image with a high similarity to the historical image can be found in time, thereby achieving the purpose of timely discovering the abnormality of the moving path, thereby achieving the technical effect of timely adjusting the moving path, thereby solving the problem of low accuracy of the navigation route caused by errors in the construction of the map by the guide device in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0016] Figure 1 A hardware structure block diagram of a computer terminal for implementing an abnormal path identification method is shown;
[0017] Figure 2 is a flowchart of a method for identifying an abnormal path provided in Example 1 of the present application;
[0018] Figure 3 is a flowchart of a method for selecting a candidate image provided in Example 1 of the present application;
[0019] Figure 4 is a flowchart of an optional abnormal path identification method provided according to Example 1 of the present application;
[0020] Figure 5 is a schematic diagram of an abnormal path identification device provided according to Embodiment 2 of the present application;
[0021] Figure 6 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0023] In order to enable those skilled in the art to better understand the solution of the present application, 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 only 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 creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] It should be noted that the abnormal path identification method, device and electronic device determined in the present disclosure can be used in the field of artificial intelligence, and can also be used in any field other than the field of artificial intelligence. The application field of the abnormal path identification method, device and electronic device determined in the present disclosure is not limited.
[0026] It should be noted that the collected information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) used in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated. Corresponding operation entrances are provided for users to choose to authorize use or refuse use. If the user chooses to refuse, the expert decision-making process is entered. For example, an interface is set between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.
[0027] The embodiments or examples of the present disclosure are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment or example can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.
[0028] Example 1
[0029] According to an embodiment of the present application, an embodiment of a method for identifying an abnormal path is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for identifying abnormal paths. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0031] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0032] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for identifying abnormal paths in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the method for identifying abnormal paths described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0033] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0034] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0035] Under the above operating environment, this application provides Figure 2 The method for identifying abnormal paths is shown. Figure 2 is a flow chart of the abnormal path identification method provided in Example 1 of the present application, such as Figure 2 As shown, the method includes:
[0036] Step S201 , obtaining an environmental image collected by a target device at a target position to obtain a first image, and obtaining a plurality of historical images collected by the target device within a historical period, wherein each historical image is a key image.
[0037] It should be noted that the target device may be a guide robot in a financial institution, and the visually impaired user can ride on the guide robot or touch the guide robot to move to the business processing location. Before the target device provides guidance, it is necessary to generate a moving map to each business processing location based on the internal environment of the financial institution. When generating the map, it is necessary to determine the adjustment method for the device posture based on the environmental images collected at each moment, so as to ensure that the device can move to the business processing location along the accurate route through continuous posture adjustment.
[0038] However, since the movement process may be affected by external or internal errors, there may be a difference between the device's acquired position and the actual position. Therefore, after acquiring each frame of the image, the image needs to be identified to determine whether there is the same historical image, and then determine whether there is a loop phenomenon. In the case of a loop phenomenon, it indicates that the target device has returned to the position it has passed. Therefore, based on the difference between the target position and the historical position, the coordinate information and posture information of other position points between the two positions can be modified to ensure the accuracy of the moving route when moving along the modified route in the future.
[0039] Specifically, in order to determine whether there is a historical image that is the same as the current environmental image, the target device needs to collect environmental images at the target position during the movement according to the image collection cycle, obtain a first image, and obtain historical images within the historical period, and then compare the first image with the historical images, so as to determine whether an abnormality occurs based on the comparison result, and then determine whether it is necessary to adjust the route that the target device has already moved.
[0040] Step S202 : selecting a historical image with the shortest acquisition time interval with the first image from a plurality of historical images to obtain a second image, and determining whether the first image is a key image based on the first image and the second image.
[0041] Specifically, in order to reduce the frequency of image comparison operations, when the target device obtains the environmental image at a certain moment, such as the current moment, it is necessary to select the historical image with the shortest acquisition time interval with the first image from multiple historical images to obtain the second image, and compare the second image with the first image to determine whether it is necessary to use the first image for comparison with all historical images. Only when the first image is a key image can the first image be compared with all historical images, thereby reducing the number of comparisons between images and improving the efficiency of the target device in generating paths.
[0042] It should be noted that the purpose of comparing the first image with the second image is to determine the similarity between the first image and the second image. Since all historical images are key images, the second image is the key image. When the similarity between the first image and the second image is high, since the second image has been compared with all historical images, there is no need to compare the first image with the second image, and the first image will not have a loop phenomenon, thereby reducing the number of image comparison operations and improving the efficiency of generating paths for the target device.
[0043] Step S203 , when the first image is a key image, a candidate image is selected from the historical images, and whether the first image is an abnormal image is determined based on the similarity between the candidate image and the first image.
[0044] Specifically, when the first image is a key image, it indicates that the distance between the first image and the second image is far, and it is necessary to identify whether a loop phenomenon occurs in the first image. At this time, it is necessary to compare the first image with various historical images to identify whether a loop phenomenon occurs in the first image, and then determine whether there is an abnormality in the path of the target device.
[0045] It should be noted that in order to improve the comparison efficiency between the first image and the historical images, it is not necessary to compare the first image with each historical image. Instead, the first image can be directly compared with the candidate images, thereby determining whether the first image is an abnormal image based on the comparison result between the first image and the candidate images, thereby determining whether a loop phenomenon occurs.
[0046] It should be noted that when selecting candidate images, the candidate images may be acquired according to a dichotomy method, thereby improving the accuracy and efficiency of acquiring the candidate images.
[0047] Step S204: when the first image is an abnormal image, determining that there is an abnormality in the moving path of the target device.
[0048] Specifically, when the similarity between the first image and the candidate image is greater than a preset value, it can be determined that a loop phenomenon occurs between the first image and the candidate image, that is, there is an anomaly. At this time, it can be determined that there is an error in the path between the candidate image and the first image, resulting in the target device passing through a repeated position when it should not return to the repeated position. At this time, it is necessary to correct the coordinates and posture of each image sampling point in the path between the candidate image and the first image according to the coordinates of the repeated points and the posture of the target device, so as to ensure that when the target device moves along the path again, the path error can be reduced and the accuracy of the moving path can be improved.
[0049] The abnormal path identification method provided by the embodiment of the present application obtains the first image by acquiring the environmental image collected by the target device at the target position, and obtains multiple historical images collected by the target device within the historical period, wherein each historical image is a key image; selects the historical image with the smallest collection time interval with the first image from the multiple historical images to obtain the second image, and judges whether the first image is the key image according to the first image and the second image; when the first image is the key image, selects the candidate image from the historical images, and judges whether the first image is the abnormal image according to the similarity between the candidate image and the first image; when the first image is the abnormal image, determines whether the moving path of the target device is abnormal, by identifying whether the environmental image collected at the target position is the key image, and comparing the key image with the historical image, while reducing the number of images that need to be compared, it is ensured that the key image with a high similarity to the historical image can be found in time, so as to achieve the purpose of timely finding the abnormality of the moving path, thereby realizing the technical effect of timely adjusting the moving path, thereby solving the problem of low accuracy of the navigation route caused by errors in the construction of the map by the guide device in the related art.
[0050] Optionally, in the abnormal path identification method provided in the embodiment of the present application, judging whether the first image is a key image based on the first image and the second image includes: calculating the Euclidean distance between the first image and the second image, and obtaining the time difference between the first image and the second image; when the time difference is greater than or equal to a preset time difference, and the Euclidean distance is greater than or equal to a preset distance, judging whether the first image is a key image based on the similarity between the first image and the second image; when the time difference is less than the preset time difference, or the Euclidean distance is less than the preset distance, determining that the first image is not a key image.
[0051] It should be noted that the Euclidean distance between two images is a method of measuring their similarity or difference. This distance value reflects the straight-line distance between the two images in the pixel space, that is, the overall difference between them. In determining whether the distance between the first image and the second image is close, the Euclidean distance can be calculated to improve the recognition accuracy.
[0052] Specifically, when determining whether the first image is a key image, it is first necessary to determine the time difference between the acquisition times of the first image and the second image. When the time difference is less than the preset time difference, it indicates that the acquisition interval between the two images is short, and it can be determined that the similarity is high, and it is determined that the first image is not a key image.
[0053] Furthermore, when the time difference is greater than the preset time difference, it is also necessary to calculate the Euclidean distance between the first image and the second image. Since a smaller Euclidean distance usually means that the images are more similar, when the Euclidean distance is less than the preset distance, it is characterized that the similarity between the first image and the second image is high. At this time, it can be determined that the high similarity of the image content is due to the short acquisition distance between the first image and the second image. At this time, it can be determined that the first image is not a key image, thereby reducing the number of executions of subsequent operations of comparing the first image with historical images, thereby improving the efficiency of identifying abnormal paths.
[0054] It should be noted that when the time difference is greater than or equal to the preset time difference and the Euclidean distance is greater than or equal to the preset distance, it is still impossible to determine whether the first image is a key image, and the first image still needs to be compared with the second image to determine whether the first image is a key image based on the similarity, thereby reducing the number of executions of the subsequent operation of comparing the first image with the historical images, thereby improving the efficiency of identifying abnormal paths.
[0055] This embodiment determines whether the first image is a key image through data in two dimensions of time difference and distance difference, thereby improving the screening accuracy of the first image, reducing the number of executions of subsequent operations of comparing the first image with historical images, and further improving the recognition efficiency of abnormal paths.
[0056] Optionally, in the abnormal path identification method provided in the embodiment of the present application, judging whether the first image is a key image based on the similarity between the first image and the second image includes: acquiring feature points in the first image to obtain multiple first image feature points, and acquiring feature points in the second image to obtain multiple second image feature points; calculating the similarity between the multiple first image feature points and the multiple second image feature points to obtain a first similarity; when the first similarity is greater than or equal to a first preset similarity, determining that the first image is a key image; when the first similarity is less than the first preset similarity, determining that the first image is not a key image.
[0057] Specifically, when determining the similarity between the first image and the second image, feature points of the first image and the second image can be obtained respectively to obtain multiple first image feature points and multiple second image feature points, and the ratio of repeated feature points to the total number of feature points can be calculated to obtain a first similarity. Furthermore, when the first similarity is greater than the first preset similarity, it indicates that there is similar content between the first image and the second image, and the motion range of the target device is within a reasonable range. At this time, the first image can be determined as a key image and added to the historical image collection.
[0058] It should be noted that when the first similarity is less than the first preset similarity, it indicates that the target device has a too large range of motion speed, resulting in a calculation error. In this case, an alarm message needs to be issued so that the operation and maintenance personnel can handle the target device to avoid erroneous movement of the target device or uncontrolled movement, which may damage the target device.
[0059] The formula for calculating the first similarity can be shown as follows:
[0060]
[0061] Among them, q is the first similarity, i1 is the number of repeated feature points, and i s is the number of first feature points or the number of second feature points.
[0062] This embodiment determines whether the first image is a key image by calculating the first similarity, thereby ensuring the accuracy of the first image and further ensuring the normal operation of the target device.
[0063] Optionally, in the abnormal path identification method provided in the embodiment of the present application, selecting candidate images from historical images includes: sorting multiple historical images in chronological order to obtain a target image sequence; grouping the target image sequence according to the dichotomy method to obtain multiple groups of image sequences; obtaining the image located in the middle position of each group of image sequences to obtain M third images, and calculating the similarity between the first image and each third image to obtain M second similarities; obtaining the maximum similarity among the M second similarities, and determining the image sequence where the maximum similarity is located as the updated target image sequence, and repeating the step of grouping the target image sequence according to the dichotomy method to obtain multiple groups of image sequences until there is only one image in the target image sequence to obtain a fourth image; and determining the fourth image as the candidate image.
[0064] Specifically, Figure 3 is a flow chart of a method for selecting candidate images provided in Example 1 of the present application, such as Figure 3 As shown, when selecting candidate images, multiple historical images can be sorted in the order of acquisition time to obtain a target image sequence, and the target image sequence can be grouped, that is, the historical image located in the middle position is used as the segmentation point, and the target image sequence is divided into two groups, and the image located in the middle position of each group is obtained to obtain two third images, and the similarity between the first image and each third image is calculated respectively to obtain two second similarities, and then the group where the third image with higher similarity belongs is determined as a new target image sequence, and the above grouping and similarity calculation process is repeated until there is only one image in the target image sequence. At this time, the image is the candidate image.
[0065] This embodiment optimizes the method of comparing the first image with each historical image by adopting a binary method to compare the first image with the historical image at the middle position of each grouped image group, thereby achieving the technical effect of improving the efficiency of selecting candidate images.
[0066] Optionally, in the abnormal path identification method provided in the embodiment of the present application, judging whether the first image is an abnormal image based on the similarity between the candidate image and the first image includes: obtaining feature points in the first image to obtain multiple first image feature points, and obtaining feature points in the candidate image to obtain multiple third image feature points; calculating the similarity between the multiple first image feature points and the multiple third image feature points to obtain a third similarity; when the third similarity is greater than or equal to a second preset similarity, determining that the first image is an abnormal image; when the third similarity is less than the second preset similarity, determining that the first image is not an abnormal image.
[0067] Specifically, when determining the similarity between the first image and the candidate image, the feature points of the first image and the candidate image can be obtained respectively to obtain multiple first image feature points and multiple third image feature points, and the ratio of repeated feature points to the total number of feature points can be calculated to obtain the third similarity. Then, when the third similarity is greater than or equal to the second preset similarity, it is characterized that the similarity between the first image and the candidate image is high, then it can be determined that the first image and the candidate image are images of repeated positions, and it is determined that a loop phenomenon occurs. At this time, it can be determined that the first image is an abnormal image.
[0068] It should be noted that the second preset similarity is greater than the first preset similarity.
[0069] It should be noted that, when the third similarity is less than the second preset similarity, it indicates that the similarity between the first image and the candidate image is low, and the first image and the candidate image are not images of repeated positions. It can be determined that no loop phenomenon occurs, and the first image is not an abnormal image. At this time, the first image can be added to the historical image set, thereby updating multiple historical images.
[0070] This embodiment achieves the effect of determining whether the first image is an abnormal image by calculating the similarity between the first image and the candidate image, thereby ensuring the accuracy of identifying whether the path is abnormal.
[0071] Optionally, in the abnormal path identification method provided in the embodiment of the present application, after acquiring the environmental image collected by the target device at the target position to obtain the first image, the method also includes: acquiring feature points in the first image to obtain multiple first image feature points; determining the number of first image feature points to obtain the target number; when the target number is greater than or equal to a preset number, executing the step of acquiring multiple historical images collected by the target device within a historical period; when the target number is less than the preset number, determining that the first image is not a key image.
[0072] Specifically, when determining whether the first image is a key image, you can also first obtain feature points in the first image to obtain multiple first image feature points. When the target number of first image feature points is less than a preset number, it means that there are fewer feature points in the first image and the image cannot be used normally. Therefore, it can be directly determined that the first image is not a key image, thereby improving the efficiency of identifying the first image.
[0073] This embodiment determines whether the first image is a usable image by determining the number of feature points in the first image, thereby achieving the technical effect of improving the efficiency of recognition and analysis of the first image.
[0074] Optionally, in the abnormal path identification method provided in an embodiment of the present application, the method also includes: when the first image is not a key image, controlling the target device to continue moving according to the current posture information, and executing the step of acquiring the environmental image captured by the target device at the target position at the next image capture position.
[0075] Specifically, when the first image is not a key image, the target device does not need to adjust the path. At this time, it can continue to move forward according to the posture information set by the target device and continue to acquire a new first image, thereby completing the generation operation of the entire moving path and ensuring the normal generation of the moving path.
[0076] This embodiment achieves the technical effect of ensuring normal generation of the moving route by illustrating that when the first image is not a key image, there is no need to adjust the path, and the target device continues to be moved according to the position information of the target device.
[0077] Figure 4 is a flowchart of an optional abnormal path identification method provided in Example 1 of the present application, such as Figure 4 As shown, firstly, a first image and a second image are acquired, and when the time difference is less than a preset time difference, or the Euclidean distance is less than a preset distance, it is determined that the first image is not a key image, and when the time difference is greater than or equal to the preset time difference, and the Euclidean distance is greater than or equal to the preset distance, a first similarity between the first image and the second image is calculated, and when the first similarity is greater than or equal to the first preset similarity, the first image is determined to be a key image, and a candidate image is selected by calculation, and a third similarity between the candidate image and the first image is calculated, and when the third similarity is greater than or equal to the second preset similarity, the first image is determined to be an abnormal image; when the third similarity is less than the second preset similarity, the first image is determined to be a critical image. The image is not an abnormal image, thereby completing the identification process of whether the first image is an abnormal image, and in the case where the first image is an abnormal image, determining that the path is abnormal and the path needs to be adjusted, and then by identifying whether the environmental image collected at the target position is a key image, and comparing the key image with the historical image, while reducing the number of images that need to be compared, it is guaranteed that the key image with a high similarity to the historical image can be found in time, achieving the purpose of timely discovering the abnormality of the moving path, thereby realizing the technical effect of timely adjusting the moving path, and then solving the problem of low accuracy of the navigation route due to errors in the construction of the map by the guide equipment in the related technology.
[0078] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0079] Example 2
[0080] The embodiment of the present application also provides an abnormal path identification device. It should be noted that the abnormal path identification device of the embodiment of the present application can be used to execute the abnormal path identification method provided in the above embodiment. The abnormal path identification device provided in the embodiment of the present application is introduced below.
[0081] Figure 5 is a schematic diagram of an abnormal path identification device provided according to Example 2 of the present application, such as Figure 5 As shown, the device comprises:
[0082] The first acquisition unit 51 is used to acquire an environmental image collected by the target device at the target position to obtain a first image, and to acquire a plurality of historical images collected by the target device within a historical period, wherein each historical image is a key image.
[0083] The first judging unit 52 is used to select a historical image with the shortest acquisition time interval with the first image from the multiple historical images to obtain a second image, and judge whether the first image is a key image based on the first image and the second image.
[0084] The second judgment unit 53 is used to select a candidate image from the historical images when the first image is a key image, and judge whether the first image is an abnormal image according to the similarity between the candidate image and the first image.
[0085] The first determining unit 54 is configured to determine that there is an abnormality in the moving path of the target device when the first image is an abnormal image.
[0086] The abnormal path identification device provided in the embodiment of the present application obtains the environment image collected by the target device at the target position through the first acquisition unit 51 to obtain the first image, and obtains multiple historical images collected by the target device in the historical period, wherein each historical image is a key image; the first judgment unit 52 selects the historical image with the smallest collection time interval with the first image from the multiple historical images to obtain the second image, and judges whether the first image is a key image based on the first image and the second image; the second judgment unit 53 selects a candidate image from the historical images when the first image is a key image, and judges whether the first image is an abnormal image based on the similarity between the candidate image and the first image; the first determination unit 54 determines that there is an abnormality in the moving path of the target device when the first image is an abnormal image. The problem of low accuracy of the navigation route caused by errors in the construction of the map by the guide device in the related art is solved. By identifying whether the environmental image collected at the target location is a key image and comparing the key image with the historical image, the number of images that need to be compared is reduced while ensuring that the key image with a high similarity to the historical image can be discovered in time, thereby achieving the purpose of timely discovering abnormalities in the moving path, thereby achieving the technical effect of timely adjusting the moving path, and further solving the problem in related technologies of low accuracy of the navigation route due to errors in map construction by the guide equipment.
[0087] Optionally, in the abnormal path identification device provided in the embodiment of the present application, the first judgment unit 52 includes: a first calculation module, used to calculate the Euclidean distance between the first image and the second image, and obtain the time difference between the first image and the second image; a judgment module, used to judge whether the first image is a key image according to the similarity between the first image and the second image when the time difference is greater than or equal to a preset time difference and the Euclidean distance is greater than or equal to a preset distance; a first determination module, used to determine that the first image is not a key image when the time difference is less than the preset time difference, or the Euclidean distance is less than the preset distance.
[0088] Optionally, in the abnormal path identification device provided in the embodiment of the present application, the judgment module includes: an acquisition submodule, used to acquire feature points in the first image to obtain multiple first image feature points, and acquire feature points in the second image to obtain multiple second image feature points; a calculation submodule, used to calculate the similarity between the multiple first image feature points and the multiple second image feature points to obtain a first similarity; a first determination submodule, used to determine that the first image is a key image when the first similarity is greater than or equal to a first preset similarity; and a second determination submodule, used to determine that the first image is not a key image when the first similarity is less than the first preset similarity.
[0089] Optionally, in the abnormal path identification device provided in the embodiment of the present application, the second judgment unit 53 includes: a sorting module, which is used to sort multiple historical images in chronological order to obtain a target image sequence; a grouping module, which is used to group the target image sequence according to the binary search method to obtain multiple groups of image sequences; a first acquisition module, which is used to obtain the image located in the middle position of each group of image sequences to obtain M third images, and calculate the similarity between the first image and each third image to obtain M second similarities; a second acquisition module, which is used to obtain the maximum similarity among the M second similarities, and determine the image sequence where the maximum similarity is located as the updated target image sequence, and repeat the step of grouping the target image sequence according to the binary search method to obtain multiple groups of image sequences until there is only one image in the target image sequence to obtain a fourth image; a second determination module, which is used to determine the fourth image as a candidate image.
[0090] Optionally, in the abnormal path identification device provided in the embodiment of the present application, the second judgment unit 53 includes: a third acquisition module, used to acquire feature points in the first image to obtain multiple first image feature points, and acquire feature points in the candidate image to obtain multiple third image feature points; a second calculation module, used to calculate the similarity between the multiple first image feature points and the multiple third image feature points to obtain a third similarity; a third determination module, used to determine that the first image is an abnormal image when the third similarity is greater than or equal to the second preset similarity; and a fourth determination module, used to determine that the first image is not an abnormal image when the third similarity is less than the second preset similarity.
[0091] Optionally, in the abnormal path identification device provided in the embodiment of the present application, after acquiring the environmental image collected by the target device at the target position to obtain the first image, the device also includes: a second acquisition unit, used to acquire feature points in the first image to obtain multiple first image feature points; a second determination unit, used to determine the number of first image feature points to obtain the target number; an execution unit, used to execute the step of acquiring multiple historical images collected by the target device within a historical period when the target number is greater than or equal to a preset number; a third determination unit, used to determine that the first image is not a key image when the target number is less than a preset number.
[0092] Optionally, in the abnormal path identification device provided in an embodiment of the present application, the device also includes: a control unit, for controlling the target device to continue moving according to current posture information when the first image is not a key image, and executing the step of acquiring the environmental image captured by the target device at the target position at the next image capture position.
[0093] It should be noted that the first acquisition unit 51, the first judgment unit 52, the second judgment unit 53, and the first determination unit 54 correspond to steps S201 to S204 in Embodiment 1, and the two modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the above modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above modules may also be part of a device and run in the computer terminal 10 provided in Embodiment 1.
[0094] Example 3
[0095] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the environmental image collected by the target device at the target position to obtain a first image, and obtain multiple historical images collected by the target device within a historical period, wherein each historical image is a key image; select the historical image with the shortest collection time interval with the first image from the multiple historical images to obtain a second image, and determine whether the first image is a key image based on the first image and the second image; if the first image is a key image, select a candidate image from the historical images, and determine whether the first image is an abnormal image based on the similarity between the candidate image and the first image; if the first image is an abnormal image, determine that there is an abnormality in the moving path of the target device.
[0096] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: calculate the Euclidean distance between the first image and the second image, and obtain the time difference between the first image and the second image; when the time difference is greater than or equal to the preset time difference, and the Euclidean distance is greater than or equal to the preset distance, determine whether the first image is a key image based on the similarity between the first image and the second image; when the time difference is less than the preset time difference, or the Euclidean distance is less than the preset distance, determine that the first image is not a key image.
[0097] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: obtain feature points in the first image to obtain multiple first image feature points, and obtain feature points in the second image to obtain multiple second image feature points; calculate the similarity between the multiple first image feature points and the multiple second image feature points to obtain a first similarity; when the first similarity is greater than or equal to a first preset similarity, determine that the first image is a key image; when the first similarity is less than the first preset similarity, determine that the first image is not a key image.
[0098] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: sort multiple historical images in chronological order to obtain a target image sequence; group the target image sequence according to the binary search method to obtain multiple groups of image sequences; obtain the image located in the middle position of each group of image sequences to obtain M third images, and calculate the similarity between the first image and each third image to obtain M second similarities; obtain the maximum similarity among the M second similarities, and determine the image sequence where the maximum similarity is located as the updated target image sequence, and repeat the step of grouping the target image sequence according to the binary search method to obtain multiple groups of image sequences until there is only one image in the target image sequence to obtain a fourth image; determine the fourth image as a candidate image.
[0099] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: obtain feature points in the first image to obtain multiple first image feature points, and obtain feature points in the candidate image to obtain multiple third image feature points; calculate the similarity between the multiple first image feature points and the multiple third image feature points to obtain a third similarity; when the third similarity is greater than or equal to the second preset similarity, determine that the first image is an abnormal image; when the third similarity is less than the second preset similarity, determine that the first image is not an abnormal image.
[0100] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: obtain feature points in the first image to obtain multiple first image feature points; determine the number of first image feature points to obtain the target number; when the target number is greater than or equal to a preset number, execute the step of obtaining multiple historical images collected by the target device within the historical period; when the target number is less than the preset number, determine that the first image is not a key image.
[0101] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when the first image is not a key image, control the target device to continue moving according to the current posture information, and execute the step of obtaining the environmental image captured by the target device at the target position at the next image capture position.
[0102] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 6 The structure of the electronic device is not limited. Figure 6More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations shown.
[0103] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0104] Example 4
[0105] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the abnormal path identification method provided in the first embodiment.
[0106] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0107] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the method for identifying an abnormal path.
[0108] The present application also provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the program controls the device where the computer-readable storage medium is located to execute the steps of the abnormal path identification method.
[0109] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0110] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0112] 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0113] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0114] If the integrated unit 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 technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0115] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for identifying abnormal paths, characterized in that: include: Acquire an environmental image collected by a target device at a target position to obtain a first image, and acquire a plurality of historical images collected by the target device within a historical period, wherein each historical image is a key image; Selecting a historical image with the shortest acquisition time interval with the first image from the multiple historical images to obtain a second image, and determining whether the first image is the key image based on the first image and the second image; In the case where the first image is the key image, selecting a candidate image from the historical images, and judging whether the first image is an abnormal image according to a similarity between the candidate image and the first image; In a case where the first image is the abnormal image, it is determined that there is an abnormality in the moving path of the target device.
2. The method according to claim 1, characterized in that Determining whether the first image is the key image according to the first image and the second image includes: Calculating the Euclidean distance between the first image and the second image, and obtaining the time difference between the first image and the second image; When the time difference is greater than or equal to a preset time difference and the Euclidean distance is greater than or equal to a preset distance, determining whether the first image is the key image according to a similarity between the first image and the second image; When the time difference is smaller than the preset time difference, or the Euclidean distance is smaller than the preset distance, it is determined that the first image is not the key image.
3. The method according to claim 2, characterized in that Determining whether the first image is the key image according to the similarity between the first image and the second image includes: Acquire feature points in the first image to obtain a plurality of first image feature points, and acquire feature points in the second image to obtain a plurality of second image feature points; Calculating similarities between the plurality of first image feature points and the plurality of second image feature points to obtain a first similarity; When the first similarity is greater than or equal to a first preset similarity, determining the first image as the key image; When the first similarity is less than the first preset similarity, it is determined that the first image is not the key image.
4. The method according to claim 1, characterized in that: Selecting candidate images from the historical images includes: Sorting the multiple historical images in chronological order to obtain a target image sequence; Grouping the target image sequence according to a dichotomy method to obtain multiple groups of image sequences; Acquire an image located in the middle position of each group of image sequences to obtain M third images, and calculate the similarity between the first image and each third image to obtain M second similarities; Obtaining the maximum similarity among the M second similarities, and determining the image sequence where the maximum similarity is located as the updated target image sequence, and repeatedly performing the step of grouping the target image sequence according to the dichotomy method to obtain multiple groups of image sequences until there is only one image in the target image sequence, thereby obtaining a fourth image; The fourth image is determined as the candidate image.
5. The method according to claim 1, characterized in that Judging whether the first image is an abnormal image according to the similarity between the candidate image and the first image includes: Acquire feature points in the first image to obtain a plurality of first image feature points, and acquire feature points in the candidate image to obtain a plurality of third image feature points; Calculating similarities between the plurality of first image feature points and the plurality of third image feature points to obtain a third similarity; When the third similarity is greater than or equal to the second preset similarity, determining that the first image is the abnormal image; When the third similarity is smaller than the second preset similarity, it is determined that the first image is not the abnormal image.
6. The method according to claim 1, characterized in that After acquiring the environment image captured by the target device at the target position to obtain the first image, the method further includes: Acquire feature points in the first image to obtain a plurality of first image feature points; Determine the number of feature points of the first image to obtain a target number; In the case where the number of targets is greater than or equal to a preset number, performing the step of acquiring a plurality of historical images collected by the target device within a historical period; When the target number is less than the preset number, it is determined that the first image is not the key image.
7. The method according to claim 1, characterized in that The method further comprises: In the case where the first image is not the key image, the target device is controlled to continue moving according to the current posture information, and the step of acquiring the environment image captured by the target device at the target position is performed at the next image capture position.
8. An abnormal path identification device, characterized in that: include: A first acquisition unit is used to acquire an environmental image collected by a target device at a target position to obtain a first image, and to acquire a plurality of historical images collected by the target device within a historical period, wherein each historical image is a key image; A first judgment unit is used to select a historical image with the shortest acquisition time interval with the first image from the multiple historical images to obtain a second image, and judge whether the first image is the key image based on the first image and the second image; a second judgment unit, configured to select a candidate image from the historical images when the first image is the key image, and judge whether the first image is an abnormal image according to a similarity between the candidate image and the first image; The first determining unit is configured to determine that there is an abnormality in the moving path of the target device when the first image is the abnormal image.
9. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the abnormal path identification method described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program executes the abnormal path identification method described in any one of claims 1 to 7 when running.