Position area detection method, apparatus, device, storage medium and program product
By mapping the target location to the mapped location in the metaverse and obtaining the regional projection data, combined with ray filtering, the problem of low efficiency in target location regional detection in the metaverse is solved, and efficient and accurate regional monitoring is achieved.
Patent Information
- Application Number
- CN202211096793.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-08
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2042-09-08
AI Technical Summary
Existing technologies have low efficiency in detecting target locations in the metaverse, resulting in excessive computation of invalid regions and low overall efficiency.
By mapping the target's location information to the mapped location and obtaining regional projection data, the initial region is roughly determined. Then, ray filtering is used to accurately locate the target region, reducing the amount of data and computational complexity.
It improves the efficiency and accuracy of target location region detection in the metaverse, adapts to the large and complex metaverse region monitoring needs, and reduces computational complexity and data volume.
Smart Images

Figure CN116188565B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a location area detection method, apparatus, computer equipment, storage medium, and computer program product. Background Technology
[0002] The metaverse is essentially a virtualization and digitization of the real world, requiring extensive modifications to content production, economic systems, user experience, and physical world content. Therefore, the metaverse possesses a vast and complex data structure and content. Due to the limited memory and display capacity of current computers, the metaverse must be divided into regions. This allows the computer to process only the content of the region where the character resides and related regions, thus fulfilling the basic requirements for entering the metaverse.
[0003] In traditional technologies, range monitoring methods are mainly used for small virtual spaces and scenes. They monitor areas by comparing distances or ranges. The biggest drawback of this method is that it introduces useless area monitoring. For example, some areas are far away from the character and do not need to be included in the calculation, but this method will introduce them all, resulting in redundant calculations and low efficiency. Summary of the Invention
[0004] Therefore, it is necessary to provide a location region detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the efficiency of target location region detection in the metaverse, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a location region detection method, the method comprising:
[0006] Obtain the target's location information;
[0007] The mapping position corresponding to the target is obtained by mapping based on the target's location information;
[0008] Obtain region projection data, which is obtained by mapping based on region boundaries;
[0009] The initial region where the target is located is determined based on the mapping position and the region projection data;
[0010] The initial area is filtered based on the location information of the target to determine the target area where the target is located.
[0011] In one embodiment, prior to acquiring the region projection data, the method further includes:
[0012] Obtain the location range of each region and extract the location information of the boundaries of each region;
[0013] The location information of the boundaries of each region is mapped one-dimensionally to the target dimension to obtain the region projection data of each region.
[0014] In one embodiment, the step of mapping the target location information to obtain the mapped location corresponding to the target includes:
[0015] The location information of the target is mapped one-dimensionally to the target dimension to obtain the mapped position corresponding to the target.
[0016] In one embodiment, the region projection data includes the region start position and region end position of each region; determining the initial region where the target is located based on the mapped position and the region projection data includes:
[0017] The mapped position is compared with the starting position and ending position of each region;
[0018] When the mapping position is between the starting position and the ending position of the region, the corresponding region is determined as the initial region where the target is located.
[0019] In one embodiment, the step of filtering the initial region based on the target's location information to determine the target region includes:
[0020] Starting from the location information of the target, a ray is constructed in a preset direction, wherein the preset direction is the four directions corresponding to two mutually perpendicular straight lines;
[0021] Detect whether each of the rays intersects the boundary of the initial region;
[0022] When all the rays intersect the boundary of the initial region, the target region where the target is located is determined.
[0023] Secondly, this application also provides a location area detection device, the device comprising:
[0024] The target location acquisition module is used to acquire the target's location information;
[0025] The first mapping module is used to obtain a mapping position corresponding to the target based on the target's location information;
[0026] A region projection data acquisition module is used to acquire region projection data, which is obtained by mapping based on the region boundary.
[0027] An initial region determination module is used to determine the initial region where the target is located based on the mapping position and the region projection data;
[0028] The target area determination module is used to filter the initial area based on the location information of the target to determine the target area where the target is located.
[0029] In one embodiment, the device further includes:
[0030] The regional location information acquisition module is used to acquire the location range of each region and extract the location information of the boundaries of each region;
[0031] The second mapping module is used to perform one-dimensional mapping of the location information of the boundaries of each region to the target dimension to obtain the region projection data of each region.
[0032] In one embodiment, the first mapping module is further configured to perform a one-dimensional mapping of the target's location information to the target dimension to obtain a mapped position corresponding to the target.
[0033] In one embodiment, the region projection data includes the region start position and region end position of each region; the initial region determination module includes:
[0034] The comparison unit is used to compare the mapped position with the start position and end position of each region, respectively.
[0035] An initial region determination unit is used to determine the corresponding region as the initial region where the target is located when the mapping position is between the region start position and the region end position.
[0036] In one embodiment, the target region determination module includes:
[0037] A ray construction unit is used to construct a ray with the target's position information as the starting point and a preset direction, wherein the preset direction is the four directions corresponding to two mutually perpendicular straight lines;
[0038] A detection unit is used to detect whether each of the rays intersects with the boundary of the initial region;
[0039] The target region determination unit is used to determine the target region where the target is located in the initial region when all the rays intersect the boundary of the initial region.
[0040] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the above embodiments.
[0041] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the methods in any of the above embodiments.
[0042] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the methods in any of the above embodiments.
[0043] The aforementioned location region detection method, device, computer equipment, storage medium, and computer program product first map the target's location information to the corresponding mapping location and obtain the region projection data obtained from the mapping based on the region boundary. This allows for a rough determination of the initial region where the target is located based on the mapping location and the region projection data. Judgment is then made using the region projection data corresponding to the region boundary, transforming the multi-dimensional region judgment into a one-dimensional region projection data judgment. This significantly reduces the amount of data and the complexity of the judgment, greatly reducing the amount of data required to monitor the vast region of the metaverse and improving efficiency. Furthermore, after roughly determining the initial region where the target is located, the initial region is then filtered based on the target's location information to determine the target region. This also ensures the accuracy of the region, and the number of filtered initial regions is greatly reduced. Filtering based on the target's location information further reduces the amount of data processing and improves efficiency. This significantly improves the program's computational efficiency and adapts to the monitoring of the vast region of the metaverse, meeting the computational needs of such a large and complex region. Attached Figure Description
[0044] Figure 1 This is an application environment diagram of a location region detection method in one embodiment;
[0045] Figure 2 This is a flowchart illustrating a location region detection method in one embodiment;
[0046] Figure 3 This is a schematic diagram of the location of a region in one embodiment;
[0047] Figure 4 This is a schematic diagram of a ray in one embodiment;
[0048] Figure 5 This is a flowchart illustrating a location region detection method in another embodiment;
[0049] Figure 6 This is a structural block diagram of a location area detection device in one embodiment;
[0050] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] The location region detection method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on other network servers. The location area detection method provided in this embodiment can be applied independently to a terminal; it is understood that the method can also be applied to a server, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. No specific limitations are made here.
[0053] The terminal 102 can send the target's location information to the server 104. The server 104 maps the target's location information to obtain a mapped location corresponding to the target; acquires region projection data, which is obtained by mapping based on region boundaries; determines the initial region where the target is located based on the mapped location and the region projection data; and filters the initial region based on the target's location information to determine the target region where the target is located. This process first maps the target's location information to the corresponding mapped location and acquires the region projection data obtained by mapping based on region boundaries. This allows for a rough determination of the target's initial region based on the mapped location and region projection data, followed by a final determination using the region projection data corresponding to the region boundaries. This significantly reduces the amount of data and improves efficiency. Furthermore, after roughly determining the initial region, filtering the initial region based on the target's location information to determine the target region ensures the accuracy of the region, greatly improving the program's computational efficiency and adapting to the vast region range monitoring of the metaverse, thus meeting the computational needs of such a large and complex region.
[0054] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0055] In one embodiment, such as Figure 2 As shown, a location region detection method is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:
[0056] S202: Obtain the target's location information.
[0057] Specifically, the target's location information can refer to the target's current coordinates, such as its coordinates in the metaverse. When the target moves, its location information is acquired; for example, when the target moves from one area to another, or when the target's coordinates change. The terminal then reports the target's location information, allowing the server to determine the target's new area in the metaverse based on this information. The target can refer to various roles in the metaverse, such as vehicles, people, objects, etc., without specific limitations. Any object in the metaverse can be represented by the target described in this application.
[0058] The regions mentioned here refer to the various regions formed after dividing the metaverse into regions. See also... Figure 3 As shown, once the metaverse is constructed, its rules for dividing the virtual world into regions are basically determined. Generally, the model boundaries are used as a reference, with certain special locations outlining the basic regional divisions of the metaverse and assigning corresponding region names. For brevity, Figure 3 The area was simply divided into four regions: A, B, C, and D. Figure 3 All four regions are regular rectangles. In other embodiments, the regions can be irregular or regular shapes, and the shape of the region boundaries is not restricted here.
[0059] S204: Map the target's location information to obtain the corresponding mapping position.
[0060] Specifically, the mapped position is obtained by mapping the target's location information. The mapping method is the same as the mapping method corresponding to the regional projection data, thus ensuring the comparability of the mapped position and the regional projection data.
[0061] Among them, the combination Figure 3 Taking point E as an example, it is projected vertically onto the x-axis to obtain the corresponding mapped position F. In other embodiments, when the region projection data is projected horizontally, the target's position information is also projected along the corresponding horizontal direction. In other embodiments, the projection direction can also be other directions, as long as the mapping method for the region projection data and the mapping method for the mapped position are consistent.
[0062] S206: Obtain regional projection data, which is obtained by mapping based on the regional boundary.
[0063] Specifically, the regional projection data is obtained by mapping based on the regional boundaries. Please continue to combine... Figure 3 As shown, each region in the metaverse is projected along a certain direction, converting it into region projection data. Optionally, this region projection data is one-dimensional data. Specifically, in actual storage, this region projection data can be stored in the form of a one-dimensional data table. Each region in the metaverse has a start position and an end position, and each region has a certain order and overlap relationship, for example... Figure 3 In the diagram, region A has a starting position of G and an ending position of I; region B has a starting position of G and an ending position of H; region C has a starting position of H and an ending position of J; and region D has a starting position of I and an ending position of J. The starting and ending positions of these regions overlap.
[0064] S208: Determine the initial region where the target is located based on the mapping position and the region projection data.
[0065] Specifically, the initial region is the approximate area where the target is located, determined based on the mapped position and the region projection data. In one optional embodiment, when the number of initial regions is one, the initial region can be directly determined as the target region; when the number of initial regions is greater than one, the initial regions are further filtered based on the target's location information to determine the target region.
[0066] The initial region is determined by comparing the mapped position with the region projection data. For example, the mapped position is compared with the starting position in the region projection data to filter regions. Then, the mapped position is compared with the ending position in the region projection data of the filtered regions to determine the final initial region. The original region was obtained by comparing two-dimensional coordinates, which is complex and computationally intensive. This application transforms the two-dimensional coordinate comparison into a one-dimensional coordinate comparison, directly reducing the computational load by at least half, thereby improving processing efficiency and also roughly determining the initial region where the target is located.
[0067] With the metaverse mapping data table, it's possible to quickly locate certain approximate regions to which a target belongs, but precise location is not possible because mapping loses some spatial dimensions, leading to overlapping regions during calculation. For a small number of regions, the advantage of fuzzy positioning is not significant, but its advantage becomes apparent when the number of regions in the metaverse is very large. After obtaining the target's coordinates, mapping is performed in the same vertical manner, and matching is done based on the metaverse mapping data, avoiding many invalid and unnecessary regions, greatly improving computational performance and efficiency.
[0068] S210: Filter the initial area based on the location information of the target to determine the target area where the target is located.
[0069] Specifically, the process of filtering the initial region is the process of accurately determining the target region. In this embodiment, the target region is determined by filtering the initial region using the target's location information.
[0070] In one optional embodiment, filtering the initial region to determine the target region based on the target's location information can be done directly using the distance or boundary comparison methods described above, or it can be done using a gridded approach. However, to improve efficiency, this application proposes using rays to filter the initial region to determine the target region. This method maps the metaverse projection data, first performing fuzzy positioning, and then using rays to accurately calculate the target's current position. This allows for completely flexible region division, eliminating the need to be confined to a fixed grid, thus meeting the basic needs of region division in the metaverse and providing efficient computation. Real-time monitoring of whether the target enters the next region or other regions allows for efficient filtering and monitoring of the region range of each target.
[0071] The ray method only requires starting from the target's location information and emitting four rays in preset directions, such as four mutually perpendicular directions. If the results returned by the four rays all include the corresponding region, then the target (x,y) is located within the region; otherwise, the target (x,y) is outside the region.
[0072] The aforementioned location region detection method first maps the target's location information to the corresponding mapping location and obtains the region projection data obtained by mapping based on the region boundary. In this way, the initial region where the target is located is roughly determined based on the mapping location and the region projection data. Judgment is made by using the region projection data corresponding to the region boundary. The amount of data is greatly reduced, improving efficiency. In addition, after roughly determining the initial region where the target is located, the initial region is filtered based on the target's location information to determine the target region where the target is located. This also ensures the accuracy of the region, greatly improves the program's computational efficiency, and adapts to the monitoring of the vast region range of the metaverse, meeting the computational needs of such a large and complex region as the metaverse.
[0073] In one embodiment, before obtaining the region projection data, the method further includes: obtaining the location range of each region and extracting the location information of the boundary of each region; mapping the location information of the boundary of each region to the target dimension in one dimension to obtain the region projection data of each region.
[0074] Specifically, the location range of the region can be extended to the region's boundary information, combined with... Figure 3 This includes regions A, B, C, and D, each with boundaries. It should be noted that the real metaverse is extremely complex and vast; the illustrations are merely for illustrating the technical points of this application. The target dimension can be a pre-determined one-dimensional dimension; for example, a coordinate axis could be the x-axis or the y-axis. No restrictions are placed on the target dimension here.
[0075] The server can extract the location information of the boundary of each region, and then perform a one-dimensional mapping of the location information of the boundary of the region to the target dimension to obtain the region projection data of each region. In other words, the metaverse region projection data is a range region table generated by a one-dimensional mapping of the boundary region of the metaverse. For example, if the metaverse is projected along the x-axis, a one-dimensional table data with boundary data is generated.
[0076] This allows for fuzzy region detection of the target, mapping the target's arbitrary coordinates to the region projection data of the metaverse in the same way. This can quickly locate the target in some initial regions, but it cannot pinpoint the exact initial region.
[0077] In the above embodiments, one-dimensional region projection data is obtained by mapping the position information of the metaverse. This allows for the subsequent fuzzy positioning to filter out the approximate initial region to which the target belongs, simplifying the calculation and improving efficiency.
[0078] In one embodiment, the step of mapping the location information of the target to obtain the mapping position corresponding to the target includes: mapping the location information of the target to the target dimension in one dimension to obtain the mapping position corresponding to the target.
[0079] In this embodiment, the target's location information is also mapped one-dimensionally to the target dimension, using the same method as the projection method of the regional projection data, thereby ensuring comparability.
[0080] Among them, continue to combine Figure 3 Taking point E as an example, it is projected vertically onto the x-axis to obtain the corresponding mapped position F. In other embodiments, when the region projection data is projected horizontally, the target's position information is also projected along the corresponding horizontal direction. In other embodiments, the projection direction can also be other directions, as long as the mapping method for the region projection data and the mapping method for the mapped position are consistent.
[0081] In the above embodiments, based on the region projection data generated by the metaverse, and matching the target's location information with the same mapping relationship, the approximate region to which the target belongs can be quickly queried. This avoids the introduction of a large number of invalid regions in the region monitoring calculation, thereby improving the monitoring efficiency.
[0082] In one embodiment, the region projection data includes the region start position and region end position of each region; determining the initial region where the target is located based on the mapping position and the region projection data includes: comparing the mapping position with the region start position and region end position of each region respectively; when the mapping position is between the region start position and region end position, determining the corresponding region as the initial region where the target is located.
[0083] Specifically, the regional projection data includes the regional starting position and regional ending position of each region. Therefore, the fuzzy positioning process is the process of comparing the mapped position with the regional starting position and regional ending position of each region.
[0084] In one optional embodiment, the initial region is determined by comparing the mapped position with the region projection data. For example, the mapped position is compared with the starting position in the region projection data to filter the regions, and then the mapped position is compared with the ending position in the region projection data of the filtered regions to determine the final initial region. The original region was obtained by comparing two-dimensional coordinates, which is complex and computationally intensive. This application converts the two-dimensional coordinate comparison into a one-dimensional coordinate comparison, directly reducing the computational load by at least half, thereby improving processing efficiency and also roughly determining the initial region where the target is located.
[0085] In the above embodiments, based on the region projection data generated by the metaverse, and matching the target's location information with the same mapping relationship, the approximate region to which the target belongs can be quickly queried. This avoids the introduction of a large number of invalid regions in the region monitoring calculation, thereby improving the monitoring efficiency.
[0086] In one embodiment, the step of filtering the initial region based on the target's location information to determine the target region includes: constructing rays from the target's location information in preset directions, where the preset directions are the four directions corresponding to two mutually perpendicular straight lines; detecting whether each ray intersects the boundary of the initial region; and determining the target region where the target is located in the initial region when all rays intersect the boundary of the initial region.
[0087] Specifically, ray casting is a feature in 3D engines that allows an invisible detection line to be emitted from any point in the virtual world in a specified direction, returning all virtual objects or boundaries that the line passes through. Ray casting can accurately match the boundaries of a region, thus accurately calculating the location of a target. However, if too many boundaries need to be verified, the computational load can be enormous. After fuzzy localization, invalid boundaries and regions can be quickly filtered out, making ray casting detection extremely high-performance.
[0088] The preset directions can be the four directions corresponding to two mutually perpendicular straight lines. For convenience, based on the characteristics of rays, the center point of the target is taken as the emission point of the ray, and the target coordinates are set as (x,y). Four direction vectors are constructed as (1,0), (-1,0), (0,-1), and (0,1), and four rays are emitted. If the results returned by all four rays contain the initial region, then the target (x,y) is located within the initial region; otherwise, the target (x,y) is outside the initial region.
[0089] Specifically, in combination Figure 4As shown, a schematic diagram of a ray in one embodiment is given. In this embodiment, multiple regions are included, with point E as the starting point, i.e. the emission point, and rays are emitted in four directions. The four rays intersect the boundary of region C, but do not all intersect the boundaries of regions A, B, and D. Therefore, region C can be determined as the target region.
[0090] In the above embodiments, the characteristics of the three-dimensional engine ray are reasonably utilized to efficiently monitor the position of the boundary, thereby locating the target area where the target is located, which conforms to the regional distribution and hierarchy of the construct metaverse.
[0091] For easier understanding, please refer to... Figure 5 As shown, Figure 5 The flowchart below shows a location region detection method in another embodiment. In this embodiment, the rules for dividing the virtual world into regions are basically determined after the metaverse is constructed. Generally, the model boundary is used as the standard, and certain special locations are used to outline the basic region division of the metaverse and assign corresponding region names.
[0092] Based on the location information of each region, the corresponding region projection data is calculated, which is converted into a one-dimensional data table. Each region has a start position and an end position, and each region has a certain order and overlap relationship. The various regions in the metaverse are projected along a certain direction, converting them into region projection data. Optionally, this region projection data is one-dimensional data. Specifically, in actual storage, this region projection data can be stored in the form of a one-dimensional data table. Each region in the metaverse has a start position and an end position, and each region has a certain order and overlap relationship, for example... Figure 3 In the diagram, region A has a starting position of G and an ending position of I; region B has a starting position of G and an ending position of H; region C has a starting position of H and an ending position of J; and region D has a starting position of I and an ending position of J. The starting and ending positions of these regions overlap.
[0093] Furthermore, the target's location information is projected using the same projection method to obtain the corresponding mapped location. Combined with... Figure 3 Taking point E as an example, it is projected vertically onto the x-axis to obtain the corresponding mapped position F. In other embodiments, when the region projection data is projected horizontally, the target's position information is also projected along the corresponding horizontal direction. In other embodiments, the projection direction can also be other directions, as long as the mapping method for the region projection data and the mapping method for the mapped position are consistent.
[0094] The mapped position and the regional projection data are compared to determine the initial region. Specifically, the mapped position is compared with the starting position in the regional projection data to filter the regions. Then, the mapped position is compared with the ending position in the regional projection data of the filtered regions to determine the final initial region. The initial region is the approximate area where the target is located, determined based on the mapped position and the regional projection data. In one optional embodiment, when the number of initial regions is one, this initial region can be directly determined as the target region. When the number of initial regions is greater than one, the initial regions are further filtered based on the target's location information to determine the target region.
[0095] The initial region is determined by comparing the mapped position with the region projection data. For example, the mapped position is compared with the starting position in the region projection data to filter regions. Then, the mapped position is compared with the ending position in the region projection data of the filtered regions to determine the final initial region. The original region was obtained by comparing two-dimensional coordinates, which is complex and computationally intensive. This application transforms the two-dimensional coordinate comparison into a one-dimensional coordinate comparison, directly reducing the computational load by at least half, thereby improving processing efficiency and also roughly determining the initial region where the target is located.
[0096] Then, the initial region is filtered using rays to determine the target region. For example, the center point of the target is used as the ray emission point, and the target point coordinates are set to (x, y). Four direction vectors are constructed: (1, 0), (-1, 0), (0, -1), and (0, 1), and four rays are emitted. If the results returned by all four rays contain the corresponding region, then the target point (x, y) is within the corresponding region; otherwise, the target point (x, y) is outside the corresponding region. The preset directions can be the four directions corresponding to two mutually perpendicular straight lines. For convenience, based on the characteristics of rays, the center point of the target is used as the ray emission point, and the target coordinates are set to (x, y). Four direction vectors are constructed: (1, 0), (-1, 0), (0, -1), and (0, 1), and four rays are emitted. If the results returned by all four rays contain the corresponding initial region, then the target (x, y) is within the corresponding initial region; otherwise, the target (x, y) is outside the corresponding initial region. Figure 4 As shown, a schematic diagram of a ray in one embodiment is given. In this embodiment, multiple regions are included, with point E as the starting point, i.e. the emission point, and rays are emitted in four directions. The four rays intersect the boundary of region C, but do not all intersect the boundaries of regions A, B, and D. Therefore, region C can be determined as the target region.
[0097] This application makes reasonable use of the direct relationship of mapping to filter out invalid comparison areas, thereby improving the real-time performance and computing efficiency of the metaverse-level regional range monitoring. While ensuring the high efficiency of real-time monitoring, it does not force virtual targets to be fixed within a grid, which is more in line with the openness and extensibility of the metaverse. The characteristics of rays make the boundary monitoring more in line with the range of virtual objects. Combined with the principle of fuzzy positioning, it avoids the number of boundaries monitored by rays, resulting in higher monitoring utilization.
[0098] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0099] Based on the same inventive concept, this application also provides a location region detection device for implementing the location region detection method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more location region detection device embodiments provided below can be found in the limitations of the location region detection method described above, and will not be repeated here.
[0100] In one embodiment, such as Figure 6 As shown, a location region detection device is provided, including: a target location acquisition module 601, a first mapping module 602, a region projection data acquisition module 603, an initial region determination module 604, and a target region determination module 605, wherein:
[0101] The target location acquisition module 601 is used to acquire the location information of the target.
[0102] The first mapping module 602 is used to map the target's location information to obtain a mapping position corresponding to the target.
[0103] The region projection data acquisition module 603 is used to acquire region projection data, which is obtained by mapping based on the region boundary.
[0104] The initial region determination module 604 is used to determine the initial region where the target is located based on the mapping position and the region projection data.
[0105] The target area determination module 605 is used to filter the initial area based on the location information of the target to determine the target area where the target is located.
[0106] In one embodiment, the location area detection device may further include:
[0107] The regional location information acquisition module is used to acquire the location range of each region and extract the location information of the boundary of each region.
[0108] The second mapping module is used to perform one-dimensional mapping of the location information of the boundaries of each region to the target dimension to obtain the region projection data of each region.
[0109] In one embodiment, the first mapping module 602 may also be used to perform a one-dimensional mapping of the target's location information to the target dimension to obtain a mapped position corresponding to the target.
[0110] In one embodiment, the region projection data includes the region start position and region end position of each region; the initial region determination module 604 may include:
[0111] The comparison unit is used to compare the mapped position with the starting position and ending position of each region.
[0112] An initial region determination unit is used to determine the corresponding region as the initial region where the target is located when the mapping position is between the region start position and the region end position.
[0113] In one embodiment, the target region determination module 605 may include:
[0114] A ray construction unit is used to construct a ray from the position information of the target in a preset direction, wherein the preset direction is the four directions corresponding to two mutually perpendicular straight lines.
[0115] The detection unit is used to detect whether each of the rays intersects with the boundary of the initial region.
[0116] The target region determination unit is used to determine the target region where the target is located in the initial region when all the rays intersect the boundary of the initial region.
[0117] Each module in the aforementioned location area detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0118] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores area projection data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a location area detection method.
[0119] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0120] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring the location information of a target; mapping the target's location information to obtain a mapped position corresponding to the target; acquiring region projection data, which is obtained by mapping based on region boundaries; determining an initial region where the target is located based on the mapped position and the region projection data; and filtering the initial region based on the target's location information to determine a target region where the target is located.
[0121] In one embodiment, before the processor executes the computer program to acquire the region projection data, the method further includes: acquiring the location range of each region and extracting the location information of the boundary of each region; mapping the location information of the boundary of each region to a target dimension in one dimension to obtain the region projection data of each region.
[0122] In one embodiment, the process of mapping the target's location information to obtain a mapping position corresponding to the target, implemented by the processor executing a computer program, includes: mapping the target's location information to the target dimension in one dimension to obtain a mapping position corresponding to the target.
[0123] In one embodiment, the region projection data involved when the processor executes the computer program includes the region start position and region end position of each region; the process of determining the initial region where the target is located based on the mapping position and the region projection data when the processor executes the computer program includes: comparing the mapping position with the region start position and region end position of each region respectively; when the mapping position is between the region start position and region end position, determining the corresponding region as the initial region where the target is located.
[0124] In one embodiment, the process of filtering the initial region based on the target's location information to determine the target region implemented by the processor executing the computer program includes: constructing rays from the target's location information in preset directions, wherein the preset directions are the four directions corresponding to two mutually perpendicular straight lines; detecting whether each ray intersects the boundary of the initial region; and determining the target region where the target is located in the initial region when all rays intersect the boundary of the initial region.
[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: acquiring the location information of a target; mapping the target location information to obtain a mapping position corresponding to the target; acquiring region projection data, the region projection data being obtained by mapping based on region boundaries; determining an initial region where the target is located based on the mapping position and the region projection data; and filtering the initial region based on the target location information to determine a target region where the target is located.
[0126] In one embodiment, before the acquisition of the region projection data is implemented when the computer program is executed by the processor, the method further includes: acquiring the location range of each region and extracting the location information of the boundary of each region; mapping the location information of the boundary of each region to a target dimension in one dimension to obtain the region projection data of each region.
[0127] In one embodiment, the process of mapping the target's location information to obtain a corresponding mapping position when the computer program is executed by a processor includes: mapping the target's location information to the target dimension in one dimension to obtain a corresponding mapping position.
[0128] In one embodiment, the region projection data involved when the computer program is executed by the processor includes the region start position and region end position of each region; the process of determining the initial region where the target is located based on the mapping position and the region projection data when the computer program is executed by the processor includes: comparing the mapping position with the region start position and region end position of each region respectively; when the mapping position is between the region start position and region end position, determining the corresponding region as the initial region where the target is located.
[0129] In one embodiment, the process of filtering the initial region based on the target's location information to determine the target region implemented when the computer program is executed by the processor includes: constructing rays from the target's location information in preset directions, wherein the preset directions are four directions corresponding to two mutually perpendicular straight lines; detecting whether each ray intersects the boundary of the initial region; and determining the target region where the target is located in the initial region when all rays intersect the boundary of the initial region.
[0130] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring the location information of a target; mapping the target's location information to obtain a mapped position corresponding to the target; acquiring region projection data, the region projection data being obtained by mapping based on region boundaries; determining an initial region where the target is located based on the mapped position and the region projection data; and filtering the initial region based on the target's location information to determine a target region where the target is located.
[0131] In one embodiment, before the acquisition of the region projection data is implemented when the computer program is executed by the processor, the method further includes: acquiring the location range of each region and extracting the location information of the boundary of each region; mapping the location information of the boundary of each region to a target dimension in one dimension to obtain the region projection data of each region.
[0132] In one embodiment, the process of mapping the target's location information to obtain a corresponding mapping position when the computer program is executed by a processor includes: mapping the target's location information to the target dimension in one dimension to obtain a corresponding mapping position.
[0133] In one embodiment, the region projection data involved when the computer program is executed by the processor includes the region start position and region end position of each region; the process of determining the initial region where the target is located based on the mapping position and the region projection data when the computer program is executed by the processor includes: comparing the mapping position with the region start position and region end position of each region respectively; when the mapping position is between the region start position and region end position, determining the corresponding region as the initial region where the target is located.
[0134] In one embodiment, the process of filtering the initial region based on the target's location information to determine the target region implemented when the computer program is executed by the processor includes: constructing rays from the target's location information in preset directions, wherein the preset directions are four directions corresponding to two mutually perpendicular straight lines; detecting whether each ray intersects the boundary of the initial region; and determining the target region where the target is located in the initial region when all rays intersect the boundary of the initial region.
[0135] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0136] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0137] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0138] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A location area detection method, characterized by, The method comprises: obtaining position information of a target; one-dimensionally mapping the position information of the target to a target dimension to obtain a mapping position corresponding to the target; obtaining a position range of each region and extracting position information of a boundary of each region; one-dimensionally mapping the position information of the boundary of each region to the target dimension to obtain region projection data of each region, the region projection data comprising a region start position and a region end position of each region; comparing the mapping position with the region start position and the region end position of each region respectively; when the mapping position is between the region start position and the region end position, determining that a corresponding region is an initial region where the target is located; screening the initial region according to the position information of the target to determine a target region where the target is located, comprising: taking the position information of the target as a start point and constructing a ray in a preset direction, the preset direction being four directions corresponding to two mutually perpendicular straight lines; detecting whether each ray intersects with the boundary of the initial region; when each ray intersects with the boundary of the initial region, determining that the initial region is the target region where the target is located.
2. The method of claim 1, wherein, The regions are each region formed after region division of the metaverse.
3. The method of claim 2, wherein, Each region in the metaverse has a certain ordering and overlapping relationship.
4. The method of claim 1, wherein, The region projection data is stored in the form of a one-dimensional data table.
5. The method of claim 1, wherein, The method further comprises: when the number of initial regions is one, directly determining the initial region as the target region; when the number of initial regions is greater than one, continuing to perform the step of screening the initial region according to the position information of the target to determine the target region where the target is located.
6. A location area detection apparatus characterized by comprising: The device comprises: a target position obtaining module configured to obtain position information of a target; a first mapping module configured to map the position information of the target to obtain a mapping position corresponding to the target; a region projection data obtaining module configured to obtain region projection data, the region projection data being obtained by mapping region boundaries; an initial region determining module configured to determine an initial region where the target is located according to the mapping position and the region projection data; a target region determining module configured to screen the initial region according to the position information of the target to determine a target region where the target is located; a region position information obtaining module configured to obtain a position range of each region and extract position information of a boundary of each region; a second mapping module configured to one-dimensionally map the position information of the boundary of each region to a target dimension to obtain region projection data of each region; the first mapping module is further configured to one-dimensionally map the position information of the target to the target dimension to obtain a mapping position corresponding to the target; the region projection data comprises a region start position and a region end position of each region; and the initial region determining module comprises: a comparison unit configured to compare the mapping position with the region start position and the region end position of each region respectively; An initial region determining unit is configured to determine an initial region corresponding to the target when the mapping position is between the region start position and the region end position. The target region determining module comprises: A ray constructing unit is configured to construct rays in a preset direction from the position information of the target, the preset direction being four directions corresponding to two straight lines perpendicular to each other; A detecting unit is configured to detect whether each ray intersects with the boundary of the initial region; A target region determining unit is configured to determine that the initial region is the target region of the target when each ray intersects with the boundary of the initial region.
7. The apparatus of claim 6, wherein, The regions are regions formed after the meta universe is divided into regions.
8. The apparatus of claim 7, wherein, Each region in the meta universe has a certain order and overlapping relationship.
9. The apparatus of claim 6, wherein, The region projection data is stored in the form of a one-dimensional data table.
10. The apparatus of claim 6, wherein, The target region determining module is further configured to, when the number of initial regions is one, directly determine the initial region as the target region; and when the number of initial regions is greater than one, continue to perform the step of screening the initial regions according to the position information of the target to determine the target region of the target. 11.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-10. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 5.
12. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.
13. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5. The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.
Citation Information
Patent Citations
Position confirming method and apparatus
CN101464132A
Signal coverage parameter configuration method of antenna and related device
CN114867044A