Data collection method and device and storage medium

The pose segmentation strategy collects images in three-dimensional space and sector angle space, which solves the problems of high image collection cost and insufficient comprehensiveness in the existing technology, realizes low-cost diversified scene image collection, and improves the image retrieval effect.

CN118533145APending Publication Date: 2024-08-23HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310497835.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-02-14
Filing Date
2023-05-05
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In the existing technology, image-based positioning has high cost when collecting images and the images are not comprehensive enough, which affects the effect of image retrieval, especially when the scene changes, it is difficult to adapt.

Method used

Through the pose-based collection space segmentation strategy, the three-dimensional space and the fan-shaped angle space are divided, allowing terminal devices to collect images at different positions and angles, and utilizing the crowdsourcing advantages of the user group to achieve low-cost diversified scene image collection.

Benefits of technology

It improves the effect of image retrieval and the efficiency of data collection, ensures the diversity and time span of images, and reduces the cost of database update.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118533145A
    Figure CN118533145A
Patent Text Reader

Abstract

The invention relates to a data collection method and device and a storage medium, and the method comprises the steps: obtaining the pose of a terminal device; determining a first acquisition space where the terminal device is located in an acquisition space set according to the pose; wherein the position ranges and / or the angle ranges of the collected images in different collection spaces in the collection space set are different, and the position ranges of the collected images in the collection spaces comprise three-dimensional spaces divided in the horizontal direction and the vertical direction; the angle range of the acquired image in the acquisition space comprises a fan-shaped angle space divided in the horizontal direction; acquiring a first image acquired by the terminal equipment in the first acquisition space; according to the image retrieval method and device, more comprehensive and diversified images can be collected through the divided three-dimensional space and / or the fan-shaped angle space, meanwhile, the crowdsourcing advantage of a user group is effectively utilized, the purpose that images of diversified scenes are collected through a low-cost means is achieved, and then the image retrieval effect is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data acquisition method, device and storage medium. Background Art

[0002] Image-based localization aims to estimate the location of the current image by identifying historical images taken at the same location. This is an important topic in computer vision and robotics research. This task is usually treated as an image retrieval problem: the image to be located is compared with the images in the database containing geographic tags in order to retrieve the most similar image from the database. Images are usually collected by professional collection personnel and equipment to continuously update the images in the database so that image retrieval can adapt to changes in the scene (outdoor road construction, indoor decoration, etc.). This image collection method is costly. In addition, the images in the scene collected are single and not comprehensive, which affects the effect of image retrieval. Summary of the invention

[0003] In view of this, a data collection method, device, electronic device, storage medium and computer program product are proposed.

[0004] In a first aspect, an embodiment of the present application provides a data acquisition method, the method comprising: acquiring a posture of a terminal device; determining a first acquisition space in a collection space set in which the terminal device is located based on the posture; wherein the position range and / or angle range of acquired images in different acquisition spaces in the collection space set are different, the position range of acquired images in the acquisition space includes a three-dimensional space divided in the horizontal and vertical directions, and the angle range of acquired images in the acquisition space includes a fan-shaped angle space divided in the horizontal direction; acquiring a first image acquired by the terminal device in the first acquisition space.

[0005] Based on the above technical solution, a posture-based acquisition space segmentation strategy is provided (i.e., the position range of the acquired image in the acquisition space includes the three-dimensional space divided in the horizontal and vertical directions, and the angle range of the acquired image in the acquisition space includes the fan-shaped angle space divided in the horizontal direction), and then the acquisition space in which the terminal device is located is determined according to the posture of the terminal device, and the image acquired by the terminal device in the acquisition space is obtained. The position range of the acquired image in the acquisition space includes the three-dimensional space divided in the horizontal and vertical directions, and the angle range of the acquired image in the acquisition space includes the fan-shaped angle space divided in the horizontal direction, so that more comprehensive and diverse images can be acquired through the divided three-dimensional space and / or fan-shaped angle space. At the same time, since different users can use the terminal device to acquire images in different acquisition spaces, that is, at different positions and / or at different angles, the crowdsourcing advantage of the user group is utilized, and the acquisition of images of diverse scenes using low-cost means is realized. In addition, users can also use the terminal device to acquire images at different times, thereby ensuring the time span of the acquired images, thereby improving the effect of image retrieval.

[0006] In one possible implementation, the method further includes: calculating the projection points in the user's current collected image and drawing a three-dimensional boundary line based on the vertex coordinates of the three-dimensional space within the first collection space, and returning the position coordinates of the user moving the terminal device within the three-dimensional boundary line; and / or, calculating the projection points in the user's current collected image and drawing a fan-shaped angle boundary line based on the fan-shaped angle space divided in the horizontal direction within the first collection space, and returning the angle at which the user changes the terminal device to collect the image within the fan-shaped angle boundary line.

[0007] Based on the above technical solution, the position coordinates of the user's mobile terminal device within the three-dimensional boundary line and / or the user's change of the angle of the terminal device to capture images within the fan-shaped angle boundary line are returned, which can more intuitively guide the user to capture images within the three-dimensional space encircled by the three-dimensional boundary line and / or the fan-shaped angle space encircled by the fan-shaped angle boundary line, thereby improving the operability of the user's image capture and the efficiency of data acquisition.

[0008] In one possible implementation, the returning of the position coordinates of the terminal device moved by the user within the three-dimensional boundary line includes: returning the real-time position coordinates of the terminal device, the three-dimensional boundary line, and the target position coordinates of the terminal device moved by the user within the three-dimensional boundary line; and / or, the returning of the angle at which the terminal device captures images changed by the user within the fan-shaped angle boundary line includes: returning the real-time angle at which the terminal device captures images, the fan-shaped angle boundary line, and the target angle at which the terminal device is changed by the user within the fan-shaped angle boundary line.

[0009] As an example, the target position coordinates and target angle can be determined based on the distribution of images in the database, and the real-time position coordinates, three-dimensional boundary line and target position coordinates can be returned, and / or the real-time angle, fan-shaped angle boundary line and target angle can be returned; thereby more intuitively guiding the user to capture images at the desired position and / or angle, and improving the diversity of image capture positions and / or capture angles in this capture space.

[0010] In one possible implementation, determining the first acquisition space in which the terminal device is located in the acquisition space set according to the posture includes: calculating a first code in the horizontal and vertical directions according to the position in the posture and the size of the three-dimensional space; and / or calculating a second code in the horizontal direction according to the posture in the posture and the size of the fan-shaped angle space; obtaining a target code according to the first code and / or the second code, and determining the acquisition space corresponding to the target code as the first acquisition space.

[0011] Based on the above technical solution, the acquisition space segmentation strategy based on posture is used to determine the encoding of the acquisition space where the terminal device is located according to the position of the terminal device and the size of the divided three-dimensional space, and / or the posture of the terminal device and the size of the divided fan-shaped angle space, so that the first acquisition space where the terminal device is located can be determined conveniently and quickly.

[0012] In one possible implementation, the method further includes: calculating the position range of the image acquired in the first acquisition space according to the target code and the size of the three-dimensional space; and / or calculating the angle range of the image acquired in the first acquisition space according to the target code and the size of the fan-shaped angle space; and returning the position range and / or angle range of the image acquired in the first acquisition space.

[0013] Based on the above technical solution, the position range and / or angle range of the image captured in the first acquisition space is calculated, and the position range and / or angle range of the image captured in the first acquisition space is returned, so that the user can be guided to capture images within the position range and / or angle range, thereby improving the operability of the user's image capture and the efficiency of data acquisition.

[0014] In one possible implementation, determining the first collection space in which the terminal device is located in a collection space set according to the posture includes: determining the collection space corresponding to the posture as the first collection space according to the posture and the correspondence between different collection spaces and different postures; wherein the correspondence includes the correspondence between the three-dimensional space and different positions, and / or the correspondence between the fan-shaped angle space and different postures.

[0015] Based on the above technical solution, the posture-based acquisition space segmentation scheme can pre-configure the correspondence between different acquisition spaces and different postures. The correspondence can represent the mapping between the acquisition space and the posture, that is, the same acquisition space can correspond to one or more postures, and each posture corresponds to a unique acquisition space; thus, based on the correspondence, the acquisition space where the terminal device is located can be determined according to the posture of the terminal device.

[0016] In one possible implementation, the method also includes: acquiring a second image captured by the terminal device, and retrieving at least one third image corresponding to the second image; determining a capture space corresponding to the third image selected by the user in response to a selection operation of the user in the at least one third image; acquiring the position of the capture space corresponding to the third image and the position of the terminal device; generating a navigation route based on the position of the capture space corresponding to the third image and the position of the terminal device, and prompting the user to reach the capture space corresponding to the third image according to the navigation route.

[0017] Based on the above technical solution, by retrieving at least one third image corresponding to the second image, and displaying the retrieval results for the user to choose; then generating a navigation route according to the position of the collection space corresponding to the third image selected by the user. Since the position corresponding to the third image selected by the user is the position the user expects to reach, the user is prompted to reach the collection space corresponding to the third image, thereby better guiding the user to reach the collection space to collect the image desired by the user, thereby improving the efficiency of data collection.

[0018] In one possible implementation, the acquiring of a second image captured by the terminal device and the retrieving of at least one third image corresponding to the second image include: displaying the second image; determining a target area in the second image in response to a selection operation of the user in the second image; inputting the second image into an image retrieval model and retrieving at least one third image corresponding to the second image; wherein, in the process of the image retrieval model retrieving at least one third image corresponding to the second image, a mask is used to block areas in the second image except for the target area.

[0019] Based on the above technical solution, the user selects a region of interest (i.e., a target area) in the second image, and in the process of retrieving at least one third image corresponding to the second image, a mask is used to block the area except the target area in the second image, thereby retrieving the image in the database with the highest similarity to the image of the region of interest. This can effectively deal with the problem of a small common viewing area between the on-site environment and the image in the database caused by changes in the external environment.

[0020] In one possible implementation, obtaining the position of the acquisition space corresponding to the third image includes: obtaining a third code of the acquisition space corresponding to the third image selected by the user; calculating the product of the coding value of the third code in the horizontal direction and the size of the three-dimensional space in the horizontal direction to obtain the position coordinates of the acquisition space corresponding to the third image in the horizontal direction; calculating the product of the coding value of the third code in the vertical direction and the size of the three-dimensional space in the vertical direction to obtain the position coordinates of the acquisition space corresponding to the third image in the vertical direction; and determining the position corresponding to the position coordinates in the horizontal direction and the position coordinates in the vertical direction as the position of the acquisition space corresponding to the third image.

[0021] In a second aspect, an embodiment of the present application provides a data acquisition device, comprising: an acquisition module, used to acquire the posture of a terminal device; a collection space determination module, used to determine a first collection space in which the terminal device is located in a collection space set according to the posture; wherein the position range and / or angle range of the collected images in different collection spaces in the collection space set are different, the position range of the collected images in the collection space includes a three-dimensional space divided in the horizontal and vertical directions, and the angle range of the collected images in the collection space includes a fan-shaped angle space divided in the horizontal direction; the acquisition module is also used to acquire a first image collected by the terminal device in the first collection space.

[0022] Based on the above technical solution, a posture-based acquisition space segmentation strategy is provided (that is, the position range of the acquired image in the acquisition space includes the three-dimensional space divided in the horizontal and vertical directions, and the angle range of the acquired image in the acquisition space includes the fan-shaped angle space divided in the horizontal direction), and then the acquisition space in which the terminal device is located is determined according to the posture of the terminal device, and the image acquired by the terminal device in the acquisition space is obtained. The position range of the acquired image in the acquisition space includes the three-dimensional space divided in the horizontal and vertical directions, and the angle range of the acquired image in the acquisition space includes the fan-shaped angle space divided in the horizontal direction; thereby, more comprehensive and diverse images can be acquired through the divided three-dimensional space and / or fan-shaped angle space. At the same time, since different users can use the terminal device to acquire images in different acquisition spaces, that is, at different positions and / or at different angles, the crowdsourcing advantage of the user group is utilized, and the acquisition of images of diverse scenes using low-cost means is realized. In addition, users can also use the terminal device to acquire images at different times, thereby ensuring the time span of the acquired images, thereby improving the effect of image retrieval.

[0023] In one possible implementation, the device also includes: a calculation module, which is used to calculate the projection points in the user's current collected image and draw a three-dimensional boundary line based on the vertex coordinates of the three-dimensional space within the first collection space, and return the position coordinates of the user moving the terminal device within the three-dimensional boundary line; and / or, based on the fan-shaped angle space divided in the horizontal direction within the first collection space, calculate the projection points in the user's current collected image and draw a fan-shaped angle boundary line, and return the angle at which the user changes the terminal device to collect the image within the fan-shaped angle boundary line.

[0024] Based on the above technical solution, the position coordinates of the terminal device moved by the user within the three-dimensional boundary line and / or the angle of the terminal device for capturing images changed by the user within the fan-shaped angle boundary line are returned, which can more intuitively guide the user to capture images within the three-dimensional space defined by the three-dimensional boundary line and / or the fan-shaped angle space defined by the fan-shaped angle boundary line, thereby improving the operability of the user's image capture and the efficiency of data acquisition.

[0025] In one possible implementation, the calculation module is also used to: return the real-time position coordinates of the terminal device, the three-dimensional boundary line, and the target position coordinates of the terminal device moved by the user within the three-dimensional boundary line; and / or return the real-time angle of the terminal device to capture the image, the fan-shaped angle boundary line, and the target angle of the terminal device changed by the user within the fan-shaped angle boundary line.

[0026] As an example, the target position coordinates and target angle can be determined based on the distribution of images in the database, and the real-time position coordinates, three-dimensional boundary line and target position coordinates can be returned, and / or the real-time angle, fan-shaped angle boundary line and target angle can be returned; thereby more intuitively guiding the user to capture images at the desired position and / or angle, and improving the diversity of image capture positions and / or capture angles in this capture space.

[0027] In one possible implementation, the acquisition space determination module is further used to: calculate a first code in the horizontal and vertical directions according to the position in the posture and the size of the three-dimensional space; and / or calculate a second code in the horizontal direction according to the posture in the posture and the size of the fan-shaped angle space; obtain a target code according to the first code and / or the second code, and determine the acquisition space corresponding to the target code as the first acquisition space.

[0028] Based on the above technical solution, the acquisition space segmentation strategy based on posture is used to determine the encoding of the acquisition space where the terminal device is located according to the position of the terminal device and the size of the divided three-dimensional space, and / or the posture of the terminal device and the size of the divided fan-shaped angle space, so that the first acquisition space where the terminal device is located can be determined conveniently and quickly.

[0029] In one possible implementation, the calculation module is also used to: calculate the position range of the image acquired in the first acquisition space according to the target code and the size of the three-dimensional space; and / or calculate the angle range of the image acquired in the first acquisition space according to the target code and the size of the fan-shaped angle space; return the position range and / or angle range of the image acquired in the first acquisition space.

[0030] Based on the above technical solution, the position range and / or angle range of the image captured in the first acquisition space is calculated, and the position range and / or angle range of the image captured in the first acquisition space is returned, so that the user can be guided to capture images within the position range and / or angle range, thereby improving the operability of the user's image capture and the efficiency of data acquisition.

[0031] In one possible implementation, the acquisition space determination module is used to: determine the acquisition space corresponding to the posture as the first acquisition space according to the posture and the correspondence between different acquisition spaces and different postures; wherein the correspondence includes the correspondence between the three-dimensional space and different positions, and / or the correspondence between the fan-shaped angle space and different postures.

[0032] Based on the above technical solution, the posture-based acquisition space segmentation scheme can pre-configure the correspondence between different acquisition spaces and different postures. The correspondence can represent the mapping between the acquisition space and the posture, that is, the same acquisition space can correspond to one or more postures, and each posture corresponds to a unique acquisition space; thus, based on the correspondence, the acquisition space where the terminal device is located can be determined according to the posture of the terminal device.

[0033] In one possible implementation, the acquisition module is also used to: acquire a second image captured by the terminal device, and retrieve at least one third image corresponding to the second image; determine a capture space corresponding to the third image selected by the user in response to a selection operation by the user in the at least one third image; acquire the position of the capture space corresponding to the third image and the position of the terminal device; generate a navigation route based on the position of the capture space corresponding to the third image and the position of the terminal device, and prompt the user to reach the capture space corresponding to the third image according to the navigation route.

[0034] Based on the above technical solution, by retrieving at least one third image corresponding to the second image, and displaying the retrieval results for the user to choose; then generating a navigation route according to the position of the collection space corresponding to the third image selected by the user. Since the position corresponding to the third image selected by the user is the position the user expects to reach, the user is prompted to reach the collection space corresponding to the third image, thereby better guiding the user to reach the collection space to collect the image desired by the user, thereby improving the efficiency of data collection.

[0035] In one possible implementation, the acquisition module is also used to: display the second image; determine a target area in the second image in response to a selection operation performed by the user in the second image; input the second image into an image retrieval model to retrieve at least one third image corresponding to the second image; wherein, in the process of the image retrieval model retrieving at least one third image corresponding to the second image, a mask is used to block areas in the second image other than the target area.

[0036] Based on the above technical solution, the user selects a region of interest (i.e., a target area) in the second image, and in the process of retrieving at least one third image corresponding to the second image, a mask is used to block the area except the target area in the second image, thereby retrieving the image in the database with the highest similarity to the image of the region of interest. This can effectively deal with the problem of a small common viewing area between the on-site environment and the image in the database caused by changes in the external environment.

[0037] In a possible implementation, the acquisition module is also used to: acquire a third code of the acquisition space corresponding to the third image selected by the user; calculate the product of the coding value of the third code in the horizontal direction and the size of the three-dimensional space in the horizontal direction to obtain the position coordinates of the acquisition space corresponding to the third image in the horizontal direction; calculate the product of the coding value of the third code in the vertical direction and the size of the three-dimensional space in the vertical direction to obtain the position coordinates of the acquisition space corresponding to the third image in the vertical direction; determine the position corresponding to the position coordinates in the horizontal direction and the position coordinates in the vertical direction as the position of the acquisition space corresponding to the third image.

[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to implement the first aspect or one or more data acquisition methods of the first aspect when executing the instructions.

[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the first aspect or one or more data acquisition methods of the first aspect.

[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer-readable code, or a computer-readable storage medium carrying a computer-readable code. When the computer-readable code runs in an electronic device, the processor in the electronic device executes the first aspect or one or more of the data acquisition methods of the first aspect.

[0041] For the technical effects of the third to fifth aspects, please refer to the first or second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the present application and, together with the description, serve to explain the principles of the present application.

[0043] Figure 1 A schematic diagram showing an applicable scenario of a data collection method according to an embodiment of the present application.

[0044] Figure 2 A flow chart of a data collection method according to an embodiment of the present application is shown.

[0045] Figure 3 A schematic diagram of a three-dimensional space according to an embodiment of the present application is shown.

[0046] Figure 4 A schematic diagram of a fan-shaped angle space according to an embodiment of the present application is shown.

[0047] Figure 5 A schematic diagram of a three-dimensional space and a fan-shaped angle space according to an embodiment of the present application is shown.

[0048] Figure 6 A schematic diagram showing a data collection method according to an embodiment of the present application is shown.

[0049] Figure 7 A schematic diagram showing a data collection method according to an embodiment of the present application is shown.

[0050] Figure 8 A flow chart of a data collection method according to an embodiment of the present application is shown.

[0051] Fig. 9 A schematic diagram of an interactive interface according to an embodiment of the present application is shown.

[0052] Fig.10 A flow chart of a data collection method according to an embodiment of the present application is shown.

[0053] Fig.11 A flow chart of a data collection method according to an embodiment of the present application is shown.

[0054] Fig.12 A schematic diagram showing a method of retrieving an image according to a target area according to an embodiment of the present application is shown.

[0055] Fig.13 A flow chart of a data collection method according to an embodiment of the present application is shown.

[0056] Fig.14 A schematic diagram of model training according to an embodiment of the present application is shown.

[0057] Fig.15 A structural diagram of a data acquisition device according to an embodiment of the present application is shown.

[0058] Fig.16 A schematic structural diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0059] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0060] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0061] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.

[0062] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0063] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0064] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0065] The word "exemplary" used herein means "used as an example, embodiment or illustrative". Any embodiment described herein as "exemplary" is not necessarily to be interpreted as being superior or better than other embodiments. In addition, in order to better illustrate the present application, numerous specific details are given in the following detailed description. Those skilled in the art should understand that the present application can also be implemented without certain specific details.

[0066] In order to better understand the solutions of the embodiments of the present application, the relevant terms and concepts that may be involved in the embodiments of the present application are first introduced below.

[0067] 1. Augmented Reality (AR)

[0068] AR technology is a technology that cleverly integrates virtual information with the real world. It widely uses a variety of technical means such as multimedia, three-dimensional modeling, real-time tracking and registration, intelligent interaction, and sensing. It simulates computer-generated virtual information such as text, images, three-dimensional models, music, and videos, and applies it to the real world. The two types of information complement each other, thereby achieving "enhancement" of the real world.

[0069] 2. Store Enhancement

[0070] It refers to the use of AR / Virtual Reality (VR) technology to add three-dimensional (3D) advertising displays and other promotional activities to stores in augmented reality scenes.

[0071] 3. City check-in

[0072] It refers to a travel check-in software platform that provides users with a platform to share what they see and hear during their travels.

[0073] 4. Digital Crow

[0074] It refers to an AR / VR software platform that can help users use a terminal equipped with a camera to create a 3D map of the area after scanning a certain area, and then place 3D digital content on the map.

[0075] 5. Convolutional Neural Network (CNN)

[0076] A convolutional neural network is a neural network with a convolutional structure. A convolutional neural network contains a feature extractor consisting of a convolutional layer and a subsampling layer. The feature extractor can be regarded as a filter, and the convolution process can be regarded as convolving the same trainable filter with an input image or convolution feature plane (feature map). A convolutional layer refers to a neuron layer in a convolutional neural network that performs convolution processing on the input signal. In a convolutional layer of a convolutional neural network, a neuron can only be connected to some neurons in the adjacent layer. A convolutional layer usually contains several feature planes, and each feature plane can be composed of some rectangularly arranged neural units. In the same convolutional layer, multiple convolution kernels can be used to extract different image information. Generally, the more convolution kernels there are, the richer the image information reflected by the convolution operation. The convolution kernel can be initialized in the form of a matrix of random size. During the training process of the convolutional neural network, the convolution kernel can obtain reasonable weights through learning.

[0077] 6. Loss function

[0078] In the process of training a neural network, because we hope that the output of the neural network is as close as possible to the value we really want to predict, we can compare the predicted value of the current neural network with the target value we really want, and then update the weight vector of each layer of the neural network according to the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring parameters for each layer in the deep neural network). For example, if the predicted value of the neural network is high, adjust the weight vector to make it predict lower, and keep adjusting until the neural network can predict the target value we really want. Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value", which is the loss function or objective function, which are important equations used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the neural network becomes a process of minimizing this loss as much as possible.

[0079] 7. Classification Learning

[0080] Neural networks need to be trained before they are used to perform classification tasks, a process called classification learning. When training a neural network for classification, a large amount of sample data needs to be classified and labeled, and then the sample data is used as the input of the neural network, and the category label corresponding to the sample data is used as the reference for the output value of the neural network. The loss function is then used to calculate the loss value of the neural network output value and the category label corresponding to the sample data, and the parameters in the neural network are repeatedly adjusted according to the loss value until the neural network can output a value very close to the category label corresponding to the sample data based on the input sample data.

[0081] 8. Contrastive Learning (CL)

[0082] Contrastive learning refers to a learning method that allows a neural network to learn the unique features of a specific category of images by comparing the differences between images of different categories. In the process of contrastive learning, the sample data is divided into: anchor, positive sample, and negative sample. Given an anchor, the distance between the anchor and the positive sample is reduced, and the distance between the anchor and the negative sample is expanded, so that the distance between the positive sample and the anchor is much smaller than the distance between the negative sample and the anchor (or the similarity between the positive sample and the anchor is much greater than the similarity between the negative sample and the point), so that the trained neural network can better distinguish between images of different categories.

[0083] 9. Visual Positioning System (VPS)

[0084] A system that achieves localization based on collected images. Image-based localization aims to estimate the location of the current image by identifying historical images taken at the same location; this task is usually treated as an image retrieval problem.

[0085] 10. Image Retrieval

[0086] Image retrieval usually involves comparing the captured image that needs to be located with images in a database containing geotags in order to retrieve the most similar image from the database.

[0087] Image retrieval requires rich data support to enhance the accuracy of image retrieval and the ability to cope with diverse scenarios. For example, in scenarios that support visual positioning, it is necessary to continuously update the images of the scene in the database so that image retrieval can adapt to changes in the scene (outdoor road construction, indoor decoration, etc.). In related technologies, professional collection personnel and equipment are used to collect images to update the database. This image collection method is costly; and the images in the collected scenes are single and not comprehensive, resulting in poor generalization ability of image retrieval for diverse scenes, affecting the effect of image retrieval.

[0088] In order to solve the above technical problems, the embodiment of the present application provides a technical solution for data collection (see below for detailed description), which can collect more comprehensive and diverse images through the divided three-dimensional space and / or fan-shaped angle space, and effectively utilize the crowdsourcing advantages of the user group, so as to realize the collection of images of diversified scenes by low-cost means, thereby improving the effect of image retrieval. The technical solution of the embodiment of the present application can be executed by a data acquisition device. For example, the data acquisition device can be independently set, integrated in other devices, or implemented by software or a combination of software and hardware. As an example, the data acquisition device can be a terminal device, such as an AR / VR terminal, a vehicle-mounted terminal, a desktop computer, a portable computer, a network server, a PDA (personal digital assistant), a mobile phone, a tablet computer, a wireless terminal device, an embedded device, a medical device, an Internet of Things (IOT) device, etc., and can also be a cloud server, an edge device, etc.; as another example, the data acquisition device can also be a chip or processor with a processing function, and the data acquisition device can include multiple processors, and the processor can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.

[0089] Figure 1 A schematic diagram showing an applicable scenario of a data collection method according to an embodiment of the present application is shown as follows: Figure 1As shown, the AR terminal is configured with a visual positioning system. When a user wearing the AR terminal is at a certain position, the data acquisition method provided in an embodiment of the present application can be executed (see below for detailed description), and the acquisition space in which the AR terminal is located can be determined according to the posture of the AR terminal, thereby obtaining image A from the current perspective of the user; exemplarily, the category to which image A belongs can also be determined according to the posture of the AR terminal, and image A can be stored in a set of images of the same category in a database, so that the image set in the database can be further used for training an image retrieval model or image retrieval, etc.

[0090] It should be noted that the above-mentioned application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art may know that the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems in response to the emergence of other similar or new scenarios. For example, the database can be encoded and processed, and can also be applied to technical fields such as e-commerce retrieval.

[0091] The data collection method provided in the embodiment of the present application is described in detail below.

[0092] Figure 2 A flow chart of a data acquisition method according to an embodiment of the present application is shown. The method can be executed by the above-mentioned data acquisition device. For example, the method can be executed by a terminal device and / or a cloud server. Figure 2 As shown, the method may include the following steps:

[0093] Step 201: Obtain the position and posture of the terminal device.

[0094] Exemplarily, the terminal device may be an AR device, such as an AR helmet, AR glasses, etc., or may be a device with an image acquisition function, such as a smart phone, a smart wearable device, etc.

[0095] Exemplarily, the posture includes position and attitude, wherein the attitude may include one or more of yaw, pitch, and roll, and the position may include three-dimensional coordinates. It is understandable that the position of the terminal device may represent the position of the current image captured by the terminal device, and the attitude of the terminal device may represent the angle at which the terminal device currently captures the image.

[0096] As an example, the position and posture of the terminal device can be determined by processing the collected data based on the sensors of the terminal device, such as the Global Positioning System (GPS), Inertial Measurement Unit (IMU), accelerometer, gyroscope, etc., using existing positioning methods (such as indoor positioning methods).

[0097] As another example, a visual positioning system may be configured to perform image retrieval based on images captured by the terminal device, retrieve similar images, and thereby obtain the current posture of the terminal device based on the postures pre-annotated in the similar images.

[0098] As another example, the above-mentioned posture determined based on the sensor and the posture obtained by the visual positioning system can be fused to obtain the current posture of the terminal device.

[0099] Step 202: Determine a first collection space in which the terminal device is located in a collection space set according to the posture.

[0100] Among them, the position range and / or angle range of the collected images in different collection spaces in the collection space set are different; the angle range of the collected images in the collection space includes a fan-shaped angle space divided in the horizontal direction, and the position range of the collected images in the collection space includes a three-dimensional space divided in the horizontal and vertical directions.

[0101] Exemplarily, the number of acquisition spaces included in the acquisition space set can be set as needed. In addition, the size of the position range of the acquired image in each acquisition space (i.e., the size of the three-dimensional space) and the size of the angle range of the acquired image (i.e., the size of the fan-shaped angle space) can be the same or different, and there is no limitation on this.

[0102] In some scenarios, the position ranges of captured images in different capture spaces in the capture space set are different; the position range may include one or more position points; that is, in the same capture space, the terminal device may capture images at one or more position points. It is understandable that the position points in the same capture space have similar geographical locations, and the images captured in the same capture space can be regarded as images captured in the same shooting scene. As an example, the position range of captured images in the capture space includes a three-dimensional space divided in the horizontal and vertical directions, Figure 3 A schematic diagram of a three-dimensional space according to an embodiment of the present application is shown. Figure 3As shown, the three-dimensional (3D) space can be divided into a plurality of independent three-dimensional spaces arranged continuously in the horizontal and vertical directions, wherein the length, width and height of each three-dimensional space are dL, dW and dH respectively, and the three-dimensional space is the position range of the collected image in the corresponding collection space. If the coordinate of point O is (0,0,0), then Figure 3 The three-dimensional space A1 is the position range of the collected image in the collection space 1, that is, it includes the position points whose coordinates on the x-axis are in the interval (0, dW), the coordinates on the y-axis are in the interval (0, dL), and the coordinates on the z-axis are in the interval (2dH, 3dH); the three-dimensional space A2 is the position range of the collected image in the collection space 2, that is, it includes the position points whose coordinates on the x-axis are in the interval (0, dW), the coordinates on the y-axis are in the interval (0, dL), and the coordinates on the z-axis are in the interval (3dH, 4dH), thereby realizing the position-based three-dimensional space division.

[0103] In other scenarios, the angle ranges of images captured in different acquisition spaces in the acquisition space set are different; the angle range may include one or more angle values; that is, in the same acquisition space, the terminal device may capture images at one or more angles. It is understandable that images captured in the same acquisition space with similar shooting angles can be regarded as images captured in the same shooting scene. As an example, the angle range of images captured in the acquisition space includes a sector angle space divided in the horizontal direction (i.e., by yaw angle), Figure 4 A schematic diagram of a fan-shaped angle space according to an embodiment of the present application is shown, such as Figure 4 As shown, multiple sector angle spaces can be divided into a continuous arrangement in the horizontal direction, where the size of each sector angle space is dθ. If the angle facing east in the horizontal direction is set to 0, and the sector angle space is divided into equal intervals in the counterclockwise direction, then Figure 4 The middle sector angle space B1 is the angle range of the image collected in the acquisition space 3, that is, it includes the angles with angle values ​​in the interval (7dθ, 8dθ); the sector angle space B2 is the angle range of the image collected in the acquisition space 4, that is, it includes the angles with angle values ​​in the interval (6dθ, 7dθ); thereby realizing the sector angle space division based on the yaw angle.

[0104] In other scenarios, the position ranges and angle ranges of captured images in different capture spaces in the capture space set are different. That is, in the same capture space, the terminal device can capture images at one or more locations, and at each location, it can capture images at one or more angles. It can be understood that in the same capture space, each location has a similar geographical location and a similar shooting angle, and the images captured in the same capture space are images captured from the same shooting scene. As an example, the angle range of captured images in the capture space includes a fan-shaped angle space divided in the horizontal direction, and the position range of captured images in the capture space includes a three-dimensional space divided in the horizontal and vertical directions; Figure 5 A schematic diagram of a three-dimensional space and a fan-shaped angle space according to an embodiment of the present application is shown. Figure 5 As shown, in the horizontal direction (i.e. Figure 5 East and North) and vertically (i.e. Figure 5 The three-dimensional space is divided into a plurality of independent three-dimensional spaces arranged continuously. For example, it can be divided into the above Figure 3 The three-dimensional space is divided into a plurality of fan-shaped angle spaces arranged continuously at equal intervals in the horizontal direction in the same three-dimensional space. For example, the above fan-shaped angle spaces can be divided into each three-dimensional space. Figure 4 The multiple fan-shaped angle spaces, wherein the size of each fan-shaped angle space is 45°, such as Figure 5 The space corresponding to the shaded part is the position range and angle range of the captured images in the divided acquisition space 5, that is, the images taken in any direction at any position point in the shaded part are all images captured in the acquisition space 5. The shaded part can be regarded as a four-dimensional (4D) space formed by the superposition of a three-dimensional space and a one-dimensional fan-shaped angle space, thereby realizing the division of the acquisition space based on position and yaw angle.

[0105] It can be understood that the above-mentioned fan-shaped angle space divided in the horizontal direction and the three-dimensional space divided in the horizontal and vertical directions are only examples, and the angle range of the captured images in the acquisition space and the position range of the captured images in the acquisition space can also include spaces of other shapes, which are not limited to this.

[0106] The following is an exemplary description of a possible implementation method of determining the first acquisition space where the terminal device is located in the acquisition space set according to the posture of the terminal device in this step.

[0107] Method 1: The first code can be calculated in the horizontal and vertical directions according to the position of the terminal device in the posture and the size of the three-dimensional space; and / or the second code can be calculated in the horizontal direction according to the posture of the terminal device in the posture and the size of the fan-shaped angle space; the target code is obtained according to the first code and / or the second code, and the acquisition space corresponding to the target code is determined as the first acquisition space. In this way, the acquisition space segmentation strategy based on the posture determines the code of the acquisition space where the terminal device is located according to the position of the terminal device and the size of the segmented three-dimensional space, and / or the posture of the terminal device and the size of the segmented fan-shaped angle space.

[0108] For example, the size of the three-dimensional space may include the size of the three-dimensional space in the horizontal and vertical directions; wherein the size of the three-dimensional space in the horizontal direction may include the length and width of the three-dimensional space, and the size in the vertical direction may include the height of the three-dimensional space. The sizes of different three-dimensional spaces can be set according to needs, and can be the same or different. For example, Figure 3 The multiple three-dimensional spaces shown have the same size, and the length, width and height of each three-dimensional space are dL, dW and dH respectively.

[0109] For example, the size of the sector angle space may include the size of the sector angle space in the horizontal direction, that is, the size of the yaw angle. The sizes of different sector angle spaces can be set according to requirements and can be the same or different. For example, Figure 4 The multiple fan-shaped angle spaces shown have the same size, and the size of each fan-shaped angle space is dθ.

[0110] As an example, a first code can be calculated in the horizontal and vertical directions according to the position in the terminal device posture and the size of the three-dimensional space, and the first code is used as the target code, and the acquisition space corresponding to the target code is determined as the first acquisition space where the terminal device is located. Exemplarily, if the three-dimensional (3D) space is divided into a plurality of independent three-dimensional spaces arranged continuously in the horizontal and vertical directions, and the length, width and height of each three-dimensional space are dL, dW, and dH respectively, then the code of each three-dimensional space can be pre-set according to the relative position of each three-dimensional space in the three-dimensional space as the identification of the corresponding acquisition space. For example, for the above Figure 3For each three-dimensional space shown, the ratio of the maximum coordinate value of the position point on the x-axis to dW, the ratio of the maximum coordinate value on the y-axis to dL, and the ratio of the maximum coordinate value on the z-axis to dH included in each three-dimensional space can be used as the code of each three-dimensional space. For example, the code of the three-dimensional space A1 is (1, 1, 3), and (1, 1, 3) can be used as the identification of the acquisition space 1; for another example, the code of the three-dimensional space A2 is (1, 1, 4), and (1, 1, 4) can be used as the identification of the acquisition space 2. If the position of the terminal device is represented by the three-dimensional coordinates (x1, y1, z1), x1 / dL, y1 / dW, z1 / dH are calculated respectively and rounded up to obtain the first code (a1, a2, a3), wherein a1 and a2 are codes calculated in the horizontal direction, and a3 is a code calculated in the vertical direction. The first code (a1, a2, a3) is used as the target code, and its corresponding collection space is the first collection space where the terminal device is currently located; the first collection space may include positions whose coordinates on the x-axis are in the interval ((a1-1)dW, a1dW), whose coordinates on the y-axis are in the interval ((a2-1)dL, a2dL), and whose coordinates on the z-axis are in the interval ((a3-1)dH, a3dH). For example, if the first code is (1, 1, 3), then the first collection space where the terminal device is currently located is collection space 1.

[0111] As another example, the second code can be calculated in the horizontal direction according to the posture (such as the yaw angle) in the terminal device posture and the size of the fan-shaped angle space, and the second code is used as the target code, and the acquisition space corresponding to the target code is determined as the first acquisition space where the terminal device is located. Exemplarily, if the size of each fan-shaped angle space is dθ in the process of dividing a plurality of fan-shaped angle spaces arranged continuously in the horizontal direction, then the code of each fan-shaped angle space can be pre-set according to the relative angle of each fan-shaped angle space as the identification of each fan-shaped angle space. For example, for the above Figure 4 For each sector angle space shown, the ratio of the maximum angle value contained in each sector angle space to dθ can be used as the code of each sector angle space. For example, the code of sector angle space B1 is 8, and 8 can be used as the identification of collection space 3. For another example, the code of sector angle space B2 is 7, and 7 can be used as the identification of collection space 4. If the yaw angle of the terminal device is α, α / dθ can be calculated and rounded up to obtain the second code b1. The second code b1 is used as the target code, and the corresponding collection space is the first collection space where the terminal device is currently located. The first collection space includes angles with angle values ​​in the interval ((b1-1)dθ, b1dθ). If the second code b1 is 8, the first collection space where the terminal device is currently located is collection space 3.

[0112] As another example, the first code can be calculated in the horizontal and vertical directions according to the position in the terminal device posture and the size of the three-dimensional space, and the second code can be calculated in the horizontal direction according to the posture (such as the yaw angle) in the terminal device posture and the size of the fan-shaped angle space. The combination of the first code and the second code is used as the target code, and the acquisition space corresponding to the target code is determined as the first acquisition space where the terminal device is located. Exemplarily, if in the process of dividing the three-dimensional (3D) space into a plurality of independent three-dimensional spaces arranged continuously in the horizontal and vertical directions, the length, width and height of each three-dimensional space are dL, dW, and dH respectively; and then in the process of dividing each three-dimensional space into a plurality of fan-shaped angle spaces arranged continuously at equal intervals in the horizontal direction, the size of each fan-shaped angle space is dθ; then the codes of each three-dimensional space and each fan-shaped angle space can be pre-set according to the relative positions of each three-dimensional space in the three-dimensional space and the relative angles of each fan-shaped angle space, and then the code of the three-dimensional space and the code of the fan-shaped angle space are combined as the identifier of the corresponding acquisition space. For example, for the above Figure 5 For each three-dimensional space shown, the ratio of the maximum coordinate value of the position point contained in each three-dimensional space on the x-axis to dW, the ratio of the maximum coordinate value on the y-axis to dL, and the ratio of the maximum coordinate value on the z-axis to dH can be used as the code of each three-dimensional space, and then in each three-dimensional space, the ratio of the maximum angle value contained in each fan-shaped angle space to dθ can be used as the code of each fan-shaped angle space, and the code of the three-dimensional space is combined with the code of the fan-shaped angle space to obtain the code of the corresponding acquisition space; for example, the code of a certain three-dimensional space is (1, 1, 3), and the code of a certain fan-shaped angle space divided in the three-dimensional space is 8, then the code of the corresponding acquisition space is (1, 1, 3, 8). If the position of the terminal device is represented by three-dimensional coordinates (x1, y1, z1), and the yaw angle of the terminal device is α, then x1 / dL, y1 / dW, z1 / dH are calculated and rounded up to obtain the first code (a1, a2, a3), and α / dθ is calculated and rounded up to obtain the second code b1. The first code (a1, a2, a3) is combined with the second code b1 to obtain the target code (a1, a2, a3, b1), and the corresponding acquisition space is the first acquisition space where the terminal device is currently located. The first acquisition space may include positions whose coordinates on the x-axis are in the interval ((a1-1)dW, a1dW), whose coordinates on the y-axis are in the interval ((a2-1)dL, a2dL), and whose coordinates on the z-axis are in the interval ((a3-1)dH, a3dH), and the angle value of each position point is an angle in the interval ((b1-1)dθ, b1dθ).

[0113] Method 2: According to the posture of the terminal device and the correspondence between different collection spaces and different postures, the collection space corresponding to the posture of the terminal device can be determined as the first collection space; wherein the correspondence includes the correspondence between the three-dimensional space and different positions, and / or the correspondence between the fan-shaped angle space and different postures. In this way, the collection space segmentation scheme based on the posture can pre-configure the correspondence between different collection spaces and different postures. The correspondence can represent the mapping between the collection space and the posture, that is, the same collection space can correspond to one or more postures, and each posture corresponds to a unique collection space; thus, based on the correspondence, the collection space where the terminal device is located can be determined according to the posture of the terminal device.

[0114] As an example, the correspondence between different acquisition spaces and different postures may include the correspondence between different three-dimensional spaces and different positions. As mentioned above, the position range of the acquired image may include one or more position points, that is, each three-dimensional space may include one or more positions, and the correspondence between each three-dimensional space and the different positions it contains may be established. Figure 3 As shown, different three-dimensional spaces contain different positions, that is, any position corresponds to only one three-dimensional space; after obtaining the position of the terminal device, the three-dimensional space corresponding to the position can be determined based on the correspondence between the three-dimensional space and different positions, and the three-dimensional space is the first acquisition space where the terminal device is currently located.

[0115] As another example, the correspondence between different acquisition spaces and different postures may include the correspondence between different fan-shaped angle spaces and different postures (such as yaw angles). As mentioned above, the angle range of the acquired image may include one or more angle values, that is, each fan-shaped angle space may include one or more angles, and the correspondence between each fan-shaped angle space and the different angles it contains may be established. Figure 4 As shown, different fan-shaped angle spaces contain different angles, that is, for any angle, it only corresponds to one fan-shaped angle space; taking the yaw angle as an example, after obtaining the yaw angle of the terminal device, the fan-shaped angle space corresponding to the yaw angle can be determined according to the correspondence between the fan-shaped angle space and different yaw angles, and the fan-shaped angle space is the first acquisition space where the terminal device is currently located.

[0116] As another example, the correspondence between different acquisition spaces and different postures may include the correspondence between different three-dimensional spaces and different positions and the correspondence between different fan-shaped angle spaces and different postures. As mentioned above, the angle range for acquiring images in the acquisition space includes the fan-shaped angle space divided in the horizontal direction, and the position range for acquiring images in the acquisition space includes the three-dimensional space divided in the horizontal and vertical directions. Then, in the same acquisition space, the device can acquire images at one or more positions, and at each position it can acquire images at one or more angles, and a correspondence between each acquisition space and the different positions and angles it contains can be established; illustratively, as mentioned above Figure 5 As shown, different acquisition spaces contain different positions and angles. Any position and any angle only corresponds to one acquisition space. Taking the yaw angle as an example, after obtaining the position and yaw angle of the terminal device, the acquisition space corresponding to the position and yaw angle can be determined based on the correspondence between the acquisition space and different positions and yaw angles, which is the first acquisition space where the terminal device is currently located.

[0117] Step 203: Acquire a first image captured by the terminal device in the first acquisition space.

[0118] Exemplarily, the first image may be a two-dimensional image, a three-dimensional image, or a pseudo three-dimensional image, etc., which is not limited thereto.

[0119] Exemplarily, the first image may be an image captured by the terminal device in the first acquisition space at the posture in step 201 above.

[0120] In a possible implementation, multiple images captured by a terminal device may be obtained; based on the similarity between the multiple images and the historical images captured in the first acquisition space, the multiple images may be screened to obtain a first image. Exemplarily, the historical image may be a historical image captured by a professional in the first acquisition space. It is understandable that the historical image has a high degree of credibility. If the similarity between the image captured by the terminal device and the historical image captured by the professional in the first acquisition space meets the requirements, it can be considered that the image and the historical image are captured in the same acquisition space, that is, by matching the images in the same acquisition space, the images captured in the same acquisition space are screened out, thereby obtaining the first image captured by the terminal device in the first acquisition space. In this way, by matching and screening the images in the acquisition space, unqualified images such as large-area occlusion, overexposure, and high motion blur are eliminated.

[0121] In a possible implementation, the first image may also be preprocessed, and the preprocessing may include operations such as image channel adjustment, image scaling, size adjustment, cropping, denoising, rotation transformation (for example, mirror transformation and small-angle rotation, etc.), and image enhancement.

[0122] In the embodiment of the present application, a collection space segmentation strategy based on posture is provided, such as three-dimensional space segmentation based on position (i.e., the position range of the collected image in the collection space includes the three-dimensional space divided in the horizontal and vertical directions), sector angle space segmentation based on yaw angle (i.e., the angle range of the collected image in the collection space includes the sector angle space divided in the horizontal direction), and collection space segmentation based on position and yaw angle. Through the above steps 201-203, the collection space in which the terminal device is located is determined according to the posture of the terminal device, and the image collected by the terminal device in the collection space is obtained. The position range of the collected image in the collection space includes the horizontal and vertical directions. The three-dimensional space is divided upward, and the angle range of the image collected in the collection space includes the fan-shaped angle space divided in the horizontal direction; thus, more comprehensive and diverse images can be collected through the divided three-dimensional space and / or fan-shaped angle space. At the same time, since different users can use the terminal device to collect images in different collection spaces, that is, at different positions and / or at different angles, the crowdsourcing advantage of the user group is utilized, and the image of a variety of scenes is collected using low-cost means. In addition, the user can also use the terminal device to collect images at different times, thereby ensuring the time span of the collected images, thereby improving the effect of image retrieval. For example, due to changes in the actual scene morphology caused by road construction, decoration, etc., it is necessary to update the images in the database used for image retrieval. The cost of using professional collection equipment for updating is too high. The data collection method of the embodiment of the present application effectively utilizes the crowdsourcing advantage of the user group, reduces the cost of updating images in the database, and since different users can use different collection spaces, the diversity of images in the data (i.e., the diversity of collection positions and the diversity of collection angles) is guaranteed. In addition, the user can also use the terminal device to collect images at different times, thereby ensuring the time span of the images in the database, and can also improve the accuracy of image retrieval.

[0123] Furthermore, the first image can also be added to a dataset for image retrieval. Considering that in the related art, large-scale datasets have defects in data diversity, resulting in poor image retrieval accuracy and generalization ability. For example, some classification datasets mainly cover scenic spots with search keywords, and lack the original posture, have classification errors, and cannot ensure that images of the same category must have a common viewing area. The street view-based dataset only covers street view images, ignoring common scenes of AR applications such as indoor scenes and tourist attractions. The image diversity is poor, which leads to poor generalization performance of image retrieval. Exemplarily, the category to which the first image belongs can be determined based on the correspondence between the first acquisition space and the preset category, and the first image can be added to the dataset, so that a large-scale dataset can be constructed. Exemplarily, in the acquisition space set, different acquisition spaces have a one-to-one correspondence with preset categories, so that the images in the dataset can be classified according to the acquisition space where the terminal device that acquires the image is located, that is, the images acquired in the same acquisition space belong to the same category, and the images acquired in different acquisition spaces belong to different categories; for example, the above Figure 3 In the above example, acquisition space 1 corresponds to category 1, and acquisition space 2 corresponds to category 2. Then, the images collected in acquisition space 1 belong to category 1, and the images collected in acquisition space 2 belong to category 2. In this way, the images collected by the terminal device in the acquisition space can be classified based on the category of the acquisition space through the acquisition space segmentation strategy based on the posture, so that each image can be divided into a specific acquisition space according to its corresponding acquisition posture. For example, the acquisition space segmentation strategy based on the position and yaw angle can be used to determine the posture of the terminal device when collecting the image, determine the acquisition space where the terminal device is located, and determine the category of the image according to the category of the acquisition space, thereby effectively utilizing the crowdsourcing advantage of the user group. Based on the acquisition space segmentation strategy, the posture of the terminal device is obtained to classify the collected images, and a classification data set is constructed, which effectively expands the diversity of images in the classification data set (diversity of acquisition positions, diversity of acquisition angles), time span and data scale.

[0124] In some scenarios, the above Figure 2 Steps 201-203 can be performed independently by the terminal device. Figure 6 A schematic diagram of a data collection method according to an embodiment of the present application is shown as follows: Figure 6As shown, the terminal device first executes step 201 to obtain the posture of the terminal device. For example, the terminal device can be configured with a visual positioning system, and the terminal device can input the image captured by the camera of the terminal device into the visual positioning system to solve the posture of the terminal device; then the terminal device executes step 202 to determine the first acquisition space where the terminal device is located according to the calculated posture of the terminal device. For example, the processing unit of the terminal device can determine the first acquisition space where the terminal device is located according to the position and yaw angle of the terminal device; then the terminal device can execute step 203 to obtain the image captured by the terminal device in the first acquisition space. For example, the processing unit of the terminal device can filter the image captured by the camera and eliminate unqualified images to obtain the filtered image, which is the image captured by the terminal device in the first acquisition space. Then, according to the correspondence between the acquisition space and the preset category, the category to which the image belongs can be determined and added to the classification data set.

[0125] In other scenarios, the above Figure 2 Steps 201-203 may be implemented by the interaction between the terminal device and the cloud server; Figure 7 A schematic diagram of a data collection method according to an embodiment of the present application is shown as follows: Figure 7 As shown, the terminal device establishes a communication connection with the cloud server, and the terminal device sends a service request to the cloud service. For example, the terminal device can upload the image taken by the camera to the cloud server, and the cloud server executes step 201 to obtain the posture of the terminal device. For example, after the communication unit of the cloud server receives the image uploaded by the terminal device, it executes the visual positioning algorithm to solve the current posture of the terminal device; then the cloud server executes step 202 to determine the first acquisition space where the terminal device is located according to the posture of the terminal device. For example, the cloud server can determine the first acquisition space where the terminal device is located according to the position and yaw angle of the terminal device; then, the cloud server can execute step 203 to obtain the image collected by the terminal device in the first acquisition space; for example, the terminal device can upload multiple images taken by the camera to the cloud server, and the processing unit of the cloud server can filter the images and eliminate unqualified images to obtain filtered images, and then determine the category to which the filtered images belong according to the correspondence between the collection space and the preset category, and add them to the classification data set.

[0126] Furthermore, in order to better guide the user to capture the desired image, the user may be guided during the image capture process. For example, during the process of capturing the first image, the user may be guided to move the position of the terminal device within the first capture space; and / or the user may be guided to change the angle at which the terminal device captures the image within the first capture space.

[0127] Figure 8A flow chart of a data collection method according to an embodiment of the present application is shown. The method can be executed by the above-mentioned data collection device, for example, by a terminal device and a cloud server. Figure 8 As shown, the method may include the following steps:

[0128] Step 801: The cloud server obtains the position and posture of the terminal device.

[0129] This step is similar to the above Figure 2 The same as step 201.

[0130] Exemplarily, the cloud server may receive an image of the current camera page of the terminal device, and the cloud server executes a visual positioning algorithm to process the image and calculate the current posture of the terminal device.

[0131] Step 802: The cloud server determines a first collection space in which the terminal device is located in a collection space set according to the posture of the terminal device.

[0132] This step is similar to the above Figure 2 The same as step 202.

[0133] Step 803: The cloud server determines the position range and / or angle range of the first acquisition space for collecting images, and returns the position range and / or angle range of the first acquisition space for collecting images.

[0134] In some examples, after the first acquisition space where the terminal device is located is determined in the above step 802 using method 1, the cloud server can calculate the position range of the first acquisition space to capture images based on the target code and the size of the three-dimensional space; the cloud server returns the position range of the first acquisition space to capture images. For example, the first acquisition space is Figure 3 In the acquisition space 1 shown, the target code is (1, 1, 3), and the length, width and height of the three-dimensional space are dL, dW and dH respectively. Then, the position range of the acquisition image acquired in the acquisition space 1 can be calculated as the position points whose coordinates on the x-axis are in the interval (0, dW), the coordinates on the y-axis are in the interval (0, dL), and the coordinates on the z-axis are in the interval (2dH, 3dH).

[0135] As another example, after the first acquisition space where the terminal device is located is determined by method 1 in step 802, the cloud server can calculate the angle range of the first acquisition space to capture images according to the target code and the size of the fan-shaped angle space; the cloud server returns the angle range of the first acquisition space to capture images. Figure 4For the acquisition space 3 shown, the target code is 8, and the size of the fan-shaped angle space is dθ. Then, the angle range of the image acquired by the acquisition space 3 can be calculated as the angle value within the interval (7dθ, 8dθ).

[0136] As another example, after determining the first acquisition space where the terminal device is located by using method 1 in the above step 802, the cloud server can also calculate the position range of the first acquisition space acquisition image according to the target code and the size of the three-dimensional space, and calculate the angle range of the first acquisition space acquisition image according to the target code and the size of the fan-shaped angle space, and then return the position range and angle range of the first acquisition space acquisition image. For example, the first acquisition space is Figure 5 The acquisition space 5 shown has a target code of (1, 1, 3, 8), the length, width and height of the three-dimensional space are dL, dW and dH respectively, and the size of the fan-shaped angle space is dθ. The position range of the acquired image in the acquisition space 5 can be calculated as the position points whose coordinates on the x-axis are in the interval (0, dW), the coordinates on the y-axis are in the interval (0, dL), and the coordinates on the z-axis are in the interval (2dH, 3dH), and the angle range is the angle value in the interval (7dθ, 8dθ).

[0137] In some scenarios, a three-dimensional boundary line can be used to represent the position range of the image collected in the first collection space. In one possible implementation, the cloud server can calculate the projection points in the user's current collected image and draw a three-dimensional boundary line based on the vertex coordinates of the three-dimensional space in the first collection space, and return the position coordinates of the user's mobile terminal device within the three-dimensional boundary line; thereby, the user can be more intuitively guided to collect images in the three-dimensional space delimited by the three-dimensional boundary line, thereby improving the operability of the user's image collection and the efficiency of data collection. As an example, the position coordinates may include the real-time position coordinates of the terminal device and the target position coordinates of the mobile terminal device within the three-dimensional boundary line; the cloud server may return the real-time position coordinates of the terminal device, the three-dimensional boundary line, and the target position coordinates of the user's mobile terminal device within the three-dimensional boundary line.

[0138] Exemplarily, the target position coordinates can be determined based on the distribution of existing images in the database. For example, the position range of the first acquisition space to collect images may include position point 1, position point 2, and position point 3. If in the database, among the images collected in the first acquisition space, there are more images collected by position point 1 and position point 2, and fewer images collected by position point 3, then position point 3 can be set as the target position coordinates. In this way, the real-time position coordinates, three-dimensional boundary lines, and target position coordinates are returned, so that the user can be more intuitively guided to collect images at the desired position, and the diversity of image collection positions in this acquisition space can be improved.

[0139] In other scenarios, the fan-shaped angle boundary line can also be used to represent the angle range of the image captured in the first acquisition space. In one possible implementation, the cloud server can calculate the projection point in the user's current captured image and draw the fan-shaped angle boundary line based on the fan-shaped angle space divided in the horizontal direction in the first acquisition space, and return the angle of the terminal device to the user to change the image captured within the fan-shaped angle boundary line; thus, the user can be more intuitively guided to capture images within the fan-shaped angle space encircled by the fan-shaped angle boundary line, thereby improving the operability of the user's image capture and the efficiency of data collection. As an example, the angle of the terminal device to capture an image may include the real-time angle of the terminal device to capture the image and the target angle of changing the terminal device within the fan-shaped angle boundary line; the cloud server can return the real-time angle of the terminal device to capture the image, the fan-shaped angle boundary line, and the target angle of the user to change the terminal device within the fan-shaped angle boundary line.

[0140] Exemplarily, the target angle can be determined based on the distribution of existing images in the database. For example, the angles of the first acquisition space for collecting images include: angle 1, angle 2, and angle 3. If in the database, among the images collected in the first acquisition space, more images are collected at angle 1 and angle 2, and fewer images are collected at angle 3, then angle 3 can be set as the target angle. In this way, the real-time angle, the sector angle boundary line, and the target angle are returned, so that the user can be more intuitively guided to collect images at the desired angle, and the diversity of image collection angles in this acquisition space can be improved.

[0141] In other scenarios, a three-dimensional boundary line can be used to represent the position range of the image captured in the first acquisition space, and a fan-shaped angle boundary line can be used to represent the angle range of the image captured in the first acquisition space. The operations of returning the position coordinates of the user's mobile terminal device within the three-dimensional boundary line and returning the angle of the user's change of the terminal device to capture the image within the fan-shaped angle boundary line in the above scenarios can be performed.

[0142] Step 804: The terminal device receives the position range and / or angle range of the image captured in the first acquisition space.

[0143] In some scenarios, the terminal device can receive the position coordinates of the user moving the terminal device within a three-dimensional boundary line; for example, it can receive the real-time position coordinates of the terminal device, the three-dimensional boundary line, and the target position coordinates of the user moving the terminal device within the three-dimensional boundary line.

[0144] In other scenarios, the terminal device can receive information from the user about changing the angle of the terminal device to capture images within the fan-shaped angle boundary line; for example, the real-time angle of the terminal device to capture images, the fan-shaped angle boundary line, and the user changing the target angle of the terminal device within the fan-shaped angle boundary line can be received.

[0145] In other scenarios, the terminal device may receive the position coordinates of the user moving the terminal device within a three-dimensional boundary line and the user changing the angle of the terminal device to capture images within a fan-shaped angle boundary line.

[0146] Step 805: The terminal device captures the image and sends it to the cloud server.

[0147] Exemplarily, the terminal device may guide the user to capture images according to the position range and / or angle range of capturing images in the first capture space.

[0148] As an example, the terminal device prompts the user to capture images within the position range of the first acquisition space based on the position range of the first acquisition space, and obtains the first image captured by the terminal device in the first acquisition space. For example, the user can be guided to move the terminal device forward, backward, left or right, so as to change the position of the terminal device in the first acquisition space to capture the image. Exemplarily, the terminal device can display one or more of the three-dimensional boundary line, the real-time position coordinates and the target position coordinates, and can use voice, text and other methods to prompt the user to move the real-time position coordinates of the terminal device within the three-dimensional boundary line to the target position coordinates.

[0149] As another example, the terminal device prompts the user to capture images within the angle range of the first capture space based on the angle range of the first capture space, and obtains the first image captured by the terminal device in the first capture space. For example, the user can be guided to rotate the terminal device up, down, left, or right to change the angle at which the terminal device captures images. Exemplarily, the terminal device can display one or more of the real-time angle, the sector angle boundary line, and the target angle, and can use voice, text, or other methods to prompt the user to change the real-time angle of the terminal device to capture images within the sector angle boundary line to the target angle.

[0150] As another example, the terminal device prompts the user to capture images within the position range and angle range of the first capture space based on the position range and angle range of the first capture space, and obtains the first image captured by the terminal device in the first capture space; wherein the prompting method can refer to the relevant description above. For example, Fig. 9 A schematic diagram of an interactive interface according to an embodiment of the present application is shown as follows: Fig. 9 As shown, in the interactive interface, the solid line indicates the three-dimensional boundary line, the dotted line indicates the fan-shaped angle boundary line, the arrow below the interface indicates the user's current direction, and the circle in the center of the interface guides the user to rotate the terminal device.

[0151] Step 806: The cloud server obtains a first image captured by the terminal device in the first acquisition space.

[0152] This step is similar to the above Figure 2 The same as step 203.

[0153] In the embodiment of the present application, the cloud server can calculate the position range and / or angle range of the first acquisition space to collect images based on the position and posture of the terminal device, and return the position range and / or angle range of the first acquisition space to collect images, and then guide the user to collect images within the position range and / or angle range, thereby improving the operability of user image collection and the efficiency of data collection. As an example, the position range of the first acquisition space to collect images can be calculated based on the target code and the size of the three-dimensional space, and / or the angle range of the first acquisition space to collect images can be calculated based on the target code and the size of the fan-shaped angle space.

[0154] Fig.10 A flow chart of a data collection method according to an embodiment of the present application is shown. The method can be executed by the above-mentioned data collection device, for example, by a terminal device, as an example. Fig.10 As shown, the method comprises the following steps:

[0155] Step 1001: The terminal device obtains the position and posture of the terminal device.

[0156] This step is similar to the above Figure 2 The same as step 201.

[0157] As an example, the terminal device may be an AR device, which enters an augmented reality application and starts to collect images; the image is then processed by a visual positioning system to calculate the position and posture of the terminal device.

[0158] Step 1002: The terminal device determines a first collection space in which the terminal device is located in the collection space set according to the posture.

[0159] This step is similar to the above Figure 2 The same as step 202.

[0160] Step 1003: The terminal device determines a position range and / or an angle range for capturing images in the first capture space.

[0161] The possible implementation method of determining the position range and / or angle range of the first acquisition space acquisition image in this step can refer to the above Figure 8 The relevant statement in step 803.

[0162] As an example, the terminal device may calculate the projection points in the user's current captured image and draw the three-dimensional boundary line according to the vertex coordinates of the three-dimensional space in the first captured space.

[0163] As another example, the projection points in the image currently collected by the user may be calculated and the sector angle boundary lines may be drawn according to the sector angle space divided in the horizontal direction within the first collection space.

[0164] Step 1004: The terminal device captures images.

[0165] In this step, during the process of collecting images, the terminal device can guide the user to collect images. The possible implementation method thereof is as described above. Figure 8 The relevant statement in step 805.

[0166] As an example, during the process of capturing images, the terminal device may remind the user to move the terminal device within the three-dimensional boundary line.

[0167] As another example, during the image acquisition process, the terminal device may remind the user to rotate the device within the sector angle boundary line.

[0168] Step 1005: The terminal device obtains a first image captured by the terminal device in the first acquisition space.

[0169] This step is similar to the above Figure 2 The same as step 203.

[0170] In an embodiment of the present application, the terminal device can calculate the position range and / or angle range of the first acquisition space for capturing images based on the posture of the terminal device, and then guide the user to capture images within the position range and / or angle range; as an example, the terminal device can be an AR device, which obtains the posture of the user device in the AR application scenario, calculates the position range and / or angle range of the first acquisition space, and interacts with the user in real time through a guidance interface to guide the user to capture images within the specified position range and / or angle range, thereby guiding users to participate in crowdsourcing data collection and improving the operability of user image collection and the efficiency of data collection.

[0171] Fig.11 A flow chart of a data collection method according to an embodiment of the present application is shown. For example, the method can be executed on a terminal device and / or a cloud server. Fig.11 As shown, the method may include the following steps:

[0172] Step 1101: Acquire a second image captured by a terminal device, and retrieve at least one third image corresponding to the second image.

[0173] Exemplarily, the second image and the third image may be two-dimensional images, three-dimensional images or pseudo three-dimensional images, etc., which are not limited. In addition, the number of third images is not limited, that is, one or more images most similar to the second image can be retrieved from the database.

[0174] Exemplarily, the second image can be input into the image retrieval model, and the image retrieval model retrieves images similar to the second image in the database. For example, the second image is input into the image retrieval model, and the image retrieval model can obtain the features corresponding to the second image, and perform similarity matching between the features corresponding to the second image and the features corresponding to each image in the database, thereby obtaining the most similar K images, that is, at least one third image corresponding to the second image. Exemplarily, the features corresponding to the second image can be compared with the features corresponding to each image in the database, and the image corresponding to the features with the highest similarity to the features corresponding to the second image can be determined as the third image. As an example, the distance between two features (such as the Euclidean distance) can be used to represent the similarity of the two corresponding images, wherein the greater the distance between the two features, the lower the similarity between the two corresponding images; the smaller the distance between the two features, the higher the similarity between the two corresponding images; then the image corresponding to the code with the smallest feature distance corresponding to the second image in the database can be determined as the third image, thereby completing the image retrieval.

[0175] Exemplarily, before the second image is input into the image retrieval model, the second image can be preprocessed, and the preprocessing includes but is not limited to operations such as image channel adjustment, image scaling, resizing, cropping, denoising, rotation transformation (for example, mirror transformation and small-angle rotation, etc.), image enhancement, non-target area exclusion or normalization.

[0176] Further, after the at least one third image is retrieved, the at least one third image may be displayed for viewing by the user.

[0177] In one possible implementation, the second image can be displayed; in response to a user's selection operation in the second image, a target area in the second image can be determined; the second image can be input into an image retrieval model to retrieve at least one third image corresponding to the second image; wherein, in the process of the image retrieval model retrieving at least one third image corresponding to the second image, a mask is used to block areas in the second image except the target area.

[0178] Wherein, the target area represents the area of ​​interest to the user, and the number of target areas may be one or more; exemplarily, the second image may be displayed on the terminal device, and the user may select the image area of ​​interest by clicking, selecting, drawing a circle, etc. on the second image displayed on the terminal device according to the object of interest; in response to the user's selection operation, one or more image areas of interest to the user in the second image are determined. For example, the second image may be displayed on a touch screen, and the user may mark the second image on the touch screen and manually select the image area of ​​interest. Exemplarily, the second image may be input into an image retrieval model, and the image retrieval model may use a mask to block the area other than the target area in the second image during the process of retrieving at least one third image corresponding to the second image, that is, the weight corresponding to the target area is set to be greater than the weight corresponding to the area other than the target area in the second image. In this way, the user selects the area of ​​interest in the second image, and in the process of retrieving at least one third image corresponding to the second image, the mask is used to block the area other than the area of ​​interest in the second image, thereby retrieving the image in the database with the highest similarity to the image of the area of ​​interest, which can effectively deal with the problem of a small common viewing area between the on-site environment and the image in the database caused by changes in the external environment. For example, in a scene of a certain intersection, when the intersection is suddenly under construction and a large number of fences, construction vehicles, and road surface are turned up, and there are no images of the construction scene or similar scenes in the database for the intersection, the user takes a photo at the intersection. If the photo is directly input into the image retrieval model, photos of other intersections with construction scenes may be retrieved. At this time, the user can manually select the image area of ​​interest, for example, the user can select the image area of ​​the convenience store at the intersection in the photo taken; in this way, when searching, the image retrieval model uses a mask to block other areas in the image except the convenience store area, that is, the weight corresponding to the convenience store area is set to be greater than the weight corresponding to other areas, so that the intersection image containing the convenience store can be retrieved more accurately.

[0179] For example, Fig.12 A schematic diagram of retrieving an image according to a target area according to an embodiment of the present application is shown. Fig.12 As shown, the user is in a room, and the second image displayed by the current terminal device includes a door, floor, wall, etc. of the room. The user circles the door as the target area in the second image, and uses a mask to block other areas (i.e., the floor, wall, etc.) except the target area (i.e., the area of ​​the door), and retrieves multiple third images corresponding to the second image, all of which include the door selected by the user.

[0180] Step 1102: In response to a selection operation of the user in the at least one third image, determine a collection space corresponding to the third image selected by the user.

[0181] The third image may be obtained by Figure 2 Images acquired using the data acquisition method shown.

[0182] For example, when the collected third image is stored in the database in advance, the collection space corresponding to the third image may be stored, so that the corresponding collection space may be determined according to the third image selected by the user.

[0183] Step 1103: Obtain the position of the acquisition space corresponding to the third image and the position of the terminal device.

[0184] In a possible implementation, this step may include: obtaining a third code of the acquisition space corresponding to the third image selected by the user; and determining the position of the acquisition space corresponding to the third image based on the third code and the size of the three-dimensional space.

[0185] For example, when the collected third image is stored in the database in advance, the collection space corresponding to the third image and the code corresponding to the collection space may be stored, so that after the user selects the third image, the third code of the collection space corresponding to the third image may be obtained.

[0186] Among them, the specific implementation details of determining the position of the acquisition space corresponding to the third image according to the third code and the size of the three-dimensional space can refer to the relevant description of calculating the acquisition space position according to the target code and the size of the three-dimensional space.

[0187] As an example, the product of the coding value of the third code in the horizontal direction and the size of the three-dimensional space in the horizontal direction can be calculated to obtain the position coordinates of the acquisition space corresponding to the third image in the horizontal direction; the product of the coding value of the third code in the vertical direction and the size of the three-dimensional space in the vertical direction can be calculated to obtain the position coordinates of the acquisition space corresponding to the third image in the vertical direction; and the position corresponding to the position coordinates in the horizontal direction and the position coordinates in the vertical direction is determined as the position of the acquisition space corresponding to the third image. For example, the third code is (1, 1, 3), the coding value of the third code in the horizontal direction is (1, 1), the size of the three-dimensional space in the horizontal direction (i.e., length and width) is dL and dW respectively, then 1*dL=dL and 1*dW=dW can be calculated, and the position coordinates of the acquisition space corresponding to the third image in the horizontal direction are (dL, dW); the coding value of the third code in the vertical direction is 3, and the size of the three-dimensional space in the vertical direction (i.e., height) is dH, then 3*dH=3dH can be calculated, and the position coordinates of the acquisition space corresponding to the third image in the vertical direction are 3dH, and then the position corresponding to (dL, dW, 3dH) is determined as the position of the acquisition space corresponding to the third image.

[0188] Step 1104: Generate a navigation route according to the position of the collection space corresponding to the third image and the position of the terminal device, and prompt the user to reach the collection space corresponding to the third image according to the navigation route.

[0189] Exemplarily, the acquisition space corresponding to the third image may be the first acquisition space.

[0190] Exemplarily, the navigation route may be displayed, and the user may be prompted to follow the navigation route to reach the collection space corresponding to the third image by voice, text, or the like.

[0191] Step 1105: Obtain the position and posture of the terminal device.

[0192] Step 1106: Determine a first collection space in which the terminal device is located in a collection space set according to the posture.

[0193] Step 1107: Acquire a first image captured by the terminal device in the first acquisition space.

[0194] Among them, steps 1105-1107 are the same as above Figure 2 Steps 201-203 are the same.

[0195] In the embodiment of the present application, at least one third image corresponding to the second image is retrieved, and the retrieval results are displayed for the user to select; then, according to the position of the acquisition space corresponding to the third image selected by the user, a navigation route is generated. Since the position corresponding to the third image selected by the user is the position the user expects to reach, the user is prompted to reach the acquisition space corresponding to the third image, so that the user can be better guided to reach the acquisition space to collect the image the user expects, thereby improving the efficiency of data collection. As an example, the user can circle the area of ​​interest (i.e., the target area) in the current photo taking interface, calculate one or more images in the database with the highest similarity to the current area of ​​interest and their corresponding acquisition spaces, and the user will check and filter them, and navigate to the acquisition space where the image is located according to the image selected by the user; after the user enters the acquisition space, the position range and / or angle range of the acquisition space where the terminal device is located can be calculated in real time through the posture of the terminal device, and the user can be guided to collect images within the position range and / or angle range.

[0196] Furthermore, the image database can be continuously updated with images collected by users to improve the diversity of image collection angles, collection locations, and collection time in the classification data set. For example, users can take images from different angles at different times at the same location, thereby enriching the images collected at the location.

[0197] Fig.13 A flow chart of a data collection method according to an embodiment of the present application is shown. The method can be executed by the above-mentioned data collection device, for example, by a terminal device and a cloud server. Fig.13 As shown, the method may include the following steps:

[0198] Step 1301: construct an initial classification data set.

[0199] For example, based on the existing professional acquisition images in the database, the above-mentioned acquisition space segmentation strategy based on posture can be used to classify the existing professional acquisition images to construct an initial image classification data set. In which, these professional acquisition images record the corresponding acquisition postures during the acquisition process.

[0200] Exemplarily, for a certain image, the category to which the image belongs may be determined based on the correspondence between the acquisition space in which the image was acquired and the preset category.

[0201] Step 1302: Obtain the position and posture of the terminal device.

[0202] For example, the visual positioning system can use professionally collected images and corresponding postures to locate the user's captured images, thereby solving the posture of the terminal device.

[0203] Step 1303: Determine a first collection space where the terminal device is located in the collection space set according to the posture of the terminal device.

[0204] Step 1304: Acquire a first image captured by the terminal device in the first acquisition space.

[0205] Among them, steps 1302-1304 are the same as above Figure 2 Steps 201-203 are the same.

[0206] For example, the user may be guided to capture images at a reasonable position and at a reasonable shooting angle.

[0207] Step 1305: Use the first image to update the classification data set and train the image retrieval model.

[0208] For example, according to the correspondence between the first acquisition space and the preset category, the category corresponding to the first acquisition space can be used as the category to which the first image belongs. In this way, by accurately classifying the images collected by the user, a large-scale data set is constructed, and the data set is continuously enriched. The images in the data set have a larger time span and scene diversity, thereby improving the effect of image retrieval.

[0209] Furthermore, this dataset can be used to train high-precision and high-generalization image retrieval models, thereby using a continuously enriched database to update the performance of the image retrieval model and improve the generalization ability of the image retrieval model for diverse scenarios.

[0210] Exemplarily, the image retrieval model can be a convolutional neural network, a graph convolutional neural network, a recurrent neural network, or other neural networks that have the function of extracting image features, or other models, which are not limited to this.

[0211] The process of training the image retrieval model is described in detail below.

[0212] Fig.14 A schematic diagram of model training according to an embodiment of the present application is shown, taking the image retrieval model as a CNN model as an example. Fig.14As shown in the figure, M types of images are sampled in the classification data set, K images are sampled for each type, and a small batch of images with a batch size of N = M*K is constructed, that is, a smaller number of images can be selected in the classification data set for each training. The backbone network of the CNN model extracts image features, and then compresses the feature dimensions by the pooling layer and the fully connected layer, constructing N 512-dimensional global vectors (global descriptors), and then inputting the global vector into the classifier. The classification loss function value can be directly calculated according to the classification label; at the same time, an N*N similarity matrix is ​​constructed based on the global vector, so as to mine difficult samples online, construct positive and negative sample pairs to calculate the contrast learning loss function value; and then, based on the classification loss function value and the contrast learning loss function value, multiple loss functions are jointly trained to obtain a trained image retrieval model.

[0213] For example, the above classification dataset can be used to perform multiple rounds of training on the image retrieval model, wherein in each round of training, sampling can be performed in the classification dataset to obtain M categories of images, and there is no common viewing area between images of different categories in the M categories; that is, the objects contained in images of different categories are different, or the shooting angles corresponding to the same object are different. As an example, when sampling M categories of images in the classification dataset, images corresponding to disjoint acquisition spaces can be selected in the classification database, for example, in the above Figure 5 In the method, part of the three-dimensional space is selected at equal intervals (n*dL, m*dh) from all the divided three-dimensional spaces, that is, one three-dimensional space is selected every n*dL in the horizontal direction and every m*dh in the vertical direction; part of the fan-shaped angle space is selected at equal intervals (k*dθ) from all the fan-shaped angle spaces divided in each three-dimensional space, that is, one fan-shaped angle space is selected every k*dθ, so that M fan-shaped angle spaces are selected from all the three-dimensional spaces; wherein the values ​​of m, n, and k can be set according to the requirements. The images corresponding to each selected acquisition space are regarded as the same type of images, thereby obtaining M types of images, and there is no common view of images in different categories.

[0214] Exemplarily, in the process of performing joint training of multiple loss functions to obtain a trained image retrieval model, the classification loss function value and the contrastive learning loss function value can be added as the target loss function value, and then the target function loss value is used to perform back propagation to adjust the parameter values ​​in the image retrieval model until the training end condition is met. Exemplarily, the training end condition may include that the target loss function value no longer decreases or the training reaches a preset number of iterations; for example, the training of the image retrieval model can be completed when the training reaches the maximum number of iterations to obtain a trained image retrieval model; for another example, the training of the image retrieval model can be completed when the target loss function value no longer decreases to achieve convergence to obtain a trained image retrieval model. In this way, through the joint training of multiple loss functions, the image retrieval model is continuously learned, so that the similarity (such as distance) between the features corresponding to the sample images of the same category generated by the image retrieval model is continuously approaching, and the similarity between the features corresponding to the sample images of different categories generated is continuously increasing.

[0215] Considering that the existing image retrieval algorithm generates high-dimensional global descriptors, resulting in slower retrieval speed and a large amount of storage space occupied, for example, SFRS (Self-supervising Fine-grained Region Similarities for Large-scale Image Localization) mines difficult samples through self-supervised learning methods, which requires offline mining of difficult samples. Regional-level supervision increases the computational cost and time cost, making it difficult to use large-scale data sets for training, and its generalization ability to cope with diverse scenarios is poor; in addition, generating high-dimensional global descriptors occupies a large storage space and leads to a lower retrieval speed. For this reason, an online mining method is adopted in the embodiment of the present application. Since the labels of each sample image are credible, positive samples of the same type and negative samples of different types can be directly selected according to the category labels to construct positive and negative sample pairs. According to the global vector, an N*N similarity matrix is ​​constructed, which refers to the similarity between two data sets, which contains all possible similarity values ​​(such as Euclidean distance, cosine distance, etc.); according to the similarity matrix, the similarity corresponding to the positive and negative sample pairs is extracted, and the contrast learning loss function is calculated. Since there is no need to mine positive and negative samples from all the data, it is only necessary to construct positive and negative sample pairs according to categories in the small batch data (i.e., N images) of each training. That is, there is no need to calculate the similarity matrix of all the data for each training, but only the N*N similarity matrix of the small batch data, thereby realizing online sample mining, so as to better distinguish samples that are difficult to distinguish.

[0216] In the embodiment of the present application, the classification data set is used to avoid offline mining of difficult samples, and the contrastive learning loss function and the classification loss function are combined for joint training, which realizes the effective use of large-scale data sets, improves the robustness of the image retrieval model and the generalization ability of multiple scenes, and the trained image retrieval model has higher retrieval accuracy and generalization ability, while compressing the global descriptor dimension, reducing the storage space occupied, and improving the retrieval speed. The trained image retrieval model can further improve the accuracy of image retrieval and retrieval-based image retrieval functions, so as to better realize AR navigation, AR games, store enhancements, city check-ins, digital map crows and other functions. For example, it can effectively improve the positioning accuracy of users in AR scenes.

[0217] Based on the same inventive concept of the above method embodiment, the embodiment of the present application further provides a data acquisition device, which can be used to execute the technical solution described in the above method embodiment. Figure 2 , Figure 8 , Fig.10 , Fig.11 ,or Fig.13 The steps of the data acquisition method are shown in .

[0218] Fig.15 A structural diagram of a data acquisition device according to an embodiment of the present application is shown as follows: Fig.15 As shown, the device includes: an acquisition module 1501, used to acquire the posture of the terminal device; a collection space determination module 1502, used to determine the first collection space where the terminal device is located in the collection space set according to the posture; wherein the position range and / or angle range of the collected image in different collection spaces in the collection space set are different, the position range of the collected image in the collection space includes a three-dimensional space divided in the horizontal and vertical directions, and the angle range of the collected image in the collection space includes a fan-shaped angle space divided in the horizontal direction; the acquisition module 1501 is also used to acquire the first image collected by the terminal device in the first collection space.

[0219] In an embodiment of the present application, a posture-based acquisition space segmentation strategy is provided (i.e., the position range of the acquired image in the acquisition space includes the three-dimensional space divided in the horizontal and vertical directions, and the angle range of the acquired image in the acquisition space includes the fan-shaped angle space divided in the horizontal direction), and then the acquisition space in which the terminal device is located is determined according to the posture of the terminal device, and the image acquired by the terminal device in the acquisition space is obtained, the position range of the acquired image in the acquisition space includes the three-dimensional space divided in the horizontal and vertical directions, and the angle range of the acquired image in the acquisition space includes the fan-shaped angle space divided in the horizontal direction; thereby, more comprehensive and diverse images can be acquired through the divided three-dimensional space and / or fan-shaped angle space, and at the same time, since different users can use the terminal device to acquire images in different acquisition spaces, that is, at different positions and / or at different angles, the crowdsourcing advantage of the user group is utilized, and the acquisition of images of diverse scenes using low-cost means is realized. In addition, users can also use the terminal device to acquire images at different times, thereby ensuring the time span of the acquired images, thereby improving the effect of image retrieval.

[0220] In one possible implementation, the device also includes: a calculation module, which is used to calculate the projection points in the user's current collected image and draw a three-dimensional boundary line based on the vertex coordinates of the three-dimensional space within the first collection space, and return the position coordinates of the user moving the terminal device within the three-dimensional boundary line; and / or, based on the fan-shaped angle space divided in the horizontal direction within the first collection space, calculate the projection points in the user's current collected image and draw a fan-shaped angle boundary line, and return the angle at which the user changes the terminal device to collect the image within the fan-shaped angle boundary line.

[0221] In one possible implementation, the calculation module is also used to: return the real-time position coordinates of the terminal device, the three-dimensional boundary line, and the target position coordinates of the terminal device moved by the user within the three-dimensional boundary line; and / or return the real-time angle of the terminal device to capture the image, the fan-shaped angle boundary line, and the target angle of the terminal device changed by the user within the fan-shaped angle boundary line.

[0222] In one possible implementation, the acquisition space determination module 1502 is further used to: calculate a first code in the horizontal and vertical directions according to the position in the posture and the size of the three-dimensional space; and / or calculate a second code in the horizontal direction according to the posture in the posture and the size of the fan-shaped angle space; obtain a target code according to the first code and / or the second code, and determine the acquisition space corresponding to the target code as the first acquisition space.

[0223] In one possible implementation, the calculation module is also used to: calculate the position range of the image acquired in the first acquisition space according to the target code and the size of the three-dimensional space; and / or calculate the angle range of the image acquired in the first acquisition space according to the target code and the size of the fan-shaped angle space; return the position range and / or angle range of the image acquired in the first acquisition space.

[0224] In one possible implementation, the acquisition space determination module 1502 is used to: determine the acquisition space corresponding to the posture as the first acquisition space according to the posture and the correspondence between different acquisition spaces and different postures; wherein the correspondence includes the correspondence between the three-dimensional space and different positions, and / or the correspondence between the fan-shaped angle space and different postures.

[0225] In one possible implementation, the acquisition module 1501 is also used to: acquire a second image captured by the terminal device, and retrieve at least one third image corresponding to the second image; determine a capture space corresponding to the third image selected by the user in response to a selection operation by the user in the at least one third image; acquire the position of the capture space corresponding to the third image and the position of the terminal device; generate a navigation route based on the position of the capture space corresponding to the third image and the position of the terminal device, and prompt the user to reach the capture space corresponding to the third image according to the navigation route.

[0226] In one possible implementation, the acquisition module 1501 is also used to: display the second image; determine a target area in the second image in response to a selection operation of the user in the second image; input the second image into an image retrieval model to retrieve at least one third image corresponding to the second image; wherein, in the process of the image retrieval model retrieving at least one third image corresponding to the second image, a mask is used to block areas in the second image except the target area.

[0227] In a possible implementation, the acquisition module 1501 is also used to: acquire a third code of the acquisition space corresponding to the third image selected by the user; calculate the product of the coding value of the third code in the horizontal direction and the size of the three-dimensional space in the horizontal direction to obtain the position coordinates of the acquisition space corresponding to the third image in the horizontal direction; calculate the product of the coding value of the third code in the vertical direction and the size of the three-dimensional space in the vertical direction to obtain the position coordinates of the acquisition space corresponding to the third image in the vertical direction; determine the position corresponding to the position coordinates in the horizontal direction and the position coordinates in the vertical direction as the position of the acquisition space corresponding to the third image.

[0228] Above Fig.15 The technical effects and specific descriptions of the data acquisition device shown and its various possible implementations can be found in the above-mentioned data acquisition method, which will not be repeated here.

[0229] It should be understood that the division of the modules in the above image retrieval device and model training device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. In addition, the modules in the device can be implemented in the form of a processor calling software; for example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of the modules of the device, wherein the processor is, for example, a general-purpose processor, such as a central processing unit (CPU) or a microprocessor, and the memory is a memory inside the device or a memory outside the device. Alternatively, the modules in the device can be implemented in the form of hardware circuits, and the functions of some or all modules can be realized by designing the hardware circuits, and the hardware circuits can be understood as one or more processors; for example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), and the functions of some or all modules above are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be realized by a programmable logic device (PLD), taking a field programmable gate array (FPGA) as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by a configuration file, so as to realize the functions of some or all modules above. All modules of the above device can be realized in the form of a processor calling software, or in the form of a hardware circuit, or in part by a processor calling software, and the rest by a hardware circuit.

[0230] In the embodiment of the present application, the processor is a circuit with the ability to process signals. In one implementation, the processor can be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a graphics processing unit (GPU), a digital signal processor (DSP), a neural-network processing unit (NPU), a tensor processing unit (TPU), etc.; in another implementation, the processor can implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above modules.

[0231] It can be seen that each module in the above device can be one or more processors (or processing circuits) configured to implement the above embodiment method, such as: CPU, GPU, NPU, TPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms. In addition, each module in the above device can be fully or partially integrated together, or can be implemented independently, which is not limited.

[0232] The embodiment of the present application further provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the method of the above embodiment when executing the instructions. Figure 2 , Figure 8 , Fig.10 , Fig.11 ,or Fig.13 The steps of the data acquisition method are shown in .

[0233] Fig.16 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown. Fig.16 As shown, the electronic device may include: at least one processor 1601 , a communication line 1602 , a memory 1603 and at least one communication interface 704 .

[0234] Processor 1601 can be a general-purpose central processing unit, a microprocessor, a specific application integrated circuit, or one or more integrated circuits for controlling the execution of the program of the present application; processor 1601 can also include a heterogeneous computing architecture of multiple general-purpose processors, for example, it can be a combination of at least two of CPU, GPU, microprocessor, DSP, ASIC, FPGA; as an example, processor 1601 can be CPU+GPU or CPU+ASIC or CPU+FPGA.

[0235] The communication link 1602 may include a pathway for transmitting information between the above-mentioned components.

[0236] The communication interface 1604 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), etc.

[0237] The memory 1603 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory may be independent and connected to the processor via a communication line 1602. The memory may also be integrated with the processor. The memory provided in the embodiment of the present application may generally have non-volatility. Among them, the memory 1603 is used to store computer execution instructions for executing the scheme of the present application, and is controlled by the processor 1601 for execution. The processor 1601 is used to execute the computer-executable instructions stored in the memory 1603, so as to implement the method provided in the above embodiments of the present application; illustratively, the above Figure 2 , Figure 8 , Fig.10 , Fig.11 ,or Fig.13 The steps of the data acquisition method are shown in .

[0238] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0239] Exemplarily, the processor 1601 may include one or more CPUs, for example, Fig.16 The processor 701 may also include a CPU, and any one of a GPU, an ASIC, and an FPGA, for example, Fig.16 CPU0+GPU0 or CPU 0+ASIC0 or CPU0+FPGA0.

[0240] Exemplarily, an electronic device may include multiple processors, such as Fig.16 1601 and processor 1607 in the embodiment. Each of these processors may be a single-CPU processor, a multi-CPU processor, or a heterogeneous computing architecture including multiple general-purpose processors. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0241] In a specific implementation, as an embodiment, the electronic device may further include an output device 1605 and an input device 1606. The output device 1605 communicates with the processor 1601 and may display information in a variety of ways. For example, the output device 1605 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. For example, it may be a display device such as a vehicle-mounted HUD, an AR-HUD, a display, etc. The input device 1606 communicates with the processor 1601 and may receive user input in a variety of ways. For example, the input device 1606 may be a mouse, a keyboard, a touch screen device, a sensor device, etc.

[0242] The embodiment of the present application provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. Figure 2 , Figure 8 , Fig.10 , Fig.11 ,or Fig.13 The steps of the data acquisition method are shown in .

[0243] The embodiment of the present application provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, and when the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method. Figure 2 , Figure 8 , Fig.10 , Fig.11 ,or Fig.13 The steps of the data acquisition method are shown in .

[0244] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing.

[0245] The computer-readable program instructions or codes described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0246] The computer program instructions for performing the operation of the present application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, by utilizing the state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present application.

[0247] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0248] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0249] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0250] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, system, method and computer program product according to multiple embodiments of the present application. In this regard, each square frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the square frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square frames can actually be executed substantially in parallel, and they can also be executed in reverse order sometimes, depending on the functions involved.

[0251] It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by hardware (such as a circuit or ASIC (Application Specific Integrated Circuit)) that performs the corresponding function or action, or can be implemented by a combination of hardware and software, such as firmware.

[0252] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0253] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A data collection method, characterized in that: The method comprises: Get the position and posture of the terminal device; According to the position and posture, a first acquisition space in which the terminal device is located is determined in the acquisition space set; wherein the position ranges and / or angle ranges of acquired images in different acquisition spaces in the acquisition space set are different, the position range of acquired images in the acquisition space includes a three-dimensional space divided in the horizontal and vertical directions, and the angle range of acquired images in the acquisition space includes a fan-shaped angle space divided in the horizontal direction; Acquire a first image captured by the terminal device in the first acquisition space.

2. The method according to claim 1, characterized in that The method further comprises: calculating the projection points in the current collected image of the user and drawing a three-dimensional boundary line according to the vertex coordinates of the three-dimensional space in the first collection space, and returning the position coordinates of the terminal device moved by the user within the three-dimensional boundary line; and / or, According to the fan-shaped angle space divided in the horizontal direction within the first acquisition space, the projection point in the user's current acquired image is calculated and the fan-shaped angle boundary line is drawn, and the angle at which the user changes the image acquired by the terminal device within the fan-shaped angle boundary line is returned.

3. The method according to claim 2, characterized in that The returning the position coordinates of the terminal device moved by the user within the three-dimensional boundary line includes: returning the real-time position coordinates of the terminal device, the three-dimensional boundary line, and the target position coordinates of the terminal device moved by the user within the three-dimensional boundary line; and / or, The returning to the user the angle at which the terminal device changes the image captured within the sector angle boundary line includes: returning the real-time angle at which the terminal device captures the image, the sector angle boundary line, and the user changing the target angle of the terminal device within the sector angle boundary line.

4. The method according to any one of claims 1 to 3, characterized in that The determining, according to the position and posture, a first collection space in which the terminal device is located in a collection space set includes: Calculating a first code in the horizontal and vertical directions according to the position in the posture and the size of the three-dimensional space; and / or calculating a second code in the horizontal direction according to the posture in the posture and the size of the fan-shaped angle space; A target code is obtained according to the first code and / or the second code, and a collection space corresponding to the target code is determined as the first collection space.

5. The method according to claim 4, characterized in that The method further comprises: Calculate the position range of the first acquisition space to acquire images according to the target code and the size of the three-dimensional space; and / or calculate the angle range of the first acquisition space to acquire images according to the target code and the size of the fan-shaped angle space; The position range and / or angle range of the image acquired in the first acquisition space is returned.

6. The method according to any one of claims 1 to 3, characterized in that The determining, according to the position and posture, a first collection space in which the terminal device is located in a collection space set includes: According to the correspondence between the posture and different acquisition spaces and different postures, the acquisition space corresponding to the posture is determined as the first acquisition space; wherein the correspondence includes the correspondence between the three-dimensional space and different positions, and / or the correspondence between the fan-shaped angle space and different postures.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Acquire a second image captured by the terminal device, and retrieve at least one third image corresponding to the second image; In response to a selection operation of the user in the at least one third image, determining a collection space corresponding to the third image selected by the user; Acquire the position of the acquisition space corresponding to the third image and the position of the terminal device; A navigation route is generated according to the position of the collection space corresponding to the third image and the position of the terminal device, and the user is prompted to reach the collection space corresponding to the third image according to the navigation route.

8. The method according to claim 7, characterized in that The acquiring the second image captured by the terminal device and retrieving at least one third image corresponding to the second image includes: displaying the second image; In response to a selection operation performed by the user in the second image, determining a target area in the second image; The second image is input into an image retrieval model to retrieve at least one third image corresponding to the second image; wherein, in the process of the image retrieval model retrieving at least one third image corresponding to the second image, a mask is used to block the area in the second image except the target area.

9. The method according to claim 7 or 8, characterized in that: The obtaining the position of the acquisition space corresponding to the third image includes: Acquire a third code of the acquisition space corresponding to the third image selected by the user; Calculate the product of the encoding value of the third code in the horizontal direction and the size of the three-dimensional space in the horizontal direction to obtain the position coordinates of the acquisition space corresponding to the third image in the horizontal direction; Calculate the product of the code value of the third code in the vertical direction and the size of the three-dimensional space in the vertical direction to obtain the position coordinates of the acquisition space corresponding to the third image in the vertical direction; The position corresponding to the position coordinates in the horizontal direction and the position coordinates in the vertical direction is determined as the position of the acquisition space corresponding to the third image.

10. A data acquisition device, characterized in that: The device comprises: An acquisition module is used to obtain the position and posture of the terminal device; A collection space determination module, used to determine, according to the position and posture, a first collection space in which the terminal device is located in the collection space set; wherein the position ranges and / or angle ranges of the collected images in different collection spaces in the collection space set are different, the position range of the collected images in the collection space includes a three-dimensional space divided in the horizontal and vertical directions, and the angle range of the collected images in the collection space includes a fan-shaped angle space divided in the horizontal direction; The acquisition module is further used to acquire a first image acquired by the terminal device in the first acquisition space.

11. The device according to claim 10, characterized in that The device further includes: a calculation module, configured to calculate the projection points in the user's current collected image and draw a three-dimensional boundary line according to the vertex coordinates of the three-dimensional space in the first collection space, and return the position coordinates of the user moving the terminal device within the three-dimensional boundary line; and / or, According to the fan-shaped angle space divided in the horizontal direction within the first acquisition space, the projection point in the user's current acquired image is calculated and the fan-shaped angle boundary line is drawn, and the angle at which the user changes the image acquired by the terminal device within the fan-shaped angle boundary line is returned.

12. The device according to claim 11, characterized in that The calculation module is further used to: return the real-time position coordinates of the terminal device, the three-dimensional boundary line, and the target position coordinates of the user moving the terminal device within the three-dimensional boundary line; and / or, Return the real-time angle of the terminal device capturing the image, the sector angle boundary line, and the target angle of the terminal device changed by the user within the sector angle boundary line.

13. The device according to any one of claims 10 to 12, characterized in that The acquisition space determination module is further used for: Calculating a first code in the horizontal and vertical directions according to the position in the posture and the size of the three-dimensional space; and / or calculating a second code in the horizontal direction according to the posture in the posture and the size of the fan-shaped angle space; A target code is obtained according to the first code and / or the second code, and a collection space corresponding to the target code is determined as the first collection space.

14. The device according to claim 13, characterized in that The calculation module is also used for: Calculate the position range of the first acquisition space to acquire images according to the target code and the size of the three-dimensional space; and / or calculate the angle range of the first acquisition space to acquire images according to the target code and the size of the fan-shaped angle space; The position range and / or angle range of the image acquired in the first acquisition space is returned.

15. The device according to any one of claims 10 to 12, characterized in that The acquisition space determination module is used for: According to the correspondence between the posture and different acquisition spaces and different postures, the acquisition space corresponding to the posture is determined as the first acquisition space; wherein the correspondence includes the correspondence between the three-dimensional space and different positions, and / or the correspondence between the fan-shaped angle space and different postures.

16. The device according to any one of claims 10 to 15, characterized in that The acquisition module is also used for: Acquire a second image captured by the terminal device, and retrieve at least one third image corresponding to the second image; In response to a selection operation of the user in the at least one third image, determining a collection space corresponding to the third image selected by the user; Acquire the position of the acquisition space corresponding to the third image and the position of the terminal device; A navigation route is generated according to the position of the collection space corresponding to the third image and the position of the terminal device, and the user is prompted to reach the collection space corresponding to the third image according to the navigation route.

17. The device according to claim 16, characterized in that The acquisition module is also used for: displaying the second image; In response to a selection operation performed by the user in the second image, determining a target area in the second image; The second image is input into an image retrieval model to retrieve at least one third image corresponding to the second image; wherein, in the process of the image retrieval model retrieving at least one third image corresponding to the second image, a mask is used to block the area in the second image except the target area.

18. The device according to claim 16 or 17, characterized in that The acquisition module is also used for: Acquire a third code of the acquisition space corresponding to the third image selected by the user; Calculate the product of the encoding value of the third code in the horizontal direction and the size of the three-dimensional space in the horizontal direction to obtain the position coordinates of the acquisition space corresponding to the third image in the horizontal direction; Calculate the product of the code value of the third code in the vertical direction and the size of the three-dimensional space in the vertical direction to obtain the position coordinates of the acquisition space corresponding to the third image in the vertical direction; The position corresponding to the position coordinates in the horizontal direction and the position coordinates in the vertical direction is determined as the position of the acquisition space corresponding to the third image.

19. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method according to any one of claims 1 to 9 when executing the instructions.

20. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.

21. A computer program product, comprising a computer-readable code, or a computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is executed in an electronic device, a processor in the electronic device executes the method according to any one of claims 1 to 9.