Mesh encoding method and apparatus

By determining the centroid of the smallest envelope polygon of the geometric figure as the marker point and combining it with the quadtree segmentation algorithm, the problems of encoding starting point deviation and encoding level mismatch are solved, thus improving the accuracy and compatibility of grid encoding.

CN113806456BActive Publication Date: 2026-04-14HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-16
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, the starting point for encoding is prone to deviating from the geometric shape, and the determination of the encoding level may not be able to fully adapt to the needs of the actual scenario, resulting in insufficient compatibility of the grid encoding method.

Method used

By determining the minimum envelope polygon of the geometric figure corresponding to the region to be encoded, using its centroid as the marker point, and encoding according to the encoding level and reference encoding size, the quadtree segmentation algorithm is used to encode layer by layer to the target level.

Benefits of technology

It improves the accuracy of the coding starting point and the compatibility of the coding method, adapts to the coding needs of various target maps, and enhances the accuracy and efficiency of grid coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113806456B_ABST
    Figure CN113806456B_ABST
Patent Text Reader

Abstract

The application provides a grid coding method and device. The grid coding method comprises the following steps: acquiring a geometric figure corresponding to a to-be-coded region on a target map; when the geometric figure corresponding to the to-be-coded region is an irregular figure, determining a minimum envelope polygon of the geometric figure corresponding to the to-be-coded region, and determining an identification point of the to-be-coded region according to the minimum envelope polygon; determining a coding level corresponding to the to-be-coded region; and coding the to-be-coded region according to the identification point of the to-be-coded region and the coding level corresponding to the to-be-coded region. The application solves the problem that a coding starting point deviates from a geometric figure, and improves the compatibility of the grid coding method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to geographic information system technology, and more particularly to a grid coding method and apparatus. Background Technology

[0002] Geographic Information Systems (GIS) are an interdisciplinary and multi-faceted technology, and spatial partitioning and grid coding of geometric figures are fundamental means used in GIS to support basic data research. In various intelligent application scenarios involving GIS, the two-dimensional or three-dimensional positional relationships of geometric figures are mapped onto an existing grid in a certain way, and then encoded using standardized coding methods.

[0003] In related technologies, the geometric shape to be encoded is mapped onto a standard spatial grid. The center of the rectangle enclosing the geometric shape is used as the encoding starting point. The corresponding encoding level is obtained according to the standard spatial grid. Then, the encoding result of the encoding level is calculated based on the encoding starting point and the encoding method.

[0004] However, the encoding starting point determined by the above method is prone to deviating from the geometric shape, and the determination of the encoding level may not be able to fully adapt to the needs of the actual scenario. Summary of the Invention

[0005] This application provides a grid encoding method and apparatus to solve the problem of the encoding starting point deviating from the geometric shape and to improve the compatibility of the grid encoding method.

[0006] In a first aspect, this application provides a grid coding method, comprising: acquiring a geometric shape corresponding to a region to be coded on a target map; when the geometric shape corresponding to the region to be coded is an irregular shape, determining the minimum envelope polygon of the geometric shape corresponding to the region to be coded, and determining the marker points of the region to be coded based on the minimum envelope polygon; determining the coding level corresponding to the region to be coded; and encoding the region to be coded based on the marker points of the region to be coded and the coding level corresponding to the region to be coded.

[0007] The target map can include maps provided by navigation applications, topographic maps in game applications, virtual maps, etc. The locations of objects displayed on the target map can all serve as areas to be encoded, such as buildings, landmarks, and game characters. This application determines the minimum envelope polygon of the geometry corresponding to the area to be encoded, and then uses the centroid of this minimum envelope polygon as the marker point of the area to be encoded. Since the minimum envelope polygon is the closest convex hull surrounding the geometry corresponding to the area to be encoded, the marker point obtained is more likely to fall within the area to be encoded compared to the center point of a rectangle surrounding the geometry, thus solving the problem of the encoding starting point deviating from the area to be encoded. Furthermore, the determination of the reference encoding size corresponding to the area to be encoded can be adapted to the encoding requirements of various target maps, improving the compatibility of the encoding method.

[0008] In one possible implementation, determining the encoding level corresponding to the region to be encoded includes: obtaining a reference encoding size corresponding to the region to be encoded; obtaining a set of grid encoding sizes for the target map, the set of grid encoding sizes including a plurality of pre-defined encoding sizes; determining the encoding size in the set of grid encoding sizes that is larger than the reference encoding size and closest to the reference encoding size as the encoding size corresponding to the region to be encoded; determining the sequence number of the encoding size corresponding to the region to be encoded in the set of grid encoding sizes as the encoding level corresponding to the region to be encoded, the sequence number being determined according to the ascending order of the plurality of encoding sizes in the set of grid encoding sizes.

[0009] In one possible implementation, obtaining the reference encoding size corresponding to the region to be encoded includes: when the target map is displayed on the front end of an application, determining the resolution of the front end display of the application as the reference encoding size corresponding to the region to be encoded; or, when the target map is processed in the back end of a location-based service, determining the scale of the back end processing of the location-based service as the reference encoding size corresponding to the region to be encoded; or, when the target map is sampled, determining the sampling precision as the reference encoding size corresponding to the region to be encoded.

[0010] The reference coding size obtained in this way can be adapted to the coding requirements of various target maps.

[0011] In one possible implementation, encoding the region to be encoded based on the identifier points of the region to be encoded and the corresponding encoding level of the region to be encoded includes: using a quadtree segmentation algorithm based on the identifier points of the region to be encoded, encoding layer by layer from the smallest encoding size in the set of grid encoding sizes, in ascending order, up to the encoding level corresponding to the region to be encoded.

[0012] In one possible implementation, determining the minimum envelope polygon of the geometry corresponding to the region to be encoded includes: using a convex hull algorithm to determine the minimum envelope polygon of the geometry corresponding to the region to be encoded.

[0013] In one possible implementation, when the minimum envelope polygon includes N sides, determining the identifier point of the region to be encoded based on the minimum envelope polygon includes: determining the identifier point of the region to be encoded based on the centroid of the minimum envelope polygon.

[0014] In one possible implementation, determining the identifier point of the region to be encoded based on the minimum envelope polygon includes: dividing the minimum envelope polygon into N-2 triangles; determining the centroid and area of ​​each of the N-2 triangles; determining the centroid of the minimum envelope polygon based on the centroid and area of ​​the N-2 triangles, and determining the centroid of the minimum envelope polygon as the identifier point of the region to be encoded.

[0015] In one possible implementation, after obtaining the geometry corresponding to the region to be encoded on the target map, the method further includes: when the geometry corresponding to the region to be encoded is a point, determining the point as the marker point of the region to be encoded; or, when the geometry corresponding to the region to be encoded is a line, determining the center point of the line as the marker point of the region to be encoded; or, when the geometry corresponding to the region to be encoded is a triangle, determining the centroid of the triangle as the marker point of the region to be encoded; or, when the geometry corresponding to the region to be encoded is a circle, determining the center of the circle as the marker point of the region to be encoded; or, when the geometry corresponding to the region to be encoded is a bisegmented polyline, obtaining a triangle based on the bisegmented polyline, and determining the centroid of the triangle as the marker point of the region to be encoded.

[0016] Secondly, this application provides a grid encoding device, comprising: an acquisition module for acquiring geometric figures corresponding to a region to be encoded on a target map; and an encoding module for determining, when the geometric figures corresponding to the region to be encoded are irregular figures, the minimum envelope polygon of the geometric figures corresponding to the region to be encoded, and determining the marker points of the region to be encoded based on the minimum envelope polygon; determining the encoding level corresponding to the region to be encoded; and encoding the region to be encoded based on the marker points of the region to be encoded and the encoding level corresponding to the region to be encoded.

[0017] In one possible implementation, the encoding module is specifically used to: obtain a reference encoding size corresponding to the region to be encoded; obtain a set of grid encoding sizes for the target map, the set of grid encoding sizes including multiple pre-defined encoding sizes; determine the encoding size in the set of grid encoding levels that is larger than the reference encoding size and closest to the reference encoding size as the encoding size corresponding to the region to be encoded; and determine the sequence number of the encoding size corresponding to the region to be encoded in the set of grid encoding sizes as the encoding level corresponding to the region to be encoded, the sequence number being determined according to the ascending order of the multiple encoding sizes in the set of grid encoding sizes.

[0018] In one possible implementation, the encoding module is specifically configured to: when the target map is displayed on the front end of the application, determine the resolution of the front end display as the reference encoding size corresponding to the area to be encoded; or, when the target map is processed in the back end of a location-based service, determine the scale of the back end processing as the reference encoding size corresponding to the area to be encoded; or, when the target map is sampled, determine the sampling precision as the reference encoding size corresponding to the area to be encoded.

[0019] In one possible implementation, the encoding module is specifically used to use a quadtree segmentation algorithm based on the identifier points of the region to be encoded, starting from the smallest encoding size in the set of grid encoding sizes, and encoding layer by layer in ascending order to the encoding level corresponding to the region to be encoded.

[0020] In one possible implementation, the encoding module is specifically used to determine the minimum envelope polygon of the geometry corresponding to the region to be encoded using a convex hull algorithm.

[0021] In one possible implementation, when the minimum envelope polygon includes N sides, the encoding module is specifically used to determine the identifier point of the region to be encoded based on the centroid of the minimum envelope polygon.

[0022] In one possible implementation, the encoding module is specifically used to divide the minimum envelope polygon into N-2 triangles; determine the centroid and area of ​​each of the N-2 triangles; determine the centroid of the minimum envelope polygon based on the centroid and area of ​​the N-2 triangles, and determine the centroid of the minimum envelope polygon as the identifier point of the region to be encoded.

[0023] In one possible implementation, the encoding module is further configured to: when the geometric shape corresponding to the region to be encoded is a point, determine the point as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a line, determine the center point of the line as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a triangle, determine the centroid of the triangle as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a circle, determine the center of the circle as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a two-segment broken line, obtain a triangle based on the two-segment broken line, and determine the centroid of the triangle as the identifier point of the region to be encoded.

[0024] Thirdly, this application provides an apparatus comprising: one or more processors; a memory for storing one or more programs; wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in any one of the first aspects above.

[0025] Fourthly, this application provides a computer-readable storage medium including a computer program that, when executed on a computer, causes the computer to perform the method described in any one of the first aspects above.

[0026] Fifthly, this application provides a computer program that, when executed by a computer, performs the method described in any one of the first aspects above. Attached Figure Description

[0027] Figure 1 An exemplary schematic diagram of the center point of a geometric figure is shown;

[0028] Figure 2 An exemplary block diagram of device 200 is shown;

[0029] Figure 3 This is a flowchart illustrating an embodiment of the grid coding method of this application;

[0030] Figure 4 An exemplary schematic diagram of the Graham scan method is shown;

[0031] Figure 5 An exemplary schematic diagram of a method for determining the centroid of a minimum envelope polygon is shown;

[0032] Figure 6 This is a schematic diagram of the structure of an embodiment of the grid coding device of this application;

[0033] Figure 7This is a schematic diagram of the structure of an embodiment of the device in this application. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0035] The terms "first," "second," etc., used in the specification, embodiments, claims, and drawings of this application are for distinguishing purposes only and should not be construed as indicating or implying relative importance or order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as including a series of steps or units. A method, system, product, or apparatus is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0036] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0037] In geographic information systems, such as maps, large-scale games, and 5G geographic planning optimization, which require massive amounts of geometric data and highly interactive applications, the quality and efficiency of grid coding determine its overall performance. In related technologies, the grid coding method includes the following steps: (1) loading an existing standard spatial grid; (2) loading the geometric shape to be encoded; (3) constructing the outer rectangle of the geometric shape; (4) finding the center point of the outer rectangle and using this center point as the starting point for encoding; (5) determining the encoding level of the geometric shape based on the existing standard spatial grid; and (6) calculating the encoding result corresponding to this encoding level using a set encoding method. Step (3) is optional; if step (3) is omitted, then step (4) involves finding the center point of the geometric shape. Figure 1 An exemplary schematic diagram of the center point of a geometric figure is shown, such as... Figure 1 As shown, the geometric shape is "L"-shaped. Mapping it onto an existing standard spatial grid yields the bounding rectangle of the geometric shape. Figure 1 (A 3×3 rectangle), the center point of which is the starting point for encoding the geometric figure.

[0038] Since the above technique uses the center point of the outer rectangle of the geometric shape as the starting point for encoding, it is not suitable for geometric shapes with special shapes, such as... Figure 1 The encoding starting point of the "L"-shaped geometric shape may not be located within the geometric shape itself. For increasingly sophisticated and complex application scenarios, such as the improved precision of graphical interactive displays like maps and game terrains, and the increasing complexity of trajectories and regions in 5G planning optimization, specially shaped geometric shapes are likely to become common processing objects. The encoding starting point determined in the aforementioned technologies may easily deviate from the geometric shape, and the determination of the encoding level may not be fully adaptable to the needs of actual scenarios.

[0039] Based on this, this application provides a trellis coding method to solve the above-mentioned problems. This trellis coding method can be applied to an encoding / decoding device in a device with image processing capabilities, which can be a server or a user device. Figure 2 An exemplary block diagram of device 200 is shown, illustrating a structural schematic of device 200 when it is a mobile phone.

[0040] like Figure 2As shown, the mobile phone 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, a sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc. The sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, a barometric pressure sensor 280C, a magnetic sensor 280D, an accelerometer sensor 280E, a distance sensor 280F, a proximity sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.

[0041] It is understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the mobile phone 200. In other embodiments of this application, the mobile phone 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0042] Processor 210 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0043] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0044] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

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

[0046] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple I2C buses. The processor 210 can couple to the touch sensor 280K, charger, flash, camera 293, etc., through different I2C bus interfaces. For example, the processor 210 can couple to the touch sensor 280K through the I2C interface, enabling the processor 210 and the touch sensor 280K to communicate through the I2C bus interface, thus realizing the touch function of the mobile phone 200.

[0047] The I2S interface can be used for audio communication. In some embodiments, the processor 210 may include multiple I2S buses. The processor 210 can be coupled to the audio module 270 via the I2S bus to enable communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 can transmit audio signals to the wireless communication module 260 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.

[0048] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 270 and the wireless communication module 260 can be coupled via the PCM bus interface. In some embodiments, the audio module 270 can also transmit audio signals to the wireless communication module 260 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0049] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 210 and the wireless communication module 260. For example, the processor 210 communicates with the Bluetooth module in the wireless communication module 260 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 270 can transmit audio signals to the wireless communication module 260 via the UART interface to enable music playback through Bluetooth headphones.

[0050] The MIPI interface can be used to connect the processor 210 to peripheral devices such as the display screen 294 and the camera 293. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 210 and the camera 293 communicate via the CSI interface to enable the mobile phone 200 to take pictures. The processor 210 and the display screen 294 communicate via the DSI interface to enable the mobile phone 200 to display.

[0051] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 210 to a camera 293, a display screen 294, a wireless communication module 260, an audio module 270, a sensor module 280, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0052] USB port 230 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, or USB Type-C port. USB port 230 can be used to connect a charger to charge phone 200, and can also be used for data transfer between phone 200 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other mobile phones, such as AR devices.

[0053] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the mobile phone 200. In other embodiments of this application, the mobile phone 200 may also adopt different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0054] The charging management module 240 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 receives charging input from the wired charger via the USB interface 230. In some wireless charging embodiments, the charging management module 240 receives wireless charging input via the wireless charging coil of the mobile phone 200. While charging the battery 242, the charging management module 240 can also supply power to the mobile phone via the power management module 241.

[0055] The power management module 241 connects the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, providing power to the processor 210, internal memory 221, display screen 294, camera 293, and wireless communication module 260, etc. The power management module 241 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 241 may also be located within the processor 210. In other embodiments, the power management module 241 and the charging management module 240 may be located in the same device.

[0056] The wireless communication function of mobile phone 200 can be realized through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor and baseband processor.

[0057] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 200 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0058] The mobile communication module 250 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on the mobile phone 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 250 may be housed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 and at least some modules of the processor 210 may be housed in the same device.

[0059] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 270A, receiver 270B, etc.) or displays images or videos through the display screen 294. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 210 and may be housed in the same device as the mobile communication module 250 or other functional modules.

[0060] The wireless communication module 260 can provide solutions for wireless communication applications on the mobile phone 200, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 210. The wireless communication module 260 can also receive signals to be transmitted from processor 210, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0061] In some embodiments, antenna 1 of mobile phone 200 is coupled to mobile communication module 250, and antenna 2 is coupled to wireless communication module 260, enabling mobile phone 200 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0062] The mobile phone 200 implements its display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0063] Display screen 294 is used to display images, videos, etc. Display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, mobile phone 200 may include one or N displays 294, where N is a positive integer greater than 1.

[0064] The mobile phone 200 can achieve shooting functions through ISP, camera 293, video codec, GPU, display 294 and application processor.

[0065] The ISP (Image Signal Processor) is used to process data fed back from the camera 293. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 293.

[0066] Camera 293 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, mobile phone 200 may include one or N cameras 293, where N is a positive integer greater than 1.

[0067] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when the mobile phone 200 is selecting a frequency, the DSP performs Fourier transforms on the frequency energy.

[0068] Video codecs are used to compress or decompress digital video. Mobile phone 200 can support one or more video codecs. Thus, mobile phone 200 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0069] NPU stands for Neural Network (NN) Computing Processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in mobile phones, such as image recognition, facial recognition, speech recognition, and text understanding.

[0070] The external storage interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 200. The external memory card communicates with the processor 210 through the external storage interface 220 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0071] Internal memory 221 can be used to store computer executable program code, which includes instructions. Internal memory 221 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of mobile phone 200 (such as audio data, phonebook, etc.). Furthermore, internal memory 221 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 210 executes various functional applications and data processing of mobile phone 200 by running instructions stored in internal memory 221 and / or instructions stored in memory located in the processor.

[0072] The mobile phone 200 can perform audio functions, such as music playback and recording, through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, and an application processor.

[0073] The audio module 270 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 270 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 270 may be located in the processor 210, or some functional modules of the audio module 270 may be located in the processor 210.

[0074] The speaker 270A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The mobile phone 200 can listen to music or make hands-free calls through the speaker 270A.

[0075] The receiver 270B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the mobile phone 200 answers a call or voice message, the receiver 270B can be brought close to the user's ear to listen to the voice.

[0076] Microphone 270C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 270C, inputting the sound signal into microphone 270C. Mobile phone 200 may have at least one microphone 270C. In some embodiments, mobile phone 200 may have two microphones 270C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, mobile phone 200 may also have three, four, or more microphones 270C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0077] The 270D headphone jack is used to connect wired headphones. The 270D headphone jack can be a USB 230 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0078] Pressure sensor 280A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 280A may be disposed on display screen 294. There are many types of pressure sensors 280A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material.

[0079] The gyroscope sensor 280B can be used to determine the motion posture of the mobile phone 200.

[0080] The 280C barometric pressure sensor is used to measure barometric pressure.

[0081] The magnetic sensor 280D includes a Hall sensor.

[0082] The accelerometer 280E can detect the magnitude of acceleration of the mobile phone 200 in various directions (generally three axes).

[0083] The 280F distance sensor is used to measure distance.

[0084] The proximity light sensor 280G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED.

[0085] The 280L ambient light sensor is used to detect ambient light intensity.

[0086] The fingerprint sensor 280H is used to collect fingerprints.

[0087] The 280J temperature sensor is used to detect temperature.

[0088] Touch sensor 280K, also known as a "touch device," can be located on display screen 294. The touch sensor 280K and display screen 294 together form a touchscreen, also known as a "touchscreen." Touch sensor 280K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 294. In other embodiments, touch sensor 280K may also be located on the surface of mobile phone 200, in a different position than display screen 294.

[0089] The bone conduction sensor 280M can acquire vibration signals.

[0090] Keypad 290 includes a power button, volume buttons, etc. Keypad 290 can be a mechanical keypad or a touch-sensitive keypad. Mobile phone 200 can receive keypad input and generate key signal inputs related to user settings and function control of mobile phone 200.

[0091] Motor 291 can generate vibration alerts. Motor 291 can be used for incoming call vibration alerts or for touch vibration feedback.

[0092] Indicator 292 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0093] The SIM card interface 295 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 295 to make contact with and separate from the mobile phone 200. The mobile phone 200 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The mobile phone 200 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the mobile phone 200 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the mobile phone 200 and cannot be separated from the mobile phone 200.

[0094] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the device. In other embodiments of this application, the device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0095] Figure 3 This is a flowchart of an embodiment of the mesh coding method of this application, as shown below. Figure 3 As shown, the execution subject of the method in this embodiment can be Figure 2 The device shown. Mesh encoding methods may include:

[0096] Step 301: Obtain the geometry of the region to be encoded on the target map.

[0097] The target map can include maps provided by navigation applications, terrain maps in games, virtual maps, etc. The locations of objects displayed on the target map can all serve as areas to be encoded, such as buildings, landmarks, and game characters. The geometry corresponding to the area to be encoded can be any two-dimensional geometric shape that needs to be encoded, input using standard input. The aforementioned standard input can be implemented using a standard interface, which is used to interface with the underlying data layer and the upper application layer, providing various standard-corresponding input protocols, output protocols, and verification methods to ensure the efficiency and quality of data exchange within the device.

[0098] Optionally, after obtaining the geometry corresponding to the region to be encoded, the geometry can be validated. This validation is to ensure that the spatial (including but not limited to coordinate system, projection information, coordinate information and order, etc.) and attribute information (including but not limited to graphic type, number of nodes, etc.) of the geometry corresponding to the complex region to be encoded can be detected and corrected in a timely manner, even under extreme conditions, due to errors caused by data compression, decompression, and transmission. Common validation methods include, but are not limited to, parity check (PC), block check character (BCC), cyclic redundancy check (CRC), and message digest 5 (MD5) validation.

[0099] Optionally, this application can first classify the geometric figures corresponding to the region to be encoded according to a pre-defined type. This pre-defined type mainly includes points, lines, bisection lines, triangles, circles, simple polygons, complex polygons, etc. Depending on actual needs, more types of geometric figures corresponding to the region to be encoded can be further refined to meet broader and more precise requirements. Then, data cleaning and screening are performed according to the type of geometric figure corresponding to the region to be encoded to ensure data usability. Each of the above types has a corresponding data cleaning and screening method to ensure input standardization. For example, this includes a validity check to determine whether the geometric figure information corresponding to the region to be encoded meets the corresponding type's geometric conditions, necessary topology checks (e.g., removing duplicate points, duplicate lines, etc.), and optional data processing operations (e.g., merging adjacent endpoints, thinning nodes, smoothing, changing node order, etc.). Specific steps need to be set according to actual needs.

[0100] Step 302: When the geometry corresponding to the region to be encoded is an irregular shape, determine the minimum envelope polygon of the geometry corresponding to the region to be encoded, and determine the marker points of the region to be encoded based on the minimum envelope polygon.

[0101] Irregular shapes refer to geometric shapes corresponding to the region to be encoded that are not common regular shapes, such as points, lines, triangles, rectangles, circles, and regular polygons. When the geometric shape corresponding to the region to be encoded is irregular, conventional methods cannot be used to obtain the marker points of the region to be encoded. Therefore, this application determines the minimum envelope polygon of the geometric shape corresponding to the region to be encoded, and then determines the marker points of the region to be encoded based on the minimum envelope polygon. Since the minimum envelope polygon is the closest convex hull surrounding the geometric shape corresponding to the region to be encoded, the marker points of the region to be encoded obtained in this way are more likely to fall within the region to be encoded than the center point of the rectangle surrounding the geometric shape corresponding to the region to be encoded.

[0102] In one possible implementation, this application may use the convex hull algorithm (i.e., Graham scan method) to determine the minimum envelope polygon of the geometry corresponding to the region to be encoded. Figure 4 An exemplary schematic diagram of the Graham scanning method is shown, such as... Figure 4 As shown, assume that the geometry corresponding to the region to be encoded includes 9 vertices (P0 to P8):

[0103] S1. Place the 9 vertices (P0 to P8) in... Figure 4 In the two-dimensional coordinate system shown, the point with the smallest ordinate among the nine vertices (P0) is mapped to the origin of the two-dimensional coordinate system. Based on geometric principles, P0 must be a point on the convex hull. This is because the interior angle of a point on the convex hull is always less than or equal to 180°, and conversely, it cannot be a point on the concave hull. Therefore, P0 is located at the origin, and the other points are all located on the positive Y-axis or the X-axis. Thus, there are no two points such that the angle between the two broken lines formed after passing through P0 is greater than 180°. Therefore, P0 must be a point on the convex hull.

[0104] S2. For the eight points (P1 to P8) other than P0, calculate the argument angles α1 to α8 of each point relative to P0, and sort the points in ascending order of argument angle. When the arguments are the same, the point closer to P0 is ranked first. For example, P2 and P3 have the same argument angle, but since P2 is closer to P0 than P3, P2 is ranked before P3. Similarly, P5 and P6 have the same argument angle, but since P5 is closer to P0 than P6, P5 is ranked before P6. Therefore, the ranking of the eight points is P1, P2, P3, P4, P5, P6, P7, P8. Based on geometric principles, P1 and P8 in the above ranking must be points on the convex hull. As mentioned above, all other points besides P0, P1, and P8 must be located on the extension of the line connecting P1, P8, and P0, or within the angle formed by the three. Therefore, there is no point that can make the angle between the two broken lines formed by P1 or P8 and P0 greater than 180°. Thus, P1 or P8 must be a point on the convex hull.

[0105] S3. Push the first point P0 and the second point P1 determined on the convex hull onto the stack in sequence.

[0106] S4. From the sorting results obtained in step S2, take the point that is ranked after P1 (i.e., P2) as the new current point.

[0107] S5, in Figure 4 Connect P0 and the top of the stack to obtain line L. Determine whether the current point is to the right or left of line L. If the current point is to the right of line L, proceed to step S6; if the current point is to the left of line L, proceed to step S7.

[0108] S6. If the current point is to the right of line L, then the point at the top of the stack is not a point on the convex hull. Pop it from the stack and jump to step S5.

[0109] S7. If the current point is to the left of line L, then the current point is a point on the convex hull, and push it onto the stack.

[0110] S8. Check if the current point is the last point in the sorting result obtained in step S2. If yes, end; if not, take the point after the current point as the new current point and jump to step S5.

[0111] After completion, all the points remaining in the stack are the points on the convex hull. Connecting these points in sequence yields the minimum envelope polygon of the geometry corresponding to the region to be encoded (i.e., the aforementioned convex hull).

[0112] In one possible implementation, this application can directly construct the envelope rectangle of the geometry corresponding to the region to be encoded as the minimum envelope polygon of the geometry corresponding to the region to be encoded using the following method:

[0113] S1. Place all vertices of the geometric figure corresponding to the region to be encoded in a two-dimensional coordinate system.

[0114] S2. Traverse each vertex of the geometric figure corresponding to the region to be encoded, and use the bubble sort algorithm to sort the two-dimensional coordinates (X,Y) of each vertex to obtain Xmin, Ymin, Xmax, and Ymax.

[0115] S3. Construct rectangles using POINT(Xmin, Ymin) and POINT(Xmax, Ymax) as the lower left and upper right vertices respectively, to obtain the outer rectangle of the geometric shape corresponding to the region to be encoded.

[0116] This application determines the marker points of the region to be encoded based on the aforementioned minimum envelope polygon. The minimum envelope polygon (assuming that the minimum envelope polygon includes N sides) can be divided into N-2 triangles; the centroid and area of ​​each of the N-2 triangles can be determined; the centroid of the minimum envelope polygon can be determined based on the centroid and area of ​​the N-2 triangles, and the centroid of the minimum envelope polygon can be determined as the marker point of the region to be encoded. Figure 5 An exemplary schematic diagram of a method for determining the centroid of a minimum envelope polygon is shown, such as... Figure 5As shown, assume the minimum envelope polygon has 6 sides and 6 vertices (A1-A6). Using A1 as a common vertex, connect it to A3-A5 with straight lines to obtain 4 triangles. For each triangle, calculate its centroid and area, resulting in the centroids (G1-G4) and areas (S1-S4) of the four triangles. Take a weighted average of the centroids (G1-G4) and areas (S1-S4) to obtain the centroid P(x,y) of the minimum envelope polygon. P(x,y) is then the identifier point of the region to be encoded. For example, weighting can be based on a single area index:

[0117]

[0118] Step 303: Determine the encoding level corresponding to the region to be encoded.

[0119] In this application, the encoding level can be considered a broad concept. The level of encoding determines the size of the smallest pixel unit. The finer the granularity (proportion) of the encoding level, the more graphics can be rendered per unit size, resulting in higher resolution. For example, the proportion and clarity of the area to be encoded in the target map.

[0120] This application can determine the encoding level corresponding to the region to be encoded based on the target map. First, a reference encoding size is determined for the region to be encoded. For example, when the target map is displayed on the front end of an application, the resolution of the front end is determined as the reference encoding size; or, when the target map is processed in a location-based service backend, the scale of the backend processing is determined as the reference encoding size; or, when the target map is sampled, the sampling precision is determined as the reference encoding size. This method allows the reference encoding size to be encoded to adapt to the encoding requirements of various target maps. Then, a set of grid encoding sizes for the target map is obtained. This set includes multiple pre-defined encoding sizes, ordered from smallest to largest. Finally, the encoding size in the grid encoding size set that is larger than the reference encoding size and closest to it is determined as the encoding size corresponding to the region to be encoded. The sequence number of this encoding size within the grid encoding size set is determined as the encoding level corresponding to the region to be encoded, based on the ascending order of the multiple encoding sizes in the grid encoding size set.

[0121] Suppose the set of grid coding sizes includes \(n\) coding sizes \(\{L_1, L_2, \ldots, L_n\}\), and the reference coding size corresponding to the area to be coded is \(S\). If \(L_{m - 1}<S<L_m\), then \(L_m\) is the coding size corresponding to the area to be coded, and \(m\) is the coding level corresponding to the area to be coded. In special cases: if \(L_1 > S\), then \(L_1\) is the coding size corresponding to the area to be coded, and \(1\) is the coding level corresponding to the area to be coded; if \(L_n < S\), then \(L_n\) is the coding size corresponding to the area to be coded, and \(n\) is the coding level corresponding to the area to be coded. For example, the levels of the target map include street level (level 1), district level (level 2), city level (level 3), national level (level 4), and world level (level 5). Thus, the set of grid coding sizes corresponding to these levels of the map includes five coding sizes. If the geometric figure corresponding to the area to be coded represents a building, then the coding size corresponding to the street level is used, and the coding level is 1. If the geometric figure corresponding to the area to be coded represents a country, then the coding size corresponding to the national level is used, and the coding level is 4.

[0122] Step 304: Code the area to be coded according to the identification point of the area to be coded and the coding level corresponding to the area to be coded.

[0123] This application can use the quadtree splitting algorithm according to the identification point of the area to be coded. In the set of grid coding sizes, starting from the smallest coding size, it is coded layer by layer in ascending order to the coding level corresponding to the area to be coded. The following describes the coding process示例性:

[0124] (1) Use the quadtree splitting algorithm to code layer by layer from coding level 1 to coding level \(m\).

[0125] (2) In the above process, for any coding level \(I\), obtain the coding result \(code(I)\in(0, 3)\) according to the identification point \(P(x, y)\) of the area to be coded.

[0126] Corresponding to coding level \(I\), the outer rectangle of the geometric figure corresponding to the area to be coded is represented as \((MaxX, MaxY, MinX, MinY)\), and the coordinates of the center point of this outer rectangle are \((MiddleX, MiddleY)\), where \(MiddleX=(MaxX + MinX) / 2\) and \(MiddleY=(MaxY + MinY) / 2\).

[0127] If \(x < MiddleX\) and \(y > MiddleY\), then \(code(I)=0\); if \(x > MiddleX\) and \(y > MiddleY\), then \(code(I)=1\); if \(x < MiddleX\) and \(y < MiddleY\), then \(code(I)=2\); if \(x > Xmiddle\) and \(y < MiddleY\), then \(code(l)=3\).

[0128] (3) If I < m, then take the quarter rectangle where the identification point P(x, y) of the area to be encoded is located as the outer rectangle of the next encoding level I + 1, and calculate the code(l + 1) of the encoding level I + 1. For example, in the above step, code(I) = 3. At this time, under the encoding level I + 1, the outer rectangle of the geometric figure corresponding to the area to be encoded is represented as (MaxX, MiddleY, MiddleX, MinY).

[0129] (4) If l = m, the calculation ends, and the final grid encoding result is output as code(l)code(2)…code(m).

[0130] It should be noted that other methods can also be used in this application to encode the geometric figure corresponding to the area to be encoded, and no specific limitation is made here.

[0131] In a possible implementation manner, when the geometric figure corresponding to the area to be encoded is a regular figure, the center point or centroid of the regular figure can be used as the identification point of the area to be encoded. For example, when the geometric figure corresponding to the area to be encoded is a point, this point can be determined as the identification point of the area to be encoded; or when the geometric figure corresponding to the area to be encoded is a line, the center point of the line can be determined as the identification point of the area to be encoded; or when the geometric figure corresponding to the area to be encoded is a triangle, the centroid of the triangle can be determined as the identification point of the area to be encoded; or when the geometric figure corresponding to the area to be encoded is a circle, the center of the circle can be determined as the identification point of the area to be encoded; or when the geometric figure corresponding to the area to be encoded is a two-segment broken line, a triangle can be obtained based on the two-segment broken line, and the centroid of the triangle can be determined as the identification point of the area to be encoded.

[0132] This application determines the minimum enclosing polygon of the geometric figure corresponding to the area to be encoded, and then determines the centroid of the minimum enclosing polygon as the identification point of the area to be encoded. Since the minimum enclosing polygon is the closest convex hull around the geometric figure corresponding to the area to be encoded, the obtained identification point is more likely to fall within the area to be encoded compared to the center point of the rectangle around the geometric figure corresponding to the area to be encoded, thus solving the problem that the encoding starting point deviates from the area to be encoded. In addition, when determining the reference encoding size corresponding to the area to be encoded, it can adapt to the encoding requirements of various target maps, improving the compatibility of the encoding method.

[0133] Figure 6 It is a schematic structural diagram of an embodiment of the grid encoding device of this application, as Figure 6As shown, the apparatus of this embodiment may include: an acquisition module 601 and an encoding module 602, wherein the acquisition module 601 is used to acquire the geometric shape corresponding to the region to be encoded on the target map; the encoding module 602 is used to determine the minimum envelope polygon of the geometric shape corresponding to the region to be encoded when the geometric shape corresponding to the region to be encoded is an irregular shape, and determine the marker point of the region to be encoded based on the minimum envelope polygon; determine the encoding level corresponding to the region to be encoded; and encode the region to be encoded based on the marker point of the region to be encoded and the encoding level corresponding to the region to be encoded.

[0134] In one possible implementation, the encoding module 602 is specifically used to obtain a reference encoding size corresponding to the region to be encoded; obtain a set of grid encoding sizes of the target map, the set of grid encoding sizes including a plurality of pre-set encoding sizes; determine the encoding size in the set of grid encoding levels that is larger than the reference encoding size and closest to the reference encoding size as the encoding size corresponding to the region to be encoded; determine the sequence number of the encoding size corresponding to the region to be encoded in the set of grid encoding sizes as the encoding level corresponding to the region to be encoded, the sequence number being determined according to the ascending order of the plurality of encoding sizes in the set of grid encoding sizes.

[0135] In one possible implementation, the encoding module 602 is specifically used to: determine the resolution of the application's front-end display as the reference encoding size corresponding to the area to be encoded when the target map is displayed on the application's front-end; or determine the scale of the location-based service back-end processing as the reference encoding size corresponding to the area to be encoded when the target map is processed in the location-based service back-end; or determine the sampling accuracy as the reference encoding size corresponding to the area to be encoded when the target map is sampled.

[0136] In one possible implementation, the encoding module 602 is specifically used to use a quadtree segmentation algorithm based on the identifier points of the region to be encoded, and to encode the region to be encoded layer by layer in the set of grid encoding sizes, starting from the smallest encoding size and proceeding in ascending order.

[0137] In one possible implementation, the encoding module 602 is specifically used to determine the minimum envelope polygon of the geometry corresponding to the region to be encoded using a convex hull algorithm.

[0138] In one possible implementation, when the minimum envelope polygon includes N sides, the encoding module 602 is specifically used to determine the centroid of the minimum envelope polygon and use the centroid of the minimum envelope polygon as the identifier point of the region to be encoded.

[0139] In one possible implementation, the encoding module 602 is specifically used to divide the minimum envelope polygon into N-2 triangles; determine the centroid and area of ​​the N-2 triangles respectively; determine the centroid of the minimum envelope polygon based on the centroid and area of ​​the N-2 triangles, and determine the centroid of the minimum envelope polygon as the identifier point of the region to be encoded.

[0140] In one possible implementation, the encoding module 602 is further configured to: when the geometric shape corresponding to the region to be encoded is a point, determine the point as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a line, determine the center point of the line as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a triangle, determine the centroid of the triangle as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a circle, determine the center of the circle as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a two-segment broken line, obtain a triangle based on the two-segment broken line, and determine the centroid of the triangle as the identifier point of the region to be encoded.

[0141] The apparatus of this embodiment can be used to perform Figure 3 The technical solutions of the method embodiments shown are similar in principle and in effect, and will not be described again here.

[0142] Figure 7 This is a schematic diagram of the structure of an embodiment of the device in this application, as shown below. Figure 7 As shown, the device 700 in this embodiment includes a processor 702 and a communication interface 703, wherein the communication interface 703 may include any one of the multi-band common aperture antennas in embodiments one to five above.

[0143] Furthermore, the device 700 may also include a memory 701. Optionally, the device 700 may also include a bus 704. The communication interface 703, processor 702, and memory 701 can be interconnected via the bus 704; the bus 704 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 704 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0144] The processor 702 can perform various functions of the device 700 by running or executing programs stored in the memory 701.

[0145] For example, Figure 7 The device 700 shown may be the encoding device involved in the embodiments of this application.

[0146] When device 700 is an encoding device, processor 702 can perform the actions completed by the encoding device in the above method examples by running or executing the program stored in memory 701.

[0147] In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly implemented by a hardware encoding processor, or implemented by a combination of hardware and software modules in the encoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0148] The memory mentioned in the above embodiments can be volatile memory or non-volatile memory, or may include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

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

[0150] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0151] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0152] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0153] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0154] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0155] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A grid coding method, characterized in that, Including: Obtain the geometric figure corresponding to the area to be encoded on the target map; When the geometric figure corresponding to the area to be encoded is an irregular figure, determine the minimum bounding polygon of the geometric figure corresponding to the area to be encoded, and determine the identification point of the area to be encoded according to the minimum bounding polygon; Determine the encoding level m corresponding to the area to be encoded; Encode the area to be encoded according to the identification point of the area to be encoded and the encoding level corresponding to the area to be encoded; Among them, the encoding of the area to be encoded according to the identification point of the area to be encoded and the encoding level corresponding to the area to be encoded includes: Adopt a quadtree splitting algorithm to encode level by level from encoding level 1 to encoding level m; For any encoding level I, the outer rectangle of the geometric figure corresponding to the area to be encoded is represented as (MaxX, MaxY, MinX, MinY), and the coordinates of the center point of the outer rectangle are (MiddleX, MiddleY), I ∈ [1, m]; If x < MiddleX and y > MiddleY, then code(I) = 0; If x > MiddleX and y > MiddleY, then code(I) = 1; If x < MiddleX and y < MiddleY, then code(I) = 2; If x > Xmiddle and y < MiddleY, then code(I) = 3; If I < m, then use the quarter rectangle where the identification point P(x, y) of the area to be encoded is located as the outer rectangle of the next encoding level I + 1, and calculate the encoding result code(I + 1) of encoding level I + 1. The identification point P(x, y) is the centroid of the minimum bounding polygon of the area to be encoded.

2. The method according to claim 1, characterized in that, The determination of the encoding level corresponding to the area to be encoded includes: Obtain the reference encoding size corresponding to the area to be encoded; Obtain the grid encoding size set of the target map, and the grid encoding size set includes a plurality of preset encoding sizes; Determine the encoding size greater than the reference encoding size and closest to the reference encoding size in the grid encoding level set as the encoding size corresponding to the area to be encoded; Determine the serial number of the encoding size corresponding to the area to be encoded in the grid encoding size set as the encoding level corresponding to the area to be encoded, and the serial number is determined according to the ascending order of the plurality of encoding sizes in the grid encoding size set.

3. The method according to claim 2, characterized in that, The obtaining of the reference encoding size corresponding to the area to be encoded includes: When the target map is displayed at the front end of the application, determine the resolution displayed at the front end of the application as the reference encoding size corresponding to the area to be encoded; or, When the target map is processed at the backend based on location services, determine the scale of the backend processing based on location services as the reference encoding size corresponding to the area to be encoded; or, When sampling the target map, determine the sampling accuracy as the reference encoding size corresponding to the area to be encoded.

4. The method according to claim 2, characterized in that, The step of encoding the region to be encoded based on the identifier points of the region to be encoded and the corresponding encoding level of the region to be encoded includes: Based on the identifiers of the region to be encoded, a quadtree segmentation algorithm is used to encode the region layer by layer in the set of grid encoding sizes, starting from the smallest encoding size and proceeding in ascending order to the corresponding encoding level.

5. The method according to claim 1, characterized in that, Determining the minimum envelope polygon of the geometric shape corresponding to the region to be encoded includes: The minimum envelope polygon of the geometric figure corresponding to the region to be encoded is determined by the convex hull algorithm.

6. The method according to any one of claims 1-5, characterized in that, When the minimum envelope polygon includes N sides, determining the identifier points of the region to be encoded based on the minimum envelope polygon includes: The identifier point of the region to be encoded is determined based on the centroid of the minimum envelope polygon.

7. The method according to claim 6, characterized in that, Determining the identifier points of the region to be encoded based on the minimum envelope polygon includes: Divide the minimum envelope polygon into N-2 triangles; Determine the centroid and area of ​​each of the N-2 triangles; The centroid of the minimum envelope polygon is determined based on the centroids and areas of the N-2 triangles, and the centroid of the minimum envelope polygon is used as the identifier point of the region to be encoded.

8. The method according to any one of claims 1-5 and 7, characterized in that, After obtaining the geometry corresponding to the area to be encoded on the target map, the process further includes: When the geometric shape corresponding to the region to be encoded is a point, that point is determined as the identifier point of the region to be encoded; or, When the geometry corresponding to the region to be encoded is a line, the center point of the line is determined as the identifier point of the region to be encoded; or... When the geometric shape corresponding to the region to be encoded is a triangle, the centroid of the triangle is determined as the marker point of the region to be encoded; or, When the geometric shape corresponding to the region to be encoded is a circle, the center of the circle is determined as the marker point of the region to be encoded; or, When the geometric shape corresponding to the region to be encoded is a two-segment broken line, a triangle is obtained based on the two-segment broken line, and the centroid of the triangle is determined as the marker point of the region to be encoded.

9. A grid coding device, characterized in that, include: The acquisition module is used to acquire the geometric shape corresponding to the area to be encoded on the target map. The encoding module is used to determine the minimum envelope polygon of the geometric shape corresponding to the region to be encoded when the geometric shape corresponding to the region to be encoded is an irregular shape, and to determine the marker point of the region to be encoded based on the minimum envelope polygon. Determine the encoding level m corresponding to the region to be encoded; The region to be encoded is encoded according to the identifier points of the region to be encoded and the corresponding encoding level of the region to be encoded. The encoding module is specifically configured to use a quadtree segmentation algorithm to perform encoding level by level from encoding level 1 to encoding level m; for any encoding level I, the bounding rectangle of the geometric figure corresponding to the area to be encoded is represented as (MaxX, MaxY, MinX, MinY), and the coordinates of the center point of the bounding rectangle are (MiddleX, MiddleY), where I ∈ [1, m]; if x < MiddleX and y > MiddleY, then code(I) = 0; if x > MiddleX and y > MiddleY, then code(I) = 1; if x < MiddleX and y < MiddleY, then code(I) = 2; if x > MiddleX and y < MiddleY, then code(I) = 3; if I < m, then use the quarter rectangle where the identification point P(x, y) of the area to be encoded is located as the bounding rectangle of the next encoding level I + 1, and calculate the encoding result code(I + 1) of encoding level I + 1, where the identification point P(x, y) is the centroid of the minimum bounding polygon of the area to be encoded.

10. The apparatus according to claim 9, characterized in that, The encoding module is specifically configured to obtain the reference encoding size corresponding to the area to be encoded; obtain the set of grid encoding sizes of the target map, where the set of grid encoding sizes includes multiple preset encoding sizes; determine the encoding size that is greater than the reference encoding size and closest to the reference encoding size in the set of grid encoding levels as the encoding size corresponding to the area to be encoded; determine the serial number of the encoding size corresponding to the area to be encoded in the set of grid encoding sizes as the encoding level corresponding to the area to be encoded, where the serial number is determined according to the ascending order of the multiple encoding sizes in the set of grid encoding sizes.

11. The apparatus according to claim 10, characterized in that, The encoding module is specifically configured to, when the target map is displayed at the front end of the application, determine the resolution of the front-end display of the application as the reference encoding size corresponding to the area to be encoded; or, when the target map is processed at the back end based on location services, determine the scale of the back-end processing based on location services as the reference encoding size corresponding to the area to be encoded; or, when sampling the target map, determine the sampling accuracy as the reference encoding size corresponding to the area to be encoded.

12. The apparatus according to claim 10, characterized in that, The encoding module is specifically configured to use a quadtree segmentation algorithm according to the identification point of the area to be encoded, and start from the smallest encoding size in the set of grid encoding sizes, and perform encoding layer by layer in ascending order to the encoding level corresponding to the area to be encoded.

13. The apparatus according to claim 9, characterized in that, The encoding module is specifically configured to use a convex hull algorithm to determine the minimum bounding polygon of the geometric figure corresponding to the area to be encoded.

14. The apparatus according to any one of claims 9-13, characterized in that, When the minimum bounding polygon includes N sides, the encoding module is specifically configured to determine the identification point of the area to be encoded according to the centroid of the minimum bounding polygon.

15. The apparatus according to claim 14, characterized in that, The encoding module is specifically used to divide the minimum envelope polygon into N-2 triangles; determine the centroid and area of ​​the N-2 triangles respectively; determine the centroid of the minimum envelope polygon based on the centroid and area of ​​the N-2 triangles, and determine the centroid of the minimum envelope polygon as the marker point of the region to be encoded.

16. The apparatus according to any one of claims 9-13, 15, characterized in that, The encoding module is further configured to: when the geometric shape corresponding to the region to be encoded is a point, determine the point as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a line, determine the center point of the line as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a triangle, determine the centroid of the triangle as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a circle, determine the center of the circle as the identifier point of the region to be encoded; or when the geometric shape corresponding to the region to be encoded is a two-segment broken line, obtain a triangle based on the two-segment broken line, and determine the centroid of the triangle as the identifier point of the region to be encoded.

17. An encoding device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-8.

18. A computer-readable storage medium, characterized in that, Includes a computer program, which, when executed on a computer, causes the computer to perform the method of any one of claims 1-8.

Citation Information

Patent Citations

  • Subdivision identification generation method and data search method of multi-source space data

    CN103136371A