Map updating method, computer device and storage medium

By only transmitting the grid point information with changed grayscale values ​​during the map update process, the problem of large data volume and slow speed in map updates is solved, and more efficient real-time updates are achieved.

CN115176127BActive Publication Date: 2025-09-16ECOFLOW INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202280002328.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2025-09-16
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

In the prior art, the map update process involves a large amount of data and a slow transmission speed, resulting in poor real-time performance of the map update.

Method used

By obtaining the attribute information of the map and the grid information of the grid points with changed grayscale values, only the changed grid information is sent to the target device for updating, reducing the amount and time of data transmission.

Benefits of technology

It improves the real-time performance of map updates, reduces data transmission volume and time, and ensures the synchronization and accuracy of map updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115176127B_ABST
    Figure CN115176127B_ABST
Patent Text Reader

Abstract

A map updating method includes: obtaining attribute information of a first map at a current moment and attribute information of a previous moment; when the attribute information of the first map at a current moment has not changed relative to the attribute information of a previous moment, obtaining the grayscale value of each grid point in the first map at a current moment and the grayscale value of the previous moment; determining the grid point whose grayscale value at a current moment is different from the grayscale value at a previous moment as a target grid point; and sending the grid information of the target grid point to a target device, wherein the grid information is used to instruct the target device to update a second map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a map updating method, computer equipment, and storage medium. Background Art

[0002] The statements herein merely provide background information related to the present application and do not necessarily constitute exemplary techniques.

[0003] When building a map using a robot, the map construction process generally needs to be displayed and updated on the target device, so the map needs to be transferred to the target device. The common transfer method is to transfer the entire map data to the target device. This transfer method transfers a large amount of data, takes more time to transfer data, and has a slow data transmission speed, which reduces the real-time performance of map updates.

[0004] Therefore, how to improve the real-time performance of map updates has become an urgent problem to be solved. Summary of the Invention

[0005] Various embodiments of the present application provide a map updating method, a computer device, and a storage medium.

[0006] In a first aspect, the present application provides a map updating method, the method comprising:

[0007] Obtaining attribute information of a first map at a current moment and attribute information at a previous moment; the attribute information of the first map is used to construct a second map; when the attribute information of the first map at a current moment has not changed relative to the attribute information at a previous moment, obtaining the grayscale value of each grid point in the first map at a current moment and the grayscale value at a previous moment;

[0008] The grid point whose grayscale value at the current moment is different from the grayscale value at the previous moment is determined as the target grid point;

[0009] The grid information of the target grid point is sent to the target device, where the grid information is used to instruct the target device to update the second map.

[0010] In a second aspect, the present application further provides a map updating device, the device comprising:

[0011] an attribute information acquisition module configured to acquire attribute information of the first map at a current moment and attribute information of a previous moment; the attribute information of the first map is used to construct the second map;

[0012] a grayscale value acquisition module configured to acquire the grayscale value of each grid point in the first map at the current moment and the grayscale value at the previous moment when the attribute information of the first map at the current moment has not changed relative to the attribute information at the previous moment;

[0013] A grid point determination module is configured to determine a grid point whose grayscale value at a current moment is different from that at a previous moment as a target grid point;

[0014] The map updating module is configured to send the grid information of the target grid point to the target device, wherein the grid information is used to instruct the target device to update the second map.

[0015] In a third aspect, the present application further provides a computer device, comprising a memory and a processor;

[0016] The memory is configured to store a computer program;

[0017] The processor is configured to execute the computer program and implement the map updating method described above when executing the computer program.

[0018] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the map updating method as described above.

[0019] The details of one or more embodiments of the present application are set forth in the following drawings and description. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0021] Figure 1 This is a schematic flowchart of a map updating method provided in an embodiment of the present application.

[0022] Figure 2 This is a schematic diagram of a first map at different times provided in an embodiment of the present application.

[0023] Figure 3 This is a schematic flowchart of the sub-steps of sending grid information provided in an embodiment of the present application.

[0024] Figure 4This is a schematic diagram of a second map before updating provided in an embodiment of the present application.

[0025] Figure 5 This is a schematic diagram of an updated second map provided in an embodiment of the present application.

[0026] Figure 6 This is a schematic block diagram of a map updating device provided in an embodiment of the present application.

[0027] Figure 7 This is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0029] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0030] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0031] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0032] Embodiments of the present application provide a map updating method, computer device, and storage medium. The map updating method can be applied to a mobile device and updates a second map based on the grid information of grid points with grayscale value changes in a first map, eliminating the need to transmit the grid information of all grid points in the entire first map. This reduces the amount of data and transmission time, and improves the real-time nature of map updates.

[0033] Among them, self-moving equipment may include but is not limited to movable equipment such as sweepers, lawn mowers, food delivery robots, and welcoming robots.

[0034] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0035] like Figure 1 As shown, the map updating method includes steps S10 to S40.

[0036] Step S10: Acquire attribute information of the first map at the current moment and attribute information of the previous moment, wherein the attribute information of the first map is used to construct the second map.

[0037] It should be noted that the map update method provided in the embodiments of the present application can be applied to scenarios where a mobile device updates a constructed map to a target device. The mobile device can construct a first map based on its environment and location, and the target device can construct a second map based on the attribute information of the first map. The first map and the second map can be raster maps, and each grid point in the raster map has a corresponding grayscale value. Then, when the first map is updated, the mobile device can send the grid information of the grid points with changed grayscale values ​​to the target device, so that the target device can update the second map based on the raster information. This eliminates the need to transmit the raster information of all grid points in the entire first map, reducing the amount of data and time transmitted and improving the real-time performance of map updates.

[0038] Traditionally, when using a raster map to build a map, the raster map needs to be discretized and the discretized data stored in a matrix, where the elements in the matrix correspond to the grid points in the raster map, and the values ​​of the elements are the grayscale values ​​of the corresponding grid points. When updating the raster map to a target device, the entire matrix needs to be sent to the target device, resulting in a large amount of data to be transmitted and a long transmission time, thereby reducing the real-time performance of the map update. In the embodiment of the present application, only the raster information of the grid points with changed grayscale values ​​needs to be sent to the target device, that is, some elements in the matrix corresponding to the raster map are sent to the target device, thereby reducing the amount of data and time to be transmitted, and improving the real-time performance of the map update.

[0039] For example, the target device can be a server or a terminal. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal can be an electronic device such as a smartphone, tablet computer, laptop computer, desktop computer, and wearable device.

[0040] It should be noted that in the embodiments of the present application, before constructing the first map on the mobile device, it is necessary to first set the attribute information of the first map, and then create the initial first map based on the attribute information. The attribute information may include information such as the length, width, and resolution of the first map. The attribute information may be stored on a local disk or in a local database, or may be stored in an attribute information sending area for sending the attribute information to the target device.

[0041] In some embodiments, after setting the attribute information of the first map, the process may further include: sending the attribute information to an attribute information sending area, packaging the attribute information in the attribute information sending area, and sending the resulting packaged data to a target device, so that the target device can construct a second map based on the packaged data. This allows the target device to subsequently update the constructed second map.

[0042] For example, when the attribute information in the encapsulated data is: length 5cm, width 5cm, and resolution 0.1, the target device can construct a 5cm×5cm blank second map based on the attribute information, and then divide the second map into 50×50 points based on the resolution; wherein each point in the second map is equivalent to a grid point.

[0043] In some embodiments, the attribute information of the first map at the current moment and the attribute information at the previous moment are obtained. For example, before updating the second map, the attribute information of the first map at the current moment T2 and the attribute information at the previous moment T1 can be obtained; then, it is determined whether the attribute information at the two moments T1 and T2 has changed.

[0044] It should be noted that to ensure that the attribute information of the first map is consistent with the attribute information of the second map on the target device, it is necessary to determine whether the attribute information of the first map has changed before updating the second map. If the attribute information of the first map has changed, the attribute information of the second map must be updated to ensure that subsequent updates to the second map are within the set range and to avoid grid point scattering outside the boundaries.

[0045] It is understood that during the construction of the first map, the attribute information of the first map may be adjusted based on actual circumstances. For example, the length or width of the first map may be adjusted. Another example is adjusting the resolution of the first map, etc. Therefore, the attribute information of the first map may change.

[0046] By obtaining the attribute information of the first map at the current moment and the attribute information of the previous moment, it is possible to detect whether the attribute information of the first map has changed, and then update the attribute information of the second map when the attribute information of the first map changes, ensuring that the second map is subsequently updated within the set range to avoid the problem of scattered grid points crossing the boundary.

[0047] Step S20: When the attribute information of the first map at the current moment has not changed relative to the attribute information at the previous moment, obtain the grayscale value of each grid point in the first map at the current moment and the grayscale value at the previous moment.

[0048] In an embodiment of the present application, after obtaining the attribute information of the first map at the current moment and the attribute information at the previous moment, it is necessary to determine whether the attribute information of the first map at the current moment has changed relative to the attribute information at the previous moment.

[0049] In some embodiments, when the attribute information of the first map at the current moment has not changed relative to the attribute information at the previous moment, the grayscale value of each grid point in the first map at the current moment and the grayscale value at the previous moment are obtained.

[0050] It is understandable that when the current attribute information of the first map has not changed compared to the attribute information of the previous moment, there is no need to update the attribute information of the second map. Instead, the grid points whose grayscale values ​​have changed in the first map are directly detected.

[0051] In other embodiments, the map update method provided by the embodiments of the present application may also include: when the attribute information at the current moment is different from the attribute information at the previous moment, saving the attribute information at the current moment in the attribute information sending area; obtaining a first coding value, and encapsulating the first coding value and the attribute information saved in the attribute information sending area, and sending the obtained encapsulated data to the target device.

[0052] In the embodiment of the present application, the code value is a unique identification code that can be used for verification and can be randomly generated. The code value obtained each time can be the same or different. In one embodiment, the code value obtained each time can be increased or decreased according to a preset rule.

[0053] Therefore, the first code value, as a code value, can be set based on the number of times the attribute information is packaged. For example, the first code value can be automatically incremented or decremented by 1 each time based on the current number of packages. Of course, other methods can also be used to set the first code value, and the specific code value is not limited here. The first code value is used to determine whether the attribute information has been successfully sent to the target device and whether the attribute information sent to the target device is consistent with the attribute information in the attribute information sending area.

[0054] For example, the first code value and the updated attribute information in the attribute information sending area may be encapsulated to obtain encapsulated data. In addition, a check code of the first code value and the updated attribute information may be calculated, and then the first code value, the check code, and the updated attribute information may be encapsulated to obtain encapsulated data.

[0055] It should be noted that the check code is used by the target device to verify the accuracy and integrity of the received attribute information. The check code can be obtained by combining the first coded value with the updated attribute information, or by encrypting the first coded value and the updated attribute information, and using the resulting encrypted information as the check code.

[0056] By saving the attribute information in the attribute information sending area when determining that the attribute information at the current moment is different from the attribute information at the previous moment, and encapsulating the first coding value and the attribute information saved in the attribute information sending area, and sending the obtained encapsulated data to the target device, it is possible to update the attribute information of the second map when the attribute information of the first map changes, ensure that the second map is subsequently updated within the set range, and avoid the problem of scattered grid points crossing the boundary.

[0057] In some embodiments, after the obtained encapsulated data is sent to the target device, the method may further include: clearing the attribute information in the attribute information sending area.

[0058] It should be noted that in the embodiment of the present application, if the attribute information sending area stores attribute information, the attribute information in the attribute information sending area will be encapsulated to obtain encapsulated data. After the encapsulated data is sent to the target device, in order to avoid frequent encapsulation of attribute information, the attribute information in the attribute information sending area needs to be cleared.

[0059] In some embodiments, after the obtained encapsulated data is sent to the target device, it can also include: if the attribute information is sent successfully, clearing the attribute information in the attribute information sending area; if the attribute information fails to be sent, re-encapsulating the attribute information in the attribute information sending area and sending the obtained encapsulated data to the target device.

[0060] For example, when the code value in the first response message received from the target device within the first preset time is the same as the first code value in the encapsulated data, it is determined that the attribute information has been sent successfully. The first preset time can be set according to actual conditions, and the specific value is not limited here.

[0061] Exemplarily, when the first response message from the target device is not received within the first preset time, after updating the first coding value, the process returns to the step of encapsulating the first coding value and the attribute information stored in the attribute information sending area until the first response message from the target device is received.

[0062] Exemplarily, when the coding value in the first response message received from the target device is different from the first coding value, after updating the first coding value, the step of encapsulating the first coding value and the attribute information stored in the attribute information sending area is returned until the coding value in the first response message received from the target device is the same as the first coding value.

[0063] That is, if the first response message from the target device is not received within the first preset time or the code value in the first response message received from the target device is different from the first code value, it is determined that the attribute information transmission has failed. In this case, the attribute information in the attribute information transmission area may have been updated.

[0064] The first preset time can be set according to actual conditions, and the specific value is not limited here.

[0065] Exemplarily, when it is determined that the attribute information has failed to be sent, a new first code value is obtained by generating a code value using any of the above-mentioned random generation, preset regular incrementing, or decrementing methods, and the new first code value is used as the updated first code value. The updated first code value is encapsulated with the attribute information stored in the attribute information sending area. For example, if the previous first code value was 0, the current updated first code value can be obtained by incrementing by 1 to obtain a 1. After updating the first code value, the updated first code value is encapsulated with the attribute information in the attribute information sending area to obtain updated encapsulated data, and the updated encapsulated data is resent to the target device. It should be noted that due to time changes, the attribute information stored in the attribute information sending area may or may not change. Regardless of whether it changes, this embodiment encapsulates the attribute information currently stored in the attribute information sending area and the updated first code value at the current moment. By clearing the attribute information in the attribute information sending area when it is determined that the attribute information has been successfully sent, frequent encapsulation of attribute information can be avoided, saving resources. By repackaging the attribute information in the attribute information sending area when it is determined that the attribute information has failed to be sent, and sending the obtained packaged data to the target device, the probability of successfully updating the attribute information of the second map can be effectively increased.

[0066] In some embodiments, after sending the obtained encapsulated data to the target device, it can also include: traversing each grid point of the first map to determine the grid information corresponding to each grid point; sending the grid information corresponding to each grid point to the target device, so that the target device can fill the grid points of the second map according to the grid information corresponding to each grid point.

[0067] It is understood that after the target device receives the encapsulated data, the second map constructed based on the attribute information in the encapsulated data is a blank map. When updating the second map based on the grid information of the grid points with changed grayscale values ​​in the first map, if the first map was not a blank map at the previous moment, the updated second map may be out of sync with the first map. To avoid this, after sending the obtained encapsulated data to the target device, the grid information corresponding to each grid point in the first map needs to be sent to the target device to synchronize the second map with the first map.

[0068] For example, the grid information may include an index value and a grayscale value corresponding to each grid point, as well as a correlation between the index value and the grayscale value. The index value is used to identify the grid point in the first map. For example, each grid point in the first map may be numbered, and the number may be used as the index value. Of course, other methods may also be used to set the index value of the grid point, which is not limited here.

[0069] By sending the grid information corresponding to each grid point to the target device, so that the target device fills the grid points of the second map according to the grid information corresponding to each grid point, it can be ensured that the second map and the first map are synchronized before the second map is updated according to the attribute information of the target grid point.

[0070] Step S30: Determine the grid point whose grayscale value at the current moment is different from the grayscale value at the previous moment as the target grid point.

[0071] See also Figure 2 , Figure 2 Schematic diagram of a first map at different times provided by an embodiment of the present application. Figure 2 As shown, when creating a map in the first map, the grayscale value corresponding to each grid point in the first map can be recorded in real time or at intervals. For example, the grayscale value corresponding to each grid point in the first map is recorded at time T1, time T2, and time T3 respectively.

[0072] For example, if the current time is T2 and the previous time is T1, the grayscale value of the grid point in the first map at the current time T2 can be compared with the grayscale value at the previous time T1. For example, if the grayscale value of grid point A in the first map at the current time T2 is different from the grayscale value at the previous time T1, grid point A can be determined as the target grid point. If the grayscale value of grid point B in the first map at the current time T2 is different from the grayscale value at the previous time T1, grid point B can also be determined as the target grid point.

[0073] By determining the grid point with different grayscale values ​​at the current moment and the previous moment as the target grid point, the grid information of the target grid point can be sent to the target device subsequently without sending the grid information of all grid points in the first map to the target device.

[0074] Step S40: Send the grid information of the target grid point to the target device, where the grid information is used to instruct the target device to update the second map.

[0075] In the embodiment of the present application, after the target grid point in the first map is determined, the grid information of the target grid point needs to be sent to the target device so that the target device can update the second map according to the grid information.

[0076] By sending the grid information of the target grid points to the target device, the second map can be updated according to the grid information of the grid points with changed grayscale values ​​in the first map, without the need to transmit the grid information of all the grid points in the entire first map, thereby reducing the amount of data and time transmitted and improving the real-time performance of map updates.

[0077] See also Figure 3 , Figure 3 This is a schematic flowchart of the sub-steps of sending grid information provided in an embodiment of the present application, which may specifically include the following steps S401 to S403.

[0078] Step S401: Obtain the grid information of each target grid point in the first map, send the grid information of each target grid point to the waiting sending area, until the traversal of the target grid points in the first map is completed, and send all the grid information in the waiting sending area to the ready sending area.

[0079] Exemplarily, the target grid points in the first map may be traversed, grid information of each target grid point may be acquired in sequence, and the grid information of each target grid point may be sent to the waiting area.

[0080] It should be noted that in an embodiment of the present application, when traversing the target grid points in the first map, the grid information of each target grid point is cached in the waiting sending area respectively; after the traversal of the target grid points in the first map is completed, all the grid information in the waiting sending area is migrated to the ready sending area to encapsulate all the grid information.

[0081] In some embodiments, obtaining grid information of each target grid point in the first map may include: obtaining an index value of each target grid point; associating the index value of each target grid point with the grayscale value of each target grid point at the current moment to obtain grid information of each target grid point.

[0082] For example, for target grid point A, the index value of target grid point A can be obtained, and the index value of target grid point A can be associated with the grayscale value of target grid point A at the current time to obtain the grid information of target grid point A. For example, if the current time is T2, the index value of target grid point A can be associated with the grayscale value of target grid point A at the current time T2.

[0083] It should be noted that by obtaining the index value of each target grid point and associating the index value of each target grid point with the grayscale value of each target grid point at the current moment, it is possible to facilitate the positioning of the grid points that need to be updated when the target device updates the second map according to the target grid information, thereby improving the update efficiency and avoiding update errors.

[0084] Step S402: Obtain a second code value, and encapsulate the second code value and the grid information of each target grid point in the ready-to-send area to obtain target grid information.

[0085] It should be noted that the second coding value can be set according to the number of times the grid information is encapsulated, and can certainly be set in other ways, and the specific value is not limited here.

[0086] In some implementations, the second code value and the grid information of each target grid point in the ready-to-send area may be encapsulated to obtain the target grid information.

[0087] In other embodiments, the second code value and the grid information of each target grid point in the ready-to-send area may be calculated, and then the second code value, the check code and the grid information of each target grid point are packaged to obtain the target grid information.

[0088] It should be noted that the verification code is used by the target device to verify the accuracy and completeness of the received target grid information. The specific verification process is not limited here. The second coded value can be combined with the grid information of each target grid point in the ready-to-send area, and the resulting byte can be used as the verification code. Alternatively, the second coded value and the grid information of each target grid point in the ready-to-send area can be encrypted, and the resulting encrypted information can be used as the verification code.

[0089] By obtaining the second coding value and encapsulating the second coding value and the grid information of each target grid point in the ready sending area, it is possible to judge whether the target grid information is successfully sent and whether the sent target grid information is the latest based on the coding value and the second coding value fed back by the target device after sending the target grid information.

[0090] Step S403: Send the encapsulated target grid information to the target device.

[0091] For example, after encapsulating the second code value with the grid information of each target grid point in the ready-to-send area, the encapsulated target grid information can be sent to the target device, so that the target device updates the second map based on the target grid information. The specific sending method is not limited herein.

[0092] For example, after successfully receiving the target grid information sent from the mobile device, the target device can update the second map according to the target grid information. Figure 4 and Figure 5 , Figure 4 is a schematic diagram of a second map before updating provided in an embodiment of the present application. Figure 5 This is a schematic diagram of an updated second map provided in an embodiment of the present application.

[0093] For example, the target device can obtain the grid information in the target grid information and fill the grid points of the second map according to the grid information. For example, the grid points to be filled are searched according to the index value in the grid information, and then the grayscale value associated with the index value is used to fill the grid points to obtain the updated second map, such as Figure 5 As shown in Figure 2, different grayscale values ​​represent different colors.

[0094] In the embodiment of the present application, the mapping process of the mobile device can also be controlled by the target device. Figure 4 and Figure 5 As shown, multiple buttons and options can be set on the interface for displaying the second map on the target device, among which the "Get Map Data" button is used to obtain map data from the mobile device; the "Start Mapping" button is used to trigger the mobile device to start building a map; the "Stop Mapping" button is used to trigger the mobile device to stop building a map; the "Clear Data" button is used to trigger the mobile device to clear map data; the "Start Task" button is used to trigger the mobile device to perform an operation task, such as a mowing task, based on the built map; the "Set Mobile Device Parameters" option is used to set the working parameters of the mobile device, etc.; the "Mobile Device Control" option is used to control the mobile device, such as controlling the walking trajectory of the mobile device.

[0095] In an embodiment of the present application, the encapsulated target grid information is sent from the mobile device to the target device. If the target device receives the target grid information, the target device generates a second response message based on the second code value in the target grid information and returns the second response message to the mobile device. In the process of sending the target grid information, data may be lost, resulting in the target device being unable to receive the target grid information, that is, the target grid information fails to be sent; it is also possible that the target grid information in the ready sending area is updated during the sending process, resulting in the target device not updating the second map based on the latest target grid information. This situation can also be regarded as a failure to send the target grid information. Therefore, after sending the encapsulated target grid information to the target device, it is necessary to determine whether the target grid information was sent successfully. When the target grid information fails to be sent, it needs to be resent, thereby increasing the probability of successful sending of the target grid information and thereby improving the accuracy of the second map update.

[0096] In some embodiments, after sending the encapsulated target grid information to the target device, it may also include: when no second response message from the target device is received within a second preset time, returning to the step of sending the encapsulated target grid information to the target device, until the number of sending times reaches the preset number of sending times and no second response message is received, stopping the sending operation and determining that the target grid information has failed to be sent.

[0097] The second preset time can be set according to actual conditions, and the specific value is not limited here. The preset number of sending times can be set according to actual conditions, and the specific value is not limited here.

[0098] In other embodiments, after sending the encapsulated target grid information to the target device, it may also include: when the code value in the received second response message of the target device is different from the second code value in the target grid information encapsulated in the ready sending area, returning to execute the step of sending the encapsulated target grid information to the target device; when the number of receptions reaches a preset number of receptions and the code value in the second response message of the target device is still different from the second code value in the target grid information, stopping the sending operation and determining that the target grid information sending has failed.

[0099] It should be noted that when the coding value in the second response message received from the target device is different from the second coding value in the target grid information in the ready sending area, it means that the current target grid information in the ready sending area has been updated, and therefore the target grid information in the ready sending area needs to be resent to the target device.

[0100] By determining whether the target grid information is sent successfully after the encapsulated target grid information is sent to the target device, the target grid information can be resent when the target grid information fails to be sent, thereby increasing the probability of successful sending of the target grid information and further improving the accuracy of the second map update.

[0101] In other embodiments, after sending the encapsulated target grid information to the target device, the method may further include: when the code value in the received second response message from the target device is the same as the second code value in the target grid information, determining that the target grid information is sent successfully.

[0102] In some embodiments, after sending the encapsulated target grid information to the target device, it may also include: when it is determined that the target grid information fails to be sent, comparing the grid information in the waiting to send area with the grid information in the ready to send area to determine the updated grid information in the waiting to send area; updating the updated grid information to the ready to send area; obtaining a third coding value, encapsulating the third coding value and the grid information in the ready to send area, and sending the encapsulated target grid information to the target device.

[0103] For example, when it is determined that the target grid information has failed to be sent, the grid information in the waiting-to-send area can be compared with the grid information in the ready-to-send area, and the grid information in the waiting-to-send area that is different from the grid information in the ready-to-send area can be determined as the updated grid information in the waiting-to-send area. For example, the grayscale value in the waiting-to-send area can be compared with the grayscale value in the ready-to-send area.

[0104] Exemplarily, the grid information in the ready-to-send area is updated based on the updated grid information. Then, the third coded value is packaged with the updated grid information in the ready-to-send area, and the packaged target grid information is sent to the target device. The specific packaging and sending processes are described in detail in the above embodiment and are not detailed here.

[0105] It should be noted that the third coding value can be set according to the number of times the grid information is encapsulated, and of course it can also be set in other ways, and the specific value is not limited here.

[0106] By updating the ready sending area according to the updated grid information in the waiting sending area when it is determined that the target grid information has failed to be sent, encapsulating the third coding value and the grid information in the ready sending area, and sending the encapsulated target grid information to the target device, the latest grid information can be updated to the second map.

[0107] The map updating method provided in the above embodiment can detect whether the attribute information of the first map has changed by acquiring the attribute information of the first map at the current moment and the attribute information of the previous moment, and then update the attribute information of the second map when the attribute information of the first map changes, ensuring that the second map is subsequently updated within the set range, avoiding the problem of grid points being scattered and out of bounds; by sending the grid information corresponding to each grid point to the target device, so that the target device fills the grid points of the second map according to the grid information corresponding to each grid point, it can be ensured that the second map and the first map are synchronized before the second map is updated according to the attribute information of the target grid point; by sending the grid information of the target grid point to the target device, it can be achieved according to the grayscale value changes in the first map. The second map is updated based on the grid information of the grid points of the first map, without transmitting the grid information of all the grid points of the entire first map, thereby reducing the amount of data and time of transmission and improving the real-time performance of map updates; by obtaining the index value of each target grid point and associating the index value of each target grid point with the grayscale value of each target grid point at the current moment, it is possible to facilitate positioning of the grid points that need to be updated when the target device updates the second map based on the target grid information, thereby improving update efficiency and avoiding update errors; by judging whether the target grid information is successfully sent after sending the encapsulated target grid information to the target device, it is possible to resend the target grid information when the target grid information fails to be sent, thereby improving the probability of successful sending of the target grid information and thus improving the accuracy of the second map update.

[0108] See also Figure 6 , Figure 6 1 is a schematic block diagram of a map updating device 1000 provided in an embodiment of the present application, wherein the map updating device is configured to execute the aforementioned map updating method.

[0109] like Figure 6 As shown, the map updating device 1000 includes: an attribute information acquisition module 1001 , a grayscale value acquisition module 1002 , a grid point determination module 1003 and a map updating module 1004 .

[0110] The attribute information acquisition module 1001 is configured to acquire the attribute information of the first map at the current moment and the attribute information of the previous moment; the attribute information of the first map is used to construct the second map.

[0111] The grayscale value acquisition module 1002 is configured to acquire the grayscale value of each grid point in the first map at the current moment and the grayscale value at the previous moment when the attribute information of the first map at the current moment has not changed relative to the attribute information at the previous moment.

[0112] The grid point determination module 1003 is configured to determine a grid point having a different grayscale value at a current moment and a different grayscale value at a previous moment as a target grid point.

[0113] The map updating module 1004 is configured to send the grid information of the target grid point to the target device, where the grid information is used to instruct the target device to update the second map.

[0114] For the process of implementing the map updating method in each of the above modules, please refer to the description of the map updating method in the above embodiment, which will not be repeated here.

[0115] See also Figure 7 , Figure 7 This is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.

[0116] See also Figure 7 The computer device includes a processor and a memory connected via a system bus, wherein the memory may include a storage medium and an internal memory. The storage medium may be a non-volatile storage medium or a volatile storage medium.

[0117] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0118] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any map updating method.

[0119] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0120] In one embodiment, the processor is configured to execute a computer program stored in the memory to implement the following steps:

[0121] Obtain attribute information of a first map at a current moment and attribute information of a previous moment; when the attribute information of the first map at a current moment has not changed relative to the attribute information of a previous moment, obtain the grayscale value of each grid point in the first map at a current moment and the grayscale value of the previous moment; determine the grid point having a different grayscale value at a current moment and a grayscale value at a previous moment as a target grid point; send the grid information of the target grid point to a target device, the grid information being used to instruct the target device to update a second map, where the second map is a map constructed based on the attribute information of the first map.

[0122] In one embodiment, the processor is further configured to implement:

[0123] When the attribute information at the current moment is different from the attribute information at the previous moment, the attribute information at the current moment is saved in the attribute information sending area; a first coding value is obtained, and the first coding value and the updated attribute information in the attribute information sending area are encapsulated, and the obtained encapsulated data is sent to the target device.

[0124] In one embodiment, after sending the obtained encapsulated data to the target device, the processor is configured to:

[0125] When no first response message from the target device is received within a first preset time, after updating the first code value, returning to the step of encapsulating the first code value with the attribute information stored in the attribute information sending area until a first response message from the target device is received;

[0126] When the coding value in the first response message received from the target device is different from the first coding value, after updating the first coding value, return to the step of encapsulating the first coding value and the attribute information stored in the attribute information sending area until the coding value in the first response message received from the target device is the same as the first coding value.

[0127] In one embodiment, after sending the obtained encapsulated data to the target device, the processor is configured to:

[0128] The attribute information in the attribute information sending area is cleared.

[0129] In one embodiment, after sending the obtained encapsulated data to the target device, the processor is configured to:

[0130] Traversing each grid point of the first map to determine grid information corresponding to each grid point; sending the grid information corresponding to each grid point to the target device, so that the target device fills the grid points of the second map according to the grid information corresponding to each grid point.

[0131] In one embodiment, when implementing sending the grid information of the target grid point to the target device, the processor is configured to implement:

[0132] Obtaining grid information of each target grid point in the first map, sending the grid information of each target grid point to a waiting sending area, until the traversal of the target grid points in the first map is completed, and sending all the grid information in the waiting sending area to the ready sending area; obtaining a second coding value, encapsulating the second coding value and the grid information of each target grid point in the ready sending area to obtain target grid information; and sending the encapsulated target grid information to the target device.

[0133] In one embodiment, when obtaining the grid information of each target grid point in the first map, the processor is configured to implement:

[0134] The index value of each target grid point is obtained; the index value of each target grid point is associated with the grayscale value of each target grid point at the current moment to obtain grid information of each target grid point.

[0135] In one embodiment, after sending the encapsulated target grid information to the target device, the processor is further configured to:

[0136] When the second response message of the target device is not received within the second preset time, the step of sending the encapsulated target grid information to the target device is returned to, and when the second response message is still not received after the number of sending times reaches the preset number of sending times, the sending operation is stopped, and it is determined that the sending of the target grid information has failed; when the code value in the received second response message of the target device is different from the second code value in the target grid information encapsulated in the ready sending area, the step of sending the encapsulated target grid information to the target device is returned to, and when the number of receiving times reaches the preset number of receiving times, and the code value in the second response message of the target device is still different from the second code value in the target grid information, the sending operation is stopped, and it is determined that the sending of the target grid information has failed.

[0137] In one embodiment, after sending the encapsulated target grid information to the target device, the processor is further configured to:

[0138] When it is determined that the target grid information fails to be sent, the grid information in the waiting-to-send area is compared with the grid information in the ready-to-send area to determine the updated grid information in the waiting-to-send area; the updated grid information is updated to the ready-to-send area; a third coding value is obtained, the third coding value and the grid information in the ready-to-send area are encapsulated, and the encapsulated target grid information is sent to the target device.

[0139] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program. The computer program includes program instructions. The processor executes the program instructions to implement any map updating method provided in the embodiment of the present application.

[0140] For example, when the program is loaded by the processor, the following steps may be performed:

[0141] Obtain attribute information of a first map at a current moment and attribute information of a previous moment; when the attribute information of the first map at a current moment has not changed relative to the attribute information of a previous moment, obtain the grayscale value of each grid point in the first map at a current moment and the grayscale value of the previous moment; determine the grid point having a different grayscale value at a current moment and a grayscale value at a previous moment as a target grid point; send the grid information of the target grid point to a target device, the grid information being used to instruct the target device to update a second map, where the second map is a map constructed based on the attribute information of the first map.

[0142] The computer-readable storage medium may be an internal storage unit of the computer device described in the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a SmartMedia Card (SMC), a Secure Digital Card (SD Card), a flash memory card, etc. equipped on the computer device.

[0143] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0144] The blockchain referred to in this application is a new application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.

[0145] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A map updating method, comprising: Obtaining the attribute information of the first map at the current moment and the attribute information of the previous moment; The attribute information includes the length, width and resolution of the first map, and the attribute information of the first map is used to construct the second map; When the attribute information of the first map at the current moment has not changed compared with the attribute information at the previous moment, obtaining the grayscale value of each grid point in the first map at the current moment and the grayscale value at the previous moment; The grid point whose grayscale value at the current moment is different from the grayscale value at the previous moment is determined as the target grid point; The grid information of the target grid point is sent to the target device, where the grid information is used to instruct the target device to update the second map. The grid information includes an index value and a grayscale value corresponding to the target grid point, and an association between the index value and the grayscale value.

2. The map updating method according to claim 1, wherein: The method further comprises: When the attribute information at the current moment is different from the attribute information at the previous moment, the attribute information at the current moment is saved in the attribute information sending area; A first coding value is obtained, and the first coding value and the attribute information stored in the attribute information sending area are encapsulated, and the obtained encapsulated data is sent to the target device.

3. The map updating method according to claim 2, wherein: After sending the obtained encapsulated data to the target device, the method further includes: When no first response message from the target device is received within a first preset time, after updating the first code value, returning to the step of encapsulating the first code value with the attribute information stored in the attribute information sending area until a first response message from the target device is received; When the coding value in the first response message received from the target device is different from the first coding value, after updating the first coding value, return to the step of encapsulating the first coding value and the attribute information stored in the attribute information sending area until the coding value in the first response message received from the target device is the same as the first coding value.

4. The map updating method according to claim 2 or 3, wherein: After sending the obtained encapsulated data to the target device, the method further includes: The attribute information in the attribute information sending area is cleared.

5. The map updating method according to claim 2, wherein: After sending the obtained encapsulated data to the target device, the method further includes: Traversing each grid point of the first map to determine grid information corresponding to each grid point; The grid information corresponding to each of the grid points is sent to the target device, so that the target device fills the grid points of the second map according to the grid information corresponding to each of the grid points.

6. The map updating method according to claim 1, wherein: The sending the grid information of the target grid point to the target device includes: Obtaining grid information of each target grid point in the first map, sending the grid information of each target grid point to a waiting sending area, until the traversal of the target grid points in the first map is completed, and sending all the grid information in the waiting sending area to a ready sending area; Obtaining a second code value, and encapsulating the second code value and the grid information of each target grid point in the ready-to-send area to obtain target grid information; The encapsulated target grid information is sent to the target device.

7. The map updating method according to claim 6, wherein: The obtaining grid information of each target grid point in the first map includes: Obtaining the index value of each target grid point; The index value of each target grid point is associated with the grayscale value of each target grid point at the current moment to obtain grid information of each target grid point.

8. The map updating method according to claim 6, wherein: After sending the encapsulated target grid information to the target device, the method further includes: When no second response message from the target device is received within the second preset time, the step of sending the encapsulated target grid information to the target device is returned to, and when the second response message is still not received the number of times the number of transmissions reaches the preset number of transmissions, the sending operation is stopped, and it is determined that the sending of the target grid information has failed.

9. The map updating method according to claim 6, wherein: After sending the encapsulated target grid information to the target device, the method further includes: When the code value in the received second response message of the target device is different from the second code value in the target grid information encapsulated in the ready sending area, return to the step of sending the encapsulated target grid information to the target device; when the number of receptions reaches the preset number of receptions and the code value in the second response message of the target device is still different from the second code value in the target grid information, stop the sending operation and determine that the sending of the target grid information has failed.

10. The map updating method according to claim 8 or 9, wherein: After sending the encapsulated target grid information to the target device, the method further includes: When it is determined that the target grid information fails to be sent, the grid information in the waiting-to-send area is compared with the grid information in the ready-to-send area to determine the updated grid information in the waiting-to-send area; Updating the updated grid information to the ready-to-send area; A third code value is obtained, the third code value is encapsulated with the grid information in the ready-to-send area, and the encapsulated target grid information is sent to the target device.

11. A computer device comprising a memory and a processor; The memory is configured to store a computer program; The processor is configured to execute the computer program and implement the map updating method according to any one of claims 1 to 10 when executing the computer program.

12. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor implements the map updating method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Map updating method, device and system, electronic equipment and storage medium

    CN113932790A