WO2023005379A1 - Method and apparatus for saving semantic map, storage medium, and electronic device - Google Patents

Method and apparatus for saving semantic map, storage medium, and electronic device Download PDF

Info

Publication number
WO2023005379A1
WO2023005379A1 PCT/CN2022/094640 CN2022094640W WO2023005379A1 WO 2023005379 A1 WO2023005379 A1 WO 2023005379A1 CN 2022094640 W CN2022094640 W CN 2022094640W WO 2023005379 A1 WO2023005379 A1 WO 2023005379A1
Authority
WO
WIPO (PCT)
Prior art keywords
semantic map
semantic
map
mobile robot
information
Prior art date
Application number
PCT/CN2022/094640
Other languages
French (fr)
Chinese (zh)
Inventor
曹蒙
Original Assignee
追觅创新科技(苏州)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 追觅创新科技(苏州)有限公司 filed Critical 追觅创新科技(苏州)有限公司
Publication of WO2023005379A1 publication Critical patent/WO2023005379A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/38Electronic maps specially adapted for navigation; Updating thereof
    • G01C21/3804Creation or updating of map data
    • G01C21/3859Differential updating map data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to the communication field, and in particular, to a method and device for storing a semantic map, a storage medium, and an electronic device.
  • the existing laser displacement sensor (Laser Distance Sensor, referred to as LDS) type mobile robot uses LDS radar information for positioning and mapping. Robots are prone to positioning errors, or positioning errors may occur after the mobile robot is lifted and then put down. This positioning error will cause the mobile robot to build a wrong map and then save a wrong map. When the follow-up mobile robot cleans according to the wrong map, confusion occurs. For example, the mobile robot needs to go to room A to clean, but due to positioning and map errors, it goes to room B. When an error occurs in the map, the user must manually delete it. The error message will always exist,
  • Embodiments of the present disclosure provide a method and device for saving a semantic map, a storage medium, and an electronic device, so as to at least solve the problem that the semantic map saved by a mobile robot may be a wrong map.
  • a method for saving a semantic map which includes: obtaining the first semantic map constructed by the mobile robot after executing the current target event; if there is a second semantic map, calculating the A similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot; when the similarity score is greater than a first preset threshold , updating the second semantic map stored in the mobile robot to the first semantic map.
  • the method further includes: executing During the process of the last target event, construct the second semantic map, wherein the second semantic map includes: object type information, object coordinate information, and object semantic weight information; After a target event, obtaining the second semantic map constructed by the mobile robot, and/or obtaining the first semantic map constructed by the mobile robot after executing the current target event, includes: when the mobile robot executes the current During the target event, the first semantic map is constructed, wherein the first semantic map includes: object type information, object coordinate information, and object semantic weight information; after the current target event is executed, Obtain the first semantic map constructed by the mobile robot.
  • calculating the similarity score between the second semantic map and the first semantic map includes: traversing the second semantic map and the first semantic map A semantic map, to obtain multiple target similarity scores corresponding to multiple identical coordinate information in the second semantic map and the first semantic map; obtain the second target similarity scores through the multiple target similarity scores A similarity score between the semantic map and the first semantic map.
  • the target similarity score includes: for any coordinate information in the plurality of identical coordinate information, obtaining the first category information corresponding to the any coordinate information in the second semantic map, and the any The second category information corresponding to the coordinate information in the first semantic map; if the first category information is the same as the second category information, based on the first semantic weight corresponding to the first category information, Or the second semantic weight corresponding to the second type of information determines the target similarity score of any coordinate information.
  • the method further includes: in a case where the first category information is different from the second category information, determining that the target similarity score of any coordinate information is smaller than a second preset threshold.
  • the method further The method includes: when the similarity score is less than a first preset threshold, storing the second semantic map in the mobile robot, and prohibiting storing the first semantic map in the mobile robot.
  • the method further includes: saving the first semantic map if the second semantic map does not exist.
  • a storage device for a semantic map includes: an acquisition module, configured to acquire the first semantic map constructed by the mobile robot after executing the current target event; a calculation module, using In the case that there is a second semantic map, calculate the similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot; save A module configured to update the second semantic map stored in the mobile robot to the first semantic map when the similarity score is greater than a first preset threshold.
  • a computer-readable storage medium where a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to perform the above-mentioned saving of the semantic map when running method.
  • an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above Steps in the method examples.
  • the first semantic map constructed by the mobile robot after executing the current target event is obtained; if there is a second semantic map, the similarity score between the second semantic map and the first semantic map is calculated,
  • the second semantic map is a historical semantic map saved by the mobile robot; when the similarity score is greater than a first preset threshold, update the second semantic map saved in the mobile robot
  • For the first semantic map that is, by comparing the second semantic map and the size relationship between the similarity score of the first semantic map constructed by the current target event and the first preset threshold, when the similarity score is greater than
  • the first semantic map is the correct map, and then the first semantic map is saved.
  • the present disclosure has the following beneficial effects: based on the semantic recognition function of the AI of the mobile robot, by mapping the semantic information together with the location information of the semantic onto the semantic map, by comparing the second semantic information constructed by the mobile robot after executing the last target event Map, and the first semantic map constructed by the mobile robot after executing the current target event, to confirm whether there is a problem with the first semantic map, and whether to save the first semantic map, to solve the problem that the map saved by the mobile robot may be a wrong map, Furthermore, in the case of map errors, abnormal behavior of the mobile robot and other problems, the robustness of the long-term operation of the mobile robot is improved, and the influence of the mobile robot's map construction and overlay is avoided.
  • FIG. 1 is a block diagram of the hardware structure of a mobile robot according to a method for storing a semantic map according to an embodiment of the present disclosure
  • FIG. 2 is a flow chart (1) of a method for saving a semantic map according to an embodiment of the present disclosure
  • FIG. 3 is a flow chart (2) of a method for saving a semantic map according to an embodiment of the present disclosure
  • Fig. 4 is a structural block diagram of an apparatus for saving a semantic map according to an embodiment of the present disclosure.
  • FIG. 1 is a block diagram of a hardware structure of a mobile robot according to a method for saving a semantic map according to an embodiment of the present disclosure.
  • the mobile robot can include one or more (only one is shown in Figure 1) processor 102 (the processor 102 can include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA, etc.) and a memory 104 for storing data.
  • the above-mentioned mobile robot may also include a transmission device 106 and an input and output device 108 for communication functions.
  • FIG. 1 is only for illustration, and it does not limit the structure of the above-mentioned mobile robot.
  • the mobile robot may also include more or fewer components than those shown in FIG. 1 , or have a different configuration that is functionally equivalent to or more functionally than that shown in FIG. 1 .
  • the memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for saving the semantic map of the mobile robot in the embodiment of the present disclosure, and the processor 102 runs the computer program stored in the memory 104. program, so as to execute various functional applications and data processing, that is, to realize the above-mentioned method.
  • the memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include memory located remotely from the processor 102, and these remote memories may be connected to the mobile robot through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is used to receive or transmit data via a network.
  • a specific example of the above-mentioned network may include a wireless network provided by a mobile robot's communication provider.
  • the transmission device 106 includes a network interface controller (NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • FIG. 2 is a flow chart (1) of a method for saving a semantic map according to an embodiment of the present disclosure. The process includes the following steps:
  • Step S202 Obtain the first semantic map constructed by the mobile robot after executing the current target event
  • Step S204 If there is a second semantic map, calculate the similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot ;
  • the target event can be understood as: cleaning work and returning to the target area
  • the second semantic map is the semantic map constructed when the mobile robot completed the cleaning work last time and returned to the target area
  • the first semantic map is the mobile robot The semantic map constructed when the cleaning work is completed and returned to the target area, wherein the semantic map is a map including the type information of the object, the coordinate information of the object, and the semantic weight information of the object.
  • Step S206 When the similarity score is greater than a first preset threshold, update the second semantic map stored in the mobile robot to the first semantic map.
  • the first semantic map constructed by the mobile robot after executing the current target event is obtained; if there is a second semantic map, the similarity between the second semantic map and the first semantic map is calculated score, wherein the second semantic map is the historical semantic map saved by the mobile robot; when the similarity score is greater than the first preset threshold, the second semantic map saved in the mobile robot
  • the map is updated to the first semantic map, that is, by comparing the second semantic map and the size relationship between the similarity score of the first semantic map constructed by the current target event and the preset threshold, when the similarity score is greater than
  • the first preset threshold it is determined that the first semantic map is the correct map, and then the first semantic map is saved.
  • obtaining the second semantic map stored by the mobile robot includes: constructing the second semantic map during the execution of the last target event by the mobile robot, wherein the second The semantic map includes: the type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the last target event, obtain the second semantic map constructed by the mobile robot, and/or obtain the mobile robot
  • the robot executes the first semantic map constructed by the current target event it includes: constructing the first semantic map during the execution of the current target event by the mobile robot, wherein the first semantic map includes: The type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the current target event, the first semantic map constructed by the mobile robot is obtained.
  • the second semantic map is constructed during the execution of the last target event by the mobile robot
  • the first semantic map is constructed during the execution of the current target event by the mobile robot
  • Both the second semantic map and the first semantic map include: the type information of the object, the coordinate information of the object, and the semantic weight information of the object.
  • the second semantic map and the first semantic map are obtained, wherein , the semantic weight information of the object is used to indicate the weight in the process of matching the second semantic map with the first semantic map.
  • the semantic weight information of the object can be preset by the user or dynamically given by the mobile robot according to the actual situation. It should be noted that this disclosure is not limited in the embodiments of the present disclosure.
  • the specific implementation of building the second semantic map is as follows: during the execution of the last target event, the mobile robot monitors the target objects within the visual range of the mobile robot in real time, and acquires the first target within the visual range
  • the first target image of the object input the first target image of the first target object acquired by the mobile robot into the artificial intelligence detection model, and obtain the first image information corresponding to the first target image, wherein the first image
  • the information includes: the first category information of the first target object, the first semantic weight information of the first target object; and according to the relative positional relationship between the mobile robot and the first target object and
  • the coordinate information determines the first coordinate information of the first target object; saves the first type information, the first semantic weight information, and the first coordinate information to the second semantic map, and traverses the travel area of the mobile robot , to obtain the second semantic map corresponding to all traveling areas.
  • the specific implementation of building the first semantic map is as follows: during the process of executing the current target event, the mobile robot monitors the target objects within the visible range of the mobile robot in real time, and acquires the information of the second target object within the visible range.
  • the second target image inputting the second target image of the second target object acquired by the mobile robot into the artificial intelligence detection model to obtain the second image information corresponding to the second target image, wherein the second image information includes : the second category information of the second target object, the second semantic weight information of the second target object; and according to the relative positional relationship between the mobile robot and the second target object and the coordinate information of the mobile robot in the traveling area Determining the second coordinate information of the second target object; saving the second type information, the second semantic weight information, and the second coordinate information to the first semantic map, traversing the travel area of the mobile robot, and The first semantic map corresponding to all traveling areas is obtained.
  • the second semantic map is matched with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map
  • the specific method is as follows: traversing The second semantic map and the first semantic map are used to obtain multiple target similarity scores corresponding to multiple identical coordinate information in the second semantic map and the first semantic map; through the multiple target similarity scores to obtain the similarity scores between the second semantic map and the first semantic map.
  • the first category information corresponding to the any coordinate information in the second semantic map is acquired, and the any A coordinate information corresponding to the second category information in the first semantic map; if the first category information is the same as the second category information, based on the first semantic weight corresponding to the first category information , or the second semantic weight corresponding to the second category information determines the target similarity score of any coordinate information; if the first category information is different from the second category information, determine the The target similarity score of any coordinate information is less than a second preset threshold.
  • the target similarity score may be zero, It can also be set as a negative value according to the actual situation, where there is corresponding first type information in the second semantic map, and if there is no corresponding second type information in the first semantic map, determine the first The category information is different from the second category information.
  • the corresponding relationship between semantic weights and target similarity scores may also be preset, and if the first category information and the second category information are the same, the corresponding target similarity scores are determined according to the semantic weights.
  • the correspondence between the semantic weight and the target similarity score is preset to be 1:10, and for any coordinate information in the plurality of identical coordinate information, obtain the coordinate information in the second semantic The first type of information corresponding to the map, and the second type of information corresponding to any coordinate information in the first semantic map; when the first type of information is the same as the second type of information, Determine that the semantic weight corresponding to the first type of information is 0.2, that is, the target similarity score of multiple identical coordinate information is 2; when the corresponding relationship between the semantic weight and the target similarity score is set to 1:1 in advance, determine the second The semantic weight corresponding to one type of information is 0.2, and the target similarity score corresponding to the same coordinate information is 0.2. It should be noted that the above values are only for better understanding of this embodiment, and are not limited in this embodiment of the present disclosure.
  • the second semantic map after matching the second semantic map with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map, after the similarity If the degree score is less than the first preset threshold, the second semantic map is saved in the mobile robot, and the first semantic map is prohibited from being saved in the mobile robot.
  • the first semantic map is saved.
  • the second semantic map Before matching the second semantic map with the first semantic map, determine whether the second semantic map is saved in the mobile robot, and the second semantic map is not saved in the mobile robot, that is, the second semantic map is not obtained. In the case of a semantic map, the first semantic map is directly saved.
  • Fig. 3 is a flow chart (2) of a method for saving a semantic map according to an embodiment of the present disclosure, as shown in Fig. 3 , the specific steps are as follows:
  • Step S301 start;
  • Step S302 The mobile robot starts cleaning and AI detects objects
  • AI recognizes the object to obtain the type information of the object, the coordinate information of the object, and the semantic weight information of the object;
  • Step S303 Map the object to the first semantic map through coordinate transformation
  • the camera is used to monitor objects within the visible range of the machine in real time, and when a target object is detected, the first position is determined according to the relative positional relationship between the mobile robot and the target object and the coordinate information of the mobile robot in the travel area.
  • First coordinate information of a target object and map the coordinate information of the target object to the first semantic map, wherein the first semantic map includes: the type of the target object, the coordinate information of the target object and the semantic weight of the target object, this
  • the semantic weight represents the weight of the comparison between the second semantic map and the first semantic map.
  • the semantic weight can be set in advance, and different objects correspond to different weights.
  • objects that are not easy to move such as beds, TV cabinets, and sofas have high weights;
  • Objects that are not easy to move in a short period of time such as tables, chairs, and floor fans, are given lower weights, while dynamic objects such as people and shoes are not given weights.
  • Step S304 detecting an instruction to save the first semantic map
  • the mobile robot When the mobile robot finishes cleaning and returns to the charging pile, it receives an instruction to save the first semantic map, and executes the operation of saving the semantic map according to the instruction.
  • Step S305 Determine whether the second semantic map is saved in the mobile robot, if the second semantic map is saved in the mobile robot, execute step S307, and if the second semantic map is not saved in the mobile robot, execute step S306;
  • Step S306 saving the first semantic map and the corresponding environment map
  • Step S307 Determine the size relationship between the similarity score between the second semantic map and the first semantic map and a preset threshold (equivalent to the first preset threshold in the above embodiment);
  • Step S308 if the size relationship indicates that the similarity score is greater than a preset threshold, save the first semantic map and the corresponding environment map;
  • Step S309 if the size relationship indicates that the similarity score is smaller than a preset threshold, save the second semantic map and the corresponding environment map.
  • the semantic information within the visible range of the mobile robot is obtained, and different types of objects detected by AI are used to assign different weights to the semantic information on the semantic map, that is, different semantic information has different semantic weights; Compare the two semantic maps to get the similarity scores of the two semantic maps. When the similarity score is greater than the preset threshold, it is confirmed that the updated map does not overlap and can be saved normally.
  • detect whether the second semantic map is saved in the mobile robot if the second semantic map is not saved, then save the first semantic map and its corresponding environment map; if save the second semantic map, then compare the second semantic map and The first semantic map, get the similarity score of the two semantic maps, if the similarity score is greater than the preset threshold, it is considered that there is no overlapping map, then save the first semantic map and the corresponding environment map, if the similarity score is less than the preset threshold, it is considered that the first semantic map constructed by the mobile robot has overlapped, the operation of saving the map is not performed, and the second semantic map is restored.
  • the map saved by the mobile robot may be a wrong map, and then the mobile robot behaves abnormally when the map is wrong, which improves the robustness of the mobile robot for a long time, and avoids the problem of the mobile robot.
  • the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
  • the technical solution of the present disclosure can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present disclosure.
  • a storage device for a semantic map is also provided, and the device is used to implement the above embodiments and preferred implementation modes, and what has been explained will not be repeated.
  • the term "module” may be a combination of software and/or hardware that realizes a predetermined function.
  • the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
  • Fig. 4 is a structural block diagram of a storage device for a semantic map according to an embodiment of the present disclosure, as shown in Fig. 4 , including:
  • An acquisition module 42 configured to acquire the first semantic map constructed by the mobile robot after executing the current target event
  • a calculation module 44 configured to calculate a similarity score between the second semantic map and the first semantic map if there is a second semantic map, wherein the second semantic map is saved by the mobile robot historical semantic map;
  • a saving module 46 configured to update the second semantic map saved in the mobile robot to the first semantic map when the similarity score is greater than a first preset threshold.
  • the first semantic map constructed by the mobile robot after executing the current target event is obtained; if there is a second semantic map, the similarity between the second semantic map and the first semantic map is calculated score, wherein the second semantic map is the historical semantic map saved by the mobile robot; when the similarity score is greater than the first preset threshold, the second semantic map saved in the mobile robot
  • the map is updated to the first semantic map, that is, by comparing the second semantic map and the size relationship between the similarity score of the first semantic map constructed by the current target event and the preset threshold, when the similarity score is greater than
  • the first preset threshold it is determined that the first semantic map is the correct map, and then the first semantic map is saved.
  • the above apparatus further includes: a construction module, configured to construct the second semantic map during the execution of the last target event by the mobile robot, wherein the second semantic map Including: the type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the last target event, obtain the second semantic map constructed by the mobile robot, and/or obtain the mobile robot at Executing the first semantic map constructed by the current target event includes: constructing the first semantic map during the execution of the current target event by the mobile robot, wherein the first semantic map includes: category information, object coordinate information, and object semantic weight information; after executing the current target event, obtain the first semantic map constructed by the mobile robot.
  • a construction module configured to construct the second semantic map during the execution of the last target event by the mobile robot, wherein the second semantic map Including: the type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the last target event, obtain the second semantic map constructed by the mobile robot, and/or obtain the mobile robot at Executing the first
  • the second semantic map is constructed during the execution of the last target event by the mobile robot
  • the first semantic map is constructed during the execution of the current target event by the mobile robot
  • Both the second semantic map and the first semantic map include: the type information of the object, the coordinate information of the object, and the semantic weight information of the object.
  • the second semantic map and the first semantic map are obtained, wherein , the semantic weight information of the object is used to indicate the weight in the process of matching the second semantic map with the first semantic map.
  • the semantic weight information of the object can be preset by the user or dynamically given by the mobile robot according to the actual situation. It should be noted that this disclosure is not limited in the embodiments of the present disclosure.
  • the specific implementation of building the second semantic map is as follows: during the execution of the last target event, the mobile robot monitors the target objects within the visual range of the mobile robot in real time, and acquires the first target within the visual range
  • the first target image of the object input the first target image of the first target object acquired by the mobile robot into the artificial intelligence detection model, and obtain the first image information corresponding to the first target image, wherein the first image
  • the information includes: the first category information of the first target object, the first semantic weight information of the first target object; and according to the relative positional relationship between the mobile robot and the first target object and
  • the coordinate information determines the first coordinate information of the first target object; saves the first type information, the first semantic weight information, and the first coordinate information to the second semantic map, and traverses the travel area of the mobile robot , to obtain the second semantic map corresponding to all traveling areas.
  • the specific implementation of building the first semantic map is as follows: during the process of executing the current target event, the mobile robot monitors the target objects within the visible range of the mobile robot in real time, and acquires the information of the second target object within the visible range.
  • the second target image inputting the second target image of the second target object acquired by the mobile robot into the artificial intelligence detection model to obtain the second image information corresponding to the second target image, wherein the second image information includes : the second category information of the second target object, the second semantic weight information of the second target object; and according to the relative positional relationship between the mobile robot and the second target object and the coordinate information of the mobile robot in the traveling area Determining the second coordinate information of the second target object; saving the second type information, the second semantic weight information, and the second coordinate information to the first semantic map, traversing the travel area of the mobile robot, and The first semantic map corresponding to all traveling areas is obtained.
  • the matching module is further configured to traverse the second semantic map and the first semantic map to obtain multiple identical coordinates in the second semantic map and the first semantic map A plurality of target similarity scores corresponding to the information; the similarity scores between the second semantic map and the first semantic map are obtained through the multiple target similarity scores.
  • the matching module is further configured to, for any coordinate information in the plurality of identical coordinate information, obtain the first category corresponding to the any coordinate information in the second semantic map information, and the second category information corresponding to any coordinate information in the first semantic map; if the first category information and the second category information are the same, based on the first category information The corresponding first semantic weight, or the second semantic weight corresponding to the second category information determines the target similarity score of any coordinate information;
  • the matching module is further configured to determine that the target similarity score of any coordinate information is smaller than the second preset if the first category information is different from the second category information. Set the threshold.
  • the target similarity score may be zero, It can also be set as a negative value according to the actual situation, where there is corresponding first type information in the second semantic map, and if there is no corresponding second type information in the first semantic map, determine the first The category information is different from the second category information.
  • the corresponding relationship between semantic weights and target similarity scores may also be preset, and if the first category information and the second category information are the same, the corresponding target similarity scores are determined according to the semantic weights.
  • the correspondence between the semantic weight and the target similarity score is preset to be 1:10, and for any coordinate information in the plurality of identical coordinate information, obtain the coordinate information in the second semantic The first type of information corresponding to the map, and the second type of information corresponding to any coordinate information in the first semantic map; when the first type of information is the same as the second type of information, Determine that the semantic weight corresponding to the first type of information is 0.2, that is, the target similarity score of multiple identical coordinate information is 2; when the corresponding relationship between the semantic weight and the target similarity score is set to 1:1 in advance, determine the second The semantic weight corresponding to one type of information is 0.2, and the target similarity score corresponding to the same coordinate information is 0.2. It should be noted that the above values are only for better understanding of this embodiment, and are not limited in this embodiment of the present disclosure.
  • the saving module is further configured to match the second semantic map with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map Afterwards, if the similarity score is less than a first preset threshold, the second semantic map is saved in the mobile robot, and the first semantic map is prohibited from being saved in the mobile robot.
  • the saving module is further configured to, before matching the second semantic map with the first semantic map, if the second semantic map is not obtained, directly The first semantic map is saved in the mobile robot.
  • the second semantic map Before matching the second semantic map with the first semantic map, determine whether the second semantic map is saved in the mobile robot, and the second semantic map is not saved in the mobile robot, that is, the second semantic map is not obtained. In the case of a semantic map, the first semantic map is directly saved.
  • An embodiment of the present disclosure also provides a storage medium, the storage medium includes a stored program, wherein the above-mentioned program executes any one of the above-mentioned methods when running.
  • the above-mentioned storage medium may be configured to store program codes for performing the following steps:
  • Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.
  • the above-mentioned processor may be configured to execute the following steps through a computer program:
  • the above-mentioned storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), Various media that can store program codes such as removable hard disks, magnetic disks, or optical disks.
  • ROM read-only memory
  • RAM random access memory
  • Various media that can store program codes such as removable hard disks, magnetic disks, or optical disks.
  • each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here
  • the steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation.
  • the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Automation & Control Theory (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
  • Manipulator (AREA)

Abstract

Embodiments of the present disclosure provide a method and apparatus for saving a semantic map, a storage medium, and an electronic device. The method for saving a semantic map comprises: acquiring a first semantic map constructed by a mobile robot after executing a current target event; when there is a second semantic map, calculating a similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot; and when the similarity score is greater than a first preset threshold, updating the second semantic map saved in the mobile robot into the first semantic map. The technical solution above is used to solve the problem in the prior art that a semantic map saved by a mobile robot may be the wrong map.

Description

语义地图的保存方法和装置、存储介质、电子装置Semantic map preservation method and device, storage medium, electronic device
本公开要求如下专利申请的优先权:于2021年07月27日提交中国专利局、申请号为202110853400.7、发明名称为“语义地图的保存方法和装置、存储介质、电子装置”的中国专利申请;上述专利申请的全部内容通过引用结合在本公开中。This disclosure claims the priority of the following patent application: a Chinese patent application submitted to the China Patent Office on July 27, 2021, with the application number 202110853400.7, and the title of the invention is "Semantic Map Preservation Method and Device, Storage Medium, and Electronic Device"; The entire contents of the aforementioned patent applications are incorporated by reference in this disclosure.
技术领域technical field
本公开涉及通信领域,具体而言,涉及一种语义地图的保存方法和装置、存储介质、电子装置。The present disclosure relates to the communication field, and in particular, to a method and device for storing a semantic map, a storage medium, and an electronic device.
背景技术Background technique
随着科学技术的进步和人工智能的发展,智能机器人也应用到了各个领域,移动机器人的定位和地图构建是移动机器人领域的热点问题。With the advancement of science and technology and the development of artificial intelligence, intelligent robots have also been applied to various fields. The positioning and map construction of mobile robots are hot issues in the field of mobile robots.
现有激光位移传感器(Laser Distance Sensor,简称LDS)类型的移动机器人通过LDS雷达信息进行定位建图,但是由于传感器在长时间失效,例如移动机器人一直倾斜,或者雷达传感器被遮住等情况,移动机器人容易发生定位错误的问题,或者在移动机器人被搬起后再放下,也有可能发生定位错误的问题,这种定位错误都会导致移动机器人构建一张错误的地图,进而保存一张错误的地图,使得后续移动机器人根据错误地图进行清扫工作时,发生错乱,比如需要移动机器人去A房间清扫,但是由于定位和地图错误,去到了B房间等,当地图出现错误时,必须用户手动去删除,不然错误信息会一直存在,The existing laser displacement sensor (Laser Distance Sensor, referred to as LDS) type mobile robot uses LDS radar information for positioning and mapping. Robots are prone to positioning errors, or positioning errors may occur after the mobile robot is lifted and then put down. This positioning error will cause the mobile robot to build a wrong map and then save a wrong map. When the follow-up mobile robot cleans according to the wrong map, confusion occurs. For example, the mobile robot needs to go to room A to clean, but due to positioning and map errors, it goes to room B. When an error occurs in the map, the user must manually delete it. The error message will always exist,
针对相关技术中,移动机器人保存的语义地图可能是错误的地图等问题,尚未提出有效的技术方案。Aiming at the problem that the semantic map saved by the mobile robot may be the wrong map in the related technology, no effective technical solution has been proposed yet.
因此,有必要对相关技术予以改良以克服相关技术中的所述缺陷。Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology.
发明内容Contents of the invention
本公开实施例提供了一种语义地图的保存方法和装置、存储介质、电子装置,以至少解决移动机器人保存的语义地图可能是错误的地图等问题。Embodiments of the present disclosure provide a method and device for saving a semantic map, a storage medium, and an electronic device, so as to at least solve the problem that the semantic map saved by a mobile robot may be a wrong map.
根据本公开的一个实施例,提供了一种语义地图的保存方法,包括:获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保 存的所述第二语义地图更新为所述第一语义地图。According to an embodiment of the present disclosure, there is provided a method for saving a semantic map, which includes: obtaining the first semantic map constructed by the mobile robot after executing the current target event; if there is a second semantic map, calculating the A similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot; when the similarity score is greater than a first preset threshold , updating the second semantic map stored in the mobile robot to the first semantic map.
在一个示例性实施例中,在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分之前,所述方法还包括:在所述移动机器人执行所述上一次目标事件的过程中,构建所述第二语义地图,其中,所述第二语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述上一次目标事件后,获取移动机器人所构建的第二语义地图,和/或,获取所述移动机器人在执行完当前目标事件所构建的第一语义地图,包括:在所述移动机器人执行所述当前目标事件的过程中,构建所述第一语义地图,其中,所述第一语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述当前目标事件后,获取移动机器人所构建的第一语义地图。In an exemplary embodiment, if there is a second semantic map, before calculating the similarity score between the second semantic map and the first semantic map, the method further includes: executing During the process of the last target event, construct the second semantic map, wherein the second semantic map includes: object type information, object coordinate information, and object semantic weight information; After a target event, obtaining the second semantic map constructed by the mobile robot, and/or obtaining the first semantic map constructed by the mobile robot after executing the current target event, includes: when the mobile robot executes the current During the target event, the first semantic map is constructed, wherein the first semantic map includes: object type information, object coordinate information, and object semantic weight information; after the current target event is executed, Obtain the first semantic map constructed by the mobile robot.
在一个示例性实施例中,在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,包括:遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分;通过所述多个目标相似度得分得到所述第二语义地图与所述第一语义地图的相似度得分。In an exemplary embodiment, if there is a second semantic map, calculating the similarity score between the second semantic map and the first semantic map includes: traversing the second semantic map and the first semantic map A semantic map, to obtain multiple target similarity scores corresponding to multiple identical coordinate information in the second semantic map and the first semantic map; obtain the second target similarity scores through the multiple target similarity scores A similarity score between the semantic map and the first semantic map.
在一个示例性实施例中,遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分,包括:对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,基于所述第一种类信息对应的第一语义权重,或所述第二种类信息对应的第二语义权重确定所述任一坐标信息的目标相似度得分。In an exemplary embodiment, traversing the second semantic map and the first semantic map to obtain a plurality of coordinate information corresponding to the same coordinate information in the second semantic map and the first semantic map The target similarity score includes: for any coordinate information in the plurality of identical coordinate information, obtaining the first category information corresponding to the any coordinate information in the second semantic map, and the any The second category information corresponding to the coordinate information in the first semantic map; if the first category information is the same as the second category information, based on the first semantic weight corresponding to the first category information, Or the second semantic weight corresponding to the second type of information determines the target similarity score of any coordinate information.
在一个示例性实施例中,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息之后,所述方法还包括:在所述第一种类信息和所述第二种类信息不相同的情况下,确定所述任一坐标信息的目标相似度得分小于第二预设阈值。In an exemplary embodiment, the first category information corresponding to the any coordinate information in the second semantic map, and the second category information corresponding to the any coordinate information in the first semantic map are acquired After information, the method further includes: in a case where the first category information is different from the second category information, determining that the target similarity score of any coordinate information is smaller than a second preset threshold.
在一个示例性实施例中,将所述第二语义地图和所述第一语义地图进行匹配,以获取所述第二语义地图与所述第一语义地图的相似度得分之后,所述方法还包括:在所述相似度得分小于第一预设阈值的情况下,在所述移动机器人中保存所述第二语义地图,且禁止在所述移动机器人中保存所述第一语义地图。In an exemplary embodiment, after matching the second semantic map with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map, the method further The method includes: when the similarity score is less than a first preset threshold, storing the second semantic map in the mobile robot, and prohibiting storing the first semantic map in the mobile robot.
在一个示例性实施例中,所述方法还包括:在不存在所述第二语义地图的情况下,保存所述第一语义地图。In an exemplary embodiment, the method further includes: saving the first semantic map if the second semantic map does not exist.
根据本公开的另一个实施例,提供了一种语义地图的保存装置,所述装置包括:获取模 块,用于获取移动机器人在执行完当前目标事件所构建的第一语义地图;计算模块,用于在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;保存模块,用于在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。According to another embodiment of the present disclosure, a storage device for a semantic map is provided, the device includes: an acquisition module, configured to acquire the first semantic map constructed by the mobile robot after executing the current target event; a calculation module, using In the case that there is a second semantic map, calculate the similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot; save A module configured to update the second semantic map stored in the mobile robot to the first semantic map when the similarity score is greater than a first preset threshold.
根据本公开的又一实施例,还提供了一种计算机可读的存储介质,该计算机可读的存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述语义地图的保存方法。According to yet another embodiment of the present disclosure, there is also provided a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to perform the above-mentioned saving of the semantic map when running method.
根据本公开的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present disclosure, there is also provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above Steps in the method examples.
通过本公开,获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图,即通过比较第二语义地图,以及执行完当前目标事件所构建的第一语义地图的相似度得分与第一预设阈值之间的大小关系,在相似度得分大于第一预设阈值的情况下,确定第一语义地图为正确的地图,进而保存第一语义地图,通过上述技术方案,解决了相关技术中,移动机器人保存的语义地图可能是错误的地图等问题。Through the present disclosure, the first semantic map constructed by the mobile robot after executing the current target event is obtained; if there is a second semantic map, the similarity score between the second semantic map and the first semantic map is calculated, Wherein, the second semantic map is a historical semantic map saved by the mobile robot; when the similarity score is greater than a first preset threshold, update the second semantic map saved in the mobile robot For the first semantic map, that is, by comparing the second semantic map and the size relationship between the similarity score of the first semantic map constructed by the current target event and the first preset threshold, when the similarity score is greater than In the case of the first preset threshold, it is determined that the first semantic map is the correct map, and then the first semantic map is saved. Through the above technical solution, the problem in the related art that the semantic map saved by the mobile robot may be a wrong map is solved. .
本公开具有如下有益效果:基于移动机器人的AI的语义识别功能,通过将语义信息连同该语义的位置信息映射到语义地图上,通过对比移动机器人在执行完上一次目标事件所构建的第二语义地图,以及移动机器人在执行完当前目标事件所构建的第一语义地图,来确认第一语义地图是否存在问题,以及是否保存第一语义地图,解决了移动机器人保存的地图可能是错误的地图,进而在地图出错的情况下,移动机器人行为异常等问题,提高了移动机器人长时间运行的鲁棒性,以及避免了移动机器人建图叠图带来的影响。The present disclosure has the following beneficial effects: based on the semantic recognition function of the AI of the mobile robot, by mapping the semantic information together with the location information of the semantic onto the semantic map, by comparing the second semantic information constructed by the mobile robot after executing the last target event Map, and the first semantic map constructed by the mobile robot after executing the current target event, to confirm whether there is a problem with the first semantic map, and whether to save the first semantic map, to solve the problem that the map saved by the mobile robot may be a wrong map, Furthermore, in the case of map errors, abnormal behavior of the mobile robot and other problems, the robustness of the long-term operation of the mobile robot is improved, and the influence of the mobile robot's map construction and overlay is avoided.
附图说明Description of drawings
此处所说明的附图用来提供对本公开的进一步理解,构成本公开的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present disclosure, and constitute a part of the present disclosure. The schematic embodiments of the present disclosure and their descriptions are used to explain the present disclosure, and do not constitute improper limitations to the present disclosure. In the attached picture:
图1是本公开实施例的一种语义地图的保存方法的移动机器人的硬件结构框图;1 is a block diagram of the hardware structure of a mobile robot according to a method for storing a semantic map according to an embodiment of the present disclosure;
图2是根据本公开实施例的语义地图的保存方法的流程图(一);FIG. 2 is a flow chart (1) of a method for saving a semantic map according to an embodiment of the present disclosure;
图3是根据本公开实施例的语义地图的保存方法的流程图(二);FIG. 3 is a flow chart (2) of a method for saving a semantic map according to an embodiment of the present disclosure;
图4是根据本公开实施例的语义地图的保存装置的结构框图。Fig. 4 is a structural block diagram of an apparatus for saving a semantic map according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本公开。需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。Hereinafter, the present disclosure will be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, in the case of no conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first" and "second" in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence.
本公开实施例所提供的方法实施例可以在移动机器人,或者类似的运算装置中执行。以运行在移动机器人上为例,图1是本公开实施例的一种语义地图的保存方法的移动机器人的硬件结构框图。如图1所示,移动机器人可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,在一个示例性实施例中,上述移动机器人还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动机器人的结构造成限定。例如,移动机器人还可包括比图1中所示更多或者更少的组件,或者具有与图1所示等同功能或比图1所示功能更多的不同的配置。The method embodiments provided by the embodiments of the present disclosure may be executed in a mobile robot or a similar computing device. Taking running on a mobile robot as an example, FIG. 1 is a block diagram of a hardware structure of a mobile robot according to a method for saving a semantic map according to an embodiment of the present disclosure. As shown in Figure 1, the mobile robot can include one or more (only one is shown in Figure 1) processor 102 (the processor 102 can include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA, etc.) and a memory 104 for storing data. In an exemplary embodiment, the above-mentioned mobile robot may also include a transmission device 106 and an input and output device 108 for communication functions. Those skilled in the art can understand that the structure shown in FIG. 1 is only for illustration, and it does not limit the structure of the above-mentioned mobile robot. For example, the mobile robot may also include more or fewer components than those shown in FIG. 1 , or have a different configuration that is functionally equivalent to or more functionally than that shown in FIG. 1 .
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本公开实施例中的移动机器人的语义地图的保存方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动机器人。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for saving the semantic map of the mobile robot in the embodiment of the present disclosure, and the processor 102 runs the computer program stored in the memory 104. program, so as to execute various functional applications and data processing, that is, to realize the above-mentioned method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, and these remote memories may be connected to the mobile robot through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动机器人的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or transmit data via a network. A specific example of the above-mentioned network may include a wireless network provided by a mobile robot's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC for short), 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 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
在本实施例中提供了一种语义地图的保存方法,应用于移动机器人中,图2是根据本公开实施例的语义地图的保存方法的流程图(一),该流程包括如下步骤:In this embodiment, a method for saving a semantic map is provided, which is applied to a mobile robot. FIG. 2 is a flow chart (1) of a method for saving a semantic map according to an embodiment of the present disclosure. The process includes the following steps:
步骤S202:获取移动机器人在执行完当前目标事件所构建的第一语义地图;Step S202: Obtain the first semantic map constructed by the mobile robot after executing the current target event;
步骤S204:在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;Step S204: If there is a second semantic map, calculate the similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot ;
需要说明的是,目标事件可以理解为:清扫工作以及回到目标区域,第二语义地图时移动机器人上一次执行完清扫工作并回到目标区域时构建的语义地图;第一语义地图是移动机器人本次执行完清扫工作并回到目标区域时构建的语义地图,其中,语义地图是包括物体的种类信息、物体的坐标信息、物体的语义权重信息的地图。It should be noted that the target event can be understood as: cleaning work and returning to the target area, the second semantic map is the semantic map constructed when the mobile robot completed the cleaning work last time and returned to the target area; the first semantic map is the mobile robot The semantic map constructed when the cleaning work is completed and returned to the target area, wherein the semantic map is a map including the type information of the object, the coordinate information of the object, and the semantic weight information of the object.
步骤S206:在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。Step S206: When the similarity score is greater than a first preset threshold, update the second semantic map stored in the mobile robot to the first semantic map.
通过本公开实施例,获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图,即通过比较第二语义地图,以及执行完当前目标事件所构建的第一语义地图的相似度得分与预设阈值之间的大小关系,在相似度得分大于第一预设阈值的情况下,确定第一语义地图为正确的地图,进而保存第一语义地图,通过上述技术方案,解决了相关技术中,移动机器人保存的语义地图可能是错误的地图等问题。Through the embodiment of the present disclosure, the first semantic map constructed by the mobile robot after executing the current target event is obtained; if there is a second semantic map, the similarity between the second semantic map and the first semantic map is calculated score, wherein the second semantic map is the historical semantic map saved by the mobile robot; when the similarity score is greater than the first preset threshold, the second semantic map saved in the mobile robot The map is updated to the first semantic map, that is, by comparing the second semantic map and the size relationship between the similarity score of the first semantic map constructed by the current target event and the preset threshold, when the similarity score is greater than In the case of the first preset threshold, it is determined that the first semantic map is the correct map, and then the first semantic map is saved. Through the above technical solution, the problem in the related art that the semantic map saved by the mobile robot may be a wrong map is solved. .
在一个示例性实施例中,获取移动机器人存储的第二语义地图,包括:在所述移动机器人执行所述上一次目标事件的过程中,构建所述第二语义地图,其中,所述第二语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述上一次目标事件后,获取移动机器人所构建的第二语义地图,和/或,获取所述移动机器人在执行完当前目标事件所构建的第一语义地图,包括:在所述移动机器人执行所述当前目标事件的过程中,构建所述第一语义地图,其中,所述第一语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述当前目标事件后,获取移动机器人所构建的第一语义地图。In an exemplary embodiment, obtaining the second semantic map stored by the mobile robot includes: constructing the second semantic map during the execution of the last target event by the mobile robot, wherein the second The semantic map includes: the type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the last target event, obtain the second semantic map constructed by the mobile robot, and/or obtain the mobile robot After the robot executes the first semantic map constructed by the current target event, it includes: constructing the first semantic map during the execution of the current target event by the mobile robot, wherein the first semantic map includes: The type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the current target event, the first semantic map constructed by the mobile robot is obtained.
也就是说,在移动机器人在执行所述上一次目标事件的过程中,构建所述第二语义地图,以及在移动机器人在执行当前目标事件的过程中,构建所述第一语义地图,其中,第二语义地图和第一语义地图中均包括:物体的种类信息、物体的坐标信息、物体的语义权重信息,在移动机器人执行完目标事件后,获取第二语义地图和第一语义地图,其中,物体的语义权重信息用于指示第二语义地图和第一语义地图匹配的过程中的权重,物体的语义权重信息可以是用户预先设置的,也可以是移动机器人根据实际情况动态给予的,需要说明的是,本公 开实施例对此不做限定。That is to say, the second semantic map is constructed during the execution of the last target event by the mobile robot, and the first semantic map is constructed during the execution of the current target event by the mobile robot, wherein, Both the second semantic map and the first semantic map include: the type information of the object, the coordinate information of the object, and the semantic weight information of the object. After the mobile robot executes the target event, the second semantic map and the first semantic map are obtained, wherein , the semantic weight information of the object is used to indicate the weight in the process of matching the second semantic map with the first semantic map. The semantic weight information of the object can be preset by the user or dynamically given by the mobile robot according to the actual situation. It should be noted that this disclosure is not limited in the embodiments of the present disclosure.
进一步的,构建第二语义地图的具体实现方式如下:移动机器人在执行上一次的目标事件的过程中,实时监测移动机器人的可视范围内的目标物体,并获取可视范围内的第一目标物体的第一目标图像,将移动机器人获取的第一目标物体的第一目标图像输入到人工智能检测模型中,得到所述第一目标图像对应的第一图像信息,其中,所述第一图像信息包括:第一目标物体的第一种类信息、第一目标物体的第一语义权重信息;以及根据所述移动机器人与所述第一目标物体的相对位置关系和所述移动机器人在行进区域的坐标信息确定所述第一目标物体的第一坐标信息;将所述第一种类信息、第一语义权重信息、第一坐标信息保存至所述第二语义地图,遍历所述移动机器人的行进区域,以得到全部的行进区域对应的第二语义地图。Further, the specific implementation of building the second semantic map is as follows: during the execution of the last target event, the mobile robot monitors the target objects within the visual range of the mobile robot in real time, and acquires the first target within the visual range The first target image of the object, input the first target image of the first target object acquired by the mobile robot into the artificial intelligence detection model, and obtain the first image information corresponding to the first target image, wherein the first image The information includes: the first category information of the first target object, the first semantic weight information of the first target object; and according to the relative positional relationship between the mobile robot and the first target object and The coordinate information determines the first coordinate information of the first target object; saves the first type information, the first semantic weight information, and the first coordinate information to the second semantic map, and traverses the travel area of the mobile robot , to obtain the second semantic map corresponding to all traveling areas.
进一步的,构建第一语义地图的具体实现方式如下:移动机器人在执行当前目标事件的过程中,实时监测移动机器人的可视范围内的目标物体,并获取可视范围内的第二目标物体的第二目标图像,将移动机器人获取的第二目标物体的第二目标图像输入到人工智能检测模型中,得到所述第二目标图像对应的第二图像信息,其中,所述第二图像信息包括:第二目标物体的第二种类信息、第二目标物体的第二语义权重信息;以及根据所述移动机器人与所述第二目标物体的相对位置关系和所述移动机器人在行进区域的坐标信息确定所述第二目标物体的第二坐标信息;将所述第二种类信息、第二语义权重信息、第二坐标信息保存至所述第一语义地图,遍历所述移动机器人的行进区域,以得到全部的行进区域对应的第一语义地图。Further, the specific implementation of building the first semantic map is as follows: during the process of executing the current target event, the mobile robot monitors the target objects within the visible range of the mobile robot in real time, and acquires the information of the second target object within the visible range. The second target image, inputting the second target image of the second target object acquired by the mobile robot into the artificial intelligence detection model to obtain the second image information corresponding to the second target image, wherein the second image information includes : the second category information of the second target object, the second semantic weight information of the second target object; and according to the relative positional relationship between the mobile robot and the second target object and the coordinate information of the mobile robot in the traveling area Determining the second coordinate information of the second target object; saving the second type information, the second semantic weight information, and the second coordinate information to the first semantic map, traversing the travel area of the mobile robot, and The first semantic map corresponding to all traveling areas is obtained.
在一个示例性实施例中,将所述第二语义地图和所述第一语义地图进行匹配,以获取所述第二语义地图与所述第一语义地图的相似度得分,具体方式如下:遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分;通过所述多个目标相似度得分得到所述第二语义地图与所述第一语义地图的相似度得分。In an exemplary embodiment, the second semantic map is matched with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map, and the specific method is as follows: traversing The second semantic map and the first semantic map are used to obtain multiple target similarity scores corresponding to multiple identical coordinate information in the second semantic map and the first semantic map; through the multiple target similarity scores to obtain the similarity scores between the second semantic map and the first semantic map.
可以理解为,确定第二语义地图和所述第一语义地图的相同的坐标信息,并确定相同的坐标信息下目标物体的类型是否相同,并确定对应的目标相似度得分,将获得的多个目标相似度得分进行相加,确定相似度得分。It can be understood as determining the same coordinate information of the second semantic map and the first semantic map, and determining whether the type of the target object under the same coordinate information is the same, and determining the corresponding target similarity score, the obtained multiple The target similarity scores are added to determine the similarity score.
在一个示例性实施例中,对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,基于所述第一种类信息对应的第一语义权重,或所述第二种类信息对应的第二语义权重确定 所述任一坐标信息的目标相似度得分;在所述第一种类信息和所述第二种类信息不相同的情况下,确定所述任一坐标信息的目标相似度得分小于第二预设阈值。In an exemplary embodiment, for any coordinate information among the plurality of identical coordinate information, the first category information corresponding to the any coordinate information in the second semantic map is acquired, and the any A coordinate information corresponding to the second category information in the first semantic map; if the first category information is the same as the second category information, based on the first semantic weight corresponding to the first category information , or the second semantic weight corresponding to the second category information determines the target similarity score of any coordinate information; if the first category information is different from the second category information, determine the The target similarity score of any coordinate information is less than a second preset threshold.
换言之,比较相同坐标信息对应的第一种类信息和第二种类信息是否相同,在所述第一种类信息和所述第二种类信息相同的情况下,根据第一种类信息对应的第一语义权重或第二种类信息对应的第二语义权重作为相同坐标信息对应的目标相似度得分,在所述第一种类信息和所述第二种类信息不相同的情况下,目标相似度得分可以为零,也可以根据实际情况设置为负数的数值,其中,在第二语义地图中存在对应的第一种类信息,在第一语义地图中不存在对应的第二种类信息的情况下,确定所述第一种类信息和所述第二种类信息不相同。In other words, compare whether the first type information and the second type information corresponding to the same coordinate information are the same, and if the first type information and the second type information are the same, according to the first semantic weight corresponding to the first type information Or the second semantic weight corresponding to the second type of information is used as the target similarity score corresponding to the same coordinate information. When the first type of information is different from the second type of information, the target similarity score may be zero, It can also be set as a negative value according to the actual situation, where there is corresponding first type information in the second semantic map, and if there is no corresponding second type information in the first semantic map, determine the first The category information is different from the second category information.
进一步的,还可以预先设置语义权重与目标相似度得分的对应关系,在所述第一种类信息和所述第二种类信息相同的情况下,根据语义权重确定对应的目标相似度得分。Further, the corresponding relationship between semantic weights and target similarity scores may also be preset, and if the first category information and the second category information are the same, the corresponding target similarity scores are determined according to the semantic weights.
举例来讲,预先设置语义权重与目标相似度得分的对应关系为1:10,对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,确定第一种类信息对应的语义权重为0.2,即在多个相同的坐标信息的目标相似度得分为2;预先设置语义权重与目标相似度得分的对应关系为1:1的情况下,确定第一种类信息对应的语义权重为0.2,相同坐标信息对应的目标相似度得分0.2,需要说明的是,上述数值仅是为了更好的理解本实施例,本公开实施例对此不做限定。For example, the correspondence between the semantic weight and the target similarity score is preset to be 1:10, and for any coordinate information in the plurality of identical coordinate information, obtain the coordinate information in the second semantic The first type of information corresponding to the map, and the second type of information corresponding to any coordinate information in the first semantic map; when the first type of information is the same as the second type of information, Determine that the semantic weight corresponding to the first type of information is 0.2, that is, the target similarity score of multiple identical coordinate information is 2; when the corresponding relationship between the semantic weight and the target similarity score is set to 1:1 in advance, determine the second The semantic weight corresponding to one type of information is 0.2, and the target similarity score corresponding to the same coordinate information is 0.2. It should be noted that the above values are only for better understanding of this embodiment, and are not limited in this embodiment of the present disclosure.
在一个示例性实施例中,将所述第二语义地图和所述第一语义地图进行匹配,以获取所述第二语义地图与所述第一语义地图的相似度得分之后,在所述相似度得分小于第一预设阈值的情况下,在所述移动机器人中保存所述第二语义地图,且禁止在所述移动机器人中保存所述第一语义地图。In an exemplary embodiment, after matching the second semantic map with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map, after the similarity If the degree score is less than the first preset threshold, the second semantic map is saved in the mobile robot, and the first semantic map is prohibited from being saved in the mobile robot.
匹配第二语义地图和第一语义地图,得出两张语义地图的相似性得分,若相似性得分小于第一预设阈值,则认为第一语义地图发生了叠图,不执行保存第一语义地图的操作,并将第二语义地图恢复出来,继续保存第二语义地图,其中,发生叠图用于指示所述第一语义地图在构建的过程中出现了错误。Match the second semantic map with the first semantic map to obtain the similarity score of the two semantic maps. If the similarity score is less than the first preset threshold, it is considered that the first semantic map has overlapped, and the first semantic map is not saved. Map operation, recovering the second semantic map, and continuing to save the second semantic map, wherein an overlay is used to indicate that an error occurred during the construction of the first semantic map.
在一个示例性实施例中,在不存在所述第二语义地图的情况下,保存所述第一语义地图。In an exemplary embodiment, if the second semantic map does not exist, the first semantic map is saved.
将所述第二语义地图和所述第一语义地图进行匹配之前,确定移动机器人中是否保存有第二语义地图,在移动机器人中没有保存有第二语义地图,即未获取到所述第二语义地图的情况下,直接保存第一语义地图。Before matching the second semantic map with the first semantic map, determine whether the second semantic map is saved in the mobile robot, and the second semantic map is not saved in the mobile robot, that is, the second semantic map is not obtained. In the case of a semantic map, the first semantic map is directly saved.
为了更好理解上述语义地图的保存方法,以下结合可选实施例对上述技术方案进行解释 说明,但不用于限定本公开实施例的技术方案。In order to better understand the storage method of the above-mentioned semantic map, the above-mentioned technical solutions are explained below in conjunction with optional embodiments, but are not intended to limit the technical solutions of the embodiments of the present disclosure.
图3是根据本公开实施例的语义地图的保存方法的流程图(二),如图3所示,具体步骤如下:Fig. 3 is a flow chart (2) of a method for saving a semantic map according to an embodiment of the present disclosure, as shown in Fig. 3 , the specific steps are as follows:
步骤S301:开始;Step S301: start;
步骤S302:移动机器人开始清扫并AI检测物体;Step S302: The mobile robot starts cleaning and AI detects objects;
需要说明的是,AI识别物体得到物体的种类信息、物体的坐标信息、物体的语义权重信息;It should be noted that AI recognizes the object to obtain the type information of the object, the coordinate information of the object, and the semantic weight information of the object;
步骤S303:将物体通过坐标变换映射到第一语义地图上;Step S303: Map the object to the first semantic map through coordinate transformation;
具体的,通过相机实时监测机器可视范围内的物体,当检测到目标物体时,通过根据所述移动机器人与目标物体的相对位置关系和移动机器人在所述行进区域的坐标信息确定所述第一目标物体的第一坐标信息,并将目标物体的映射坐标信息到第一语义地图上,其中,第一语义地图包括:目标物体的种类,目标物体的坐标信息和目标物体的语义权重,这个语义权重代表了第二语义地图和第一语义地图对比时的权重,语义权重可以预先设定,不同的物体对应不同的权重,如床、电视机柜、沙发等不容易移动的物体权重很高;桌子、椅子、落地扇等短时间内不容易移动的物体权重较低,而对于人、鞋子等动态物体,则不给予权重。Specifically, the camera is used to monitor objects within the visible range of the machine in real time, and when a target object is detected, the first position is determined according to the relative positional relationship between the mobile robot and the target object and the coordinate information of the mobile robot in the travel area. First coordinate information of a target object, and map the coordinate information of the target object to the first semantic map, wherein the first semantic map includes: the type of the target object, the coordinate information of the target object and the semantic weight of the target object, this The semantic weight represents the weight of the comparison between the second semantic map and the first semantic map. The semantic weight can be set in advance, and different objects correspond to different weights. For example, objects that are not easy to move such as beds, TV cabinets, and sofas have high weights; Objects that are not easy to move in a short period of time, such as tables, chairs, and floor fans, are given lower weights, while dynamic objects such as people and shoes are not given weights.
步骤S304:检测到保存第一语义地图的指令;Step S304: detecting an instruction to save the first semantic map;
当移动机器人完成清扫工作,并回到充电桩时收到保存第一语义地图的指令,根据指令执行保存语义地图的操作。When the mobile robot finishes cleaning and returns to the charging pile, it receives an instruction to save the first semantic map, and executes the operation of saving the semantic map according to the instruction.
步骤S305:判断移动机器人中是否保存有第二语义地图,若移动机器人中保存有第二语义地图,执行步骤S307,若移动机器人中没有保存有第二语义地图,执行步骤S306;Step S305: Determine whether the second semantic map is saved in the mobile robot, if the second semantic map is saved in the mobile robot, execute step S307, and if the second semantic map is not saved in the mobile robot, execute step S306;
步骤S306:保存第一语义地图以及对应的环境地图;Step S306: saving the first semantic map and the corresponding environment map;
步骤S307:确定第二语义地图与第一语义地图的相似性得分与预设阈值(相当于上述实施例中的第一预设阈值)之间的大小关系;Step S307: Determine the size relationship between the similarity score between the second semantic map and the first semantic map and a preset threshold (equivalent to the first preset threshold in the above embodiment);
步骤S308:在大小关系指示所述相似性得分大于预设阈值的情况下,保存第一语义地图以及对应的环境地图;Step S308: if the size relationship indicates that the similarity score is greater than a preset threshold, save the first semantic map and the corresponding environment map;
步骤S309:在大小关系指示所述相似性得分小于预设阈值的情况下,保存第二语义地图以及对应的环境地图。Step S309: if the size relationship indicates that the similarity score is smaller than a preset threshold, save the second semantic map and the corresponding environment map.
上述实施例中,获取移动机器人可视范围内的语义信息,并通过AI检测到的不同物体的种类对语义地图上的语义信息分配不同的权重,即,不同语义信息拥有不同的语义权重;通过对两张语义地图进行对比,得到两张语义地图的相似度得分,当相似度得分大于预设阈值时,确认更新的地图不存在叠图,可以正常保存。具体的,检测移动机器人中是否保存有 第二语义地图,若没有保存第二语义地图,则保存第一语义地图和其对应的环境地图;若保存第二语义地图,则对比第二语义地图和第一语义地图,得出两张语义地图的相似性得分,若相似性得分大于预设阈值,则认为没有叠图,则保存第一语义地图以及对应的环境地图,若相似性得分小于预设阈值,则认为此次移动机器人构建的第一语义地图发生了叠图,不执行存图操作,并将第二语义地图恢复出来。通过本实施例,解决了移动机器人保存的地图可能是错误的地图,进而在地图出错的情况下,移动机器人行为异常等问题,提高了移动机器人长时间运行的鲁棒性,以及避免了移动机器人建图叠图带来的影响。In the above embodiment, the semantic information within the visible range of the mobile robot is obtained, and different types of objects detected by AI are used to assign different weights to the semantic information on the semantic map, that is, different semantic information has different semantic weights; Compare the two semantic maps to get the similarity scores of the two semantic maps. When the similarity score is greater than the preset threshold, it is confirmed that the updated map does not overlap and can be saved normally. Specifically, detect whether the second semantic map is saved in the mobile robot, if the second semantic map is not saved, then save the first semantic map and its corresponding environment map; if save the second semantic map, then compare the second semantic map and The first semantic map, get the similarity score of the two semantic maps, if the similarity score is greater than the preset threshold, it is considered that there is no overlapping map, then save the first semantic map and the corresponding environment map, if the similarity score is less than the preset threshold, it is considered that the first semantic map constructed by the mobile robot has overlapped, the operation of saving the map is not performed, and the second semantic map is restored. Through this embodiment, the map saved by the mobile robot may be a wrong map, and then the mobile robot behaves abnormally when the map is wrong, which improves the robustness of the mobile robot for a long time, and avoids the problem of the mobile robot. The impact of building and overlaying maps.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present disclosure can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present disclosure.
在本实施例中还提供了语义地图的保存装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a storage device for a semantic map is also provided, and the device is used to implement the above embodiments and preferred implementation modes, and what has been explained will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
图4是根据本公开实施例的语义地图的保存装置的结构框图,如图4所示,包括:Fig. 4 is a structural block diagram of a storage device for a semantic map according to an embodiment of the present disclosure, as shown in Fig. 4 , including:
获取模块42,用于获取移动机器人在执行完当前目标事件所构建的第一语义地图;An acquisition module 42, configured to acquire the first semantic map constructed by the mobile robot after executing the current target event;
计算模块44,用于在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;A calculation module 44, configured to calculate a similarity score between the second semantic map and the first semantic map if there is a second semantic map, wherein the second semantic map is saved by the mobile robot historical semantic map;
保存模块46,用于在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。A saving module 46, configured to update the second semantic map saved in the mobile robot to the first semantic map when the similarity score is greater than a first preset threshold.
通过本公开实施例,获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图,即通过比较第二语义地图,以及执行完当前目标事件所构建的第一语义地图的相似度得分与预设阈值之间的大小关系,在相似度得分大于第一预设阈值的情况下,确定第一语义地图为正确的地图,进而保存第一语义地图,通过上述技术方案,解决了相关技术中,移动机器人保存的语义地图可能是错误的地图等问题。Through the embodiment of the present disclosure, the first semantic map constructed by the mobile robot after executing the current target event is obtained; if there is a second semantic map, the similarity between the second semantic map and the first semantic map is calculated score, wherein the second semantic map is the historical semantic map saved by the mobile robot; when the similarity score is greater than the first preset threshold, the second semantic map saved in the mobile robot The map is updated to the first semantic map, that is, by comparing the second semantic map and the size relationship between the similarity score of the first semantic map constructed by the current target event and the preset threshold, when the similarity score is greater than In the case of the first preset threshold, it is determined that the first semantic map is the correct map, and then the first semantic map is saved. Through the above technical solution, the problem in the related art that the semantic map saved by the mobile robot may be a wrong map is solved. .
在一个示例性实施例中,上述装置还包括:构建模块,用于在所述移动机器人执行所述上一次目标事件的过程中,构建所述第二语义地图,其中,所述第二语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述上一次目标事件后,获取移动机器人所构建的第二语义地图,和/或,获取所述移动机器人在执行完当前目标事件所构建的第一语义地图,包括:在所述移动机器人执行所述当前目标事件的过程中,构建所述第一语义地图,其中,所述第一语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述当前目标事件后,获取移动机器人所构建的第一语义地图。In an exemplary embodiment, the above apparatus further includes: a construction module, configured to construct the second semantic map during the execution of the last target event by the mobile robot, wherein the second semantic map Including: the type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the last target event, obtain the second semantic map constructed by the mobile robot, and/or obtain the mobile robot at Executing the first semantic map constructed by the current target event includes: constructing the first semantic map during the execution of the current target event by the mobile robot, wherein the first semantic map includes: category information, object coordinate information, and object semantic weight information; after executing the current target event, obtain the first semantic map constructed by the mobile robot.
也就是说,在移动机器人在执行所述上一次目标事件的过程中,构建所述第二语义地图,以及在移动机器人在执行当前目标事件的过程中,构建所述第一语义地图,其中,第二语义地图和第一语义地图中均包括:物体的种类信息、物体的坐标信息、物体的语义权重信息,在移动机器人执行完目标事件后,获取第二语义地图和第一语义地图,其中,物体的语义权重信息用于指示第二语义地图和第一语义地图匹配的过程中的权重,物体的语义权重信息可以是用户预先设置的,也可以是移动机器人根据实际情况动态给予的,需要说明的是,本公开实施例对此不做限定。That is to say, the second semantic map is constructed during the execution of the last target event by the mobile robot, and the first semantic map is constructed during the execution of the current target event by the mobile robot, wherein, Both the second semantic map and the first semantic map include: the type information of the object, the coordinate information of the object, and the semantic weight information of the object. After the mobile robot executes the target event, the second semantic map and the first semantic map are obtained, wherein , the semantic weight information of the object is used to indicate the weight in the process of matching the second semantic map with the first semantic map. The semantic weight information of the object can be preset by the user or dynamically given by the mobile robot according to the actual situation. It should be noted that this disclosure is not limited in the embodiments of the present disclosure.
进一步的,构建第二语义地图的具体实现方式如下:移动机器人在执行上一次的目标事件的过程中,实时监测移动机器人的可视范围内的目标物体,并获取可视范围内的第一目标物体的第一目标图像,将移动机器人获取的第一目标物体的第一目标图像输入到人工智能检测模型中,得到所述第一目标图像对应的第一图像信息,其中,所述第一图像信息包括:第一目标物体的第一种类信息、第一目标物体的第一语义权重信息;以及根据所述移动机器人与所述第一目标物体的相对位置关系和所述移动机器人在行进区域的坐标信息确定所述第一目标物体的第一坐标信息;将所述第一种类信息、第一语义权重信息、第一坐标信息保存至所述第二语义地图,遍历所述移动机器人的行进区域,以得到全部的行进区域对应的第二语义地图。Further, the specific implementation of building the second semantic map is as follows: during the execution of the last target event, the mobile robot monitors the target objects within the visual range of the mobile robot in real time, and acquires the first target within the visual range The first target image of the object, input the first target image of the first target object acquired by the mobile robot into the artificial intelligence detection model, and obtain the first image information corresponding to the first target image, wherein the first image The information includes: the first category information of the first target object, the first semantic weight information of the first target object; and according to the relative positional relationship between the mobile robot and the first target object and The coordinate information determines the first coordinate information of the first target object; saves the first type information, the first semantic weight information, and the first coordinate information to the second semantic map, and traverses the travel area of the mobile robot , to obtain the second semantic map corresponding to all traveling areas.
进一步的,构建第一语义地图的具体实现方式如下:移动机器人在执行当前目标事件的过程中,实时监测移动机器人的可视范围内的目标物体,并获取可视范围内的第二目标物体的第二目标图像,将移动机器人获取的第二目标物体的第二目标图像输入到人工智能检测模型中,得到所述第二目标图像对应的第二图像信息,其中,所述第二图像信息包括:第二目标物体的第二种类信息、第二目标物体的第二语义权重信息;以及根据所述移动机器人与所述第二目标物体的相对位置关系和所述移动机器人在行进区域的坐标信息确定所述第二目标物体的第二坐标信息;将所述第二种类信息、第二语义权重信息、第二坐标信息保存至所述第一语义地图,遍历所述移动机器人的行进区域,以得到全部的行进区域对应的第一语义 地图。Further, the specific implementation of building the first semantic map is as follows: during the process of executing the current target event, the mobile robot monitors the target objects within the visible range of the mobile robot in real time, and acquires the information of the second target object within the visible range. The second target image, inputting the second target image of the second target object acquired by the mobile robot into the artificial intelligence detection model to obtain the second image information corresponding to the second target image, wherein the second image information includes : the second category information of the second target object, the second semantic weight information of the second target object; and according to the relative positional relationship between the mobile robot and the second target object and the coordinate information of the mobile robot in the traveling area Determining the second coordinate information of the second target object; saving the second type information, the second semantic weight information, and the second coordinate information to the first semantic map, traversing the travel area of the mobile robot, and The first semantic map corresponding to all traveling areas is obtained.
在一个示例性实施例中,匹配模块,还用于遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分;通过所述多个目标相似度得分得到所述第二语义地图与所述第一语义地图的相似度得分。In an exemplary embodiment, the matching module is further configured to traverse the second semantic map and the first semantic map to obtain multiple identical coordinates in the second semantic map and the first semantic map A plurality of target similarity scores corresponding to the information; the similarity scores between the second semantic map and the first semantic map are obtained through the multiple target similarity scores.
可以理解为,确定第二语义地图和所述第一语义地图的相同的坐标信息,并确定相同的坐标信息下目标物体的类型是否相同,并确定对应的目标相似度得分,将获得的多个目标相似度得分进行相加,确定相似度得分。It can be understood as determining the same coordinate information of the second semantic map and the first semantic map, and determining whether the type of the target object under the same coordinate information is the same, and determining the corresponding target similarity score, the obtained multiple The target similarity scores are added to determine the similarity score.
在一个示例性实施例中,匹配模块,还用于对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,基于所述第一种类信息对应的第一语义权重,或所述第二种类信息对应的第二语义权重确定所述任一坐标信息的目标相似度得分;In an exemplary embodiment, the matching module is further configured to, for any coordinate information in the plurality of identical coordinate information, obtain the first category corresponding to the any coordinate information in the second semantic map information, and the second category information corresponding to any coordinate information in the first semantic map; if the first category information and the second category information are the same, based on the first category information The corresponding first semantic weight, or the second semantic weight corresponding to the second category information determines the target similarity score of any coordinate information;
在一个示例性实施例中,匹配模块,还用于在所述第一种类信息和所述第二种类信息不相同的情况下,确定所述任一坐标信息的目标相似度得分小于第二预设阈值。In an exemplary embodiment, the matching module is further configured to determine that the target similarity score of any coordinate information is smaller than the second preset if the first category information is different from the second category information. Set the threshold.
换言之,比较相同坐标信息对应的第一种类信息和第二种类信息是否相同,在所述第一种类信息和所述第二种类信息相同的情况下,根据第一种类信息对应的第一语义权重或第二种类信息对应的第二语义权重作为相同坐标信息对应的目标相似度得分,在所述第一种类信息和所述第二种类信息不相同的情况下,目标相似度得分可以为零,也可以根据实际情况设置为负数的数值,其中,在第二语义地图中存在对应的第一种类信息,在第一语义地图中不存在对应的第二种类信息的情况下,确定所述第一种类信息和所述第二种类信息不相同。In other words, compare whether the first type information and the second type information corresponding to the same coordinate information are the same, and if the first type information and the second type information are the same, according to the first semantic weight corresponding to the first type information Or the second semantic weight corresponding to the second type of information is used as the target similarity score corresponding to the same coordinate information. When the first type of information is different from the second type of information, the target similarity score may be zero, It can also be set as a negative value according to the actual situation, where there is corresponding first type information in the second semantic map, and if there is no corresponding second type information in the first semantic map, determine the first The category information is different from the second category information.
进一步的,还可以预先设置语义权重与目标相似度得分的对应关系,在所述第一种类信息和所述第二种类信息相同的情况下,根据语义权重确定对应的目标相似度得分。Further, the corresponding relationship between semantic weights and target similarity scores may also be preset, and if the first category information and the second category information are the same, the corresponding target similarity scores are determined according to the semantic weights.
举例来讲,预先设置语义权重与目标相似度得分的对应关系为1:10,对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,确定第一种类信息对应的语义权重为0.2,即在多个相同的坐标信息的目标相似度得分为2;预先设置语义权重与目标相似度得分的对应关系为1:1的情况下,确定第一种类信息对应的语义权重为0.2,相同坐标信息对应的目标相似度得分0.2,需要说明的是,上述数值仅是为了更好的理解本实施例,本公开实施例对此不做限定。For example, the correspondence between the semantic weight and the target similarity score is preset to be 1:10, and for any coordinate information in the plurality of identical coordinate information, obtain the coordinate information in the second semantic The first type of information corresponding to the map, and the second type of information corresponding to any coordinate information in the first semantic map; when the first type of information is the same as the second type of information, Determine that the semantic weight corresponding to the first type of information is 0.2, that is, the target similarity score of multiple identical coordinate information is 2; when the corresponding relationship between the semantic weight and the target similarity score is set to 1:1 in advance, determine the second The semantic weight corresponding to one type of information is 0.2, and the target similarity score corresponding to the same coordinate information is 0.2. It should be noted that the above values are only for better understanding of this embodiment, and are not limited in this embodiment of the present disclosure.
在一个示例性实施例中,保存模块,还用于将所述第二语义地图和所述第一语义地图进行匹配,以获取所述第二语义地图与所述第一语义地图的相似度得分之后,在所述相似度得分小于第一预设阈值的情况下,在所述移动机器人中保存所述第二语义地图,且禁止在所述移动机器人中保存所述第一语义地图。In an exemplary embodiment, the saving module is further configured to match the second semantic map with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map Afterwards, if the similarity score is less than a first preset threshold, the second semantic map is saved in the mobile robot, and the first semantic map is prohibited from being saved in the mobile robot.
匹配第二语义地图和第一语义地图,得出两张语义地图的相似性得分,若相似性得分小于第一预设阈值,则认为第一语义地图发生了叠图,不执行保存第一语义地图的操作,并将第二语义地图恢复出来,继续保存第二语义地图,其中,发生叠图用于指示所述第一语义地图在构建的过程中出现了错误。Match the second semantic map with the first semantic map to obtain the similarity score of the two semantic maps. If the similarity score is less than the first preset threshold, it is considered that the first semantic map has overlapped, and the first semantic map is not saved. Map operation, recovering the second semantic map, and continuing to save the second semantic map, wherein an overlay is used to indicate that an error occurred during the construction of the first semantic map.
在一个示例性实施例中,保存模块,还用于将所述第二语义地图和所述第一语义地图进行匹配之前,在未获取到所述第二语义地图的情况下,直接在所述移动机器人中保存所述第一语义地图。In an exemplary embodiment, the saving module is further configured to, before matching the second semantic map with the first semantic map, if the second semantic map is not obtained, directly The first semantic map is saved in the mobile robot.
将所述第二语义地图和所述第一语义地图进行匹配之前,确定移动机器人中是否保存有第二语义地图,在移动机器人中没有保存有第二语义地图,即未获取到所述第二语义地图的情况下,直接保存第一语义地图。Before matching the second semantic map with the first semantic map, determine whether the second semantic map is saved in the mobile robot, and the second semantic map is not saved in the mobile robot, that is, the second semantic map is not obtained. In the case of a semantic map, the first semantic map is directly saved.
本公开的实施例还提供了一种存储介质,该存储介质包括存储的程序,其中,上述程序运行时执行上述任一项的方法。An embodiment of the present disclosure also provides a storage medium, the storage medium includes a stored program, wherein the above-mentioned program executes any one of the above-mentioned methods when running.
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Optionally, in this embodiment, the above-mentioned storage medium may be configured to store program codes for performing the following steps:
S1,获取移动机器人在执行完当前目标事件所构建的第一语义地图;S1, acquiring the first semantic map constructed by the mobile robot after executing the current target event;
S2,在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;S2. If there is a second semantic map, calculate a similarity score between the second semantic map and the first semantic map, where the second semantic map is a historical semantic map saved by the mobile robot;
S3,在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。S3. In a case where the similarity score is greater than a first preset threshold, update the second semantic map stored in the mobile robot to the first semantic map.
本公开的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through a computer program:
S1,获取移动机器人在执行完当前目标事件所构建的第一语义地图;S1, acquiring the first semantic map constructed by the mobile robot after executing the current target event;
S2,在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;S2. If there is a second semantic map, calculate a similarity score between the second semantic map and the first semantic map, where the second semantic map is a historical semantic map saved by the mobile robot;
S3,在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第 二语义地图更新为所述第一语义地图。S3. When the similarity score is greater than a first preset threshold, update the second semantic map stored in the mobile robot to the first semantic map.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), Various media that can store program codes such as removable hard disks, magnetic disks, or optical disks.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details are not repeated in this embodiment.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details are not repeated in this embodiment.
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present disclosure is not limited to any specific combination of hardware and software.
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above descriptions are only preferred embodiments of the present disclosure, and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims (10)

  1. 一种语义地图的保存方法,其特征在于:包括:A method for preserving a semantic map, characterized in that: comprising:
    获取移动机器人在执行完当前目标事件所构建的第一语义地图;Obtain the first semantic map constructed by the mobile robot after executing the current target event;
    在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;If there is a second semantic map, calculate the similarity score between the second semantic map and the first semantic map, where the second semantic map is a historical semantic map saved by the mobile robot;
    在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。If the similarity score is greater than a first preset threshold, the second semantic map stored in the mobile robot is updated to the first semantic map.
  2. 根据权利要求1所述的语义地图的保存方法,其特征在于:在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分之前,所述方法还包括:The method for preserving a semantic map according to claim 1, wherein, if there is a second semantic map, before calculating the similarity score between the second semantic map and the first semantic map, the method Also includes:
    在所述移动机器人执行所述当前目标事件的上一次目标事件的过程中,构建所述第二语义地图,其中,所述第二语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;During the process of the mobile robot executing the last target event of the current target event, the second semantic map is constructed, wherein the second semantic map includes: object type information, object coordinate information, object Semantic weight information;
    在执行完所述上一次目标事件后,获取移动机器人所构建的第二语义地图,和/或After executing the last target event, obtain the second semantic map constructed by the mobile robot, and/or
    获取所述移动机器人在执行完当前目标事件所构建的第一语义地图,包括:Obtaining the first semantic map constructed by the mobile robot after executing the current target event, including:
    在所述移动机器人执行所述当前目标事件的过程中,构建所述第一语义地图,其中,所述第一语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;During the execution of the current target event by the mobile robot, the first semantic map is constructed, wherein the first semantic map includes: object type information, object coordinate information, and object semantic weight information;
    在执行完所述当前目标事件后,获取移动机器人所构建的第一语义地图。After the execution of the current target event, the first semantic map constructed by the mobile robot is obtained.
  3. 根据权利要求2所述的语义地图的保存方法,其特征在于:在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,包括:The method for preserving a semantic map according to claim 2, wherein, if there is a second semantic map, calculating the similarity score between the second semantic map and the first semantic map includes:
    遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分;Traversing the second semantic map and the first semantic map to obtain a plurality of target similarity scores corresponding to a plurality of identical coordinate information in the second semantic map and the first semantic map;
    通过所述多个目标相似度得分得到所述第二语义地图与所述第一语义地图的相似度得分。A similarity score between the second semantic map and the first semantic map is obtained through the plurality of target similarity scores.
  4. 根据权利要求3所述的语义地图的保存方法,其特征在于:遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分,包括:The method for saving a semantic map according to claim 3, characterized in that: traversing the second semantic map and the first semantic map to obtain a plurality of the second semantic map and the first semantic map Multiple target similarity scores corresponding to the same coordinate information, including:
    对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;For any coordinate information in the plurality of identical coordinate information, obtain the first category information corresponding to the any coordinate information in the second semantic map, and the any coordinate information in the first The second type of information corresponding to the semantic map;
    在所述第一种类信息和所述第二种类信息相同的情况下,基于所述第一种类信息对应的第一语义权重,或所述第二种类信息对应的第二语义权重确定所述任一坐标信息的目标相似度得分。If the first category information is the same as the second category information, determine the any A target similarity score for coordinate information.
  5. 根据权利要求4所述的语义地图的保存方法,其特征在于:获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息之后,所述方法还包括:The method for saving a semantic map according to claim 4, characterized in that: obtaining the first category information corresponding to the any coordinate information in the second semantic map, and the any coordinate information in the second semantic map After the corresponding second category information in a semantic map, the method also includes:
    在所述第一种类信息和所述第二种类信息不相同的情况下,确定所述任一坐标信息的目标相似度得分小于第二预设阈值。If the first category information is different from the second category information, it is determined that the target similarity score of any coordinate information is smaller than a second preset threshold.
  6. 根据权利要求1所述的语义地图的保存方法,其特征在于:所述方法还包括:The preservation method of the semantic map according to claim 1, wherein the method further comprises:
    在所述相似度得分小于第一预设阈值的情况下,在所述移动机器人中保存所述第二语义地图,且禁止在所述移动机器人中保存所述第一语义地图。If the similarity score is less than a first preset threshold, the second semantic map is saved in the mobile robot, and the first semantic map is prohibited from being saved in the mobile robot.
  7. 根据权利要求1所述的语义地图的保存方法,其特征在于:所述方法还包括:The preservation method of the semantic map according to claim 1, wherein the method further comprises:
    在不存在所述第二语义地图的情况下,保存所述第一语义地图。If the second semantic map does not exist, save the first semantic map.
  8. 一种语义地图的保存装置,其特征在于:所述装置包括:A storage device for a semantic map, characterized in that the device includes:
    获取模块,用于获取移动机器人在执行完当前目标事件所构建的第一语义地图;An acquisition module, configured to acquire the first semantic map constructed by the mobile robot after executing the current target event;
    计算模块,用于在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;A calculation module, configured to calculate a similarity score between the second semantic map and the first semantic map if there is a second semantic map, wherein the second semantic map is a history saved by the mobile robot semantic map;
    保存模块,用于在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。A saving module, configured to update the second semantic map saved in the mobile robot to the first semantic map when the similarity score is greater than a first preset threshold.
  9. 一种计算机可读的存储介质,其特征在于,所述计算机可读的存储介质包括存储的程序,其中,所述程序运行时执行上述权利要求1至7任一项中所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when running.
  10. 一种电子装置,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至7任一项中所述的方法。An electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the computer program described in any one of claims 1 to 7 through the computer program. Methods.
PCT/CN2022/094640 2021-07-27 2022-05-24 Method and apparatus for saving semantic map, storage medium, and electronic device WO2023005379A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110853400.7A CN113656418B (en) 2021-07-27 2021-07-27 Semantic map storage method and device, storage medium and electronic device
CN202110853400.7 2021-07-27

Publications (1)

Publication Number Publication Date
WO2023005379A1 true WO2023005379A1 (en) 2023-02-02

Family

ID=78490719

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/094640 WO2023005379A1 (en) 2021-07-27 2022-05-24 Method and apparatus for saving semantic map, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN113656418B (en)
WO (1) WO2023005379A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656418B (en) * 2021-07-27 2023-08-22 追觅创新科技(苏州)有限公司 Semantic map storage method and device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10318907B1 (en) * 2015-05-22 2019-06-11 Walgreen Co. Autonomous vehicle for mapping store layout
CN112632211A (en) * 2020-12-30 2021-04-09 上海思岚科技有限公司 Semantic information processing method and equipment for mobile robot
CN112784873A (en) * 2020-12-25 2021-05-11 华为技术有限公司 Semantic map construction method and equipment
CN113656418A (en) * 2021-07-27 2021-11-16 追觅创新科技(苏州)有限公司 Semantic map storage method and device, storage medium and electronic device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106767812B (en) * 2016-11-25 2017-12-08 郭得科 A kind of indoor semantic map updating method and system based on Semantic features extraction
KR102314539B1 (en) * 2017-06-09 2021-10-18 엘지전자 주식회사 Controlling method for Artificial intelligence Moving robot
CN109507995B (en) * 2017-09-14 2022-01-04 深圳乐动机器人有限公司 Management system of robot map and robot
CN109974722B (en) * 2019-04-12 2020-09-15 珠海市一微半导体有限公司 Map updating control method and map updating control system of visual robot
CN111815687A (en) * 2020-06-19 2020-10-23 浙江大华技术股份有限公司 Point cloud matching method, positioning method, device and storage medium
CN112734845B (en) * 2021-01-08 2022-07-08 浙江大学 Outdoor monocular synchronous mapping and positioning method fusing scene semantics
CN113124902B (en) * 2021-04-19 2024-05-14 追创科技(苏州)有限公司 Positioning correction method and device for mobile robot, storage medium and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10318907B1 (en) * 2015-05-22 2019-06-11 Walgreen Co. Autonomous vehicle for mapping store layout
CN112784873A (en) * 2020-12-25 2021-05-11 华为技术有限公司 Semantic map construction method and equipment
CN112632211A (en) * 2020-12-30 2021-04-09 上海思岚科技有限公司 Semantic information processing method and equipment for mobile robot
CN113656418A (en) * 2021-07-27 2021-11-16 追觅创新科技(苏州)有限公司 Semantic map storage method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN113656418B (en) 2023-08-22
CN113656418A (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US9298183B2 (en) Robot and method for autonomous inspection or processing of floor areas
US11896175B2 (en) Method and apparatus for updating working map of mobile robot, and storage medium
WO2023045644A1 (en) Positioning method and device for mobile robot, storage medium and electronic device
WO2023005379A1 (en) Method and apparatus for saving semantic map, storage medium, and electronic device
WO2022222345A1 (en) Positioning correction method and apparatus for mobile robot, storage medium, and electronic apparatus
WO2023005377A1 (en) Map building method for robot, and robot
CN111603100B (en) Storage and reuse method and storage and reuse device for sweeping drawing of sweeper
WO2023231545A1 (en) Grid map updating apparatus and method, and computer device and storage medium
WO2023151548A1 (en) Navigation method and apparatus, and program and computer-readable storage medium
WO2023160698A1 (en) Dynamic full-coverage path planning method and apparatus, cleaning device, and storage medium
WO2023078112A1 (en) Method and apparatus for determining state of robot, and storage medium and electronic apparatus
CN108834076B (en) Target equipment searching method, device and equipment
US20220318529A1 (en) Error correction using combination rfid signals
CN114983279A (en) Control method and device of sweeping robot, sweeping robot and storage medium
CN113359705A (en) Path planning method, formation cooperative operation method and equipment
WO2023179207A1 (en) Map processing method and apparatus, cleaning device, storage medium, and electronic apparatus
WO2023103713A1 (en) Method and system for searching for charging base, self-moving robot, and storage medium
WO2023207610A1 (en) Mapping method and apparatus, and storage medium and electronic apparatus
WO2023207407A1 (en) Floor material recognition method and apparatus, storage medium, and electronic apparatus
WO2023071922A1 (en) Map optimization method and apparatus, and electronic device and storage medium
WO2019109228A1 (en) Visual relocation-based method and apparatus for sweeper to continue sweeping after power-off, and sweeper
WO2024055412A1 (en) Map construction method and apparatus, and self-moving device
CN116184991A (en) Drawing construction method and device for robot
WO2023109347A1 (en) Relocalization method for self-moving device, device, and storage medium
CN116892937A (en) Map detection method and device based on robot, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22847991

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE