Method, device, electronic device and storage medium for determining location information
By acquiring graphic code images in the mobile device and combining counter algorithms, the target position is quickly and accurately determined, which solves the problem of inaccurate positioning in augmented reality, and achieves a low-power and high-precision positioning effect.
Patent Information
- Application Number
- CN202211190525.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-09-28
AI Technical Summary
The prior art has low positioning accuracy and efficiency of mobile devices in augmented reality, visual recognition solutions rely on object characteristics and high computing capabilities, and the ultra-wideband technology has limited accuracy.
By collecting the image of the graphic code in the first area of the mobile device, identifying the image to acquire coordinate information, and determining the identification information based on the coordinate information of adjacent time, combining the counter algorithm and the preset time difference value, the target position is quickly and accurately determined.
It realizes low power consumption and high-precision positioning of mobile devices in augmented reality environment, and is suitable for scenarios such as AR gaming and robot positioning.
Smart Images

Figure CN115661240B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of Internet technology, and in particular relates to a method, device, electronic device and storage medium for determining location information. Background Art
[0002] With the development of information technology, augmented reality (AR) has gradually entered people's horizons. AR overlays virtual information on the real world and objects to achieve a fusion of virtual and real life. However, accurately locating moving objects in space in AR has always been a challenge and a problem.
[0003] Currently, positioning solutions based on visual recognition rely on the specific characteristics of the object being identified, resulting in low accuracy for multiple mobile devices. Ultra-wideband positioning, a low-power communication positioning technology, often struggles to achieve accurate AR positioning.
[0004] Therefore, the current positioning accuracy and efficiency of mobile devices are not high. Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, device, and storage medium for determining location information, which can solve the current problem of low positioning accuracy and efficiency for mobile devices.
[0006] In a first aspect, an embodiment of the present application provides a method for determining location information, the method comprising:
[0007] When the mobile device is located in a first area, a first image of a first graphic code is captured at a first moment, the first area includes a plurality of second areas, each second area includes a plurality of graphic codes, and the second areas correspond to the identification information one by one;
[0008] Recognize the first image and obtain first coordinate information of the mobile device in a third area, where the third area is the area where the mobile device is located at the first moment, and the third area is any one of the plurality of second areas;
[0009] Determining first identification information corresponding to the third area based on the first coordinate information and the second coordinate information; the second coordinate information is obtained by identifying a second image of a second graphic code acquired at a second moment, the plurality of graphic codes include the first graphic code and the second graphic code, the second moment is prior to the first moment, and a time difference between the first moment and the second moment is less than a preset time difference;
[0010] The target location information of the mobile device is determined according to the first coordinate information and the first identification information.
[0011] In a second aspect, an embodiment of the present application provides a device for determining location information, the device comprising:
[0012] A collection module, configured to collect, at a first moment, a first image of a first graphic code when the mobile device is located in a first area, the first area including a plurality of second areas, each of the second areas including a plurality of graphic codes, and the second areas corresponding to the identification information in a one-to-one manner;
[0013] an identification module, configured to identify the first image and obtain first coordinate information of the mobile device in a third area, where the third area is the area where the mobile device is located at the first moment, and the third area is any one of the plurality of second areas;
[0014] a first determining module, configured to determine first identification information corresponding to a third area based on first coordinate information and second coordinate information, wherein the second coordinate information is obtained by identifying a second image of a second graphic code acquired at a second moment, the plurality of graphic codes including the first graphic code and the second graphic code, the second moment being earlier than the first moment, and a time difference between the first moment and the second moment being less than a preset time difference;
[0015] The second determining module is configured to determine target location information of the mobile device according to the first coordinate information and the first identification information.
[0016] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the method in the first aspect or any possible implementation of the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0018] In an embodiment of the present application, a first image of a first graphical code is captured at a first moment while a mobile device is within a first area. The first area includes multiple second areas corresponding one-to-one with identification information, each of which includes multiple graphical codes. By recognizing the first image, first coordinate information of a third area indicated by the first graphical code, where the mobile device is located at the first moment, can be obtained. The third area is any one of the multiple second areas. Therefore, the first coordinate information is used to locate the mobile device within the third area. Then, based on the first coordinate information and second coordinate information, first identification information corresponding to the third area is determined. The second coordinate information is obtained by recognizing a second image of a second graphical code captured at a second moment. The second moment is prior to the first moment, and the time difference between the first moment and the second moment is less than a preset time difference. Therefore, the first coordinate information at the first moment and the coordinate information at the second moment are adjacently captured. Therefore, based on the first coordinate information and the second coordinate information, first identification information corresponding to the location of the third area within the first area can be determined. Here, the first coordinate information indicates the location of the mobile device within the third area, and the first identification information indicates the location of the third area within the entire first area. Thus, based on the first coordinate information and the first identification information, the target location information of the mobile device within the first area can be quickly and accurately determined. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 This is a flow chart of a method for determining location information provided by an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of a mobile device provided in an embodiment of the present application;
[0022] Figure 3 This is a schematic diagram of a second region provided in an embodiment of the present application;
[0023] Figure 4 This is a schematic diagram of a first region provided in an embodiment of the present application;
[0024] Figure 5 This is another schematic diagram of the first region provided in an embodiment of the present application;
[0025] Figure 6 This is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0026] Figure 7is a structural diagram of a position information determination device provided in an embodiment of the present application;
[0027] Figure 8 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0029] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0030] The location information determination method provided in the embodiments of the present application can be applied to at least the following application scenarios, which are described below.
[0031] Augmented Reality (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 them to the real world. The two types of information complement each other, thereby achieving "enhancement" of the real world. AR superimposes virtual information on the real world and objects to achieve the effect of merging virtual and reality. However, how to accurately locate objects moving in space in AR has always been a challenge and problem. The existing technologies have the following solutions, but they all have serious limitations:
[0032] On the one hand, visual recognition positioning uses cameras, LiDAR, infrared cameras, and other solutions, combined with object recognition algorithms, to perceive moving objects in the real world. These solutions are generally referred to as computer vision positioning solutions. However, these solutions rely on identifying distinct characteristics of objects, such as color, shape, luminescence, and pattern. Otherwise, accurate positioning is difficult. This is especially true when there are multiple similar moving robots, where visual recognition solutions are often helpless and often lack high accuracy. Furthermore, this solution requires significant computing power, and real-time detection of multiple moving objects places high demands on device performance.
[0033] On the other hand, there is positioning based on Ultra Wide Band (UWB) technology. UWB is a wireless carrier communication technology that transmits data using nanosecond-level non-sinusoidal narrow pulses instead of sinusoidal carriers, thus occupying a very wide spectrum. As a low-power communication positioning technology, UWB has a distance detection accuracy of around 5cm. The positioning accuracy for angle of arrival (AoA) is even greater, and it has limitations in terms of field of view (FOV), making it difficult to achieve accurate AR positioning.
[0034] Figure 1 This is a flowchart of a method for determining location information provided in an embodiment of the present application.
[0035] like Figure 1 As shown, the location information determination method may include steps 110 to 140, and the method is applied to a location information determination device, as shown below:
[0036] Step 110: When the mobile device is located in a first area, a first image of a first graphic code is captured at a first moment. The first area includes multiple second areas, each second area includes multiple graphic codes, and the second areas correspond to the identification information one by one.
[0037] Step 120 , identifying the first image, and obtaining first coordinate information of the mobile device in a third area, where the third area is the area where the mobile device is located at the first moment, and the third area is any one of the plurality of second areas.
[0038] Step 130: Determine the first identification information corresponding to the third area based on the first coordinate information and the second coordinate information; the second coordinate information is obtained by identifying the second image of the second graphic code collected at the second moment, the multiple graphic codes include the first graphic code and the second graphic code, the second moment is earlier than the first moment, and the time difference between the first moment and the second moment is less than the preset time difference.
[0039] Step 140: Determine the target location information of the mobile device according to the first coordinate information and the first identification information.
[0040] In an embodiment of the present application, a first image of a first graphical code is captured at a first moment while a mobile device is within a first area. The first area includes multiple second areas corresponding one-to-one with identification information, each of which includes multiple graphical codes. By recognizing the first image, first coordinate information of a third area indicated by the first graphical code, where the mobile device is located at the first moment, can be obtained. The third area is any one of the multiple second areas. Therefore, the first coordinate information is used to locate the mobile device within the third area. Then, based on the first coordinate information and second coordinate information, first identification information corresponding to the third area is determined. The second coordinate information is obtained by recognizing a second image of a second graphical code captured at a second moment. The second moment is prior to the first moment, and the time difference between the first moment and the second moment is less than a preset time difference. Therefore, the first coordinate information at the first moment and the coordinate information at the second moment are adjacently captured. Therefore, based on the first coordinate information and the second coordinate information, first identification information corresponding to the location of the third area within the first area can be determined. Here, the first coordinate information is used to locate the mobile device within the third area, and the first identification information is used to locate the third area within the entire first area. Thus, based on the first coordinate information and the first identification information, the target location information of the mobile device in the first area can be quickly and accurately determined.
[0041] The contents of steps 110 to 140 are described below:
[0042] This involves step 110 .
[0043] When the mobile device is located in the first area, a first image of the first graphic code is captured at a first moment. The first area includes multiple second areas, each second area includes multiple graphic codes, and the second areas correspond to the identification information one by one.
[0044] The first area includes multiple second areas, each of which has unique identification information. For example, the identification information of the second area can be (1, 1), (1, 2), and (1, 2), etc. Each second area includes multiple graphic codes, each of which corresponds to a coordinate information.
[0045] For example, Figure 2 As shown, the bottom of the mobile device is equipped with a light sensor, which is illuminated by an LED light. When the mobile device is located in a special coding mat, that is, a first area, the mobile device is located in the first area by scanning the graphic code on the special coding mat.
[0046] Each second area includes a plurality of graphic codes, such as Figure 3As shown, the second area can be designed to a standard square size (such as 1 meter * 1 meter), and then each square cm 2 A positioning QR code is printed inside the grid, which is divided into a 100×100 grid, starting from one corner (such as the upper left corner) with a coordinate of (0, 0) and ending at the opposite corner (such as the lower right corner) with a coordinate of (99, 99). Users can splice multiple standardized base mats at the same angle to form first areas with different aspect ratios and shapes. Here, by standardizing the design of the pads and splicing multiple pads when using them, the pads can be made more practical. And during the positioning of the mobile device, a counter algorithm is used to calculate the absolute position of the mobile device at any location, thereby achieving accurate positioning.
[0047] The graphic code can be displayed in a variety of formats, including a QR code or a barcode, without limitation. Furthermore, since the distance between the light sensor at the bottom of the mobile device and the first area is typically relatively close, the size of the graphic code can also be relatively small (e.g., with a side length of less than 0.5 cm).
[0048] In addition, the lines of the graphic code can be thinned to achieve an effect that is difficult to be seen by the naked eye at a distance, thus ensuring the aesthetics of the base mat. Alternatively, the QR code of the base mat can be printed using infrared light-sensitive materials, making it invisible to the naked eye, and combined with infrared LED lights and infrared light sensors to achieve the same effect.
[0049] This involves step 120 .
[0050] The first image is recognized to obtain first coordinate information of the mobile device in a third area, where the third area is the area where the mobile device is located at the first moment, and the third area is any one of the plurality of second areas.
[0051] The step of identifying the first image and obtaining the first coordinate information of the mobile device in the third area may specifically include: scanning the first image, sending a request message to a preset server, and receiving graphic information corresponding to the first graphic code returned by the server, the graphic information including the first coordinate information of the mobile device in the third area, the third area being the area where the mobile device is located at the first moment, and the third area being any one of the multiple second areas.
[0052] In a possible embodiment, before step 120, the following steps may be further included:
[0053] Recognizing the first image and determining a first direction of the first graphic code;
[0054] When the first direction is inconsistent with the preset direction, determining a target coordinate transformation relationship according to the first direction and the preset direction;
[0055] Recognizing the first image and obtaining first coordinate information of the mobile device in the third area includes:
[0056] Recognize the first image and obtain fourth coordinate information of the mobile device in the third area;
[0057] Based on the target coordinate conversion relationship, the fourth coordinate information is converted into the first coordinate information.
[0058] The direction of the graphic codes in each second area can be arbitrary, and the directions of the graphic codes in the same second area are consistent. The preset direction can be a user-specified direction or a default direction.
[0059] When the first direction is consistent with the preset direction, the first image can be recognized and the first coordinate information of the mobile device in the third area can be directly obtained.
[0060] When the mobile device is placed in the second area, the first image corresponding to the first graphic code on the second area is first identified, and the first direction of the first graphic code is determined. If the first direction is inconsistent with the preset direction, a target coordinate transformation relationship is determined based on the first direction and the preset direction to obtain a coordinate transformation relationship between the coordinate information contained in the first graphic code and the actual coordinate information.
[0061] For example, if the upper right corner of the third area is moved to the upper left corner during the splicing of the second area, the mobile device will recognize that the first direction of the first graphic code has been rotated 90° counterclockwise. After recognizing the first image, the coordinate conversion relationship between the fourth coordinate information (x, y) of the mobile device in the third area and the actual coordinate information (x', y') is as follows (assuming there are 100×100 QR codes on the pad):
[0062] x'=y; y'=100-x;
[0063] Accordingly, recognizing the first image and obtaining first coordinate information of the mobile device in the third area includes:
[0064] Recognize the first image and obtain fourth coordinate information of the mobile device in the third area;
[0065] Based on the target coordinate conversion relationship, the fourth coordinate information is converted into the first coordinate information.
[0066] For example, the fourth coordinate information is (10, 20). Based on the target coordinate conversion relationship, the first coordinate information obtained by converting the fourth coordinate information is (20, 90).
[0067] like Figure 4As shown, the stitching between multiple second areas can be based on any angle. All mobile devices start from the second area in the upper left corner. When the mobile device is placed in the second area in the upper left corner, the target coordinate transformation relationship is first determined based on the direction of the graphic code on the second area.
[0068] During the movement of the mobile device, it will continue to scan the graphic code to read the coordinate information (x, y) contained in the graphic code and convert it into actual coordinate information (x', y'). On the one hand, if it is detected that the coordinate value x' or y' jumps, for example, from 0 to 99, or from 99 to 0, it means that the mobile device has moved from one second area to another second area, such as Figure 5 Therefore, x or y in the first identification information can be increased by 1.
[0069] If a change in the direction of the graphic code is detected, it means that the mobile device has moved from one second area to another second area. Figure 5 In this case, it is necessary to determine a new target coordinate conversion relationship according to the new graphic code direction, and add 1 to x or y in the first identification information.
[0070] Here, during the movement of the mobile device, the target coordinate conversion relationship is determined by the direction of the graphic code. Based on the target coordinate conversion relationship, the fourth coordinate information obtained by identifying the first image is converted into the first coordinate information. The coordinate information of the mobile device at any position can be calculated to achieve accurate positioning.
[0071] Wherein, the graphic code includes a preset mark, and the steps of identifying the first image and determining the first direction of the first graphic code mentioned above may specifically include the following steps:
[0072] Recognize the first image and determine the mark position information of the preset mark in the first graphic code;
[0073] A first direction of the first graphic code is determined according to the mark position information.
[0074] Identify the first image and determine the mark position information of the preset mark in the first graphical code. Determine a first direction of the first graphical code based on the mark position information. For example, if the mark position information is at the upper left position of the first graphical code, then the first direction of the first graphical code can be determined to be consistent with the preset direction. If the mark position information is at the upper right position of the first graphical code, then the first direction of the first graphical code can be determined to differ from the preset direction by 90 degrees in a clockwise direction.
[0075] like Figure 5As shown, for example, a preset mark is set in the upper left corner of each graphic code, which can identify the first image, determine the mark position information of the preset mark in the first graphic code, and determine the first direction of the first graphic code based on the mark position information. Figure 5 What is shown is the situation where the first direction is consistent with the preset direction.
[0076] Here, by introducing the preset mark into the graphic code, the user does not need to strictly follow a certain direction when splicing the pads corresponding to multiple second areas, thereby further improving the practicality of the pads.
[0077] This involves step 130 .
[0078] Based on the first coordinate information and the second coordinate information, the first identification information corresponding to the third area is determined; the second coordinate information is obtained by identifying the second image of the second graphic code collected at the second moment, the multiple graphic codes include the first graphic code and the second graphic code, the second moment is earlier than the first moment, and the time difference between the first moment and the second moment is less than the preset time difference.
[0079] In order to enable the mobile device to achieve rapid and accurate positioning, a counter algorithm may be introduced, that is, the first identification information corresponding to the third area may be determined according to the first coordinate information and the second coordinate information.
[0080] Among them, the second moment is earlier than the first moment and the time difference between the first moment and the second moment is less than the preset time difference, wherein the preset time difference can be the upper limit of the time difference between two adjacent graphic code recognition operations of the mobile device, that is, the time difference of the second moment is less than the preset time difference, that is, the first coordinate information of the first moment and the coordinate information of the second moment are adjacently collected coordinate information, so the first identification information corresponding to the position of the third area in the first area can be determined based on the first coordinate information and the second coordinate information.
[0081] For example, let's start the mobile device from the top-left mat (i.e., the second zone) and set a two-dimensional counter to (0, 0), meaning the horizontal axis is mat 0 and the vertical axis is mat 0. When the mobile device is operating on mat (0, 0), its sensor continuously reads coordinates. If the mobile device's x or y coordinate suddenly jumps from 99 to 0, it can be determined that the mobile device has moved from mat (0, 0) to mat (1, 0) or (0, 1), and the first identification information corresponding to the third zone currently located by the mobile device can be determined.
[0082] In a possible embodiment, the first coordinate information includes first abscissa information and first ordinate information, and the second coordinate information includes second abscissa information and second ordinate information. Step 130 may specifically include the following steps:
[0083] Obtaining second identification information corresponding to a fourth area, where the fourth area is an area where the mobile device is located at the second moment, and the fourth area is any one of the plurality of second areas;
[0084] When the difference between the first horizontal coordinate information and the second horizontal coordinate information is greater than the first threshold, or when the difference between the first vertical coordinate information and the second vertical coordinate information is greater than the first threshold, the second identification information is updated according to the preset counting rule to obtain the first identification information.
[0085] Obtain second identification information corresponding to the fourth region, where the second identification information may be the region where the mobile device is located at the second moment, for example, the second identification information is (0, 0). As the mobile device moves, its sensor continuously reads coordinates, for example, (0, 0), ..., (89, 11). When the mobile device continues to move rightward to the edge of the second region (0, 0), its coordinates read are 99, such as (99, 11).
[0086] When the mobile device continues to move right to the edge of the second area (1, 0), its coordinates suddenly jump to (0, 11). Since its X coordinate suddenly jumps from 99 to 0, it can be determined that the mobile device has moved from mat (0, 0) to mat (1, 0).
[0087] When the difference between the first horizontal coordinate information (i.e., 99) and the second horizontal coordinate information (i.e., 0) is greater than a first threshold value (e.g., 98), or when the difference between the first vertical coordinate information and the second vertical coordinate information is greater than the first threshold value, the second identification information is updated according to a preset counting rule to obtain the first identification information, that is, the first horizontal coordinate identification information or the first vertical coordinate identification information of the second identification information is added by 1 to obtain the first identification information.
[0088] When the difference between the first horizontal coordinate information and the second horizontal coordinate information is greater than the first threshold, the first horizontal coordinate identification information of the second identification information is added by 1 to obtain the first identification information; when the difference between the first vertical coordinate information and the second vertical coordinate information is greater than the first threshold, the first vertical coordinate identification information of the second identification information is added by 1 to obtain the first identification information.
[0089] Furthermore, when the mobile device is moving at high speed, it may not be able to fully read the coordinate data at each time. Tolerance values can be introduced to smooth the data. For example, the robot may read 98 and then suddenly move to another mat and read 1. In this case, the error is 2, which can allow for such jumps between 99 and 0. The specific tolerance value introduced can be flexibly adjusted according to different construction plans, accuracy requirements, mobile device operating speed, and reading accuracy.
[0090] This involves step 140 .
[0091] The target location information of the mobile device is determined according to the first coordinate information and the first identification information.
[0092] Through the above steps, the real-time coordinates of the mobile device in the current second area, that is, the first coordinate information (Cx, Cy), and the first identification information (Dx, Dy) of the current third area can be obtained. Based on (Cx, Cy) and (Dx, Dy), the target location information of the mobile device can be determined.
[0093] In a possible embodiment, determining the target location information of the mobile device according to the first coordinate information and the first identification information includes:
[0094] Determining a second distance based on the first identification information and a pre-acquired first distance corresponding to the second area;
[0095] Target position information is determined according to the first coordinate information and the second distance.
[0096] If the second area is a square, the first distance corresponding to the second area is the side length of the second area.
[0097] If the second area is a rectangle, the first distance corresponding to the second area includes the horizontal length and the vertical length of the second area.
[0098] Wherein, the first distance on the X-axis and the first distance on the Y-axis of a single second area are equal to 100, and the target position information (Ax, Ay) can be determined according to the following calculation:
[0099] Ax=T*Dx+Cx;
[0100] Ay=T*Dy+Cy;
[0101] Therefore, no matter how many second areas there are in the first area, the target position information of the mobile device in the first area can be obtained, thereby ensuring fast and accurate positioning of the mobile device in the first area.
[0102] The target position information includes target horizontal coordinate information and target vertical coordinate information, the first coordinate information includes first horizontal coordinate information and second vertical coordinate information, the first identification information includes first horizontal coordinate identification information and first vertical coordinate identification information, the target position information includes target horizontal coordinate information and target vertical coordinate information, and determining the target position information based on the first coordinate information and the second distance includes:
[0103] determining a third distance according to the first horizontal coordinate identification information and the pre-acquired first distance corresponding to the second area;
[0104] Determining a fourth distance based on the first vertical coordinate identification information and the pre-acquired first distance corresponding to the second area; the second distance includes the third distance and the fourth distance;
[0105] determining target horizontal coordinate information according to the first horizontal coordinate information and the third distance;
[0106] The target vertical coordinate information is determined according to the first vertical coordinate information and the fourth distance.
[0107] In a possible embodiment, the method further includes:
[0108] When the mobile device is in a stationary state, obtaining historical location information of the mobile device at a third moment, where the third moment is a starting moment when the mobile device is in the stationary state;
[0109] Obtaining a movement distance of the mobile device between a third moment and a fourth moment; the fourth moment being the first moment after the third moment when the mobile device is in a stationary state;
[0110] An operation instruction is determined according to the historical position information and the moving distance, and the operation instruction is used to indicate the moving track of the mobile device.
[0111] During the actual movement of the mobile device, it may collide and fall over, or be picked up for inspection and charging. In this case, if the mobile device is not properly returned to its original position, the target position information may be calculated incorrectly. To address this situation, an IMU displacement detection algorithm can be added. The details are as follows:
[0112] When a mobile device is detected to have been knocked over, the historical location information of the mobile device at the time of the knock is first read, i.e., the historical location information (Cx, Cy) at the third moment. The third moment is the starting time when the mobile device is in a stationary state, that is, the time when the mobile device was knocked over. This is the aforementioned real-time coordinate.
[0113] The moving distance of the mobile device between the third moment and the fourth moment can be obtained through IMU technology. The fourth moment is the first moment when the mobile device is in a stationary state after the third moment, that is, the moment when the mobile device is placed on the second area again.
[0114] Based on the historical location information and the moving distance, it is determined whether the identification information of the second area where the mobile device is located has changed, so as to determine the operation instruction for indicating the moving track of the mobile device. The specific determination method is as follows:
[0115] The historical location information includes historical coordinate information and historical identification information. The above-mentioned step of determining the operation instruction based on the historical location information and the moving distance may specifically include the following steps:
[0116] When the historical coordinate information is within a preset coordinate interval, or when the moving distance is greater than a second threshold, an operation instruction is determined, the operation instruction being used to instruct to clear the historical identification information and to instruct to transfer the mobile device to a preset starting position.
[0117] When the historical coordinate information is in the first preset coordinate interval, that is, if the horizontal coordinate information C in the historical coordinate information is X If the coordinates are within a first preset range (e.g., 20-80 degrees), or if the ordinate information Cy in the historical coordinate information is within the first preset range (e.g., 20-80 degrees), the IMU data is used to roughly calculate the distance the mobile device has moved since it was picked up. This is the distance the person has moved the mobile device off the ground after picking it up. If the distance moved is less than the preset distance, for example, if the operator simply righted a flipped mobile device, the historical identification information will not be cleared.
[0118] However, if, just before the mobile device is knocked over, the historical coordinate information is within a preset coordinate range (less than 10 or greater than 80), or if the moving distance is greater than a second threshold, the historical identification information needs to be cleared, and the user is prompted through an interface display or voice output to move the mobile device to a preset starting position, for example, the second area located in the upper left corner of the first area.
[0119] In addition, if Figure 6 As shown, after the AR device uses the camera to scan and locate the mobile device, the corresponding AR effects can be superimposed on the mobile device. Previously, the coordinate system read by the mobile device and the coordinate system in the AR device can be corrected once. This correction can be done manually, or through preset AR cloud anchors, or by identifying a pre-placed image anchor to achieve quick correction.
[0120] After determining the target location information of the mobile device based on the first coordinate information and the first identification information, the mobile device can also transmit the read code to the AR recognition device in real time through communication technology, such as Bluetooth, WiFi, 5G, etc. The real-time absolute location coordinates of the mobile device can be uploaded to the 5G MEC node, and the 5G MEC node sends the absolute location coordinates of the mobile device to user terminals participating in the mobile device AR game within the cell.
[0121] This allows for low-power, high-precision positioning of mobile devices in AR augmented reality. Specifically, this can be applied to scenarios such as watching physical robot war games in AR, real-time positioning and display of robots or unmanned vehicles, or positioning and management of transport robots in warehouses. In the embodiments of the present application, as the mobile device moves, the target position information of the mobile device in the first area is determined by continuously identifying the graphic code in the first area. This system is scalable, low-cost, and flexible to build, thus possessing high application value.
[0122] In the method for determining location information provided herein, a first image of a first graphical code is captured at a first moment while a mobile device is within a first area. The first area includes multiple second areas corresponding one-to-one with identification information, each of which includes multiple graphical codes. By recognizing the first image, first coordinate information of a third area indicated by the first graphical code within which the mobile device is located at the first moment is obtained. The third area is any one of the multiple second areas. Thus, the first coordinate information is used to locate the mobile device within the third area. Then, based on the first coordinate information and second coordinate information, first identification information corresponding to the third area is determined. The second coordinate information is obtained by recognizing a second image of a second graphical code captured at a second moment. The second moment is prior to the first moment, and the time difference between the first moment and the second moment is less than a preset time difference. Therefore, the first coordinate information at the first moment and the coordinate information at the second moment are adjacently captured. Therefore, based on the first coordinate information and the second coordinate information, first identification information corresponding to the location of the third area within the first area can be determined. Here, the first coordinate information is used to locate the mobile device within the third area, and the first identification information is used to locate the third area within the entire first area. Thus, based on the first coordinate information and the first identification information, the target location information of the mobile device within the first area can be quickly and accurately determined.
[0123] Based on the above Figure 1 The embodiment of the present application also provides a device for determining location information, such as Figure 7 As shown, the location information determining device 700 may include:
[0124] The acquisition module 710 is used to acquire a first image of a first graphic code at a first moment when the mobile device is located in a first area. The first area includes multiple second areas, each second area includes multiple graphic codes, and the second areas correspond to the identification information one by one.
[0125] The recognition module 720 is configured to recognize the first image and obtain first coordinate information of the mobile device in a third area, where the third area is the area where the mobile device is located at the first moment, and the third area is any one of the plurality of second areas.
[0126] The first determination module 730 is used to determine the first identification information corresponding to the third area based on the first coordinate information and the second coordinate information; the second coordinate information is obtained by identifying the second image of the second graphic code collected at the second moment, the multiple graphic codes include the first graphic code and the second graphic code, the second moment is earlier than the first moment, and the time difference between the first moment and the second moment is less than the preset time difference.
[0127] The second determining module 740 is configured to determine target location information of the mobile device according to the first coordinate information and the first identification information.
[0128] In a possible embodiment, the first coordinate information includes first abscissa information and first ordinate information, and the second coordinate information includes second abscissa information and second ordinate information. The first determining module 730 is specifically configured to:
[0129] Obtaining second identification information corresponding to a fourth area, where the fourth area is an area where the mobile device is located at the second moment, and the fourth area is any one of the plurality of second areas;
[0130] When the difference between the first horizontal coordinate information and the second horizontal coordinate information is greater than the first threshold, or when the difference between the first vertical coordinate information and the second vertical coordinate information is greater than the first threshold, the second identification information is updated according to the preset counting rule to obtain the first identification information.
[0131] In a possible embodiment, the apparatus 700 may further include:
[0132] an acquisition module, configured to acquire historical location information of the mobile device at a third moment when the mobile device is in a stationary state, where the third moment is a starting moment when the mobile device is in the stationary state;
[0133] The acquisition module is further configured to acquire a movement distance of the mobile device between a third moment and a fourth moment; the fourth moment being the first moment after the third moment when the mobile device is in a stationary state;
[0134] The third determining module is used to determine an operation instruction according to the historical location information and the moving distance, where the operation instruction is used to indicate the moving track of the mobile device.
[0135] In a possible embodiment, the historical location information includes historical coordinate information and historical identification information, and the third determination module is specifically configured to:
[0136] When the historical coordinate information is within a preset coordinate interval, or when the moving distance is greater than a second threshold, an operation instruction is determined, the operation instruction being used to instruct to clear the historical identification information and to instruct to transfer the mobile device to a preset starting position.
[0137] In a possible embodiment, the apparatus 700 may further include:
[0138] a fourth determining module, configured to recognize the first image and determine a first direction of the first graphic code;
[0139] a fifth determining module, configured to determine a target coordinate transformation relationship according to the first direction and the preset direction when the first direction is inconsistent with the preset direction;
[0140] The identification module 720 is specifically configured to:
[0141] Recognize the first image and obtain fourth coordinate information of the mobile device in the third area;
[0142] Based on the target coordinate conversion relationship, the fourth coordinate information is converted into the first coordinate information.
[0143] In a possible embodiment, the graphic code includes a preset mark, and the fourth determination module is specifically configured to:
[0144] Recognize the first image and determine the mark position information of the preset mark in the first graphic code;
[0145] A first direction of the first graphic code is determined according to the mark position information.
[0146] In a possible embodiment, the second determining module 740 is specifically configured to:
[0147] Determining a second distance based on the first identification information and a pre-acquired first distance corresponding to the second area;
[0148] Target position information is determined according to the first coordinate information and the second distance.
[0149] In an embodiment of the present application, a first image of a first graphical code is captured at a first moment while a mobile device is located within a first area. The first area includes multiple second areas corresponding one-to-one with identification information, each of which includes multiple graphical codes. By recognizing the first image, first coordinate information of a third area indicated by the first graphical code within which the mobile device is located at the first moment can be obtained. The third area is any one of the multiple second areas. Therefore, the first coordinate information is used to locate the mobile device within the third area. Then, based on the first coordinate information and second coordinate information, first identification information corresponding to the third area is determined. The second coordinate information is obtained by recognizing a second image of a second graphical code captured at a second moment. The second moment is prior to the first moment, and the time difference between the first moment and the second moment is less than a preset time difference. Therefore, the first coordinate information at the first moment and the coordinate information at the second moment are adjacently captured. Therefore, based on the first coordinate information and the second coordinate information, first identification information corresponding to the location of the third area within the first area can be determined. Here, the first coordinate information is used to locate the mobile device within the third area, and the first identification information is used to locate the third area within the entire first area. Thus, based on the first coordinate information and the first identification information, the target location information of the mobile device in the first area can be quickly and accurately determined.
[0150] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0151] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.
[0152] Specifically, the processor 301 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0153] The memory 302 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 302 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory. In a specific embodiment, the memory 302 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0154] The processor 301 reads and executes computer program instructions stored in the memory 302 to implement any one of the location information determination methods in the embodiments shown in the figure.
[0155] In one example, the electronic device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301 , the memory 302 , and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0156] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0157] Bus 310 comprises hardware, software or both, couples the parts of electronic equipment to each other.For example, and not limitation, bus can comprise accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus 310 can comprise one or more buses.Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.
[0158] The electronic device can execute the location information determination method in the embodiment of the present application, thereby realizing the combination Figure 2 Describes the method for determining location information.
[0159] In addition, in combination with the location information determination method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the Figure 1 Method for determining location information.
[0160] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0161] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0162] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0163] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.
Claims
1. A method for determining location information, characterized in that: Applied to a mobile device, the method includes: When the mobile device is located in a first area, capturing a first image of a first graphic code at a first moment, the first area includes a plurality of second areas, each of the second areas includes a plurality of graphic codes, and the second areas correspond to the identification information one by one; Recognize the first image to obtain first coordinate information of the mobile device in a third area, where the third area is the area where the mobile device is located at the first moment, and the third area is any one of the plurality of second areas; determining first identification information corresponding to the third area based on the first coordinate information and the second coordinate information; the second coordinate information is obtained by identifying a second image of a second graphic code acquired at a second moment, the multiple graphic codes include the first graphic code and the second graphic code, the second moment is prior to the first moment, and a time difference between the first moment and the second moment is less than a preset time difference; determining target location information of the mobile device according to the first coordinate information and the first identification information; The first coordinate information includes first horizontal coordinate information and first vertical coordinate information, the second coordinate information includes second horizontal coordinate information and second vertical coordinate information, and determining the first identification information corresponding to the third area based on the first coordinate information and the second coordinate information includes: Acquire second identification information corresponding to a fourth area, where the fourth area is the area where the mobile device is located at the second moment, and the fourth area is any one of the multiple second areas; When a difference between the first horizontal coordinate information and the second horizontal coordinate information is greater than a first threshold, or when a difference between the first vertical coordinate information and the second vertical coordinate information is greater than the first threshold, updating the second identification information according to a preset counting rule to obtain the first identification information; The determining of the target location information of the mobile device according to the first coordinate information and the first identification information includes: determining a second distance according to the first identification information and a pre-acquired first distance corresponding to the second area; The target position information is determined according to the first coordinate information and the second distance.
2. The method according to claim 1, characterized in that The method further comprises: When the mobile device is in a stationary state, obtaining historical location information of the mobile device at a third moment, where the third moment is a starting moment when the mobile device is in the stationary state; Obtaining a movement distance of the mobile device between the third moment and a fourth moment; the fourth moment being the first moment in which the mobile device is in a stationary state after the third moment; An operation instruction is determined according to the historical position information and the moving distance, where the operation instruction is used to indicate a moving track of the mobile device.
3. The method according to claim 2, characterized in that The historical position information includes historical coordinate information and historical identification information, and determining the operation instruction based on the historical position information and the moving distance includes: When the historical coordinate information is within a preset coordinate interval, or when the moving distance is greater than a second threshold, the operation instruction is determined, and the operation instruction is used to instruct to clear the historical identification information and to instruct to transfer the mobile device to a preset starting position.
4. The method according to claim 1, wherein Before recognizing the first image and obtaining first coordinate information of the mobile device in the third area, the method further includes: Recognizing the first image and determining a first direction of the first graphic code; In the case where the first direction is inconsistent with the preset direction, determining a target coordinate transformation relationship according to the first direction and the preset direction; The identifying the first image and obtaining first coordinate information of the mobile device in the third area includes: Recognizing the first image to obtain fourth coordinate information of the mobile device in a third area; Based on the target coordinate conversion relationship, the fourth coordinate information is converted into the first coordinate information.
5. The method according to claim 4, characterized in that The graphic code includes a preset mark, and the identifying the first image and determining the first direction of the first graphic code includes: identifying the first image and determining the mark position information of the preset mark in the first graphic code; The first direction of the first graphic code is determined according to the mark position information.
6. A device for determining position information, characterized in that: The position information determining device comprises: a capture module configured to capture, at a first moment, a first image of a first graphic code when the mobile device is located in a first area, the first area including a plurality of second areas, each of the second areas including a plurality of graphic codes, and the second areas corresponding to the identification information in a one-to-one manner; an identification module, configured to identify the first image and obtain first coordinate information of the mobile device in a third area, where the third area is the area where the mobile device is located at the first moment, and the third area is any one of the plurality of second areas; a first determining module, configured to determine first identification information corresponding to the third area based on the first coordinate information and second coordinate information, wherein the second coordinate information is obtained by identifying a second image of a second graphic code acquired at a second moment, the plurality of graphic codes include the first graphic code and the second graphic code, the second moment is prior to the first moment, and a time difference between the first moment and the second moment is less than a preset time difference; a second determining module, configured to determine target location information of the mobile device according to the first coordinate information and the first identification information; The first coordinate information includes first abscissa information and first ordinate information, the second coordinate information includes second abscissa information and second ordinate information, and the first determining module is specifically configured to: Acquire second identification information corresponding to a fourth area, where the fourth area is the area where the mobile device is located at the second moment, and the fourth area is any one of the multiple second areas; When a difference between the first horizontal coordinate information and the second horizontal coordinate information is greater than a first threshold, or when a difference between the first vertical coordinate information and the second vertical coordinate information is greater than the first threshold, updating the second identification information according to a preset counting rule to obtain the first identification information; The second determining module is specifically configured to: determining a second distance according to the first identification information and a pre-acquired first distance corresponding to the second area; The target position information is determined according to the first coordinate information and the second distance.
7. An electronic device, characterized in that: The electronic device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for determining position information according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the method for determining position information according to any one of claims 1 to 5.
Citation Information
Patent Citations
Fingerprint data processing method, medium and mobile robot
CN113556680A
Mobile robot positioning method, navigation method, and grid map creation method
JP2020091837A