A virtual object display method and system based on collaborative computing

By adjusting the allocation of computing tasks according to network speed in the SLAM system, the problem of high power consumption of mobile terminals is solved, a balance between real-time performance and power consumption is achieved, and the power consumption of mobile terminals is reduced.

CN114399548BActive Publication Date: 2024-08-23PENG CHENG LAB
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111524703.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2024-08-23
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

Mobile terminals in existing SLAM systems require high computing power, resulting in high power consumption and serious heat generation, which affects the user experience.

Method used

A virtual object display method based on collaborative computing is used to adjust the allocation of computing tasks according to the difference in network speed between the mobile terminal and the edge server. When the network speed is low, the mobile terminal performs visual feature extraction and local map calculation locally. When the network speed is high, the virtual object display method is used. The calculation is performed by the edge server to reduce the computing power requirements of the mobile terminal.

Benefits of technology

While ensuring the real-time performance of pose data output and user experience, it also reduces the power consumption of mobile terminals and reduces the impact on battery life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114399548B
    Figure CN114399548B
Patent Text Reader

Abstract

The present invention discloses a virtual object display method and system based on collaborative computing. In the method provided by the present invention, when the network speed is low, the mobile terminal extracts visual features and calculates a local map locally based on the captured image, and does not require the image and map data transmission process between the edge server and the mobile terminal, which can ensure the real-time output of posture data and the user experience. When the network speed is high, the mobile terminal sends the captured image to the edge server for calculation. Due to the high network speed, the data transmission takes less time. While ensuring the real-time output of posture data, it is also possible to avoid the need to run algorithms with high computing power requirements on the mobile terminal all the time, thereby reducing the power consumption of the mobile terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision, and in particular to a virtual object display method and system based on collaborative computing. Background Art

[0002] SLAM (Simultaneous Localization and Mapping) is a core technology for virtual reality and other businesses. It mainly uses computer vision and other technologies to estimate the position and posture (abbreviated as pose) of mobile terminals and local map data of the environment in which they are located. In the existing SLAM system with end-to-end architecture, the algorithms deployed on the mobile terminal and the algorithm deployed in the cloud are fixed. In this system, the SLAM system requires high computing power from the mobile terminal, which will lead to high power consumption and severe heat generation of the mobile terminal.

[0003] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0004] In view of the above-mentioned defects of the prior art, the present invention provides a virtual object display method and system based on collaborative computing, aiming to solve the problem of high power consumption of mobile terminals in the SLAM system with deep end-cloud architecture in the prior art.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0006] A first aspect of the present invention provides a method for displaying a virtual object based on collaborative computing, the method comprising:

[0007] When the network speed between the mobile terminal and the edge server is less than the first preset threshold:

[0008] The mobile terminal calculates a first pose of the mobile terminal in a first coordinate system, and acquires visual features according to an image taken by the mobile terminal;

[0009] The mobile terminal calculates a local map according to the first posture and the visual feature, and sends the local map to the edge server;

[0010] The edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal;

[0011] The mobile terminal calculates a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and displays a virtual object according to the second posture;

[0012] When the network speed between the mobile terminal and the edge server is greater than a second preset threshold:

[0013] The mobile terminal calculates a first pose of the mobile terminal in a first coordinate system, and sends an image captured by the mobile terminal and the first pose to the edge server;

[0014] The edge server obtains the visual features according to the image taken by the mobile terminal, and calculates the local map according to the first posture and the visual features;

[0015] The edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal;

[0016] The mobile terminal calculates a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and displays a virtual object according to the second posture;

[0017] The first preset threshold is smaller than the second preset threshold.

[0018] The method for displaying virtual objects based on collaborative computing, wherein the method further comprises:

[0019] When the network speed between the mobile terminal and the edge server is greater than the first preset threshold and less than the second preset threshold:

[0020] The mobile terminal calculates a first pose of the mobile terminal in a first coordinate system, obtains visual features according to an image taken by the mobile terminal, and sends the first pose and the visual features to the edge server;

[0021] The edge server calculates the local map according to the first posture and the visual feature;

[0022] The edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal;

[0023] The mobile terminal calculates a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and displays a virtual object according to the second posture.

[0024] The method for displaying virtual objects based on collaborative computing, wherein the edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal, comprises:

[0025] After receiving the local map sent by the mobile terminal, the edge server optimizes and updates the local map;

[0026] The edge server sends the updated local map to the cloud server;

[0027] The cloud server obtains a global map according to the local maps corresponding to the multiple mobile terminals, and sends the global map to the edge server;

[0028] The edge server determines the global sub-map corresponding to the mobile terminal in the global map according to the location fingerprint of the mobile terminal, and sends the global sub-map to the mobile terminal.

[0029] The method for displaying virtual objects based on collaborative computing, wherein the mobile terminal calculates a second posture of the mobile terminal in a second coordinate system according to the global submap, comprises:

[0030] The mobile terminal calculates the second posture of the mobile terminal at the kth frame image according to the global submap;

[0031] The mobile terminal obtains the second posture of the mobile terminal at the lth frame image according to the second posture at the kth frame image, where l≥k.

[0032] The method for displaying a virtual object based on collaborative computing, wherein the mobile terminal acquires the second posture of the mobile terminal at the lth frame image according to the second posture at the kth frame image, comprises:

[0033] The mobile terminal acquires a target transformation matrix at the kth image frame according to the second posture at the kth image frame, wherein the target transformation matrix is ​​a transformation matrix that transforms the three-dimensional coordinates in the first coordinate system into the second coordinate system;

[0034] The mobile terminal obtains the second posture of the mobile terminal at the lth frame image according to the target transformation matrix at the kth frame image and the first posture of the mobile terminal at the lth frame image.

[0035] The virtual object display method based on collaborative computing, wherein the mobile terminal acquires the target transformation matrix at the kth frame image according to the second posture at the kth frame image, comprises:

[0036] The mobile terminal obtains the target conversion matrix through a first preset formula;

[0037] The first preset formula is:

[0038] G T L,k = G T c,k( L T c,k ) -1 ,

[0039] in, G T L,k represents the target transformation matrix at the k-th frame image, G T c,k represents the second posture of the mobile terminal at the kth frame, L T c,k Represents the first posture of the mobile terminal in the kth frame image.

[0040] The method for displaying virtual objects based on collaborative computing, wherein the mobile terminal acquires the second posture of the mobile terminal at the lth frame image according to the target transformation matrix at the kth frame image and the first posture of the mobile terminal at the lth frame image, comprises:

[0041] The mobile terminal obtains the second posture of the mobile terminal at the time of the first frame image by using a second preset formula;

[0042] The second preset formula is:

[0043] G T c,l = G T L,k L T c,l ,

[0044] in, G T L,k represents the target transformation matrix at the k-th frame image, G T c,l represents the second posture of the mobile terminal in the first frame image, L T c,l Represents the first posture of the mobile terminal in the lth frame image.

[0045] A second aspect of the present invention provides a virtual object display system based on collaborative computing, the system comprising a mobile terminal and an edge server;

[0046] When the network speed between the mobile terminal and the edge server is less than a first preset threshold;

[0047] The mobile terminal is used to calculate a first pose of the mobile terminal in a first coordinate system, obtain visual features according to an image taken by the mobile terminal, calculate a local map according to the first pose and the visual features, and send the local map to the edge server;

[0048] The edge server is used to update the local map, obtain the global sub-map corresponding to the mobile terminal, and send the global sub-map to the mobile terminal;

[0049] The mobile terminal is further used to calculate a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and display a virtual object according to the second posture;

[0050] When the network speed between the mobile terminal and the edge server is greater than a second preset threshold:

[0051] The mobile terminal is used to calculate a first pose of the mobile terminal in a first coordinate system, and send an image captured by the mobile terminal and the first pose to the edge server;

[0052] The edge server is used to obtain the visual features according to the image taken by the mobile terminal, calculate the local map according to the first posture and the visual features, update the local map, obtain the global submap corresponding to the mobile terminal, and send the global submap to the mobile terminal;

[0053] The mobile terminal is further used to calculate a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and display a virtual object according to the second posture;

[0054] The first preset threshold is smaller than the second preset threshold.

[0055] The virtual object display system based on collaborative computing, wherein when the network speed between the mobile terminal and the edge server is greater than the first preset threshold and less than the second preset threshold:

[0056] The mobile terminal is used to calculate a first pose of the mobile terminal in a first coordinate system, obtain visual features according to an image taken by the mobile terminal, and send the first pose and the visual features to the edge server;

[0057] The edge server is used to calculate the local map according to the first position and the visual feature, update the local map, obtain the global sub-map corresponding to the mobile terminal, and send the global sub-map to the mobile terminal;

[0058] The mobile terminal is used to calculate a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and display a virtual object according to the second posture.

[0059] The virtual object display system based on collaborative computing, wherein the system further comprises a cloud server, and the edge server comprises a map update module;

[0060] The map updating module is used to optimize and update the local map after receiving the local map sent by the mobile terminal, and send the updated local map to the cloud server;

[0061] The cloud server is used to obtain a global map according to the local maps corresponding to the multiple mobile terminals, and send the global map to the edge server;

[0062] The map updating module is further used to determine the global sub-map corresponding to the mobile terminal in the global map according to the location fingerprint of the mobile terminal, and send the global sub-map to the mobile terminal.

[0063] The virtual object display system based on collaborative computing, wherein the mobile terminal includes a second posture calculation module and a posture correction module;

[0064] The second posture calculation module is used to calculate the second posture of the mobile terminal at the kth frame image according to the global submap;

[0065] The posture correction module is used to obtain the second posture of the mobile terminal at the lth frame image according to the second posture at the kth frame image, where l≥k.

[0066] The virtual object display system based on collaborative computing, wherein the posture correction module includes a transformation matrix calculation unit and a posture acquisition unit;

[0067] The transformation matrix calculation unit is used to obtain the target transformation matrix at the k-th image frame according to the second posture at the k-th image frame, wherein the target transformation matrix is ​​a transformation matrix that transforms the three-dimensional coordinates in the local coordinate system into the world coordinate system;

[0068] The posture acquisition unit is used to acquire the second posture of the mobile terminal in the lth frame image according to the target transformation matrix in the kth frame image and the first posture of the mobile terminal in the lth frame image.

[0069] The virtual object display system based on collaborative computing, wherein the transformation matrix calculation unit is specifically used to calculate the target transformation matrix according to a first preset formula;

[0070] The first preset formula is:

[0071] G T L,k = G T c,k ( L Tc,k ) -1 ,

[0072] in, G T L,k represents the target transformation matrix at the k-th frame image, G T c,k represents the second posture of the mobile terminal at the kth frame, L T c,k Represents the first posture of the mobile terminal in the kth frame image.

[0073] The virtual object display system based on collaborative computing, wherein the posture acquisition unit is specifically used to calculate the second posture of the mobile terminal at the time of the first frame image according to a second preset formula;

[0074] The second preset formula is:

[0075] G T c,l = G T L,k L T c,l ,

[0076] in, G T L,k represents the target transformation matrix at the k-th frame image, G T c,l represents the second posture of the mobile terminal in the first frame image, L T c,l Represents the first posture of the mobile terminal in the lth frame image.

[0077] Compared with the prior art, the present invention provides a virtual object display method and system based on collaborative computing. In the virtual object display method based on collaborative computing, both the mobile terminal and the edge server can perform visual feature extraction and local map calculation. When the network speed is low, the mobile terminal extracts visual features based on the captured image locally, calculates the local map, and then sends the local map to the edge server to obtain the global map. When the network speed is high, the mobile terminal sends the captured image to the edge server, and the edge server extracts visual features based on the captured image and calculates the local map and then sends it to the mobile terminal. In this way, when the network speed is low, the mobile terminal extracts visual features based on the captured image locally and calculates the local map, and the image and map data transmission process between the edge server and the mobile terminal is not required, which can ensure the real-time output of the posture data and the user experience. When the network speed is high, the mobile terminal sends the captured image to the edge server for calculation. Due to the high network speed, the data transmission takes less time. While ensuring the real-time output of the posture data, it is also possible to make it unnecessary to run algorithms with high computing power requirements on the mobile terminal all the time, thereby reducing the power consumption of the mobile terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 A flowchart of an embodiment of a method for displaying a virtual object based on collaborative computing provided by the present invention;

[0079] Figure 2 A schematic diagram of algorithm modules respectively arranged on the end-edge-cloud in an embodiment of a virtual object display method based on collaborative computing provided by the present invention;

[0080] Figure 3 A schematic diagram of algorithm modules running on a mobile terminal and an edge server under a first network condition in an embodiment of a method for displaying a virtual object based on collaborative computing provided by the present invention;

[0081] Figure 4 A schematic diagram of algorithm modules running on a mobile terminal and an edge server under a second network condition in an embodiment of a virtual object display method based on collaborative computing provided by the present invention;

[0082] Figure 5 A schematic diagram of algorithm modules running on a mobile terminal and an edge server under a third network condition in an embodiment of a method for displaying a virtual object based on collaborative computing provided by the present invention;

[0083] Figure 6 A logical schematic diagram of turning on and off algorithm modules on a mobile terminal and an edge server under three network speed conditions in an embodiment of a virtual object display method based on system calculation provided by the present invention;

[0084] Figure 7This is a structural principle diagram of an embodiment of a virtual object display system based on collaborative computing provided by the present invention. DETAILED DESCRIPTION

[0085] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0086] The virtual object display method based on collaborative computing provided by the present invention can be applied to a virtual object display system based on collaborative computing, wherein the system includes a mobile terminal and an edge server, the mobile terminal and the edge server can communicate with each other, and the edge server behind the mobile terminal jointly executes the virtual object display method based on collaborative computing provided by the present invention.

[0087] Embodiment 1

[0088] In the present invention, the mobile terminal and the edge server collaborate to complete the display of virtual objects. Specifically, Figure 2 As shown, the mobile terminal and the edge server are both provided with a feature module and a map module. The feature module is used to extract visual features based on the input image, and the map module is used to calculate the local map based on the visual features and the position of the mobile terminal in the local coordinate system. The mobile terminal and the edge server are also both provided with a communication module to enable data transmission between the two. In the present invention, whether the feature module and the map module on the mobile terminal and the edge server are turned on is determined based on the network speed between the mobile terminal and the edge server, that is, under different network speed conditions, the calculation contents performed on the mobile terminal and the edge server are different. The network speed between the mobile terminal and the edge server can be obtained by the communication module set on the mobile terminal or the communication module set on the edge server. Figure 1 As shown, in one embodiment of the method for displaying virtual objects based on collaborative computing, when the network speed between the mobile terminal and the edge server is less than a first preset threshold, the method includes the steps of:

[0089] S110, the mobile terminal calculates a first pose of the mobile terminal in a first coordinate system, and acquires visual features according to an image taken by the mobile terminal;

[0090] S120: The mobile terminal calculates a local map according to the first posture and the visual features, and sends the local map to the edge server.

[0091] When the network speed between the mobile terminal and the edge server is greater than a second preset threshold, the method comprises the steps of:

[0092] S210, the mobile terminal calculates a first posture of the mobile terminal at a first coordinate, and sends an image captured by the mobile terminal and the first posture to the edge server;

[0093] S220: The edge server obtains the visual features according to the image taken by the mobile terminal, and calculates the local map according to the first posture and the visual features.

[0094] The second preset threshold is greater than the first preset threshold.

[0095] When the network speed between the mobile terminal and the edge server is less than the first preset threshold, the network speed is slow, indicating that the time taken for data transmission between the mobile terminal and the edge server will be longer, especially for images with large data volume, which will cause a large delay and affect the real-time experience of users. Figure 3As shown, in this embodiment, when the network speed between the mobile terminal and the edge server is less than the first preset threshold, the feature module and the map module on the mobile terminal are both turned on, and after the mobile terminal captures the image, the visual features are calculated locally on the mobile terminal. Specifically, the extraction of visual features includes the detection and description of feature points in the image, which can be implemented using existing open source algorithms. For example, feature point detection algorithms include FAST, ORB, DOG, Shi-Tomasi, Harris algorithms, etc., and description algorithms include BRIEF, Rbrief, ORB, SIFT algorithms, etc. The 2D features output by the feature module are standard data, such as the 2D coordinates of feature points on the image and feature descriptions of feature points. The mobile terminal also calculates the first pose of the mobile terminal in the first coordinate system, and the first coordinate system is the local coordinate system of the mobile terminal, that is, the first coordinate system is based on a certain point on the mobile terminal as the origin of the coordinate system. The data of the first pose of the mobile terminal can be calculated by the SLAM / VIO / VO module, which can be a non-open source API or an open source program, and the output of the module is standard data, for example, the pose is a quaternion and the position is a three-dimensional coordinate. After obtaining the first posture and the visual features, the local map of the mobile terminal can be calculated by the map module. The calculation of the map module includes 3D feature calculation and key frame posture calculation. The module can use non-open source API and open source code. The module also outputs standard data, such as 2D features, 3D features, and postures on key frames. Specifically, the feature descriptions used for 2D features and 3D features can be existing or newly developed, and the data format requires standardization. The 3D data in the 3D features and the position of the key frames are three-dimensional coordinates, and the posture of the key frames is quaternions. The 2D features output by the map module and the 2D features output by the feature module are of the same standard. After the mobile terminal calculates the local map, it sends the local map to the edge server.

[0096] When the network speed between the mobile terminal and the edge server is greater than the second preset threshold, it means that the network speed is fast, the data transmission speed between the mobile terminal and the edge server is high, and the delay effect is small. At this time, in order to prevent the mobile terminal from continuously performing high-computing power operations, causing the mobile terminal to consume too much power and heat up, thereby affecting the battery life, in this embodiment, if Figure 4As shown, when the network speed between the mobile terminal and the edge server is greater than the second preset threshold, the feature module and the map module on the mobile terminal are turned off, while the feature module and the map module on the edge server are turned on. After the mobile terminal captures an image, the captured image and the first posture calculated by the mobile terminal are sent to the edge server. After the edge server extracts visual features to obtain the visual features, it calculates the local map corresponding to the mobile terminal based on the first posture and the visual features.

[0097] In a possible implementation, when the network speed between the mobile terminal and the edge server is greater than the first preset threshold and less than the second preset threshold, in order to balance the real-time display of the virtual object and the power consumption of the mobile terminal, as Figure 5 As shown, the feature module on the mobile terminal is turned on and the map module is turned off, and the feature module on the edge server is turned off and the map module is turned on. That is, when the network speed between the mobile terminal and the edge server is greater than the first preset threshold and less than the second preset threshold, the virtual object display method provided in this embodiment includes:

[0098] S310, the mobile terminal calculates a first posture of the mobile terminal in a first coordinate system, obtains visual features according to an image taken by the mobile terminal, and sends the first posture and the visual features to the edge server;

[0099] S320: The edge server calculates the local map according to the first posture and the visual features.

[0100] When the network speed between the mobile terminal and the edge server is greater than the first preset threshold and less than the second preset threshold, it means that the network speed is normal. At this time, the picture with a large amount of data is left in the local mobile terminal for feature extraction, and the extracted features are sent to the edge server for local map calculation. In this way, a balance can be achieved between the real-time performance of the virtual object display calculation and the power consumption of the mobile terminal.

[0101] According to the different network speeds between the mobile terminal and the edge server, the overall logic diagram of opening and closing the feature module and the map module on the mobile terminal and the edge server is as follows: Figure 6 shown.

[0102] The edge server is a computing device with higher computing power than the mobile terminal, such as a computer or a dedicated server. One edge server corresponds to multiple mobile terminals. After obtaining the local map of a single mobile terminal, it is necessary to merge the local maps of multiple mobile terminals to form a global map. Figure 1 As shown, after the edge server obtains the local map, the virtual object display method based on collaborative computing provided by this embodiment further includes the steps of:

[0103] S300, the edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal;

[0104] S400: The mobile terminal calculates a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and displays a virtual object according to the second posture.

[0105] After the edge server obtains the local map corresponding to the mobile terminal, the local map is updated. Specifically, a map update module may be provided on the edge server. After receiving the local map corresponding to the mobile terminal, the map update module optimizes the local map to obtain a more accurate local map. The map update module on the edge server mainly uses a closed-loop correction algorithm and a nonlinear optimization algorithm to realize map update.

[0106] After updating the local map, the edge server obtains the global sub-map corresponding to the mobile terminal according to the updated local map. The edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal, including:

[0107] After receiving the local map sent by the mobile terminal, the edge server optimizes and updates the local map;

[0108] The edge server sends the updated local map to the cloud server;

[0109] The cloud server obtains a global map according to the local maps corresponding to the multiple mobile terminals, and sends the global map to the edge server;

[0110] The edge server determines the global sub-map corresponding to the mobile terminal in the global map according to the location fingerprint of the mobile terminal, and sends the global sub-map to the mobile terminal.

[0111] Specifically, Figure 2As shown, in this embodiment, the SLAM system also includes a cloud server, and a map update module is provided in the cloud server. The local map corresponding to each of the mobile terminals in the system is sent to the map update module in the cloud server. The map update module in the cloud server utilizes a closed-loop correction algorithm and a nonlinear optimization algorithm to fuse all the local maps into a global map in the same coordinate system (global coordinate system).

[0112] The edge server provides a map storage space for each adjacent mobile terminal. Each storage space stores the local map of the corresponding mobile terminal. This local map may include all scenes experienced by the mobile terminal. Therefore, the size of the local map on the edge server may be much larger than the local map on the terminal. The cloud server sends the global map to the edge server. After the edge server receives the global map returned by the cloud server, it will directly replace the original map data with the returned global map. That is to say, the map stored on the edge server will be the global map at this time. After obtaining the global map, the edge server obtains the global sub-map of the corresponding mobile terminal (i.e., the mobile terminal adjacent to the edge server) according to the global map and sends it to the corresponding mobile terminal. The edge server divides the part corresponding to the mobile terminal from the global map according to the location fingerprint of each mobile terminal as the global sub-map of the mobile terminal and sends it to the mobile terminal.

[0113] After receiving the global sub-map, the mobile terminal calculates a second posture in a second coordinate system according to the global sub-map.

[0114] The second coordinate system is a global coordinate system, the global map is a map obtained by integrating the local maps of all the mobile terminals by the cloud server in the second coordinate system, and the second coordinate system may be a world coordinate system. Specifically, the mobile terminal calculates the second position of the mobile terminal in the second coordinate system according to the global sub-map, including:

[0115] The mobile terminal calculates the second posture of the mobile terminal at the kth frame image according to the global submap;

[0116] The mobile terminal obtains the second posture of the mobile terminal at the lth frame image according to the second posture at the kth frame image, where l≥k.

[0117] The mobile terminal may calculate the second posture of the mobile terminal in each frame image according to the global submap through a registration algorithm such as PnP, EPnP, or 3D-3D.

[0118] In order to reduce the posture error that is continuously accumulated when calculating the first posture on the mobile terminal and ensure that the posture of the displayed virtual object is accurate, in this embodiment, posture correction is performed based on the second posture of the mobile terminal in the kth frame image to obtain the second posture of the mobile terminal in the lth frame image, where l≥k.

[0119] The mobile terminal acquires the second posture of the mobile terminal at the lth frame image according to the second posture at the kth frame image, comprising:

[0120] The mobile terminal acquires a target transformation matrix at the kth image frame according to the second posture at the kth image frame, wherein the target transformation matrix is ​​a transformation matrix that transforms the three-dimensional coordinates in the first coordinate system into the second coordinate system;

[0121] The mobile terminal obtains the second posture of the mobile terminal at the lth frame image according to the target transformation matrix at the kth frame image and the first posture of the mobile terminal at the lth frame image.

[0122] Let the second position in the second coordinate system calculated by the mobile terminal according to the global submap at the kth frame image be G T L,k , which represents the transformation matrix corresponding to the transformation of the three-dimensional coordinates represented in the camera coordinate system to the second coordinate system at the moment corresponding to the k-th frame image, and the first posture in the first coordinate system calculated by the mobile terminal at the time of the k-th frame image is L T c,k , then we have:

[0123] G T c,k = G T L,k L T c,k ,

[0124] G T L,k represents a transformation matrix (i.e., the target transformation matrix) for transforming the three-dimensional coordinates in the first coordinate system to the second coordinate system at the k-th frame image. Then, the mobile terminal acquires the target transformation matrix at the k-th frame image according to the second posture at the k-th frame image, including:

[0125] The mobile terminal obtains the target conversion matrix through a first preset formula;

[0126] The first preset formula is:

[0127] G T L,k = G T c,k ( L T c,k ) -1 ,

[0128] in, G T L,k represents the target transformation matrix at the k-th frame image, G T c,k represents the second posture of the mobile terminal at the kth frame, L T c,k Represents the first posture of the mobile terminal in the kth frame image.

[0129] The target transformation matrix at the kth frame image is used as the basis for subsequent posture data correction. At the subsequent lth frame image, the second posture of the mobile terminal at the lth frame image is obtained by a second preset formula, and the second preset formula is:

[0130] G T c,l = G T L,k L T c,l ,

[0131] in, G T L,k represents the target transformation matrix at the k-th frame image, G T c,l represents the second posture of the mobile terminal in the first frame image, L T c,l Represents the first posture of the mobile terminal in the lth frame image.

[0132] That is to say, in order to prevent the mobile terminal from accumulating posture errors, when calculating the second posture of the lth frame, the target transformation matrix obtained based on the second posture calculated based on the kth frame before the lth frame is used for calculation. The target transformation matrix can be updated every fixed time, that is, lk<n, that is, each time the target transformation matrix is ​​used to calculate the second posture of a certain frame, it is calculated based on the target transformation matrix corresponding to the frame whose time interval with the frame is within a certain threshold. In this way, the cumulative error of posture can be effectively reduced.

[0133] In summary, this embodiment provides a virtual object display method based on collaborative computing, in which both the mobile terminal and the edge server can perform visual feature extraction and local map calculation. When the network speed is low, the mobile terminal extracts visual features based on the captured image locally, calculates the local map, and then sends the local map to the edge server to obtain the global map. When the network speed is high, the mobile terminal sends the captured image to the edge server, and the edge server extracts visual features based on the captured image and calculates the local map and then sends it to the mobile terminal. In this way, when the network speed is low, the mobile terminal extracts visual features and calculates the local map based on the captured image locally, and the image and map data transmission process between the edge server and the mobile terminal is not required, which can ensure the real-time output of the posture data and the user experience. When the network speed is high, the mobile terminal sends the captured image to the edge server for calculation. Due to the high network speed, the data transmission takes less time. While ensuring the real-time output of the posture data, it is also possible to avoid running algorithms with high computing power requirements on the mobile terminal all the time, thereby reducing the power consumption of the mobile terminal.

[0134] It should be understood that, although the various steps in the flowcharts given in the accompanying drawings of the present specification are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0135] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0136] Embodiment 2

[0137] Based on the above embodiments, the present invention also provides a virtual object display system based on collaborative computing, such as Figure 7 As shown, the system includes: a mobile terminal and an edge server;

[0138] When the network speed between the mobile terminal and the edge server is less than a first preset threshold;

[0139] The mobile terminal is used to calculate a first pose of the mobile terminal in a first coordinate system, obtain visual features according to an image taken by the mobile terminal, calculate a local map according to the first pose and the visual features, and send the local map to the edge server;

[0140] The edge server is used to update the local map, obtain the global sub-map corresponding to the mobile terminal, and send the global sub-map to the mobile terminal;

[0141] The mobile terminal is further used to calculate a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and display a virtual object according to the second posture;

[0142] When the network speed between the mobile terminal and the edge server is greater than a second preset threshold:

[0143] The mobile terminal is used to calculate a first pose of the mobile terminal in a first coordinate system, and send an image captured by the mobile terminal and the first pose to the edge server;

[0144] The edge server is used to obtain the visual features according to the image taken by the mobile terminal, calculate the local map according to the first posture and the visual features, update the local map, obtain the global submap corresponding to the mobile terminal, and send the global submap to the mobile terminal;

[0145] The mobile terminal is further used to calculate a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and display a virtual object according to the second posture;

[0146] The first preset threshold is smaller than the second preset threshold, as described in the first embodiment.

[0147] When the network speed between the mobile terminal and the edge server is greater than the first preset threshold and less than the second preset threshold:

[0148] The mobile terminal is used to calculate a first pose of the mobile terminal in a first coordinate system, obtain visual features according to an image taken by the mobile terminal, and send the first pose and the visual features to the edge server;

[0149] The edge server is used to calculate the local map according to the first position and the visual feature, update the local map, obtain the global sub-map corresponding to the mobile terminal, and send the global sub-map to the mobile terminal;

[0150] The mobile terminal is used to calculate a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and display a virtual object according to the second posture, as specifically described in the first embodiment.

[0151] The system also includes a cloud server, and the edge server includes a map update module;

[0152] The map updating module is used to optimize and update the local map after receiving the local map sent by the mobile terminal, and send the updated local map to the cloud server;

[0153] The cloud server is used to obtain a global map according to the local maps corresponding to the multiple mobile terminals, and send the global map to the edge server;

[0154] The map updating module is further used to determine the global sub-map corresponding to the mobile terminal in the global map according to the location fingerprint of the mobile terminal, and send the global sub-map to the mobile terminal, as described in the first embodiment.

[0155] The mobile terminal includes a second posture calculation module and a posture correction module;

[0156] The second posture calculation module is used to calculate the second posture of the mobile terminal at the kth frame image according to the global submap;

[0157] The posture correction module is used to obtain the second posture of the mobile terminal at the lth frame image according to the second posture at the kth frame image, where l≥k, as described in the first embodiment.

[0158] The posture correction module includes a conversion matrix calculation unit and a posture acquisition unit;

[0159] The transformation matrix calculation unit is used to obtain the target transformation matrix at the k-th image frame according to the second posture at the k-th image frame, wherein the target transformation matrix is ​​a transformation matrix that transforms the three-dimensional coordinates in the local coordinate system into the world coordinate system;

[0160] The posture acquisition unit is used to acquire the second posture of the mobile terminal in the lth frame image according to the target transformation matrix in the kth frame image and the first posture of the mobile terminal in the lth frame image, as specifically described in Example 1.

[0161] The conversion matrix calculation unit is specifically used to calculate the target conversion matrix according to a first preset formula;

[0162] The first preset formula is:

[0163] G T L,k = G T c,k ( L T c,k ) -1 ,

[0164] in, G T L,k represents the target transformation matrix at the k-th frame image, G T c,k represents the second posture of the mobile terminal at the kth frame, L T c,k Represents the first posture of the mobile terminal in the kth frame image, as specifically described in the first embodiment.

[0165] The posture acquisition unit is specifically used to calculate the second posture of the mobile terminal at the time of the first frame image according to a second preset formula;

[0166] The second preset formula is:

[0167] G T c,l = G T L,k L T c,l ,

[0168] in, G T L,k represents the target transformation matrix at the k-th frame image, G T c,l represents the second posture of the mobile terminal in the first frame image, L T c,l Represents the first posture of the mobile terminal in the lth frame image, as specifically described in Example 1.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A virtual object display method based on collaborative computing, It is characterized in that The method comprises: When the network speed between the mobile terminal and the edge server is less than the first preset threshold: The mobile terminal calculates a first pose of the mobile terminal in a first coordinate system, and acquires visual features according to an image taken by the mobile terminal; The mobile terminal calculates a local map according to the first posture and the visual feature, and sends the local map to the edge server; The edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal; The mobile terminal calculates a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and displays a virtual object according to the second posture; When the network speed between the mobile terminal and the edge server is greater than a second preset threshold: The mobile terminal calculates a first pose of the mobile terminal in a first coordinate system, and sends an image captured by the mobile terminal and the first pose to the edge server; The edge server obtains the visual features according to the image taken by the mobile terminal, and calculates the local map according to the first posture and the visual features; The edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal; The mobile terminal calculates a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and displays a virtual object according to the second posture; Wherein, the first preset threshold is less than the second preset threshold; The mobile terminal calculates a second position and posture of the mobile terminal in a second coordinate system according to the global submap, including: The mobile terminal calculates the second posture of the mobile terminal at the kth frame image according to the global submap; The mobile terminal acquires the second posture of the mobile terminal at the lth frame image according to the second posture at the kth frame image, where l≥k; The mobile terminal acquires the second posture of the mobile terminal at the lth frame image according to the second posture at the kth frame image, comprising: The mobile terminal acquires a target transformation matrix at the kth image frame according to the second posture at the kth image frame, wherein the target transformation matrix is ​​a transformation matrix that transforms the three-dimensional coordinates in the first coordinate system into the second coordinate system; The mobile terminal acquires the second posture of the mobile terminal at the lth frame image according to the target transformation matrix at the kth frame image and the first posture of the mobile terminal at the lth frame image; The mobile terminal acquires the target transformation matrix at the kth image frame according to the second posture at the kth image frame, including: The mobile terminal obtains the target conversion matrix through a first preset formula; The first preset formula is: , in, represents the target transformation matrix at the k-th frame image, represents the second posture of the mobile terminal at the kth frame, represents the first posture of the mobile terminal at the kth frame image; The mobile terminal acquires the second posture of the mobile terminal at the lth frame image according to the target transformation matrix at the kth frame image and the first posture of the mobile terminal at the lth frame image, comprising: The mobile terminal obtains the second posture of the mobile terminal at the time of the first frame image by using a second preset formula; The second preset formula is: , in, represents the target transformation matrix at the k-th frame image, represents the second posture of the mobile terminal in the first frame image, Represents the first posture of the mobile terminal in the lth frame image.

2. The method for displaying virtual objects based on collaborative computing according to claim 1, It is characterized in that The method further comprises: When the network speed between the mobile terminal and the edge server is greater than the first preset threshold and less than the second preset threshold: The mobile terminal calculates a first pose of the mobile terminal in a first coordinate system, obtains visual features according to an image taken by the mobile terminal, and sends the first pose and the visual features to the edge server; The edge server calculates the local map according to the first posture and the visual feature; The edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal; The mobile terminal calculates a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and displays a virtual object according to the second posture.

3. The method for displaying virtual objects based on collaborative computing according to claim 1 or 2, It is characterized in that The edge server updates the local map, obtains the global sub-map corresponding to the mobile terminal, and sends the global sub-map to the mobile terminal, including: After receiving the local map sent by the mobile terminal, the edge server optimizes and updates the local map; The edge server sends the updated local map to the cloud server; The cloud server obtains a global map according to the local maps corresponding to the multiple mobile terminals, and sends the global map to the edge server; The edge server determines the global sub-map corresponding to the mobile terminal in the global map according to the location fingerprint of the mobile terminal, and sends the global sub-map to the mobile terminal.

4. A virtual object display system based on collaborative computing, It is characterized in that The system comprises: a mobile terminal and an edge server; When the network speed between the mobile terminal and the edge server is less than a first preset threshold; The mobile terminal is used to calculate a first pose of the mobile terminal in a first coordinate system, obtain visual features according to an image taken by the mobile terminal, calculate a local map according to the first pose and the visual features, and send the local map to the edge server; The edge server is used to update the local map, obtain the global sub-map corresponding to the mobile terminal, and send the global sub-map to the mobile terminal; The mobile terminal is further used to calculate a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and display a virtual object according to the second posture; When the network speed between the mobile terminal and the edge server is greater than a second preset threshold: The mobile terminal is used to calculate a first pose of the mobile terminal in a first coordinate system, and send an image captured by the mobile terminal and the first pose to the edge server; The edge server is used to obtain the visual features according to the image taken by the mobile terminal, calculate the local map according to the first posture and the visual features, update the local map, obtain the global submap corresponding to the mobile terminal, and send the global submap to the mobile terminal; The mobile terminal is further used to calculate a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and display a virtual object according to the second posture; Wherein, the first preset threshold is less than the second preset threshold; The mobile terminal includes a second posture calculation module and a posture correction module; The second posture calculation module is used to calculate the second posture of the mobile terminal at the kth frame image according to the global submap; The posture correction module is used to obtain the second posture of the mobile terminal at the lth frame image according to the second posture at the kth frame image, where l≥k; The posture correction module includes a conversion matrix calculation unit and a posture acquisition unit; The transformation matrix calculation unit is used to obtain the target transformation matrix at the k-th image frame according to the second posture at the k-th image frame, wherein the target transformation matrix is ​​a transformation matrix that transforms the three-dimensional coordinates in the local coordinate system into the world coordinate system; The posture acquisition unit is used to acquire the second posture of the mobile terminal at the lth frame image according to the target transformation matrix at the kth frame image and the first posture of the mobile terminal at the lth frame image; The conversion matrix calculation unit is specifically used to calculate the target conversion matrix according to a first preset formula; The first preset formula is: , in, represents the target transformation matrix at the k-th frame image, represents the second posture of the mobile terminal at the kth frame, represents the first posture of the mobile terminal at the kth frame image; The posture acquisition unit is specifically used to calculate the second posture of the mobile terminal at the time of the first frame image according to a second preset formula; The second preset formula is: , in, represents the target transformation matrix at the k-th frame image, represents the second posture of the mobile terminal in the first frame image, Represents the first posture of the mobile terminal in the lth frame image.

5. The virtual object display system based on collaborative computing according to claim 4, It is characterized in that When the network speed between the mobile terminal and the edge server is greater than the first preset threshold and less than the second preset threshold: The mobile terminal is used to calculate a first pose of the mobile terminal in a first coordinate system, obtain visual features according to an image taken by the mobile terminal, and send the first pose and the visual features to the edge server; The edge server is used to calculate the local map according to the first posture and the visual feature, update the local map, obtain the global submap corresponding to the mobile terminal, and send the global submap to the mobile terminal; The mobile terminal is used to calculate a second posture of the mobile terminal in a second coordinate system according to the global sub-map, and display a virtual object according to the second posture.

6. The virtual object display system based on collaborative computing according to claim 4 or 5, It is characterized in that The system also includes a cloud server, and the edge server includes a map update module; The map updating module is used to optimize and update the local map after receiving the local map sent by the mobile terminal, and send the updated local map to the cloud server; The cloud server is used to obtain a global map according to the local maps corresponding to the multiple mobile terminals, and send the global map to the edge server; The map updating module is further used to determine the global sub-map corresponding to the mobile terminal in the global map according to the location fingerprint of the mobile terminal, and send the global sub-map to the mobile terminal.

Citation Information

Patent Citations

  • Edge collaboration cache arrangement method based on drosophila optimization algorithm

    CN108848395A

  • Posture data processing method and device, terminal and computer readable storage medium

    CN110310326A

  • Visual slam-based grid operating environment map construction method and system

    WO2020233724A1