Virtual object display method, global map updating method and device

By downloading the global submap in virtual scene technology and combining it with video images for pose calculation, the problem of low global map update efficiency is solved, efficient and accurate global positioning and robustness are achieved, and the user experience is improved.

CN112785700BActive Publication Date: 2024-09-24HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911099310.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-11-08
Filing Date
2019-11-11
Publication Date
2024-09-24
Estimated Expiration
2039-11-11

AI Technical Summary

Technical Problem

In existing virtual scene technology, the coverage of the global map is limited, and the urban architectural landscape changes with seasons and lighting changes, resulting in inaccurate or impossible global positioning of electronic devices. How to achieve efficient global map updates is an urgent need to solve. problem.

Method used

By detecting user operations, the server is used to download the global submap and stored in the SLAM system of the electronic device, and the video images collected by the camera are combined for pose calculation, and the map update information is used to update the global map, making full use of the computing resources of multiple electronic devices. Reduce server computing load and save transmission bandwidth.

Benefits of technology

Efficient and accurate global map updates are achieved, the global positioning accuracy and robustness of electronic devices are improved, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112785700B_ABST
    Figure CN112785700B_ABST
Patent Text Reader

Abstract

The present application provides a virtual object display method, a global map update method and a device, wherein the global map update method comprises: obtaining a global sub-map associated with the position of an electronic device from a server; obtaining map update information according to a comparison result between a SLAM map in a second coordinate system and a global sub-map in a second coordinate system, or according to a comparison result between a SLAM map in a first coordinate system and a global sub-map in a second coordinate system and coordinate system transformation information; the map update information is used to indicate the difference between the SLAM map in the second coordinate system or in the first coordinate system and the global sub-map in the second coordinate system; and sending the map update information to a server, wherein the map update information is used to update the global map in the second coordinate system in the server. The implementation of the present application can realize efficient global map update and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on November 8, 2019, with application number 2019110973931 and application name “Virtual Object Display Method, Global Map Update Method and Device”, all contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of virtual scene technology, and in particular to a virtual object display method, a global map update method, and an electronic device and a server. Background Art

[0003] Virtual Reality (VR), Augmented Reality (AR) and Mixed Reality (MR) technologies are emerging multimedia virtual scene technologies in recent years. Among them, VR technology is a simulation technology that can create and experience a virtual world, and AR technology is a technology that can superimpose virtual reality and the real world and interact with each other. MR technology is a new visual environment generated by merging the real world and the virtual world, and a comprehensive technology that builds an interactive feedback information loop between the real world, the virtual world and the user.

[0004] In the above virtual scene technology, Simultaneous Localization and Mapping (SLAM) technology is usually used to locate the electronic device itself in the environment. SLAM technology can specifically enable electronic devices (such as mobile phones, VR glasses and other mobile electronic devices) to locate themselves according to position estimation and maps when they start moving from an unknown position in the environment, and at the same time build incremental maps based on their own positioning to facilitate subsequent positioning. Systems or modules using SLAM technology can also be called spatial positioning engines.

[0005] In some city-level interactive VR or AR applications, the global map is the carrier of virtual objects and the bridge for interconnection between users. After the local coordinate system of the electronic device is synchronized with the global coordinate system of the global map, the virtual objects in the global coordinate system can be displayed on the electronic device. However, the global maps created by the global map generation company often have limited coverage, and in the real environment, the urban architectural landscape often changes, the environmental landscape changes with the seasons, the environmental visibility changes with the light, and so on. These factors will cause the map content in the global map to be different from the real environment, resulting in inaccurate or even impossible global positioning of the electronic device. Therefore, how to effectively update the global map is a technical problem that technicians in this field urgently need to solve. Summary of the invention

[0006] The embodiments of the present application provide a virtual object display method, a global map update method and a device, which can achieve efficient global map update and improve user experience.

[0007] In a first aspect, an embodiment of the present application provides a virtual object display method, which is applied to a first electronic device having a display component (e.g., a display screen (e.g., a touch screen, a flexible screen, a curved screen, etc., or an optical component) and a camera, wherein the first electronic device may be a handheld terminal (e.g., a mobile phone), VR or AR glasses, a drone, an unmanned vehicle, etc. The method includes: detecting an operation of a user opening an application; in response to the operation, downloading a first global submap from a server and storing it in a simultaneous positioning and mapping (SLAM) system of the first electronic device; the first global submap is a submap in a global map associated with the position of the first electronic device; displaying a virtual object on the display component based on the posture data of the first electronic device (or displaying the position and posture of the virtual object on the display component), wherein the posture data of the first electronic device is obtained by the SLAM system performing posture calculation based on at least a video image collected by the camera and the first global submap, wherein the global map on the server is updated according to map update information sent by one or more second electronic devices, wherein the one or more second electronic devices are electronic devices other than the first electronic device, and the second electronic device may also be, for example, a handheld terminal (e.g., a mobile phone), VR or AR glasses, a drone, an unmanned vehicle, etc.

[0008] The so-called "operation of opening an application" may be opening an application by clicking, touching, sliding, shaking, or the like, or by voice control or other means, and this application does not limit this. For example, after the electronic device detects a user's touch operation, the navigation function in the application is activated, the camera is activated, and so on.

[0009] Among them, the server can be used as a platform to provide content and information support for VR or AR or MR applications of the first electronic device and the second electronic device. A global map is stored in the server. Generally speaking, the global map is a high-precision map of a large geographical range. The so-called "large geographical range" is relative to the geographical range represented by the SLAM map in the electronic device. For example, the global map can be obtained by merging the map update information of multiple SLAM maps generated by one or more second electronic devices according to certain rules. Correspondingly, the global sub-map represents a sub-map associated with the position of the first electronic device in the global map (also referred to as a sub-map associated with the position of the first electronic device). That is to say, the actual position of the first electronic device in the global map can be used as the starting point to obtain the map content in the preset area around the starting point as the global sub-map.

[0010] It should be understood that the present application is not limited to user triggering, and the first electronic device may also automatically detect whether the conditions for downloading the global sub-map (or starting downloading the global sub-map) are met. That is, in another possible implementation of the present application, the first electronic device may also start the step of downloading the global sub-map in other ways, for example, by detecting changes in ambient light or detecting changes in the environment to start the step of downloading the global sub-map.

[0011] In this embodiment, the first electronic device may be installed with a virtual scene application such as a VR, AR, or MR application, and may run the VR, AR, or MR application based on user operations (such as clicks, touches, slides, shakes, voice control, etc.). The first electronic device may collect video images in the environment through a local camera, determine the current position of the electronic device in combination with the collected video images and the downloaded global submap, and then display the position and posture of the virtual object on the display component based on the current position of the first electronic device. The virtual object may be a virtual object in a VR scene, an AR scene, or an MR scene (i.e., an object in a virtual environment).

[0012] The map update information is used to indicate the difference between the SLAM map in the second coordinate system or the first coordinate system and the global sub-map in the second coordinate system. The first coordinate system is the coordinate system of the SLAM map of the SLAM system, and the second coordinate system is the coordinate system of the global sub-map. The first or second here is only for the convenience of distinction.

[0013] In the embodiment of the present application, the computing resources of each second electronic device are fully utilized to calculate the map update information, thereby reducing the computing load of the server. Compared with the image data captured by the camera, the map update information has less data volume, which saves transmission bandwidth resources, and the server can quickly implement global map updates based on the map update information of one or more second electronic devices, with high update efficiency. Since the global map in the server can be updated efficiently and accurately, it also promotes the global positioning of the first electronic device to be more accurate and more robust. After the first electronic device detects the operation of the user opening the application, it downloads the global submap by requesting the server, and uses the global submap with higher accuracy than the SLAM map as a visual observation input to the SLAM system. The SLAM system uses the global submap and the collected video image to estimate the position and direction of the electronic device, ensuring that the virtual object will not be offset in the long-term (e.g., more than 1 minute) operation of the VR, AR or MR application, and correctly displaying the virtual object for a long time (e.g., displaying the virtual object in a relatively accurate manner in the environment and duration represented by the video image), thereby improving the user experience.

[0014] Among them, the posture data of the first electronic device can be the posture data of the first electronic device in a first coordinate system, or the posture data of the first electronic device in a second coordinate system; the first coordinate system is the coordinate system of the SLAM map of the SLAM system, and the second coordinate system is the coordinate system of the global sub-map. The first or second here is only for the convenience of distinction.

[0015] In this article, the coordinate system used to construct the SLAM map can be called the first coordinate system. The first coordinate system in this article may also be called the local coordinate system, SLAM coordinate system, camera coordinate system or other appropriate terms in some application scenarios. Correspondingly, the posture (posture data) reflected by the electronic device in the local coordinate system can be called the local posture.

[0016] The coordinate system used to construct the global map can be called the second coordinate system. The second coordinate system in this article may also be called the global coordinate system, the world coordinate system or other appropriate terms in some application scenarios. Correspondingly, the posture (posture data) of the electronic device in the global coordinate system can be called the global posture.

[0017] Based on the first aspect, in one implementation scheme, the map update information is obtained by the SLAM system of the second electronic device based on the comparison result of the SLAM map in the second coordinate system and the global sub-map in the second coordinate system; wherein, the SLAM map in the second coordinate system is obtained based on the SLAM map in the first coordinate system constructed by the SLAM system of the electronic device and the coordinate system transformation information between the first coordinate system and the second coordinate system; the comparison result reflects the difference between the SLAM map in the second coordinate system and the global sub-map in the second coordinate system, and the SLAM system can further obtain the map update information based on the difference.

[0018] In another implementation scheme, the map update information is obtained by the SLAM system of the second electronic device based on the comparison result of the SLAM map in the first coordinate system and the global sub-map in the second coordinate system and the coordinate system transformation information. The comparison result reflects the difference between the SLAM map in the first coordinate system and the global sub-map in the second coordinate system. The SLAM system can convert the difference into the second coordinate system, and the map update information can be further obtained based on the difference in the second coordinate system.

[0019] Among them, the SLAM system can use key frames to construct a SLAM map. The SLAM map can be understood as a map drawn by the SLAM system based on the environmental information collected by the acquisition device. The acquisition device may include, for example, an image acquisition device (such as a camera or a camera) and an inertial measurement unit (IMU) in an electronic device. The IMU may include sensors such as a gyroscope and an accelerometer.

[0020] The SLAM map may include the following map content: multiple keyframes, triangulated feature points, and associations between keyframes and feature points. Keyframes may be formed based on images captured by a camera and camera parameters used to generate images (e.g., the position of an electronic device in a SLAM coordinate system). Feature points (i.e., features) as used herein are interesting or significant parts of an image. The feature points may represent different 3D map points along three-dimensional space in a SLAM map and feature descriptions on 3D map points. Each feature point may have an associated feature position. Each feature point may represent a 3D coordinate position and be associated with one or more descriptors. Feature points may also be referred to as 3D features, feature points, 3D feature points, or other suitable names.

[0021] For example, when an electronic device captures an image, whether to add the image as a new keyframe to the SLAM map can be considered from two aspects: the new keyframe itself and the relationship between the new keyframe and the existing keyframes in the SLAM map. That is to say, on the one hand, the image quality of the new keyframe itself should be good, such as it cannot be a very blurry image, the number of feature points should be sufficient, the distribution of feature points should be as uniform as possible, etc.; on the other hand, the new keyframe needs to have a small amount of co-viewing relationship with the existing keyframes in the SLAM map, and most of the feature points are new feature points, so as to achieve the effect of both constraints and as little information redundancy as possible, such as 10% of the feature points of a neighboring keyframe in the SLAM map can be observed in the new keyframe, and the remaining 90% cannot be observed, etc.

[0022] Among them, 3D map points (or three-dimensional map points or three-dimensional space coordinate points) represent coordinates on the three-dimensional space axes X, Y and Z. For example, for a SLAM map in a local coordinate system, a 3D map point represents the coordinates on the three-dimensional space axes X, Y and Z of the local coordinate system. For a SLAM map in a global coordinate system, a 3D map point represents the coordinates on the three-dimensional space axes X, Y and Z of the global coordinate system.

[0023] For the convenience of description, in the embodiments of the present application, the concept of 3D map points in the so-called “3D map points of key frames” or the so-called “3D map points of non-redundant key frames” may include visual feature information in a two-dimensional image.

[0024] Based on the first aspect, in a possible implementation, the map update information includes: pose data corresponding to a target key frame of a SLAM map constructed by a SLAM system of the second electronic device, a three-dimensional (3D) map point, and common view data, wherein the common view data is used to indicate a common view relationship between the target key frame and a key frame of a second global submap in the second electronic device. The second global submap is a submap in a global map associated with a location of the second electronic device.

[0025] Specifically, the target key frame is a non-redundant key frame, and the non-redundant key frame refers to a key frame that exists in the SLAM map of the second electronic device but does not exist in the second global sub-map.

[0026] For example, the map update information can be the relevant information after the target keyframe is converted to the global coordinate system and then integrated into the global submap (i.e., the position, co-viewing relationship, 3D map points, etc. corresponding to the target keyframe). That is, the map update information is the updated part of the fused global submap compared to the original global submap.

[0027] In the embodiment of the present application, the map update information only needs to include the changed key frame pose, common view relationship and 3D map points. Compared with the originally downloaded global sub-map, the data volume will be much smaller, so the transmission bandwidth resources are further saved. After the second electronic device sends the map update information to the server, the server can update the global map in the server based on the map update information. In this way, the server computing load is reduced and the update efficiency and robustness of the global map are improved.

[0028] Based on the first aspect, in a possible implementation, the map update information includes: a key frame that exists in the SLAM map of the second electronic device but does not exist in the second global submap. The second global submap is a submap in the global map associated with the location of the second electronic device.

[0029] In the embodiment of the present application, the map update information can be directly a non-redundant key frame. After the second electronic device identifies the non-redundant key frame of the SLAM map, it sends the non-redundant key frame to the server, and the server then uses the non-redundant key frame to fuse it into the global map, thereby also being able to achieve efficient updating of the global map in the server. Such a solution is conducive to reducing the computing load of the electronic device and ensuring the accuracy of map fusion.

[0030] Based on the first aspect, in a possible implementation, in response to the operation, downloading the first global sub-map from the server includes: sending first location fingerprint information indicating the initial location of the first electronic device to the server; receiving the first global sub-map from the server, the first global sub-map corresponding to the second location fingerprint information, and the first location fingerprint information matches the second location fingerprint information. Performing the map matching operation through the server improves the matching efficiency and accuracy, which is conducive to reducing the delay in downloading the map.

[0031] In a second aspect, an embodiment of the present application provides a global map updating method, which is applied to an electronic device, and the electronic device may be a handheld terminal (such as a mobile phone), VR or AR glasses, a drone, an unmanned vehicle, etc. The method includes: obtaining a global submap corresponding to the position of the electronic device from a server, wherein the global submap is a submap associated with the position of the electronic device in a global map in a second coordinate system; obtaining map update information according to a comparison result of a SLAM map in a second coordinate system constructed by a SLAM system of the electronic device and a global submap in the second coordinate system, or according to a comparison result of a SLAM map in a first coordinate system constructed by a SLAM system of the electronic device and a global submap in the second coordinate system and the coordinate system transformation information, wherein the SLAM map in the second coordinate system is obtained based on the SLAM map in the first coordinate system and the coordinate system transformation information between the first coordinate system and the second coordinate system, and the map update information is used to indicate the difference between the SLAM map in the second coordinate system or the first coordinate system relative to the global submap in the second coordinate system; sending the map update information to the server, wherein the map update information is used to update the global map in the second coordinate system in the server.

[0032] Among them, when the scheme is implemented as "obtaining map update information based on the comparison result of the SLAM map in the second coordinate system and the global sub-map in the second coordinate system", the map update information is used to indicate the difference between the SLAM map in the second coordinate system and the global sub-map in the second coordinate system. In other words, the SLAM map in the second coordinate system is obtained based on the SLAM map in the first coordinate system and the coordinate system transformation information between the first coordinate system and the second coordinate system. The comparison result reflects the difference between the SLAM map in the second coordinate system and the global sub-map in the second coordinate system. The SLAM system can further obtain the map update information based on the difference.

[0033] When the scheme is implemented as "obtaining map update information based on the comparison result between the SLAM map in the first coordinate system and the global submap in the second coordinate system and the coordinate system transformation information", the map update information is used to indicate the difference between the SLAM map in the first coordinate system and the global submap in the second coordinate system. The comparison result reflects the difference between the SLAM map in the first coordinate system and the global submap in the second coordinate system. The "difference" here is the difference expressed in the first coordinate system, and the SLAM system can further convert the difference to the second coordinate system based on the coordinate system transformation information between the first coordinate system and the second coordinate system, and the map update information can be further obtained based on the difference in the second coordinate system. Therefore, the map update information can be used to "indicate the difference".

[0034] Among them, the server can be used as a platform to provide content and information support for VR, AR or MR applications of electronic devices. A global map is stored in the server. Generally speaking, a global map is a high-precision map of a large geographical range. The so-called "large geographical range" is relative to the geographical range represented by the SLAM map in the electronic device. For example, a global map can be obtained by integrating multiple SLAM maps generated by one or more electronic devices according to certain rules. Correspondingly, the global sub-map represents a sub-map associated with the position of the electronic device in the global map, that is, the actual position of the electronic device in the global map can be used as the starting point, and the map content in the preset area around the starting point can be obtained as the global sub-map.

[0035] In an embodiment of the present application, the electronic device downloads a global sub-map in a global map from a server, and obtains map update information by comparing the global sub-map with the SLAM map in the electronic device, using the computing resources and computing power on the electronic device side. The map update information can be used to update the map content in the global sub-map. Therefore, after the electronic device sends the map update information to the server, the server can update the global map in the server based on the map update information. In this way, the computing load of the server is reduced and the efficiency of the server in updating the global map is improved. Compared with the image data captured by the camera, the map update information has less data volume, so it also saves transmission bandwidth resources.

[0036] Based on the second aspect, in a possible implementation, the SLAM map in the second coordinate system is specifically obtained by transforming the SLAM map in the first coordinate system based on the coordinate system transformation information; the map update information is obtained by comparing the SLAM map in the second coordinate system constructed according to the SLAM system of the electronic device with the global sub-map in the second coordinate system, including: obtaining non-redundant key frames by comparing the SLAM map in the second coordinate system with the global sub-map in the second coordinate system, and the non-redundant key frames represent key frames that exist in the SLAM map in the second coordinate system but do not exist in the global sub-map in the second coordinate system; fusing the non-redundant key frames into the global sub-map in the second coordinate system to obtain a fused global sub-map; and obtaining the map update information from the fused global sub-map.

[0037] Among them, the SLAM system can use key frames to construct a SLAM map. The SLAM map can be understood as a map drawn by the SLAM system based on the environmental information collected by the acquisition device. The SLAM map can contain the following map content: multiple key frames, triangulated feature points, and the association between key frames and feature points. The key frame can be formed based on the image collected by the camera and the camera parameters used to generate the image (for example, the position of the electronic device in the SLAM coordinate system). As used in this article, the feature point (i.e., feature) is an interesting or significant part of the image. The feature point can represent different 3D map points along the three-dimensional space in the SLAM map and the feature description on the 3D map point. Each feature point can have an associated feature position. Each feature point can represent a 3D coordinate position and is associated with one or more descriptors.

[0038] Among them, the 3D map point (or three-dimensional map point) represents the coordinates on the three-dimensional space axes X, Y and Z. For example, for a SLAM map in a local coordinate system, the 3D map point represents the coordinates on the three-dimensional space axes X, Y and Z of the local coordinate system. For a SLAM map in a global coordinate system, the 3D map point represents the coordinates on the three-dimensional space axes X, Y and Z of the global coordinate system.

[0039] For the convenience of description, in the embodiments of the present application, the concept of 3D map points in the so-called “3D map points of key frames” or the so-called “3D map points of non-redundant key frames” may include visual feature information in a two-dimensional image.

[0040] In one embodiment of the present application, the key frames and map points in the SLAM map can be transformed into a global coordinate system for representation, and the SLAM map can also be transformed into a global coordinate system for representation. During the operation of the SLAM system, the SLAM map will be continuously updated, and the so-called "updating the SLAM map" is reflected in the continuous insertion of key frames into the SLAM map under the global coordinate system. When a new key frame is inserted or is about to be inserted into the SLAM map, the electronic device determines whether the key frame inserted by the SLAM system is redundant with the key frame in the downloaded global sub-map. The so-called redundancy of the key frame means that the 3D map point information associated with the key frame already exists in the global sub-map, that is, the global sub-map has saved the visual information in the current environment, and there is no need to add the key frame. The key frame is not redundant, that is, the 3D map point information associated with the key frame does not exist in the global sub-map, and the global sub-map needs to add the key frame to realize the update, so that the map content is synchronized with the real environment. In the embodiment of the present application, the key frame in the SLAM map under the global coordinate system that is not redundant with the key frame in the global sub-map can be called a non-redundant key frame. Subsequently, the non-redundant keyframes may be fused into a global sub-map in a global coordinate system.

[0041] After the non-redundant keyframes are fused to the global submap in the global coordinate system, the map update information obtained may include information such as the position, co-viewing relationship, and 3D map points corresponding to the non-redundant keyframes, that is, the map update information is the updated part of the fused global submap compared to the original global submap. Therefore, the electronic device can obtain the map update information from the fused global submap and send it to the server.

[0042] In another embodiment of the present application, during the operation of the SLAM system, when a new key frame is inserted or is about to be inserted into the SLAM map in the local coordinate system, the electronic device determines whether the key frame inserted by the SLAM system is redundant with the key frame in the downloaded global sub-map, that is, whether there is a non-redundant key frame, and the non-redundant key frame indicates that the key frame in the SLAM map in the local coordinate system is not redundant with the key frame in the global sub-map. If it exists, the non-redundant key frame can be transformed to the global coordinate system, and the non-redundant key frame in the global coordinate system can be fused into the global sub-map in the global coordinate system.

[0043] After the non-redundant keyframes in the global coordinate system are fused to the global submap in the global coordinate system, the map update information obtained may include information such as the posture, co-viewing relationship, and 3D map points corresponding to the non-redundant keyframes in the global coordinate system, that is, the map update information is the updated part of the fused global submap compared to the original global submap. Therefore, the electronic device can obtain the map update information from the fused global submap and send it to the server.

[0044] In the embodiment of the present application, the map update information can be obtained from the fused global sub-map, so the data volume is much smaller than the originally downloaded global sub-map, thereby further saving transmission bandwidth resources. After the second electronic device sends the map update information to the server, the server can update the global map in the server based on the map update information. In this way, the server computing load is reduced and the update efficiency and robustness of the global map are improved.

[0045] Based on the second aspect, in a possible implementation, the fusing of the non-redundant key frame into the global submap in the second coordinate system includes: adding the non-redundant key frame as a new key frame node to the global submap in the second coordinate system; updating the co-viewing relationship between the non-redundant key frame and the key frame in the global submap in the second coordinate system; calculating the pose data and three-dimensional map points corresponding to the non-redundant key frame; accordingly, obtaining the map update information from the fused global submap includes: obtaining the pose data, three-dimensional map points and co-viewing data corresponding to the non-redundant key frame from the fused global submap as the map update information (that is, the map update information is the part of the information in the fused global submap that is updated compared to the original global submap), and the co-viewing data is used to indicate the co-viewing relationship between the non-redundant key frame and the key frame of the global submap in the second coordinate system.

[0046] Specifically, for a certain 3D map point in the global submap, if the 3D map point can be observed by several key frames at the same time, then the several key frames have a co-viewing relationship with the 3D map point. Therefore, the electronic device can calculate which 3D map points in the global submap can be observed by at least one key frame and a non-redundant key frame in the global submap at the same time, thereby updating the co-viewing relationship between the key frames and the non-redundant key frames in the global submap.

[0047] After updating the co-viewing relationship of the key frames of the global sub-map, the electronic device can use a triangulation algorithm to calculate new 3D map points, and optimize the poses and 3D map point coordinates corresponding to the non-redundant key frames through the BA algorithm, thereby completing the fusion (or insertion) of the non-redundant key frames into the global sub-map, realizing the update of the global sub-map, and using the pose data, three-dimensional map points and co-viewing data corresponding to the non-redundant key frames as the map update information.

[0048] In the embodiment of the present application, the map update information only needs to include the changed key frame pose, common view relationship and 3D map points. Compared with the originally downloaded global sub-map, the data volume will be much smaller, so the transmission bandwidth resources are further saved. After the second electronic device sends the map update information to the server, the server can update the global map in the server based on the map update information. In this way, the server computing load is reduced and the update efficiency and robustness of the global map are improved.

[0049] Based on the second aspect, in a possible implementation, the map update information is obtained according to the comparison result of the SLAM map in the first coordinate system and the global submap in the second coordinate system and the coordinate system transformation information, including: obtaining a non-redundant key frame by comparing the SLAM map in the first coordinate system with the global submap in the second coordinate system, wherein the non-redundant key frame is a key frame existing in the SLAM map in the first coordinate system, and the non-redundant key frame does not exist in the global submap in the second coordinate system after being transformed by the coordinate system transformation information; and fusing the non-redundant key frame transformed by the coordinate system transformation information into the global submap in the second coordinate system to obtain the map update information. The non-redundant key frame transformed by the coordinate system transformation information is the key frame in the second coordinate system.

[0050] From the above, it can be seen that in the embodiment of the present application, when the scheme is implemented as "obtaining map update information based on the comparison result of the SLAM map in the second coordinate system and the global sub-map in the second coordinate system", the map update information is used to indicate the difference between the SLAM map in the second coordinate system and the global sub-map in the second coordinate system. The comparison result reflects the difference between the SLAM map in the second coordinate system and the global sub-map in the second coordinate system. This difference can be a non-redundant key frame in the SLAM map in the second coordinate system, that is, the non-redundant key frame does not exist in the global sub-map. The SLAM system can subsequently fuse the non-redundant key frame into the global sub-map, thereby obtaining map update information (including pose data, three-dimensional map points and common view data corresponding to the non-redundant key frame) and sending it to the server. The SLAM system can also directly send the non-redundant key frame as map update information to the server.

[0051] When the scheme is implemented as "obtaining map update information based on the comparison result between the SLAM map in the first coordinate system and the global submap in the second coordinate system and the coordinate system transformation information", the map update information is used to indicate the difference between the SLAM map in the first coordinate system and the global submap in the second coordinate system. The comparison result reflects the difference between the SLAM map in the first coordinate system and the global submap in the second coordinate system. This difference can be a non-redundant key frame in the SLAM map in the first coordinate system. The SLAM system can convert the non-redundant key frame to the second coordinate system to obtain a non-redundant key frame in the second coordinate system. Subsequently, the SLAM system can fuse the non-redundant key frame in the second coordinate system to the global submap, thereby obtaining map update information (including pose data, three-dimensional map points and common view data corresponding to the non-redundant key frame in the second coordinate system) and sending it to the server. The SLAM system can also directly send the non-redundant key frame in the second coordinate system to the server as map update information.

[0052] Based on the second aspect, in a possible implementation, obtaining a global sub-map corresponding to the location of the electronic device from a server includes: sending indication information of the initial location of the electronic device to a server; receiving the global sub-map from the server, wherein the global sub-map is determined based on the initial location of the electronic device.

[0053] The indication information of the initial position of the electronic device may include first position fingerprint information for indicating the initial position of the electronic device; the global sub-map corresponds to second position fingerprint information, and the first position fingerprint information matches the second position fingerprint information. The map matching operation is performed by the server, which improves the matching efficiency and accuracy, thereby facilitating the reduction of the delay in downloading the map.

[0054] Based on the second aspect, in a possible implementation, before obtaining the map update information, it also includes: determining the first pose data of the electronic device in the SLAM map in the first coordinate system based on the collected video image and the SLAM map in the first coordinate system; determining the second pose data of the electronic device in the global submap in the second coordinate system based on the video image and the global submap in the second coordinate system; obtaining the coordinate system transformation information between the first coordinate system of the SLAM map and the second coordinate system of the global map based on the first pose data and the second pose data.

[0055] In one embodiment of the present application, the video image may also be directly an image. In another embodiment of the present application, the video image may also represent the Kth frame image in the video image sequence captured by the camera of the electronic device, where K is an integer greater than or equal to 1. In other words, the video image captured by the camera may be a video sequence (video stream), including multiple frames of images, and the Kth frame image may be a frame in the video stream.

[0056] The embodiment of the present application obtains the terminal's posture in the local coordinate system and the posture in the global coordinate system respectively according to the same frame, and based on these two postures, the coordinate system transformation information (such as the coordinate system transformation matrix) between the two coordinate systems can be obtained. According to this coordinate system transformation matrix, the synchronization of the two coordinate systems can be achieved, so that the information originally represented by the local coordinate system (such as the local posture, the feature points of the image, the 3D map points of the SLAM map, etc.) can be transformed to the global coordinate system based on the coordinate system transformation matrix. In this way, it is possible to convert the SLAM map in the local coordinate system to the global coordinate system, or to convert the non-redundant key frame in the local coordinate system to the global coordinate system.

[0057] Based on the second aspect, in a possible implementation, determining the first position data of the electronic device in the SLAM map in the first coordinate system based on the collected video image and the SLAM map in the first coordinate system includes: obtaining the first position data of the electronic device in the SLAM map in the first coordinate system based on the video image, the SLAM map in the first coordinate system and the motion data collected by the electronic device; the motion data includes motion speed data and motion direction data.

[0058] For example, an IMU is provided in the electronic device, and the input signals of the SLAM system include the video images collected by the camera, the motion data collected by the IMU, and the SLAM map in the local coordinate system. The IMU detects the angular velocity and linear acceleration of the electronic device at a high frequency, and integrates the angular acceleration and the linear acceleration respectively, and then calculates the posture of the electronic device. The video image collected by the camera is matched in the SLAM map in the local coordinate system, so that the posture of the electronic device can also be calculated. Then, based on these two postures, a certain algorithm is used to calculate and obtain the first posture data.

[0059] Based on the second aspect, in a possible implementation, determining the second pose data of the electronic device in the global sub-map in the second coordinate system based on the video image and the global sub-map in the second coordinate system includes: extracting features from the video image to obtain image features; performing feature matching on the image features in the global sub-map in the second coordinate system to obtain map features that match the image features; and calculating the second pose data of the electronic device in the global sub-map in the second coordinate system based on the image features and the map features.

[0060] For example, the electronic device performs feature detection on the K-th frame image, extracts the image position of the feature in the K-th frame image, and the feature detection algorithm is not limited to feature detection methods such as FAST, ORB, SIFT, SURF, D2Net, and SuperPoint. Then, each detected feature is described, and the feature description algorithm is not limited to feature description methods such as ORB, SIFT, SURF, BRIEF, BRISK, FREAK, D2Net, and SuperPoint, thereby forming a one-dimensional vector for subsequent feature matching. Through feature matching, the electronic device can match the map content (such as one or more key frames) that is most similar to the K-th frame image from the global submap. The specific method includes, for example, traditional image retrieval methods based on BOW, VLAD, and new image retrieval methods based on NetVLAD and AI. After finding the map content that is most similar to the K-th frame image, the pose estimation can be performed based on the K-th frame image and the most similar map content. For example, the PnP, EPnP, 3D-3D, and other registration algorithms can be used to calculate the second pose data.

[0061] The embodiments of the present application can be implemented on the electronic device side, fully utilizing the computing power of the electronic device to calculate the first pose data and the second pose data, thereby improving the processing efficiency and reducing the computing burden of the server.

[0062] Based on the second aspect, in a possible implementation, determining second pose data of the electronic device in a global sub-map in a second coordinate system based on the video image and the global sub-map in the second coordinate system includes: sending the video image to the server; receiving the second pose data from the server, wherein the second pose data is determined by the server through feature extraction and feature matching of a global sub-map associated with the position of the electronic device in the video image and the global map in the second coordinate system.

[0063] When the video image is the Kth frame image in a sequence of video images captured by a camera of an electronic device, the Kth frame image may be the 1st frame image in the sequence of video images captured by the camera.

[0064] In this embodiment, the electronic device needs to download the global sub-map of the corresponding area first. The process of downloading the map takes a certain amount of time. In order to speed up the user's entry into the application, the first global pose estimation can be completed on the server side. In other words, after the application is started, the first global pose estimation is performed on the server side. While starting the global pose estimation, the server obtains the global sub-map and transmits it to the electronic device, thereby increasing the speed at which the user enters the application. The user will not perceive the delay in the map download process. In this way, the user waiting caused by the download delay can be avoided, further improving the user experience.

[0065] In a third aspect, an embodiment of the present application provides a global map updating method, which is applied to a server, and the method comprises: sending a global sub-map corresponding to the position of the electronic device to the electronic device according to a request of the electronic device, wherein the global sub-map is a sub-map associated with the position of the electronic device in a global map under a second coordinate system; receiving map update information from the electronic device; the map update information is used to indicate the difference between a SLAM map under the first coordinate system or the second coordinate system constructed by a SLAM system of the electronic device and the global sub-map under the second coordinate system, and updating the global map according to the map update information.

[0066] In one implementation, the map update information is used to indicate the difference between the SLAM map in the second coordinate system constructed by the SLAM system of the electronic device and the global sub-map in the second coordinate system. Specifically, the map update information is obtained by the SLAM system of the electronic device based on the comparison result of the SLAM map in the second coordinate system and the global sub-map in the second coordinate system; wherein the SLAM map in the second coordinate system is obtained based on the SLAM map in the first coordinate system constructed by the SLAM system and the coordinate system transformation information between the first coordinate system and the second coordinate system; the comparison result reflects the difference between the SLAM map in the second coordinate system and the global sub-map in the second coordinate system, and the SLAM system can further obtain the map update information based on the difference and send the map update information to the server.

[0067] In another implementation, the map update information is used to indicate the difference between the SLAM map in the first coordinate system constructed by the SLAM system of the electronic device and the global submap in the second coordinate system. Specifically, the map update information is obtained by the SLAM system of the second electronic device based on the comparison result of the SLAM map in the first coordinate system and the global submap in the second coordinate system and the coordinate system transformation information. The comparison result reflects the difference between the SLAM map in the first coordinate system and the global submap in the second coordinate system. The SLAM system can convert the difference to the second coordinate system, and can further obtain the map update information based on the difference in the second coordinate system, and send the map update information to the server.

[0068] In an embodiment of the present application, the server sends a global sub-map in a global map to the electronic device. The electronic device compares the global sub-map with the SLAM map in the electronic device and uses the computing resources and computing power on the electronic device side to obtain map update information. The map update information can be used to update the map content in the global sub-map. Therefore, after the server receives the map update information sent by the electronic device, it can update the global map in the server based on the map update information. In this way, the computing load of the server is reduced and the efficiency of the server in updating the global map is improved. Compared with the image data captured by the camera, the map update information has less data volume, so it also saves transmission bandwidth resources.

[0069] Based on the third aspect, in a possible implementation, the map update information represents information associated with a non-redundant key frame; the non-redundant key frame may represent a key frame that exists in the SLAM map in the second coordinate system but does not exist in the global submap in the second coordinate system.

[0070] Correspondingly, updating the global map according to the map update information includes: adding the map update information to the global map.

[0071] The map update information specifically includes: the pose data, three-dimensional map points and co-viewing data corresponding to the non-redundant keyframe, and the co-viewing data is used to indicate the co-viewing relationship between the non-redundant keyframe and the keyframe of the global submap in the second coordinate system. In other words, the map update information represents the relevant information obtained after the non-redundant key is fused into the global submap (such as the pose, co-viewing relationship, 3D map points and other information corresponding to the non-redundant key). That is, the map update information is the part of the information that is updated in the fused global submap compared to the original global submap.

[0072] Since the map update information only needs to include the changed keyframe poses, common view relationships, and 3D map points, the data volume is much smaller than the originally downloaded global submap, so transmission bandwidth resources are further saved. After the server receives the map update information, it can update the global map in the server based on the map update information. In this way, the server computing load is reduced and the update efficiency and robustness of the global map are improved.

[0073] Based on the third aspect, in a possible implementation, updating the global map according to the map update information includes: adding the map update information to the global map. Since the map update information is obtained from the fused global sub-map, and the global sub-map is obtained from the global map of the server, the server can also directly and quickly add the map update information to the global map of the server, which greatly improves the update efficiency of the global map.

[0074] Based on the third aspect, in a possible implementation, the map update information includes non-redundant key frames, and accordingly, updating the global map according to the map update information includes: adding the non-redundant key frames as new key frame nodes to the global map; updating the co-visibility relationship between the non-redundant key frames and the key frames in the global map; and calculating the pose data and three-dimensional map points corresponding to the non-redundant key frames.

[0075] Specifically, for a certain 3D map point in the global map, if the 3D map point can be observed by several key frames at the same time, then the several key frames have a co-viewing relationship with the 3D map point. Therefore, the server can calculate which 3D map points in the global map can be observed by at least one key frame in the global map and the non-redundant key frame at the same time, thereby updating the co-viewing relationship between the key frame in the global map and the non-redundant key frame.

[0076] After updating the co-viewing relationship of the key frames of the global map, the server can use the triangulation algorithm to calculate new 3D map points, and optimize the poses and 3D map point coordinates corresponding to the non-redundant key frames through the BA algorithm, thereby completing the fusion (or insertion) of the non-redundant key frames into the global map and realizing the update of the global map.

[0077] In the embodiment of the present application, the electronic device identifies non-redundant key frames by comparing the SLAM map and the global sub-map, and sends the non-redundant key frames to the server, and the server then uses the non-redundant key frames to fuse into the global map, thereby also being able to efficiently update the global map in the server. Such a solution is conducive to reducing the computing load of the electronic device and ensuring the accuracy of map fusion.

[0078] Based on the third aspect, in a possible implementation, sending a global sub-map corresponding to the position of the electronic device to the electronic device according to the request of the electronic device includes: receiving indication information of the initial position of the electronic device; obtaining the global sub-map corresponding to the position of the electronic device in the global map according to the initial position of the electronic device; and sending the global sub-map to the electronic device.

[0079] Among them, the indication information of the initial position of the electronic device may include first position fingerprint information for indicating the initial position of the electronic device; the global submap in the global map corresponds to the second position fingerprint information; the obtaining of the global submap corresponding to the position of the electronic device in the global map according to the initial position of the electronic device includes: according to the first position fingerprint information, finding the global submap in the global map having the second position fingerprint information matching the first position fingerprint information. The map matching operation is performed by the server, which improves the matching efficiency and accuracy, thereby helping to reduce the delay in downloading the map.

[0080] In a fourth aspect, an embodiment of the present application provides an electronic device for displaying virtual objects, comprising: one or more processors, a memory, and one or more applications, one or more computer programs; the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to perform the virtual object display method described in the first aspect or any possible implementation of the first aspect.

[0081] In the fifth aspect, an embodiment of the present application provides an electronic device for global map updating, comprising: one or more processors, a memory, and one or more computer programs; the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute the virtual object display method described in the above second aspect or any possible implementation of the second aspect.

[0082] In the sixth aspect, an embodiment of the present application provides a server for global map updating, comprising: one or more processors, a memory, and one or more computer programs; the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute the virtual object display method described in the above third aspect or any possible implementation of the third aspect.

[0083] In a seventh aspect, an embodiment of the present application provides a chip, comprising a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface to execute the virtual object display method in the first aspect or any possible implementation of the first aspect.

[0084] Optionally, as an implementation, the chip may further include a memory storing instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the virtual object display method in the first aspect or any possible implementation of the first aspect.

[0085] In an eighth aspect, an embodiment of the present application provides a chip, comprising a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface to execute the global map update method in the second aspect or any possible implementation of the second aspect.

[0086] Optionally, as an implementation, the chip may further include a memory storing instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the global map update method in the second aspect or any possible implementation of the second aspect.

[0087] In the ninth aspect, an embodiment of the present application provides a chip, which includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the global map update method in the third aspect or any possible implementation of the third aspect.

[0088] Optionally, as an implementation, the chip may further include a memory storing instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the global map update method in the third aspect or any possible implementation of the third aspect.

[0089] In a tenth aspect, an embodiment of the present application provides an electronic device for global map updating, including:

[0090] A communication module, configured to obtain a global sub-map corresponding to the position of the electronic device from a server, wherein the global sub-map is a sub-map associated with the position of the electronic device in a global map in a second coordinate system;

[0091] A SLAM module, used for obtaining map update information according to a comparison result between a SLAM map in a second coordinate system constructed by the SLAM module and a global submap in the second coordinate system, or according to a comparison result between a SLAM map in a first coordinate system constructed by the SLAM module and a global submap in the second coordinate system and the coordinate system transformation information, wherein the SLAM map in the second coordinate system is obtained based on the SLAM map in the first coordinate system and the coordinate system transformation information between the first coordinate system and the second coordinate system; the map update information is used to indicate the difference between the SLAM map in the second coordinate system or the first coordinate system and the global submap in the second coordinate system;

[0092] The communication module is further used to send the map update information to the server, where the map update information is used to update the global map in the second coordinate system in the server.

[0093] The SLAM module may be the SLAM system described in the embodiments of the present application, for example, the SLAM system 12 described in the embodiments later in this document.

[0094] Based on the tenth aspect, in a possible implementation manner, the SLAM map in the second coordinate system is specifically obtained by transforming the SLAM map in the first coordinate system based on the coordinate system transformation information;

[0095] The SLAM module is specifically used to: obtain non-redundant key frames by comparing the SLAM map in the second coordinate system with the global sub-map in the second coordinate system, wherein the non-redundant key frames represent key frames that exist in the SLAM map in the second coordinate system but do not exist in the global sub-map in the second coordinate system; fuse the non-redundant key frames into the global sub-map in the second coordinate system to obtain a fused global sub-map; and obtain the map update information from the fused global sub-map.

[0096] Based on the tenth aspect, in a possible implementation, the SLAM module is specifically used to: add the non-redundant key frame as a new key frame node to the global sub-map in the second coordinate system; update the co-viewing relationship between the non-redundant key frame and the key frame in the global sub-map in the second coordinate system; calculate the pose data and three-dimensional map points corresponding to the non-redundant key frame; obtain the pose data, three-dimensional map points and co-viewing data corresponding to the non-redundant key frame from the fused global sub-map as the map update information, and the co-viewing data is used to indicate the co-viewing relationship between the non-redundant key frame and the key frame of the global sub-map in the second coordinate system.

[0097] Based on the tenth aspect, in a possible implementation, the SLAM module is specifically used to: obtain non-redundant key frames by comparing the SLAM map in the first coordinate system with the global submap in the second coordinate system, wherein the non-redundant key frames are key frames existing in the SLAM map in the first coordinate system, and the non-redundant key frames do not exist in the global submap in the second coordinate system after being transformed by the coordinate system transformation information; merge the non-redundant key frames transformed by the coordinate system transformation information into the global submap in the second coordinate system to obtain the map update information, and the non-redundant key frames transformed by the coordinate system transformation information are key frames in the second coordinate system.

[0098] Based on the tenth aspect, in a possible implementation, the communication module is specifically used to: send indication information of the initial position of the electronic device to the server; receive the global sub-map from the server, and the global sub-map is determined based on the initial position of the electronic device.

[0099] Based on the tenth aspect, in a possible implementation, the indication information of the initial position of the electronic device includes first position fingerprint information for indicating the initial position of the electronic device; the global sub-map corresponds to second position fingerprint information, and the first position fingerprint information and the second position fingerprint information match.

[0100] Based on the tenth aspect, in a possible implementation manner, the electronic device also includes a global positioning module and a coordinate system change matrix calculation module; the SLAM module is specifically used to determine the first pose data of the electronic device in the SLAM map in the first coordinate system based on the collected video image and the SLAM map in the first coordinate system; the global positioning module is specifically used to determine the second pose data of the electronic device in the global sub-map in the second coordinate system based on the video image and the global sub-map in the second coordinate system; the coordinate system change matrix calculation module is specifically used to obtain the coordinate system transformation information between the first coordinate system of the SLAM map and the second coordinate system of the global map based on the first pose data and the second pose data.

[0101] Based on the tenth aspect, in a possible implementation, the SLAM module is specifically used to: obtain the first position data of the electronic device in the SLAM map in the first coordinate system according to the video image, the SLAM map in the first coordinate system, and the motion data collected by the electronic device; the motion data includes motion speed data and motion direction data.

[0102] Based on the tenth aspect, in a possible implementation, the global positioning module is specifically used to extract features from the video image to obtain image features; perform feature matching on the image features in the global sub-map in the second coordinate system to obtain map features that match the image features; and calculate, based on the image features and the map features, second posture data of the electronic device in the global sub-map in the second coordinate system.

[0103] Based on the tenth aspect, in a possible implementation, the communication module is specifically used to: send the video image to the server; receive the second posture data from the server, wherein the second posture data is determined by the server based on feature extraction and feature matching of a global sub-map associated with the position of the electronic device in the global map under the video image and the second coordinate system.

[0104] In an eleventh aspect, an embodiment of the present application provides a server for a global map, including:

[0105] a communication module, configured to send a global sub-map corresponding to the position of the electronic device to the electronic device according to a request of the electronic device, wherein the global sub-map is a sub-map associated with the position of the electronic device in the global map under the second coordinate system;

[0106] The communication module is further used to receive map update information from the electronic device; the map update information is used to indicate the difference between the SLAM map in the first coordinate system or the second coordinate system constructed by the SLAM system of the electronic device and the global sub-map in the second coordinate system;

[0107] A processing module is used to update the global map according to the map update information.

[0108] Based on the eleventh aspect, in a possible implementation, the difference information represents information associated with a non-redundant key frame; the non-redundant key frame represents a key frame that exists in the SLAM map in the second coordinate system but does not exist in the global submap in the second coordinate system.

[0109] Based on the eleventh aspect, in a possible implementation, the map update information specifically includes: posture data, three-dimensional map points and common view data corresponding to the non-redundant key frames, and the common view data is used to indicate the common view relationship between the non-redundant key frames and the key frames of the global sub-map in the second coordinate system.

[0110] Based on the eleventh aspect, in a possible implementation manner, the processing module is specifically used to: add the map update information to the global map.

[0111] Based on the eleventh aspect, in a possible implementation, the communication module is specifically used to: receive indication information of the initial position of the electronic device; obtain the global sub-map corresponding to the position of the electronic device in the global map based on the initial position of the electronic device; and send the global sub-map to the electronic device.

[0112] Based on the eleventh aspect, in a possible implementation, the indication information of the initial position of the electronic device includes first position fingerprint information for indicating the initial position of the electronic device; the global sub-map in the global map corresponds to second position fingerprint information; and the processing module is specifically used to: according to the first position fingerprint information, find the global sub-map in the global map having second position fingerprint information matching the first position fingerprint information.

[0113] In the twelfth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable medium stores a program code for execution by a device, wherein the program code includes instructions for executing the method in the first aspect or any possible implementation of the first aspect, or the program code includes instructions for executing the method in the second aspect or any possible implementation of the second or third aspect.

[0114] In the thirteenth aspect, an embodiment of the present invention provides a computer program product, which may be a software installation package. The computer program product includes program instructions. When the computer program product is executed by an electronic device, the processor of the electronic device executes a method in any possible implementation of the first aspect, the second aspect, or the third aspect.

[0115] It can be seen that in the embodiment of the present application, the electronic device downloads the global sub-map in the global map from the server, and obtains map update information by comparing the global sub-map with the SLAM map in the electronic device and utilizing the computing resources and computing power on the electronic device side. The map update information can be used to update the map content in the global sub-map. Therefore, after the electronic device sends the map update information to the server, the server can update the global map in the server based on the map update information. In this way, the computing load of the server is reduced and the efficiency of the server in updating the global map is improved. Compared with the image data captured by the camera, the map update information has less data volume, so it also saves transmission bandwidth resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0116] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0117] Figure 1It is a schematic diagram of an application architecture provided in an embodiment of the present application;

[0118] Figure 2 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0119] Figure 3 It is a structural diagram of a server provided in an embodiment of the present application;

[0120] Figure 4 It is a schematic diagram of the structure of a system provided by an embodiment of the present application, and an electronic device and a server in the system;

[0121] Figure 5 This is a schematic diagram of another system provided by an embodiment of the present application, and a structural diagram of an electronic device and a server in the system;

[0122] Figure 6 This is a functional implementation diagram of a map fusion module provided in an embodiment of the present application;

[0123] Figure 7 is a flowchart of a virtual object display method provided in an embodiment of the present application;

[0124] Figure 8 It is a schematic diagram of a scenario implemented by the method of the present application provided in an embodiment of the present application;

[0125] Fig. 9 It is a flowchart of a global map updating method provided in an embodiment of the present application;

[0126] Fig.10 is a flowchart of another global map updating method provided in an embodiment of the present application;

[0127] Fig.11 It is a schematic diagram of a scene related to a coordinate system transformation matrix provided in an embodiment of the present application;

[0128] Fig.12 is a scene schematic diagram describing a co-viewing relationship between key frames provided in an embodiment of the present application;

[0129] Fig.13 It is a schematic diagram of another scenario implemented by the method of the present application provided in an embodiment of the present application;

[0130] Fig.14 It is a schematic diagram of another scenario implemented by the method of the present application provided in an embodiment of the present application;

[0131] Fig.15 is a flowchart of another global map updating method provided in an embodiment of the present application;

[0132] Fig.16 This is a schematic diagram of another system provided by an embodiment of the present application, and a structural diagram of an electronic device and a server in the system;

[0133] Fig.17 It is a flowchart of another global map updating method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0134] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0135] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects rather than to limit a specific order.

[0136] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0137] The singular forms of "a", "said" and "the" used in the embodiments of the present application or the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items. As used herein, the singular forms of "one", "some" and "the" are intended to also include plural forms, unless the context clearly indicates otherwise. It will also be understood that the terms "include", "have", "include" and / or "contain" specify the presence of stated features, integers, steps, operations, elements, and / or components when used in this article, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0138] It should be noted that the terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.

[0139] See also Figure 1 , Figure 1 The application architecture provided by the embodiment of the present application includes multiple electronic devices and a server. As shown in the figure, the multiple electronic devices include a first electronic device, one or more second electronic devices ( Figure 1In the example of two second electronic devices, the one or more second electronic devices are several electronic devices other than the first electronic device, and each electronic device can communicate with the server. For example, any electronic device can communicate with the server through wireless fidelity (Wifi) communication, Bluetooth communication, or cellular 2 / 3 / 4 / 5 generation (2G / 3G / 4G / 5G) communication. It should be noted that the so-called "multiple second electronic devices" in this article are only used to represent multiple other electronic devices other than the first electronic device, and it does not limit whether the types of the second electronic devices are the same.

[0140] for Figure 1 Each of the multiple electronic devices shown in the figure can be various types of devices equipped with a camera and a display component. For example, the electronic device can be a terminal device such as a mobile phone, a tablet computer, a laptop computer, a video recorder, etc. (such as Figure 1 In the example above, each electronic device is a mobile phone, and may also be a device for interacting with a virtual scene, such as VR glasses, AR devices, MR interactive devices, etc. It may be a wearable electronic device such as a smart watch or a smart bracelet, or it may be an on-board device in a vehicle such as an unmanned vehicle or a drone. The specific form of the electronic device is not particularly limited in the embodiments of the present application.

[0141] In addition, any of the multiple electronic devices may also be referred to as user equipment (UE), subscriber station, mobile unit, subscriber unit, wireless unit, remote unit, mobile device, wireless device, wireless communication device, remote device, mobile subscriber station, terminal device, access terminal, mobile terminal, wireless terminal, intelligent terminal, remote terminal, handset, user agent, mobile client, client, or other suitable terminology.

[0142] The server may be one or more physical servers (e.g. Figure 1 A physical server is exemplarily shown in the figure), it may also be a computer cluster, or a virtual machine in a cloud computing scenario, and so on.

[0143] In an embodiment of the present application, each of the multiple electronic devices may be installed with a virtual scene application such as a VR or AR or MR application, and may run the VR or AR or MR application based on a user's operation (e.g., click, touch, slide, shake, voice control, etc.). The electronic device may collect video images of any object in the environment through a local camera and / or sensor, and display a virtual object on a display component based on the collected video image. The virtual object may be a virtual object in a VR scene, an AR scene, or an MR scene (i.e., an object in a virtual environment).

[0144] It should be noted that in the embodiments of the present application, the virtual scene application in the electronic device can be an application built into the electronic device itself, or it can be an application provided by a third-party service provider and installed by the user, and the embodiments of the present application are not limited thereto.

[0145] In the embodiment of the present application, each of the multiple electronic devices is also configured with a simultaneous localization and mapping (SLAM) system. The SLAM system can create a map in a completely unknown environment, and use the map for autonomous positioning, position and posture (position and attitude) determination, navigation, etc. The map constructed by the SLAM system herein may be referred to as a SLAM map. The SLAM map may be understood as a map drawn by the SLAM system based on environmental information collected by a collection device. The collection device may include, for example, an image collection device (such as a camera or a camera) and an inertial measurement unit (IMU) in an electronic device. The IMU may include sensors such as a gyroscope and an accelerometer.

[0146] The SLAM map may include the following map content: multiple keyframes, triangulated feature points, and associations between keyframes and feature points. Keyframes may be formed based on images captured by a camera and camera parameters used to generate images (e.g., the position of an electronic device in a SLAM coordinate system). Feature points (i.e., features) as used herein are interesting or significant parts of an image. The feature points may represent different 3D map points along three-dimensional space in a SLAM map (e.g., coordinates on three-dimensional space axes X, Y, and Z) and feature descriptions on 3D map points. Each feature point may have an associated feature position. Each feature point may represent a 3D coordinate position and be associated with one or more descriptors.

[0147] For example, when an electronic device captures an image, whether to add the image as a new keyframe to the SLAM map can be considered from two aspects: the new keyframe itself and the relationship between the new keyframe and the existing keyframes in the SLAM map. That is to say, on the one hand, the image quality of the new keyframe itself should be good, such as it cannot be a very blurry image, the number of feature points should be sufficient, the distribution of feature points should be as uniform as possible, etc.; on the other hand, the new keyframe needs to have a small amount of co-viewing relationship with the existing keyframes in the SLAM map, but most of the feature points are new feature points, so as to achieve the effect of both constraints and as little information redundancy as possible, such as 10% of the feature points of a neighboring keyframe in the SLAM map can be observed in the new keyframe, and the remaining 90% cannot be observed, etc.

[0148] The coordinate system used to construct the SLAM map can be called the first coordinate system. The first coordinate system in this article may also be called the local coordinate system, SLAM coordinate system, camera coordinate system or other appropriate terms in some application scenarios. For the convenience of understanding, the following text will mainly introduce the scheme under the name of "local coordinate system". Correspondingly, the posture of the electronic device in the local coordinate system can be called the local posture.

[0149] In an embodiment of the present application, the server can be used as a platform for providing content and information support for VR, AR or MR applications of any electronic device. A global map is stored in the server. Generally, compared with the SLAM map in a single electronic device, the global map covers a larger area and has higher map content accuracy. The server maintains and updates the global map. In an embodiment of the present application, the global map can be obtained by integrating multiple map update information provided by one or more electronic devices among the multiple electronic devices according to certain rules.

[0150] The coordinate system used to construct the global map can be called the second coordinate system. The second coordinate system in this article may also be called the global coordinate system, the world coordinate system or other appropriate terms in some application scenarios. For the convenience of understanding, the following text will mainly introduce the solution under the name of "global coordinate system". Correspondingly, the posture of the electronic device in the global coordinate system can be called the global posture.

[0151] See also Figure 2 , Figure 2 A structural diagram of an electronic device 10 is exemplarily shown. The electronic device 10 may be at least one of a first electronic device and a second electronic device. It should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0152] like Figure 2 As shown, the electronic device 10 may include: a chip 310, a memory 315 (one or more computer-readable storage media), a user interface 322, a display component 323, a camera 324, a positioning module 331 for device positioning, and a transceiver 332 for communication. These components can communicate on one or more communication buses 314.

[0153] The chip 310 may be integrated to include: one or more processors 311, a clock module 312, and a power management module 313. The clock module 312 integrated in the chip 310 is mainly used to provide the processor 311 with a timer required for data transmission and timing control, and the timer can realize the clock function of data transmission and timing control. The processor 311 can perform operations according to the instruction operation code and timing signal, generate operation control signals, and complete the control of fetching and executing instructions. The power management module 313 integrated in the chip 310 is mainly used to provide stable and high-precision voltage for the chip 310 and other components of the electronic device 10.

[0154] The processor 110 may also be referred to as a central processing unit (CPU). The processor 110 may specifically include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or may be integrated into one or more processors.

[0155] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0156] The memory 315 may be connected to the processor 311 via a bus, or may be coupled to the processor 311 to store various software programs and / or multiple sets of instructions. In a specific implementation, the memory 315 may include a high-speed random access memory (e.g., a cache memory), and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 315 may store an operating system, such as an embedded operating system such as ANDROID, IOS, WINDOWS, or LINUX. The memory 315 is also used to store related programs of the SLAM system. The memory 315 is used to store data (e.g., image data, point cloud data, map data, key frame data, pose data, coordinate system conversion information, map update information, etc.). The memory 315 may also store a communication program, which may be used to communicate with one or more servers or other devices. The memory 315 may also store one or more applications. As shown in the figure, these applications may include: virtual scene applications such as AR / VR / MR, map applications, image management applications, and the like. The memory 115 may also store a user interface program, which may display the content of the application (such as virtual objects in virtual scenes such as AR / VR / MR) realistically through a graphical operation interface and present it through the display component 323, and realize receiving user control operations on the application through input controls such as menus, dialog boxes, and buttons. The memory 315 may be used to store computer executable program codes, which include instructions.

[0157] The user interface 322 may be, for example, a touch panel, through which the operation instructions of the user on the touch panel may be detected. The user interface 322 may also be a keypad, a physical button or a mouse.

[0158] The electronic device 10 may include one or more display components 323. The electronic device 10 may realize the display function through the display component 323, the graphics processor (GPU) in the chip 310, and the application processor (AP). The GPU is a microprocessor for image processing, which connects the display component 323 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The display component 323 is used to display the interface content currently output by the system, such as displaying images and videos in virtual scenes such as AR / VR / MR. The interface content may include the interface of the running application and the system-level menu, etc., which may be specifically composed of the following interface elements: input interface elements, such as buttons (Button), text input boxes (Text), sliders (Scroll Bar), menus (Menu), etc.; and output interface elements, such as windows (Window), labels (Label), images, videos, animations, etc.

[0159] In a specific implementation, the display component 323 may be a display panel, a lens (such as VR glasses), a projection screen, etc. The display panel may also be referred to as a display screen, such as a touch screen, a flexible screen, a curved screen, etc., or other optical components. That is to say, when an electronic device has a display screen in this application, the display screen may be a touch screen, a flexible screen, a curved screen, or other forms of screens, and the display screen of the electronic device has the function of displaying images. As for the specific material and shape of the display screen, this application does not make any restrictions on this.

[0160] For example, when the display component 323 includes a display panel, the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In addition, in some specific implementations, the touch panel in the user interface 322 and the display panel in the display component 323 can be coupled together, for example, the touch panel can be set below the display panel, and the touch panel can be used to detect the touch pressure acting on the display panel when the user inputs a touch operation (such as clicking, sliding, touching, etc.) through the display panel, and the display panel is used to display content.

[0161] The camera 324 may be a monocular camera, a binocular camera, or a depth camera, and is used to shoot / record the environment to obtain an image / video image. The image / video image collected by the camera 324 may be used as an input data of a SLAM system, or may be displayed as an image / video through the display component 323.

[0162] In some scenarios, the camera 324 can also be regarded as a sensor. The image collected by the camera 324 can be in IMG format or other format types, which are not limited here.

[0163] The sensor 325 can be used to collect data related to the state change (such as rotation, swing, movement, shaking, etc.) of the electronic device 10. The data collected by the sensor 325 can be used as a kind of input data of the SLAM system. The sensor 325 may include one or more sensors, such as an inertial measurement unit (IMU), a time of flight (TOF) sensor, etc. The IMU may further include sensors such as a gyroscope and an accelerometer. The gyroscope can be used to measure the angular velocity of the electronic device when it moves, and the accelerometer can be used to measure the acceleration of the electronic device when it moves. The TOF sensor can further include an optical transmitter and an optical receiver, the optical transmitter can be used to emit light, such as laser, infrared, radar waves, etc., and the optical receiver can be used to detect reflected light, such as reflected laser, infrared, radar waves, etc.

[0164] It should be noted that the sensor 325 may also include more other sensors, such as an inertial sensor, a barometer, a magnetometer, a wheel speed meter, etc.

[0165] The positioning module 331 is used to realize the physical positioning of the electronic device 10, for example, to obtain the initial position of the electronic device 10. The positioning module 331 may include, for example, one or more of a WIFI positioning module, a Bluetooth positioning module, a base station positioning module, and a satellite positioning module. The satellite positioning module may be provided with a Global Navigation Satellite System (GNSS) to assist in positioning, and the GNSS is not limited to the Beidou system, the GPS system, the GLONASS system, and the Galileo system.

[0166] The transceiver 332 is used to realize the communication between the electronic device 10 and the server or other electronic devices. The transceiver 332 integrates a transmitter and a receiver, which are used to send and receive radio frequency signals respectively. In a specific implementation, the transceiver 332 may include, but is not limited to: an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC chip, a SIM card, and a storage medium. In some embodiments, the transceiver 332 can also be implemented on a separate chip. The transceiver 332 can, for example, support data network communication through at least one of 2G / 3G / 4G / 5G, and / or support at least one of the following short-range wireless communication methods: Bluetooth (BT) communication, Wireless Fidelity (WiFi) communication, Near Field Communication (NFC), Infrared (IR) wireless communication, Ultra Wide Band (UWB) communication, ZigBee communication.

[0167] In the embodiment of the present application, the processor 311 executes various functional applications and data processing of the electronic device 10 by running the instructions stored in the memory 315. Specifically, the processor 311 may execute the following: Figure 7 The method steps shown in the embodiment may be performed as follows Fig. 9 , Fig.10 , Fig.15 or Fig.17 Functions of the electronic device side in the embodiment.

[0168] See also Figure 3 , Figure 3 is a structural block diagram of an implementation of a server 20 provided in an embodiment of the present application. The server 20 may be Figure 1 The server described in the embodiment. Figure 3 As shown, the server 20 includes a processor 403, a memory 401 (one or more computer-readable storage media), and a transceiver 402. These components can communicate on one or more communication buses 404. Among them:

[0169] The processor 403 may be one or more central processing units (CPUs). When the processor 403 is a CPU, the CPU may be a single-core CPU or a multi-core CPU.

[0170] The memory 401 may be connected to the processor 403 via a bus, or may be coupled to the processor 403, and is used to store various software programs and / or multiple sets of instructions, and data (such as map data, posture data, etc.). In a specific implementation, the memory 401 includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM).

[0171] The transceiver 402 mainly integrates a receiver and a transmitter, wherein the receiver is used to receive data (such as requests, images, etc.) sent by the electronic device, and the transmitter is used to send data (such as map data, posture data, etc.) to the electronic device.

[0172] It should be understood that the above-mentioned server 20 is only an example provided in the embodiment of the present application. In a specific implementation, the server 20 may have more components than those shown in the figure.

[0173] In the specific embodiment of the present application, the processor 403 can be used to call the program instructions in the memory 401 to execute the following Fig. 9 , Fig.10 , Fig.15 or Fig.17 Functions of the server side in the embodiment.

[0174] The term "coupling" as used herein means being directly connected to, or being connected through one or more intervening components or circuits. Any signal provided on various buses described herein may be time multiplexed with other signals and provided on one or more common buses. In addition, the interconnection between each circuit element or software block may be shown as a bus or a single signal line. Each bus may alternatively be a single signal line, and each single signal line may alternatively be a bus, and a single line or bus may represent any one or more of a large number of physical or logical mechanisms for communication between components.

[0175] In an existing global map update scheme, when an electronic device sends a global positioning request to a server, the electronic device uploads an image to the server, performs global positioning based on the image on the server, and triggers the update of the global map on the server. Specifically, the server extracts feature points from the image uploaded by the electronic device, inserts the uploaded image as a node into the global map, and optimizes the global map through a global nonlinear optimization algorithm, thereby achieving the update of the global map. In this scheme, on the one hand, the global positioning request of the electronic device is usually low-frequency, and the frequency of uploading images is low, so it will be slow to update the global map using this scheme. On the other hand, assuming that the electronic device can frequently upload images to the server to update the global map in the server, not only will the electronic device consume more communication resources, but when multiple users upload images at the same time, the server load will also be particularly large. On the other hand, there is a risk of privacy leakage when the electronic device directly uploads images to the server.

[0176] The implementation of the present application embodiment can overcome the defects of the existing solution and achieve efficient global map update. Figure 5 , Figure 5 1 is a block diagram of a system provided by an embodiment of the present application. The system includes an electronic device 10 and a server 20, and the electronic device 10 and the server 20 can be connected to each other through their respective transceivers. A SLAM system 12, a data acquisition module 13, an interaction module 14 and a communication module 11 are configured in the electronic device 10. The SLAM system 12, the data acquisition module 13, the interaction module 14 and the communication module 11 can exist in the form of software codes. In a specific implementation, the data / programs of these functional modules can be stored in a file such as Figure 2 The memory 315 shown in FIG. 1 and can be operated as follows Figure 2 The processor 311 is shown. Among them:

[0177] The communication module 11 can utilize Figure 2 The transceiver 332 shown realizes communication with the server 20. Specifically, the communication module 11 is configured to obtain a global sub-map from the server 20, wherein the global sub-map is a sub-map associated with the location information of the electronic device 10 in the global map stored in the server 20. The global sub-map is stored in the database 123 of the global sub-map in the SLAM system 12 of the electronic device 10.

[0178] The data acquisition module 13 is configured to use Figure 2 The sensor 325 shown in the figure is used to obtain the status data of the electronic device 10, using Figure 2 The camera 324 shown in the figure is used to obtain video images, and the Figure 2 The positioning module 331 shown is used to obtain the position of the electronic device.

[0179] The interaction module 14 is configured to utilize Figure 2 The user interface 322 shown in the figure realizes the detection and acquisition of user operations, and utilizes Figure 2 The display component 323 shown implements the display of images / videos / virtual objects, etc., such as the display of application content such as AR / VR / MR.

[0180] The computing module 121 in the SLAM system 12 is configured to perform posture calculation based on the video image captured by the camera 324 and the downloaded global submap to obtain the posture data of the electronic device 10; the interaction module 14 can display virtual objects on the display component based on the posture data of the electronic device 10.

[0181] The SLAM map constructed by the SLAM system 12 itself is stored in a SLAM map database 122 . The SLAM system is also configured to update the SLAM map in the database 122 based on the position and posture data of the electronic device 10 .

[0182] In a specific embodiment, the functional modules in the electronic device 10 can cooperate with each other to perform the following steps: Figure 7 The steps in the method shown in the embodiment, or performing the Fig. 9 , Fig.10 , Fig.15 or Fig.17 Functions of the electronic device side in the embodiment.

[0183] The server 20 is provided with a communication module 21, a map update module 22, and a global map database 23. The communication module 21, the processing module 22, and the global map database 23 may exist in the form of software codes. In a specific implementation, the data / programs of these functional modules may be stored in a computer program such as a computer program program. Figure 3 The memory 401 shown in FIG. Figure 3 Processor 403 is shown.

[0184] in:

[0185] The global map database 23 is used to store, maintain and update the global map.

[0186] The map update module 22 may be configured to update the global map in the database 23 based on the map update information uploaded by the electronic device.

[0187] The communication module 21 can utilize Figure 3 The transceiver 402 shown implements communication with the electronic device 10. Specifically, the communication module 21 can send the global sub-map to the electronic device 10, and receive map update information from the electronic device 10.

[0188] In a specific embodiment, the functional modules in the server 20 can cooperate with each other to perform the following steps: Fig. 9 , Fig.10 , Fig.15 or Fig.17 Functions of the server side in the embodiment.

[0189] See also Figure 5 , Figure 5 It is shown that in a specific implementation, Figure 4 The components (or sub-modules) that each functional module in the electronic device 10 may further include, and the components (or sub-modules) that each functional module in the server 20 may further include. It should be noted that the components that each functional module in the electronic device 10 (such as the SLAM system, the data acquisition module 13, and the interactive module 14) may further include and the components (or sub-modules) that each functional module in the server 20 (such as the processing module 22) may further include are only examples of the embodiments of the present application. In other embodiments, the above-mentioned functional modules may also include more or fewer components (or sub-modules).

[0190] like Figure 5 As shown, the computing module 121 in the SLAM system 12 further includes a mapping module 1211, a pose estimation module 1212, a pose estimation module 1212, a feature processing module 1213, a feature matching module 1214 and a map fusion module 1215. In addition, the electronic device 10 also includes a global positioning module 16 and a software development kit (SDK). The global positioning module 16 further includes an image retrieval module 161, a feature extraction module 162, a feature matching module 163 and a pose estimation module 164. The SDK may include databases for global pose and local pose, respectively, and a coordinate system change matrix calculation module 15, and the SDK may also call the interaction module 14 to realize display through the display component.

[0191] The feature processing module 1213 can be used for operations related to visual feature processing. For example, in one embodiment, the feature processing module 1213 can further include a feature detection function and a feature description function. The feature detection function is to extract the image position of the feature in the image, and the feature description function is to describe each detected feature to form a one-dimensional vector. The feature matching module 1214 can be used to achieve feature matching between image features and map features. The pose estimation module 1212 can further perform pose estimation based on the result of feature matching.

[0192] The data acquisition module 13 (such as an IMU sensor) can output high-frequency angular velocity and linear acceleration. The posture estimation module 1212 integrates the angular acceleration and linear acceleration respectively, and performs posture estimation in combination with the video image captured by the camera, and can calculate the position and posture of the electronic device. The result of the posture estimation can be used as the output of the SLAM system. At the same time, the result of the posture estimation can also be used as the input of the mapping module 1211. The mapping module 1211 creates an environmental map that the SLAM system can perceive, i.e., a SLAM map, in a local coordinate system. The SLAM system continuously creates / updates the SLAM map during its continuous operation in space. In some embodiments, the SLAM map can also be used as the input of the posture estimation module 1212 for posture estimation in turn, thereby improving the accuracy of the posture estimation.

[0193] In one embodiment, the database 123 stores a global sub-map downloaded from the server 10, and the pose estimation module 1212 is configured to perform pose calculations based on the global sub-map and the video image captured by the camera 324 and the motion data collected by the sensor 325 to obtain the pose data of the electronic device 10, that is, to obtain the global pose of the electronic device 10, thereby tracking and locating the pose of the electronic device 10. The motion data includes the motion speed data and motion direction data of the electronic device 10, such as acceleration, angular velocity, etc. Specifically, the feature processing module 1213 can be used to extract 2D features of the video image, and the pose estimation module 1212 can obtain the global pose of the electronic device 10 in the global sub-map based on the 2D features of the video image, the 3D map points of the global sub-map, and the motion data collected by the data acquisition module 13 (such as IMU).

[0194] In some embodiments, the pose estimation module 1212 of the SLAM system can also be used to determine the local pose of the electronic device 10 in the SLAM map in the local coordinate system based on the video image captured by the camera and the SLAM map in the local coordinate system. Specifically, the feature processing module 1213 can be used to extract 2D features in the video image, and the pose estimation module 1212 can obtain the local pose of the electronic device 10 in the SLAM map in the local coordinate system based on the 2D features in the video image, the 3D map points of the SLAM map in the local coordinate system, and the motion data collected by the data acquisition module 13 (such as IMU); the motion data includes the motion speed data and motion direction data of the electronic device 10, such as acceleration, angular velocity, etc.

[0195] The global pose module 16 is used to determine the global pose of the electronic device 10 in the global submap based on the collected video image and the global submap. Specifically, the video image can be obtained through the image retrieval module 161, and the feature extraction module 162 can extract features based on the video image to obtain image features. The feature matching module 163 can match the image features in the global submap to obtain map features matching the image features; the pose estimation module 164 can calculate the global pose of the electronic device 10 in the global submap based on the image features and the map features.

[0196] The above local pose and global pose can be stored in the database in the SDK respectively. The coordinate system change matrix calculation module 15 can be configured to calculate the coordinate system transformation information (e.g., coordinate system transformation matrix) between the local coordinate system of the SLAM map and the global coordinate system of the global map according to the local pose and global pose of the same video image. And the coordinate system transformation information is fed back to the SLAM system.

[0197] The mapping module 1211 in the SLAM system may be configured to update the SLAM map in the database 122 of the SLAM system according to the posture data of the electronic device 10. Specifically, the mapping module 1211 may transform the SLAM map to the global coordinate system according to the coordinate system transformation information, and use the global posture of the electronic device 10 as the posture data in the SLAM map in the global coordinate system to update the SLAM map in the global coordinate system.

[0198] During the operation of the SLAM system, the mapping module 1211 will continuously create a SLAM map, which is reflected in the continuous insertion of key frames. The key frames and map points in the SLAM map can be transformed into a global coordinate system for representation.

[0199] The map fusion module 1215 can be used to compare the SLAM map and the global sub-map to identify whether there are non-redundant key frames in the current SLAM map. If there are non-redundant key frames, the non-redundant key frames are fused to the global sub-map to obtain map update information. The map update information can indicate the difference between the SLAM map in the global coordinate system and the global sub-map in the global coordinate system. In a specific embodiment, the map update information includes: posture data, three-dimensional map points and common view data corresponding to the non-redundant key frames, and the common view data is used to indicate the common view relationship between the non-redundant key frames and the key frames of the global sub-map.

[0200] like Figure 6As shown, in one embodiment of the present application, the process of map fusion performed by the map fusion module 1215 can be described as follows: the map fusion module 1215 determines whether the newly inserted keyframe of the SLAM system is redundant with the keyframe in the downloaded global submap. Keyframe redundancy means that the 3D map point information associated with the keyframe already exists in the global submap, that is, the global submap has saved the visual information in the current environment, and no keyframe needs to be added. Keyframe non-redundancy means that the 3D map point information associated with the keyframe does not exist in the global submap (such keyframes can be referred to as non-redundant keyframes). If it is necessary to insert a non-redundant keyframe into the global submap, a keyframe node (undirected graph structure) is added to the global submap, and the co-view relationship between the keyframes in the global submap is updated. After updating the co-view relationship of the keyframes of the global submap, a triangulation algorithm is used to calculate the new 3D map point, and the pose of the keyframe and the coordinates of the 3D map point are optimized by the BA algorithm, thereby realizing the update of the global submap, that is, the updated global submap (or fused global submap) is obtained and stored in the database 123. The updated global sub-map may be applied to the global positioning module 16 to calculate the global pose.

[0201] In some embodiments, the updated global sub-map can be used to provide map update information (such as the pose corresponding to non-redundant key frames, 3D map points, common view relationships, etc.) to the server 20, that is, the electronic device 10 can obtain the map update information from the updated global sub-map and send it to the server 20, so that the server 20 can use the map update information to update the global map.

[0202] In some other embodiments, the electronic device 10 also directly sends the non-redundant keyframes to the server 20; the server 20 further uses the non-redundant keyframes to update the global map. The updated global sub-map can be applied to the global positioning module 16 to calculate the global pose.

[0203] In a specific embodiment, the functional modules in the electronic device 10 can cooperate with each other to perform the following steps: Figure 7 The steps in the method shown in the embodiment, or performing the Fig. 9 , Fig.10 , Fig.15 or Fig.17 Functions of the electronic device side in the embodiment.

[0204] In one embodiment, in addition to the map update module 22, the server 20 also includes a sub-map map update module 221 and a location fingerprint matching module 222. The map update module 22 can be configured to add the map update information to the global map to update the global map; or configured to merge non-redundant key frames into the global map to update the global map. The location fingerprint matching module 222 is configured to search for location fingerprint information (herein referred to as the second location fingerprint information) that matches the first location fingerprint information in the global map according to the location fingerprint information of the initial location sent by the electronic device 10 (herein referred to as the first location fingerprint information). The sub-map processing module 221 is used to retrieve the global sub-map with the second location fingerprint information from the global map of the database 23. The global sub-map can also be stored in the database of the server 20 for quick access next time. The server 20 can send the global sub-map with the second location fingerprint information to the electronic device 10.

[0205] In a specific embodiment, the functional modules in the server 20 can cooperate with each other to perform the following steps: Fig. 9 , Fig.10 , Fig.15 or Fig.17 Functions of the server side in the embodiment.

[0206] Based on the above description, some virtual object display methods provided by the embodiments of the present application are given below. For the various method embodiments described below, for convenience, they are all expressed as a combination of a series of action steps, but those skilled in the art should know that the specific implementation of the technical solution of the present application is not limited by the order of the described series of action steps.

[0207] See also Figure 7 , Figure 7 1 is a flow chart of a method for displaying a virtual object provided by an embodiment of the present application. In some implementations, the method can be applied to a first electronic device having a display component and a camera. The method includes but is not limited to the following steps:

[0208] S1011. Detecting a user's operation of opening an application.

[0209] S1012. In response to the operation, download a first global sub-map from the server and store it in a simultaneous localization and mapping (SLAM) system of the electronic device; the first global sub-map is a sub-map in the global map associated with the position of the electronic device.

[0210] S1013. Displaying a virtual object on a display component based on posture data of the electronic device, wherein the posture data of the electronic device is obtained by performing posture calculation based on at least the video image captured by the camera and the first global sub-map, wherein the global map on the server is updated based on map update information sent by one or more second electronic devices, wherein the one or more second electronic devices are electronic devices other than the first electronic device.

[0211] In the embodiment of the present application, the user inputs an operation for opening an application (APP) on the electronic device, such as click, touch, slide, shake, voice control, etc. In response to the operation, on the one hand, the interface of the application is displayed on the display component (such as a display panel or lens) of the electronic device, and on the other hand, the process of downloading the global submap from the server or other device (such as other terminal devices or storage media such as hard disks and USB) is started. Among them, the application can be an AR / VR / MR application installed in the electronic device.

[0212] In some embodiments of the present application, the server receives map update information from each second electronic device, and can continuously update the global map in the server based on the map update information. The map update information is obtained by the second electronic device based on the comparison result of the SLAM map of the second electronic device and the global sub-map downloaded by the second electronic device itself, and the coordinate system transformation information between the local coordinate system of the second electronic device and the global coordinate system corresponding to the global sub-map.

[0213] In one embodiment, the map update information may specifically include: pose data corresponding to the target key frame constructed by the SLAM system of the second electronic device, three-dimensional map points (or 3D map points), and co-viewing data, wherein the co-viewing data is used to indicate the co-viewing relationship between the target key frame and the key frame of the global sub-map in the second electronic device. The target key frame is a non-redundant key frame, which means a key frame that exists in the SLAM map of the second electronic device but does not exist in the global sub-map in the second electronic device.

[0214] In such a global map update solution, the computing resources of each second electronic device are fully utilized to calculate and obtain map update information, reducing the computing load of the server. Compared with the image data captured by the camera, the map update information has less data volume, saving transmission bandwidth resources, and the server can quickly implement global map updates based on the map update information of the second electronic device, with high update efficiency. Since the global map in the server can be updated efficiently and accurately, it also promotes higher accuracy and better robustness of the global positioning of the first electronic device.

[0215] For example, see Figure 8 In a possible implementation scenario, the first electronic device is an electronic device 10 as an example. In the figure, the electronic device 10 is a mobile phone. A virtual scene application (for example, a navigation map application with an AR function) is installed in the electronic device 10. Figure 8 (a) in the figure shows a graphical user interface (GUI) on the display panel of the electronic device 10, and the GUI is the desktop 101 of the electronic device. When the electronic device detects that the user clicks the icon 102 of the virtual scene application on the desktop 101, on the one hand, the process of downloading the global sub-map is started in the background, and on the other hand, after starting the virtual scene application, the display panel is displayed as follows: Figure 8 Another GUI shown in (b) of FIG. 1 is a user interface 103 of the GUI, in which an AR navigation interface is used as an example. The user interface 103 may include a viewfinder 104. The viewfinder 104 may display a preview video stream of the real environment where the electronic device 10 is located in real time. The preview video stream is obtained by shooting with the camera of the electronic device 10. Virtual objects of the AR application are also superimposed on the preview video stream. The number of virtual objects may be one or more, such as Figure 8 As shown in (b), the virtual objects are exemplified by navigation instructions 105 and interactive robots 107. The navigation instructions 105 can indicate the navigation route from the current location to a destination in real time through directional arrows, and the interactive robot 107 can be used to implement voice dialogue, voice introduction, or simply as an interesting street display, etc.

[0216] Specifically, the electronic device 10 performs posture calculation in the background (processor) according to the obtained global sub-map and the video image captured by the camera in real time, so as to obtain the posture data (i.e., global posture) of the electronic device 10 in the global coordinate system in real time. The position and posture of the virtual object in the AR scene can be determined by the global posture of the electronic device 10, that is, the global posture of the electronic device represents the position and posture of the virtual object. Therefore, the position and posture of the virtual object in the AR scene can be displayed in the viewfinder 104 in real time based on the global posture of the electronic device 10.

[0217] AR applications can use computer graphics technology and visualization technology to generate virtual objects that do not exist in the real environment, and based on the current global posture of the electronic device 10, superimpose the virtual objects into the viewfinder 104, thereby superimposing the virtual objects into the video stream of the viewfinder 104 within the viewfinder 104.

[0218] For example, after the electronic device 10 captures a video image through a camera, the AR application sends the video image to the AR cloud server to request the AR cloud server to obtain the object to be rendered corresponding to the video image. The object to be rendered may include the identifier of the object to be rendered and / or the name, metadata and other information of the object to be rendered. The AR cloud server sends the object to be rendered corresponding to the video image to the electronic device 10, and the electronic device 10 determines the business rules corresponding to the object to be rendered, and renders the corresponding object to be rendered using the business rules of each object to be rendered, thereby generating multiple or more AR objects (i.e., virtual objects), and based on the global posture of the electronic device 10, superimposes the virtual objects on the video stream of the viewfinder 104.

[0219] When the user walks with the electronic device 10 for a period of time (for example, 1 minute, 5 minutes, 10 minutes, etc., not limited here), the electronic device 10 can still continue to accurately superimpose the virtual object in the video stream of the viewfinder 104, thereby improving the user experience. In one embodiment, when the electronic device 10 is about to move out of the geographical range of the global sub-map, a new global sub-map can be requested to be downloaded in advance based on the location of the electronic device 10. Subsequently, the electronic device 10 can perform global pose estimation based on the new global sub-map, thereby further avoiding the occurrence of pose mutations when the geographical ranges corresponding to the two global sub-maps are switched, thereby further improving the user experience.

[0220] See also Fig. 9 , Fig. 9 This is a flowchart of a global map update method provided by an embodiment of the present application. In some implementations, the method is described from the electronic device and the server side respectively. The electronic device can be the first electronic device described above or the second electronic device described above. The method includes but is not limited to the following steps:

[0221] S201: The server sends a global sub-map to the electronic device based on a request from the electronic device. Correspondingly, the electronic device receives the global sub-map. The global sub-map is a sub-map in the global map that is associated with the location of the electronic device.

[0222] S202: The electronic device stores the global sub-map in a SLAM system of the electronic device.

[0223] S203: The electronic device obtains map update information according to the SLAM map and the global sub-map constructed by itself.

[0224] The map update information may be used to indicate the difference between the SLAM map in the global coordinate system and the global sub-map in the global coordinate system.

[0225] In one implementation, the electronic device can use the coordinate system transformation information between the local coordinate system and the global coordinate system to convert the SLAM map constructed by itself into the global coordinate system, and then obtain the comparison result by comparing the SLAM map in the global coordinate system with the global sub-map (the comparison result at this time is the comparison result in the global coordinate system), and then obtain the map update information based on the comparison result.

[0226] For example, the comparison result may be at least one key frame in the SLAM map in the global coordinate system, that is, the at least one key frame does not exist in the global sub-map, or is significantly different from each key frame in the global sub-map. Then, the map update information may be obtained based on the at least one key frame. The map update information may be the relevant information after the at least one key frame is integrated into the global sub-map (such as posture, common view relationship, 3D map points, etc.), and the map update information may also be directly the at least one key frame.

[0227] In another implementation, the electronic device first obtains a comparison result directly based on the SLAM map in the local coordinate system and the global sub-map in the global coordinate system (the comparison result at this time is the comparison result in the local coordinate system), and then uses the coordinate system transformation information between the local coordinate system and the global coordinate system to convert the comparison result to the global coordinate system, thereby obtaining map update information.

[0228] For example, the comparison result may be at least one key frame in the SLAM map in the local coordinate system. After the at least one key frame is converted to the global coordinate system, it does not exist in the global sub-map, or it has significant differences from each key frame in the global sub-map. Then, the map update information may be obtained based on the at least one key frame. The map update information may be relevant information (such as posture, common view relationship, 3D map points, etc.) after the at least one key frame is converted to the global coordinate system and then integrated into the global sub-map. The map update information may also be directly the key frame formed by converting the at least one key frame to the global coordinate system.

[0229] For ease of understanding herein, the at least one key frame mentioned above may also be referred to as a non-redundant key frame.

[0230] S204: The electronic device sends the map update information to the server, and correspondingly, the server receives the map update information.

[0231] S205: The server updates the global map in the server according to the map update information. Since the map update information can represent the map content lacking in the sub-map of the global map, the map update information can be used to update the global map in the server.

[0232] It can be seen that in the embodiment of the present application, the electronic device downloads the global sub-map in the global map from the server, and obtains map update information by comparing the global sub-map with the SLAM map in the electronic device and utilizing the computing resources and computing power on the electronic device side. The map update information can be used to update the map content in the global sub-map. Therefore, after the electronic device sends the map update information to the server, the server can update the global map in the server based on the map update information. In this way, the computing load of the server is reduced and the efficiency of the server in updating the global map is improved. Compared with the image data captured by the camera, the map update information has less data volume, so it also saves transmission bandwidth resources.

[0233] See also Fig.10 , Fig.10 This is a flowchart of another global map updating method provided by an embodiment of the present application, which is described from the electronic device side and the server side respectively. The method includes but is not limited to the following steps:

[0234] S301. An electronic device sends first location fingerprint information indicating an initial location of the electronic device to a server.

[0235] In an embodiment of the present application, the electronic device uploads location fingerprint information to the server. The initial location may be the geographical location information of the electronic device when the electronic device requests to download a map. For example, the source of the location fingerprint information includes initial location information, signal strength information, signal characteristic information, etc. measured by positioning methods such as GNSS / WiFi / Bluetooth / base station; it may also be location information entered by the user.

[0236] S302: The server obtains a global sub-map matching the first location fingerprint information from the global map. The global sub-map is a sub-map in the global map associated with the location of the electronic device.

[0237] S303: The server sends the global sub-map to the electronic device. Correspondingly, the electronic device receives the global sub-map.

[0238] In one embodiment, the server matches the first location fingerprint information with the location fingerprint information of a sub-map pre-stored in a database by the server, where the sub-map in the database is a sub-map belonging to the global map. If there is a matching sub-map, the matching sub-map is transmitted to the electronic device.

[0239] In another embodiment, the server traverses the global map stored in the server according to the first location fingerprint information until an area matching the location fingerprint information is found. The server takes the area from the global map as a global sub-map and transmits the global sub-map to the electronic device.

[0240] S304: The electronic device stores the global sub-map in the SLAM system of the electronic device.

[0241] S305: The electronic device calculates coordinate system transformation information, and transforms the SLAM map based on the coordinate system transformation information.

[0242] Specifically, the process of an electronic device calculating coordinate system transformation information can be described as follows: the electronic device obtains a frame of video image captured by a camera; then, on the one hand, based on the video image and the SLAM map, the local pose of the electronic device in the SLAM map under the originally constructed local coordinate system is determined (here referred to as the first pose data).

[0243] For example, an IMU is provided in the electronic device, and the input signals of the SLAM system include the video images collected by the camera, the motion data collected by the IMU, and the SLAM map in the local coordinate system. The IMU detects the angular velocity and linear acceleration of the electronic device at a high frequency, and integrates the angular acceleration and the linear acceleration respectively, and then calculates the posture of the electronic device. The video image collected by the camera is matched in the SLAM map in the local coordinate system, so that the posture of the electronic device can also be calculated. Then, based on these two postures, a certain algorithm is used to calculate and obtain the first posture data.

[0244] For another example, in addition to the camera and IMU, the electronic device is also equipped with a positioning module related to posture or motion (GPS positioning, Beidou positioning, WIFI positioning, or base station positioning, etc.). Then, the SLAM system can also refer to the video image collected by the camera, the motion data collected by the IMU, the SLAM map in the local coordinate system, and the data collected by the positioning module to calculate the first posture data.

[0245] On the other hand, based on the video image and the global submap, feature extraction can be performed on the video image, and feature matching can be performed with the global submap to determine the global posture of the electronic device in the global submap (referred to as second posture data here).

[0246] For example, the electronic device performs feature detection on the video image and extracts the image position of the feature in the video image. The feature detection algorithm is not limited to feature detection methods such as FAST, ORB, SIFT, SURF, D2Net, and SuperPoint. Then, each detected feature is described. The feature description algorithm is not limited to feature description methods such as ORB, SIFT, SURF, BRIEF, BRISK, FREAK, D2Net, and SuperPoint, thereby forming a one-dimensional vector for subsequent feature matching. Through feature matching, the electronic device can match the map content (such as one or more key frames) that is most similar to the video image from the global submap. Specific methods include, for example, traditional image retrieval methods based on BOW, VLAD, and new image retrieval methods based on NetVLAD and AI. Feature matching specifically calculates the similarity between two feature descriptions. For Float type vectors, it can be calculated by Euclidean distance; for binary vectors, it can be calculated by XOR. After finding the map content most similar to the video image, the pose estimation can be performed based on the video image and the most similar map content. For example, a PnP, EPnP, 3D-3D or other registration algorithm can be used to calculate the second pose data.

[0247] Then, the electronic device may obtain coordinate system transformation information between the first coordinate system of the SLAM map and the second coordinate system of the global map according to the first posture data and the second posture data. The coordinate system transformation information may be, for example, a coordinate system transformation matrix.

[0248] For example, Fig.11 As shown, let the pose of the video image in the local coordinate system (the first pose data) be L T c , the pose (second pose data) in the global coordinate system is G T c ,but

[0249] G T c = G T L L T c (1)

[0250] G T L = G T c ( L T c ) -1 (2)

[0251] here, G T LThe coordinate transformation matrix between the local coordinate system and the global coordinate system can be represented. Based on this coordinate transformation matrix, the synchronization of the two coordinate systems can be achieved. In this way, the information originally represented by the local coordinate system (such as key frames, local poses, feature points of images, 3D map points of SLAM maps, etc.) can be transformed to the global coordinate system based on the coordinate transformation matrix. The SLAM map originally represented by the local coordinate system can be transformed to the global coordinate system based on the coordinate transformation matrix.

[0252] S306: The electronic device determines whether there is a non-redundant key frame.

[0253] In the embodiment of the present application, the key frames and map points in the SLAM map can be transformed into a global coordinate system, and the SLAM map can also be transformed into a global coordinate system. During the operation of the SLAM system, the SLAM map will be continuously updated, and the so-called "updating the SLAM map" is reflected in the continuous insertion of key frames into the SLAM map.

[0254] When a new keyframe is inserted or is about to be inserted into the SLAM map, the electronic device determines whether the keyframe inserted by the SLAM system is redundant with the keyframe in the downloaded global submap. The so-called redundancy of the keyframe means that the 3D map point information associated with the keyframe already exists in the global submap, that is, the global submap has already saved the visual information in the current environment, and there is no need to add the keyframe. If the keyframe is not redundant, that is, the 3D map point information associated with the keyframe does not exist in the global submap, the global submap needs to add the keyframe to implement the update so that the map content is synchronized with the real environment.

[0255] For ease of understanding, key frames that are not redundant with key frames in the global submap herein may be referred to as non-redundant key frames. In some embodiments, a method for an electronic device to identify a non-redundant key frame may be, for example, detecting the association between the current key frame and the map points of the key frame in the global submap of the current position of the electronic device. If the map points on the global submap are projected onto the current key frame, no associated 2D feature points can be found, or there are very few associated 2D feature points (for example, less than 50%, which should be noted here only for explanation), then the key frame is judged to be a non-redundant key frame. If the map points on the global submap are projected onto the current key frame, many 2D feature points can be associated (for example, greater than or equal to 50%, which should be noted here only for explanation), then the key frame is judged not to be a non-redundant key frame.

[0256] S307: If there are non-redundant key frames, the electronic device merges the non-redundant key frames into the global sub-map to obtain map update information.

[0257] Specifically, when there is a non-redundant key frame, the electronic device adds a key frame node (undirected graph structure) in the global sub-map, and updates the co-view relationship between the non-redundant key frame and the key frame in the global sub-map, such as Fig.12 As shown, Fig.12 Schematic diagram for explaining the co-viewing relationship between non-redundant keyframes and keyframes in the global submap. For a certain 3D map point in the global submap, if the 3D map point can be observed by several keyframes at the same time, then the several keyframes have a co-viewing relationship with the 3D map point. Therefore, the electronic device can calculate which 3D map points in the global submap can be observed by at least one keyframe in the global submap at the same time, thereby updating the co-viewing relationship between the keyframes and the non-redundant keyframes in the global submap (as shown by the dotted lines in the figure).

[0258] After updating the co-viewing relationship of the key frames of the global sub-map, the electronic device can use the triangulation algorithm to calculate new 3D map points, and optimize the poses and 3D map point coordinates corresponding to the non-redundant key frames through the BA algorithm, thereby completing the fusion (or insertion) of the non-redundant key frames into the global sub-map and realizing the update of the global sub-map.

[0259] S308: The electronic device sends the map update information to the server, and correspondingly, the server receives the map update information.

[0260] S309: The server updates the global map in the server according to the map update information.

[0261] In an embodiment of the present application, the map update information uploaded by the electronic device includes the position, co-view data and 3D map points corresponding to the non-redundant keyframes updated in the global submap. The co-view data is used to indicate the co-view relationship between the non-redundant keyframes and the keyframes of the global submap in the second coordinate system. That is, the map update information includes the keyframe position, co-view relationship and 3D map points that change after the global submap is downloaded to the electronic device.

[0262] In a possible implementation scenario of the present application, when the electronic device determines that the electronic device is about to leave the actual geographical range corresponding to the global sub-map, it will request the server to download another global sub-map based on the current location information. Before the electronic device requests the other sub-map, or while the electronic device requests the other sub-map, the electronic device uploads the map update information to the server. Compared with the originally downloaded global sub-map, the uploaded map update information only needs to include the changed key frame poses, co-viewing relationships, and 3D map points, so the data volume will be much smaller.

[0263] After receiving the map update information, the server can directly update the key frame co-viewing relationship, map point coordinate values, and key frame poses on the server's global map based on the map update information. After such an update, it is equivalent to integrating the non-redundant key frames into the global map, thereby achieving a high-efficiency update of the global map. It can be seen that the electronic device in this embodiment has completed the triangulation calculation, BA optimization calculation and other computationally intensive calculation steps in advance to obtain the map update information, so the server does not need to perform triangulation calculation, BA optimization calculation and other calculation steps in the process of using the map update information to update the global map, thereby greatly reducing the computational burden of the server.

[0264] In another possible implementation scenario of the present application, the process from the user clicking on the virtual scene application to the electronic device uploading the map update information to the server can be implemented as follows:

[0265] like Fig.13 As shown, taking the electronic device 10 as a mobile phone as an example, a virtual scene application (for example, a navigation map application with an AR function) is installed in the electronic device 10. Fig.13 (a) shows a desktop 101 on the display panel of the electronic device 10. When the electronic device detects that the user clicks the icon 102 of the virtual scene application on the desktop 101, on the one hand, the electronic device enters the application, for example, the display panel of the electronic device 10 displays the following Fig.13 The user interface 106 shown in (b) of the figure includes, for example, an electronic map interface and multiple controls, such as an electronic map control, a satellite map control, and an AR control. Exemplarily, the electronic map control is a control for controlling an application to enter an electronic map interface, the satellite map control is a control for controlling an application to enter a satellite map interface, and the AR control is a control for controlling an application to enter an AR interface.

[0266] On the other hand, the electronic device 10 starts the process of downloading the global sub-map in the background. After the global sub-map is downloaded, the electronic device 10 further performs the identification of non-redundant key frames in the background. If non-redundant key frames exist, the non-redundant key frames can be further integrated into the global sub-map to obtain map update information.

[0267] In order to achieve timely upload of map update information, at some appropriate time, a control for user operation can be popped up in the user interface 106 of the electronic device 10, such as Fig.13The control 109 shown in (b) in the figure indicates to the user whether it is necessary to upload map update information in order to update the global map on the server side. The control 109 may include two options, "Reject" and "Agree". When the electronic device 10 detects that the user clicks "Agree", the map update information upload process is started, so that the map update information is uploaded to the server to update the global map. When the electronic device 10 detects that the user clicks "Reject", the map update information upload process is not started. Through such a design, both the timeliness of uploading map update information and the user's current willingness to share map update information are taken into account (for example, the user may not upload if he does not want to consume additional traffic), thereby improving the user experience.

[0268] In another possible implementation scenario of the present application, the process from the user clicking on the virtual scene application to the electronic device uploading the map update information to the server can also be implemented in the following manner:

[0269] like Fig.14 As shown, taking the electronic device 10 as a mobile phone as an example, a virtual scene application (for example, a navigation map application with an AR function) is installed in the electronic device 10. Fig.14 (a) shows a desktop 101 on the display panel of the electronic device 10. When the electronic device detects that the user clicks the icon 102 of the virtual scene application on the desktop 101, the display panel of the electronic device 10 displays the following Fig.14 The user interface 108 shown in (b) in the figure includes a text box for inputting an account number and a password to prompt the user to log in to the application by verifying the identity. The user interface 108 also includes a to-be-selected control 110. The to-be-selected control 110 is used to indicate whether the electronic device is allowed to automatically upload map update information. When the electronic device 10 detects that the user clicks to trigger and checks the to-be-selected control 110, the automatic uploading of map update information is allowed in the background. On the contrary, when the user does not click to trigger and check the to-be-selected control 110, the automatic uploading of map update information is not allowed in the background. Through such a design, the user's current willingness to share map update information is taken into account (for example, the user does not want to upload when he does not want to consume additional traffic), and when the user's consent is obtained, the map update information can be automatically uploaded in the background, thereby ensuring the timeliness of uploading the map update information and avoiding the link of uploading the map update information from interfering with the user's use of the application.

[0270] After the user of the electronic device 10 clicks to trigger the check to be selected control 11, and detects that the user enters the account and password to log in (the electronic device 10 verifies that the account and password are correct), on the one hand, the electronic device enters the application, for example, the display panel of the electronic device 10 displays the following Fig.14The user interface 106 shown in (c) in the figure includes, for example, an electronic map interface and multiple controls, such as an electronic map control, a satellite map control, and an AR control. Exemplarily, the electronic map control is a control for controlling an application to enter an electronic map interface, the satellite map control is a control for controlling an application to enter a satellite map interface, and the AR control is a control for controlling an application to enter an AR interface.

[0271] On the other hand, the electronic device 10 starts the process of downloading the global sub-map in the background. After the global sub-map is downloaded, the electronic device 10 further performs the identification of non-redundant key frames in the background. If there are non-redundant key frames, the non-redundant key frames can be further integrated into the global sub-map to obtain map update information, and the map update information is uploaded to the server in the background to update the global map.

[0272] It can be seen that in the embodiment of the present application, the electronic device downloads the global sub-map in the global map from the server, and obtains the position and posture of the terminal in the local coordinate system and the position and posture in the global coordinate system respectively according to the same frame. Based on these two positions, the coordinate system transformation information (such as the coordinate system transformation matrix) between the two coordinate systems can be obtained. According to this coordinate system transformation matrix, the synchronization of the two coordinate systems can be achieved. In this way, the information originally represented by the local coordinate system (such as the local position and posture, the feature points of the image, the 3D map points of the SLAM map, etc.) can be transformed to the global coordinate system based on the coordinate system transformation matrix. By comparing the SLAM map in the global coordinate system and the global sub-map and the SLAM map in the electronic device, the non-redundant key frames of the SLAM map are identified, and the computing resources and computing power of the electronic device side are used to merge the non-redundant key frames into the global sub-map, thereby obtaining the map update information. The map update information only needs to include the changed key frame position and posture, the common view relationship and the 3D map point. Compared with the global sub-map originally downloaded, the data volume will be much smaller, so the transmission bandwidth resources are further saved. After the electronic device sends the map update information to the server, the server can update the global map in the server based on the map update information, thereby reducing the server computing load and improving the update efficiency and robustness of the global map.

[0273] See also Fig.15 , Fig.15 This is a flow chart of another global map updating method provided in an embodiment of the present application, which is described from the electronic device side and the server side respectively. Fig.15 With the aforementioned Fig.10 The main difference between the embodiments is that Fig.10 The map update information in the embodiment is the key frame poses, co-viewing relationships and 3D map points that have changed in the global sub-map. Fig.15The map update information in the embodiment is directly a non-redundant key frame. The relevant steps of the method are briefly described as follows:

[0274] S501: An electronic device sends first location fingerprint information indicating an initial location of the electronic device to a server.

[0275] S502: The server obtains a global sub-map matching the first location fingerprint information from the global map. The global sub-map is a sub-map in the global map associated with the location of the electronic device.

[0276] S503: The server sends the global sub-map to the electronic device. Correspondingly, the electronic device receives the global sub-map.

[0277] S504: The electronic device stores the global sub-map in the SLAM system of the electronic device.

[0278] S505: The electronic device calculates coordinate system transformation information, and transforms the SLAM map based on the coordinate system transformation information.

[0279] S506: The electronic device determines whether there is a non-redundant key frame.

[0280] The specific contents of the above steps S501-S506 can be the same as those in the above Fig.10 Steps S301-S306 in the embodiment are the same and will not be described here for the sake of brevity.

[0281] S507: If there is a non-redundant key frame, the electronic device sends the non-redundant key frame to the server, and correspondingly, the server receives the non-redundant key frame.

[0282] S508: The server updates the global map in the server according to the map update information.

[0283] In this embodiment, when a new key frame is inserted into or is about to enter the SLAM map, if the electronic device determines that the new key frame is a non-redundant key frame, in order to save the computing power of the electronic device, the non-redundant key frame can also be directly sent to the server, and the server executes the process of fusing (or inserting) the non-redundant key frame into the global map in the server.

[0284] Similarly, the server can add keyframe nodes (undirected graph structure) to the global map and update the co-visibility relationship between the non-redundant keyframe and the keyframe in the global map, that is, the server can calculate which 3D map points in the global map can be observed by at least one keyframe in the global map and the non-redundant keyframe at the same time, thereby updating the co-visibility relationship between the keyframes and the non-redundant keyframes in the global map. After updating the co-visibility relationship of the keyframes of the global map, the server can use the triangulation algorithm to calculate new 3D map points, and optimize the pose and 3D map point coordinates corresponding to the non-redundant keyframes through the BA algorithm, thereby completing the process of fusing (or inserting) the non-redundant keyframes into the global map and realizing the update of the global map.

[0285] It can be seen that in the embodiment of the present application, the electronic device downloads the global sub-map in the global map from the server, and obtains the position and posture of the terminal in the local coordinate system and the position and posture in the global coordinate system respectively according to the same frame. Based on these two positions, the coordinate system transformation information (such as the coordinate system transformation matrix) between the two coordinate systems can be obtained. According to this coordinate system transformation matrix, the synchronization of the two coordinate systems can be achieved, so that the information originally represented by the local coordinate system (such as the local position and posture, the feature points of the image, the 3D map points of the SLAM map, etc.) can be transformed to the global coordinate system based on the coordinate system transformation matrix. By comparing the SLAM map and the global sub-map under the global coordinate system, the non-redundant key frames of the SLAM map are identified, and the non-redundant key frames are sent to the server, and the server then uses the non-redundant key frames to merge into the global map, thereby also being able to achieve efficient updating of the global map in the server. Such a scheme is conducive to reducing the computing load of the electronic device and ensuring the accuracy of map fusion.

[0286] See also Fig.16 , Fig.16 It is shown that in yet another specific implementation, Figure 4 Each functional module in the electronic device 10 shown may further include components, and each functional module in the server 20 may further include components. Fig.16 Embodiment and the foregoing Figure 5 The main difference between the embodiments is that Fig.16 In the functional module architecture shown in the embodiment, the functional configuration of the global positioning module 16 is implemented on the server 20 side, that is, the server 20 also includes an image retrieval module 161, a feature extraction module 162, a feature matching module 163 and a posture estimation module 164.

[0287] The global pose module 16 in the server 20 is used to obtain at least one frame of video image uploaded by the electronic device at the initial moment or at any moment thereafter, calculate the global pose (for example, the second pose data) of the electronic device 10 in the global sub-map based on the video image, and send the global pose to the electronic device 10. Specifically, the video image in the video image sequence uploaded by the electronic device 10 can be obtained by the image retrieval module 161, the feature extraction module 162 performs feature extraction based on the video image to obtain image features, the feature matching module 163 performs feature matching on the image features in the global sub-map to obtain map features matching the image features; the pose estimation module 164 calculates the global pose (for example, the second pose data) of the electronic device 10 in the global sub-map based on the image features and the map features, and sends the global pose to the electronic device 10.

[0288] Fig.16 The components that may be further included in other functional modules of the server 20 shown in the figure can be similarly referred to in the foregoing Figure 5 For the sake of brevity, the relevant description of the server 20 in the embodiment will not be repeated here.

[0289] Fig.16 The components that may be further included in each functional module of the electronic device 10 shown in the figure can be similarly referred to in the above Figure 5 For the sake of brevity, the related description of the electronic device 10 in the embodiment will not be repeated here.

[0290] In a specific embodiment, the functional modules in the electronic device 10 can cooperate with each other to perform the following steps: Fig.17 The various functional modules in the server 20 can cooperate with each other to perform the following operations: Fig.17 Functions of the server side in the embodiment

[0291] See also Fig.17 , Fig.17 This is a flowchart of another virtual object display method provided by an embodiment of the present application, which is described from the electronic device and the server side respectively. The method includes but is not limited to the following steps:

[0292] S601: An electronic device sends first position fingerprint information indicating an initial position of the electronic device and at least one frame of video image to a server.

[0293] In a specific embodiment, in order to achieve the first global positioning of the electronic device, the electronic device needs to upload location fingerprint information and at least one or more currently captured video images to the server. Among them, the at least one frame of video image can be a video image in a sequence of video images taken by the electronic device through a camera. For example, it can be the first frame image in a sequence of video images taken by a camera. The initial position indicated by the location fingerprint information may be the geographical location information of the electronic device when the electronic device requests to download a map. For example, the source of the location fingerprint information includes initial location information, signal strength information, signal characteristic information, etc. measured by positioning methods such as GNSS / WiFi / Bluetooth / base station; it may also be location information entered by the user.

[0294] In a specific implementation, the electronic device may package the first location fingerprint information and a frame of video image together and send them to the server.

[0295] In another specific implementation, the electronic device may also independently send the first position fingerprint information and a frame of video image to the server.

[0296] S602: The server obtains a global sub-map matching the first location fingerprint information from the global map. The global sub-map is a sub-map in the global map associated with the location of the electronic device.

[0297] In one embodiment, the server matches the first location fingerprint information with the location fingerprint information of the sub-map pre-stored in the database by the server, and the sub-map in the database is a sub-map belonging to the global map. If there is a matching sub-map, the sub-map is the global sub-map that needs to be sent to the electronic device later.

[0298] In another embodiment, the server traverses the global map stored in the server according to the first location fingerprint information until an area matching the location fingerprint information is found, and the server takes the area from the global map as a global sub-map.

[0299] S603: The server performs posture calculation based on the video image and the global sub-map to obtain the global posture of the electronic device in the global sub-map (also referred to as second posture data).

[0300] In one embodiment of the present application, the first calculation of the global pose of the electronic device can be completed on the server side. The process of the server performing the global pose calculation also includes image retrieval, feature extraction, feature matching, pose estimation and other processes.

[0301] For example, the server performs feature detection on the video image and extracts the image position of the feature in the video image. The feature detection algorithm is not limited to feature detection methods such as FAST, ORB, SIFT, SURF, D2Net, and SuperPoint. Then, each detected feature is described. The feature description algorithm is not limited to feature description methods such as ORB, SIFT, SURF, BRIEF, BRISK, FREAK, D2Net, and SuperPoint, thereby forming a one-dimensional vector for subsequent feature matching. Through feature matching, the server can match the map content (such as one or more key frames) that is most similar to the video image from the global submap. Specific methods include, for example, traditional image retrieval methods based on BOW, VLAD, and new image retrieval methods based on NetVLAD and AI. Feature matching specifically calculates the similarity between two feature descriptions. For Float type vectors, it can be calculated by Euclidean distance; for binary vectors, it can be calculated by XOR. After finding the map content most similar to the video image, the pose estimation can be performed based on the video image and the most similar map content. For example, the PnP, EPnP, 3D-3D and other registration algorithms can be used to calculate the second pose data.

[0302] S604: After completing the pose estimation, the server sends the global pose (second pose data) of the electronic device in the global submap to the electronic device. Correspondingly, the electronic device receives the second pose data. The electronic device can subsequently use the second pose data to calculate coordinate system transformation information (e.g., coordinate system transformation matrix).

[0303] S605: The server sends the global sub-map to the electronic device. Correspondingly, the electronic device receives the global sub-map.

[0304] S606: The electronic device stores the global sub-map in the SLAM system of the electronic device.

[0305] S607: The electronic device calculates coordinate system transformation information.

[0306] The process of calculating coordinate system transformation information of the electronic device can be described as follows: the electronic device obtains a video image, which is the same as the video image sent to the server in S601; then, on the one hand, based on the video image and the SLAM map, the local pose (here referred to as the first pose data) of the electronic device in the SLAM map under the local coordinate system originally constructed is determined. The specific implementation process can be similar to reference Fig.10 The first position data is described in S305 of the embodiment, which will not be repeated here for the sake of brevity.

[0307] Then, the electronic device can further obtain coordinate system transformation information between the first coordinate system of the SLAM map and the second coordinate system of the global map according to the first posture data and the second posture data obtained in S604. The coordinate system transformation information can be, for example, a coordinate system transformation matrix. Fig.11 For the sake of brevity, the related description of the embodiments will not be repeated here.

[0308] S608: The electronic device determines whether there is a non-redundant key frame.

[0309] S609: If there are non-redundant key frames, the electronic device merges the non-redundant key frames into the global sub-map to obtain map update information.

[0310] S610: The electronic device sends map update information to a server, and correspondingly, the server receives the map update information.

[0311] S611: The server updates the global map in the server according to the map update information.

[0312] The specific implementation process of the above steps S608-S611 can be similarly referred to Fig.10 For the sake of brevity, the description of embodiments S306-S309 will not be repeated here.

[0313] It can be seen that in the embodiment of the present application, the electronic device needs to download the global sub-map of the corresponding area first, and the process of downloading the map takes a certain amount of time. In order to speed up the user's entry into the application, the first global pose estimation can be completed on the server side. That is to say, after the application is started, the first global pose estimation is performed on the server side. While starting the global pose estimation, the server obtains the global sub-map and transmits it to the electronic device accordingly, thereby increasing the speed at which the user enters the application. The user does not perceive the existence of the delay in the map download process, so that the user waiting caused by the download delay can be avoided, further improving the user experience. The electronic device compares the global sub-map with the SLAM map in the electronic device, and uses the computing resources and computing power on the electronic device side to obtain the map update information, which can be used to update the map content in the global sub-map. Therefore, after the electronic device sends the map update information to the server, the server can implement the global map update in the server based on the map update information. In this way, the server computing load is reduced and the efficiency of the server updating the global map is improved. Compared with the image data captured by the camera, the map update information has less data volume, so it also saves transmission bandwidth resources.

[0314] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions, and when the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a network site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, microwave, etc.) mode to another network site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or it can be a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape, etc.), an optical medium (e.g., a DVD, etc.), or a semiconductor medium (e.g., a solid-state hard disk), etc.

Claims

1. A virtual object display method, applied to a first electronic device having a display component and a camera, characterized in that: The method comprises: Detecting the user opening the app; In response to the operation, a first global sub-map is downloaded from the server and stored in a Simultaneous Localization and Mapping (SLAM) system of the first electronic device; the first global sub-map is a sub-map in the global map associated with the position of the first electronic device; A virtual object is displayed on the display component based on the posture data of the first electronic device, wherein the posture data of the first electronic device is obtained by the SLAM system performing posture calculation based on at least the video image captured by the camera and the first global sub-map, wherein the global map on the server is updated based on map update information sent by one or more second electronic devices, wherein the one or more second electronic devices are electronic devices other than the first electronic device, and the map update information is used to indicate the difference between the SLAM map in the first coordinate system or the second coordinate system constructed by the SLAM system of the second electronic device and the global sub-map in the second coordinate system, and the global sub-map is a sub-map associated with the position of the second electronic device in the global map in the second coordinate system.

2. The method according to claim 1, characterized in that The map update information is obtained by the SLAM system of the second electronic device according to a comparison result of the SLAM map in the second coordinate system and the global sub-map in the second coordinate system; wherein the SLAM map in the second coordinate system is obtained based on the SLAM map in the first coordinate system and the coordinate system transformation information between the first coordinate system and the second coordinate system; or, The map update information is obtained by the SLAM system of the second electronic device according to a comparison result between the SLAM map in the first coordinate system and the global sub-map in the second coordinate system and the coordinate system transformation information.

3. The method according to claim 1 or 2, characterized in that: The map update information includes: The pose data, three-dimensional map points and common view data corresponding to the target key frame of the SLAM map constructed by the SLAM system of the second electronic device, the common view data is used to indicate the common view relationship between the target key frame and the key frame of the second global submap in the second electronic device, and the second global submap is a submap in the global map associated with the position of the second electronic device.

4. The method according to claim 3, characterized in that The target key frame is a non-redundant key frame, which represents a key frame that exists in the SLAM map of the second electronic device but does not exist in the second global sub-map.

5. The method according to claim 1 or 2, characterized in that: The map update information includes: A key frame that exists in the SLAM map of the second electronic device but does not exist in a second global sub-map of the second electronic device, where the second global sub-map is a sub-map in the global map associated with the location of the second electronic device.

6. The method according to any one of claims 1-2 and 4, characterized in that: In response to the operation, downloading the first global sub-map from the server includes: Sending first location fingerprint information indicating an initial location of the first electronic device to a server; The first global sub-map is received from the server, the first global sub-map corresponds to the second location fingerprint information, and the first location fingerprint information matches the second location fingerprint information.

7. A global map updating method, applied to an electronic device, characterized in that: The method comprises: Acquire a global sub-map associated with the position of the electronic device from a server, wherein the global sub-map is a sub-map associated with the position of the electronic device in a global map in a second coordinate system; Obtaining map update information based on a comparison result between a SLAM map in a second coordinate system constructed by the SLAM system of the electronic device and a global submap in the second coordinate system, or based on a comparison result between a SLAM map in a first coordinate system constructed by the SLAM system of the electronic device and a global submap in the second coordinate system and coordinate system transformation information; wherein the SLAM map in the second coordinate system is obtained based on the SLAM map in the first coordinate system and the coordinate system transformation information between the first coordinate system and the second coordinate system; and the map update information is used to indicate the difference between the SLAM map in the second coordinate system or the first coordinate system and the global submap in the second coordinate system; The map update information is sent to the server, where the map update information is used to update the global map in the second coordinate system in the server.

8. The method according to claim 7, characterized in that The SLAM map in the second coordinate system is specifically obtained by transforming the SLAM map in the first coordinate system based on the coordinate system transformation information; The obtaining of map update information based on a comparison result of the SLAM map in the second coordinate system constructed by the SLAM system of the electronic device and the global sub-map in the second coordinate system includes: By comparing the SLAM map in the second coordinate system with the global sub-map in the second coordinate system, a non-redundant key frame is obtained, wherein the non-redundant key frame represents a key frame that exists in the SLAM map in the second coordinate system but does not exist in the global sub-map in the second coordinate system; Fusion the non-redundant key frames into a global submap in the second coordinate system to obtain a fused global submap; The map update information is obtained from the fused global sub-map.

9. The method according to claim 8, characterized in that The step of fusing the non-redundant key frames into a global sub-map in the second coordinate system includes: Adding the non-redundant key frame as a new key frame node to the global submap in the second coordinate system; Updating the co-viewing relationship between the non-redundant key frame and the key frame in the global sub-map in the second coordinate system; Calculating the pose data and three-dimensional map points corresponding to the non-redundant keyframes; Accordingly, obtaining the map update information from the fused global sub-map includes: The pose data, three-dimensional map points and common view data corresponding to the non-redundant key frame are obtained from the fused global sub-map as the map update information, and the common view data is used to indicate the common view relationship between the non-redundant key frame and the key frame of the global sub-map in the second coordinate system.

10. The method according to claim 7, characterized in that The obtaining of map update information according to the comparison result of the SLAM map in the first coordinate system and the global sub-map in the second coordinate system and the coordinate system transformation information comprises: By comparing the SLAM map in the first coordinate system with the global submap in the second coordinate system, a non-redundant key frame is obtained, where the non-redundant key frame is a key frame existing in the SLAM map in the first coordinate system, and the non-redundant key frame does not exist in the global submap in the second coordinate system after being transformed by the coordinate system transformation information; The non-redundant key frame transformed by the coordinate system transformation information is merged into the global sub-map in the second coordinate system to obtain the map update information; the non-redundant key frame transformed by the coordinate system transformation information is the key frame in the second coordinate system.

11. The method according to any one of claims 7 to 10, characterized in that: The acquiring, from the server, a global sub-map corresponding to the location of the electronic device comprises: Sending indication information of the initial position of the electronic device to a server; The global sub-map is received from the server, where the global sub-map is determined according to an initial position of the electronic device.

12. The method according to claim 11, characterized in that The indication information of the initial position of the electronic device includes first position fingerprint information for indicating the initial position of the electronic device; the global sub-map corresponds to second position fingerprint information, and the first position fingerprint information matches the second position fingerprint information.

13. The method according to any one of claims 7 to 10 and 12, characterized in that: Before getting map update information, it also includes: Determine first position data of the electronic device in the SLAM map in the first coordinate system according to the collected video image and the SLAM map in the first coordinate system; Determining second position and posture data of the electronic device in the global submap in the second coordinate system according to the video image and the global submap in the second coordinate system; The coordinate system transformation information between the first coordinate system of the SLAM map and the second coordinate system of the global map is obtained according to the first pose data and the second pose data.

14. The method according to claim 13, characterized in that The step of determining the first position data of the electronic device in the SLAM map in the first coordinate system according to the collected video image and the SLAM map in the first coordinate system comprises: According to the video image, the SLAM map in the first coordinate system and the motion data collected by the electronic device, the first position data of the electronic device in the SLAM map in the first coordinate system is obtained; the motion data includes motion speed data and motion direction data.

15. The method according to claim 13, characterized in that The determining, according to the video image and the global sub-map in the second coordinate system, second position data of the electronic device in the global sub-map in the second coordinate system includes: Performing feature extraction on the video image to obtain image features; Performing feature matching on the image feature in the global sub-map in the second coordinate system to obtain a map feature matching the image feature; Second position data of the electronic device in the global sub-map in the second coordinate system is calculated based on the image features and the map features.

16. The method according to claim 13, characterized in that The determining, according to the video image and the global sub-map in the second coordinate system, second position data of the electronic device in the global sub-map in the second coordinate system includes: Sending the video image to the server; The second posture data is received from the server, where the second posture data is determined by the server through feature extraction and feature matching based on the video image and a global sub-map associated with the position of the electronic device in the global map under the second coordinate system.

17. A global map updating method, applied to a server, characterized in that: The method comprises: Sending, according to a request of the electronic device, a global sub-map corresponding to the position of the electronic device to the electronic device, wherein the global sub-map is a sub-map associated with the position of the electronic device in the global map in the second coordinate system; receiving map update information from the electronic device; the map update information is used to indicate the difference between the SLAM map in the first coordinate system or the second coordinate system constructed by the SLAM system of the electronic device and the global sub-map in the second coordinate system; The global map is updated according to the map update information.

18. The method according to claim 17, characterized in that The map update information represents information associated with non-redundant key frames; the non-redundant key frames represent key frames that exist in the SLAM map in the second coordinate system but do not exist in the global sub-map in the second coordinate system.

19. The method according to claim 18, characterized in that The map update information specifically includes: The pose data, three-dimensional map points and common view data corresponding to the non-redundant key frame, the common view data is used to indicate the common view relationship between the non-redundant key frame and the key frame of the global sub-map in the second coordinate system.

20. The method according to claim 18, characterized in that The updating of the global map according to the map update information comprises: The map update information is added to the global map.

21. The method according to any one of claims 17 to 20, characterized in that: The sending, according to a request of the electronic device, a global sub-map corresponding to the position of the electronic device to the electronic device comprises: Receiving information indicating an initial position of the electronic device; According to the initial position of the electronic device, acquiring the global sub-map corresponding to the position of the electronic device in the global map; The global sub-map is sent to the electronic device.

22. The method according to claim 21, characterized in that The indication information of the initial position of the electronic device includes first position fingerprint information for indicating the initial position of the electronic device; the global sub-map in the global map corresponds to the second position fingerprint information; The acquiring, in the global map, the global sub-map corresponding to the position of the electronic device according to the initial position of the electronic device comprises: According to the first location fingerprint information, the global sub-map having the second location fingerprint information matching the first location fingerprint information is found in the global map.

23. An electronic device for displaying a virtual object, the electronic device being a first electronic device, characterized in that: include: Display components; Camera; one or more processors; Memory; Multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, cause the first electronic device to perform the following steps: Detecting the user opening the app; In response to the operation, a first global sub-map is downloaded from the server and stored in a Simultaneous Localization and Mapping (SLAM) system of the first electronic device; the first global sub-map is a sub-map in the global map associated with the position of the first electronic device; A virtual object is displayed on the display component based on the posture data of the first electronic device, wherein the posture data of the first electronic device is obtained by performing posture calculation based on at least the video image captured by the camera and the first global sub-map, wherein the global map on the server is updated by the SLAM system based on map update information sent by one or more second electronic devices, wherein the one or more second electronic devices are electronic devices other than the first electronic device.

24. The electronic device according to claim 23, characterized in that: The map update information is obtained by the SLAM system of the second electronic device according to a comparison result of the SLAM map in the second coordinate system and the global sub-map in the second coordinate system; wherein the SLAM map in the second coordinate system is obtained based on the SLAM map in the first coordinate system and the coordinate system transformation information between the first coordinate system and the second coordinate system; or, The map update information is obtained by the SLAM system of the second electronic device according to a comparison result between the SLAM map in the first coordinate system and the global sub-map in the second coordinate system and the coordinate system transformation information.

25. The electronic device according to claim 23 or 24, characterized in that: The map update information includes: The pose data, three-dimensional map points and common view data corresponding to the target key frame of the SLAM map constructed by the SLAM system of the second electronic device, the common view data is used to indicate the common view relationship between the target key frame and the key frame of the second global submap in the second electronic device, and the second global submap is a submap in the global map associated with the position of the second electronic device.

26. The electronic device according to claim 25, characterized in that: The target key frame is a non-redundant key frame, which represents a key frame that exists in the SLAM map of the second electronic device but does not exist in the second global sub-map.

27. The electronic device according to claim 23 or 24, characterized in that: The map update information includes: A key frame that exists in the SLAM map of the second electronic device but does not exist in a second global sub-map of the second electronic device, where the second global sub-map is a sub-map in the global map associated with the location of the second electronic device.

28. The electronic device according to any one of claims 23 to 24 and 26, characterized in that: When the instruction is executed by the electronic device, the electronic device specifically performs the following steps: Sending first location fingerprint information indicating an initial location of the first electronic device to a server; The first global sub-map is received from the server, the first global sub-map corresponds to the second location fingerprint information, and the first location fingerprint information matches the second location fingerprint information.

29. An electronic device for global map updating, characterized in that: include: A communication module, configured to obtain a global sub-map associated with the position of the electronic device from a server, wherein the global sub-map is a sub-map associated with the position of the electronic device in a global map in a second coordinate system; A SLAM module, configured to obtain map update information according to a comparison result between a SLAM map in a second coordinate system constructed by the SLAM module and a global submap in the second coordinate system, or according to a comparison result between a SLAM map in a first coordinate system constructed by the SLAM module and a global submap in the second coordinate system and coordinate system transformation information; The SLAM map in the second coordinate system is obtained based on the SLAM map in the first coordinate system and the coordinate system transformation information between the first coordinate system and the second coordinate system; the map update information is used to indicate the difference between the SLAM map in the second coordinate system or the first coordinate system and the global submap in the second coordinate system; The communication module is further used to send the map update information to the server, where the map update information is used to update the global map in the second coordinate system in the server.

30. The electronic device according to claim 29, characterized in that The SLAM map in the second coordinate system is specifically obtained by transforming the SLAM map in the first coordinate system based on the coordinate system transformation information; The SLAM module is specifically used for: By comparing the SLAM map in the second coordinate system with the global sub-map in the second coordinate system, a non-redundant key frame is obtained, wherein the non-redundant key frame represents a key frame that exists in the SLAM map in the second coordinate system but does not exist in the global sub-map in the second coordinate system; Fusion the non-redundant key frames into a global submap in the second coordinate system to obtain a fused global submap; The map update information is obtained from the fused global sub-map.

31. The electronic device according to claim 30, characterized in that: The SLAM module is specifically used for: Adding the non-redundant key frame as a new key frame node to the global submap in the second coordinate system; Updating the co-viewing relationship between the non-redundant key frame and the key frame in the global sub-map in the second coordinate system; Calculating the pose data and three-dimensional map points corresponding to the non-redundant keyframes; The pose data, three-dimensional map points and common view data corresponding to the non-redundant key frame are obtained from the fused global sub-map as the map update information, and the common view data is used to indicate the common view relationship between the non-redundant key frame and the key frame of the global sub-map in the second coordinate system.

32. The electronic device according to claim 29, characterized in that The SLAM module is specifically used for: By comparing the SLAM map in the first coordinate system with the global submap in the second coordinate system, a non-redundant key frame is obtained, where the non-redundant key frame is a key frame existing in the SLAM map in the first coordinate system, and the non-redundant key frame does not exist in the global submap in the second coordinate system after being transformed by the coordinate system transformation information; The non-redundant key frame transformed by the coordinate system transformation information is merged into the global sub-map in the second coordinate system to obtain the map update information; the non-redundant key frame transformed by the coordinate system transformation information is the key frame in the second coordinate system.

33. The electronic device according to any one of claims 29 to 32, characterized in that: The communication module is specifically used for: Sending indication information of the initial position of the electronic device to a server; The global sub-map is received from the server, where the global sub-map is determined according to an initial position of the electronic device.

34. The electronic device according to claim 33, characterized in that: The indication information of the initial position of the electronic device includes first position fingerprint information for indicating the initial position of the electronic device; the global sub-map corresponds to second position fingerprint information, and the first position fingerprint information matches the second position fingerprint information.

35. The electronic device according to any one of claims 29 to 32 and 34, characterized in that: The electronic device also includes a global positioning module and a coordinate system change matrix calculation module; The SLAM module is specifically used to determine the first position data of the electronic device in the SLAM map in the first coordinate system according to the collected video image and the SLAM map in the first coordinate system; The global positioning module is specifically used to determine the second position data of the electronic device in the global sub-map in the second coordinate system according to the video image and the global sub-map in the second coordinate system; The coordinate system change matrix calculation module is specifically used to obtain the coordinate system transformation information between the first coordinate system of the SLAM map and the second coordinate system of the global map according to the first posture data and the second posture data.

36. The electronic device according to claim 35, characterized in that: The SLAM module is specifically used for: According to the video image, the SLAM map in the first coordinate system and the motion data collected by the electronic device, the first position data of the electronic device in the SLAM map in the first coordinate system is obtained; the motion data includes motion speed data and motion direction data.

37. The electronic device according to claim 35, characterized in that: The global positioning module is specifically used for: Performing feature extraction on the video image to obtain image features; Performing feature matching on the image feature in the global sub-map in the second coordinate system to obtain a map feature matching the image feature; Second position data of the electronic device in the global sub-map in the second coordinate system is calculated based on the image features and the map features.

38. The electronic device according to claim 35, characterized in that: The communication module is specifically used to: send the video image to the server; The second posture data is received from the server, where the second posture data is determined by the server through feature extraction and feature matching based on the video image and a global sub-map associated with the position of the electronic device in the global map under the second coordinate system.

39. A server for global maps, characterized in that: include: a communication module, configured to send a global sub-map corresponding to the position of the electronic device to the electronic device according to a request of the electronic device, wherein the global sub-map is a sub-map associated with the position of the electronic device in the global map under the second coordinate system; The communication module is further used to receive map update information from the electronic device; the map update information is used to indicate the difference between the SLAM map in the first coordinate system or the second coordinate system constructed by the SLAM system of the electronic device and the global sub-map in the second coordinate system; A processing module is used to update the global map according to the map update information.

40. The server according to claim 39, characterized in that The map update information represents information associated with non-redundant key frames; the non-redundant key frames represent key frames that exist in the SLAM map in the second coordinate system but do not exist in the global sub-map in the second coordinate system.

41. The server according to claim 40, characterized in that The map update information specifically includes: The pose data, three-dimensional map points and common view data corresponding to the non-redundant key frame, the common view data is used to indicate the common view relationship between the non-redundant key frame and the key frame of the global sub-map in the second coordinate system.

42. The server according to claim 40, characterized in that The processing module is specifically used for: The map update information is added to the global map.

43. The server according to any one of claims 39 to 42, characterized in that: The communication module is specifically used for: Receiving information indicating an initial position of the electronic device; According to the initial position of the electronic device, acquiring the global sub-map corresponding to the position of the electronic device in the global map; The global sub-map is sent to the electronic device.

44. The server according to claim 43, characterized in that The indication information of the initial position of the electronic device includes first position fingerprint information for indicating the initial position of the electronic device; the global sub-map in the global map corresponds to the second position fingerprint information; The processing module is specifically configured to: find, in the global map, the global sub-map having second location fingerprint information matching the first location fingerprint information, according to the first location fingerprint information.

45. A computer storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, enable the electronic device to execute the virtual object display method as claimed in any one of claims 1 to 6 or the global map updating method as claimed in any one of claims 7 to 16.

46. ​​A computer storage medium, characterized in that The method comprises computer instructions, which, when executed on a server, cause the server to execute the global map updating method according to any one of claims 17 to 22.