Data processing method and electronic device

By introducing the concept of map fences and a target dataset rendering method, the rendering lag problem caused by the surge in the number of devices in the IoT management platform was solved, improving data processing efficiency and the accuracy of device status display.

CN116881382BActive Publication Date: 2026-02-27ECOFLOW INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310989752.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-07
Publication Date
2026-02-27
Estimated Expiration
2043-08-07

AI Technical Summary

Technical Problem

In IoT management platforms, when the number of connected devices surges, map operations or data rendering are prone to lag and stuttering, making it impossible to view device status information in a timely or accurate manner.

Method used

The concept of map fences is introduced to update the map fences in response to user operations, and the target dataset is determined from the reference dataset. Only the target data points within the map fence are rendered, reducing the amount of data processing.

Benefits of technology

It improves map data processing efficiency, reduces rendering lag and stuttering, and ensures timely and accurate display of device status information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116881382B_ABST
    Figure CN116881382B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and provides a data processing method and an electronic device. The method is applied to the electronic device, and the method comprises the following steps: displaying a map region in a preset map located in a map fence; in response to a first operation on a map region displayed on the electronic device, updating the map fence, and determining a target data set from reference data sets; wherein, none of the reference data sets contains all data points in the preset map, and the union set of the reference data sets contains all data points in the preset map; determining a target data point located in the map fence according to the target data set; rendering the target data point, and displaying the rendering result of the target data point in a map region corresponding to the updated map fence. The above method can improve the processing efficiency of map data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a data processing method and an electronic device. BACKGROUND

[0002] Internet of Things (IOT) is an Internet with a wider coverage area, which is constructed on the basis of computer Internet and by using Radio Frequency Identification (RFID), wireless data communication and other technologies. An IOT management platform can be a server or a server cluster, which is configured to provide various services, such as device management, security authentication, etc., for access devices (such as energy storage devices, smart home devices, smart lawn mowers, etc.). The device management can include online debugging, remote maintenance, real-time monitoring, etc.

[0003] Taking real-time monitoring as an example, the state information of all access devices can be obtained by viewing the map displayed on the IOT management platform, such as representing each access device by a data point on the map, determining the risk level of the access device corresponding to the data point by viewing the color of the data point on the map, and thus maintaining the access device with a higher risk level. This kind of method can more intuitively view the state of the access device. In related technologies, the IOT management platform needs to re-render all data points on the map after each operation of the user on the map. However, when the number of access devices surges, the operation on the map or the rendering of data is prone to lag, unsmoothness, or even the situation that the data points cannot be rendered due to a large amount of data, resulting in that the state information of the access device cannot be viewed in time or correctly. SUMMARY

[0004] Embodiments of the present application disclose a data processing method and an electronic device, which solve the technical problem of low data processing efficiency caused by a large amount of map data.

[0005] The present application provides a data processing method applied to an electronic device, including: displaying a map region in a preset map located within a map fence; in response to a first operation on the map region displayed on the electronic device, updating the map fence, and determining a target data set from a reference data set; wherein any reference data set does not contain all data points in the preset map, and the union set of each reference data set contains all data points in the preset map; determining a target data point located within the map fence according to the target data set; rendering the target data point, and displaying the rendering result of the target data point in the map region corresponding to the updated map fence.

[0006] In the data processing method of the present application, first, the map area displayed on the electronic device is referred to as the map area within the map fence, the concept of map fence is introduced, and the data within the preset map is displayed on demand. Secondly, in response to the first operation on the map area displayed on the electronic device, the map fence is updated and the target data set is determined from the reference data set. Since the reference data set does not contain all the data points within the preset map, the target data set can be determined only according to part of the data after the user performs the first operation, thereby reducing the data amount for subsequent data processing. Finally, the target data points to be rendered are determined according to the target data set, thereby reducing the amount of data to be rendered and to some extent reducing the occurrence of lag and unsmoothness of the electronic device during rendering, thereby improving the processing efficiency of the map data.

[0007] The present application also provides a data processing device applied to an electronic device, comprising: a display module configured to display a map area within a map fence in a preset map; an update module configured to update the map fence in response to a first operation on the map area displayed on the electronic device, and determine a target data set from a reference data set; wherein any reference data set does not contain all the data points within the preset map, and the union set of each reference data set contains all the data points within the preset map; a determination module configured to determine target data points within the map fence according to the target data set; and a rendering module configured to render the target data points and display the rendering result of the target data points in the map area corresponding to the updated map fence.

[0008] The present application also provides an electronic device comprising a display screen, a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the data processing method.

[0009] The present application also provides a computer readable storage medium storing at least one instruction, wherein the at least one instruction is executed by a processor to implement the data processing method. BRIEF DESCRIPTION OF DRAWINGS

[0010] Figure 1 FIG. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application.

[0011] Figure 2 FIG. 2 is a flowchart of a data processing method provided by an embodiment of the present application.

[0012] Figure 3 FIG. 3 is a flowchart of a data processing method provided by another embodiment of the present application.

[0013] Figure 4 FIG. 4 is a schematic diagram of a zoom-in operation provided by an embodiment of the present application.

[0014] Figure 5is a schematic diagram of a zoom-out operation provided by an embodiment of the present application.

[0015] Figure 6 is a schematic diagram of a drag operation provided by an embodiment of the present application.

[0016] Figure 7 is an update and rendering flowchart of a data processing method provided by yet another embodiment of the present application.

[0017] Figure 8 is a structural schematic diagram of a data processing apparatus provided by an embodiment of the present application. DETAILED DESCRIPTION

[0018] For ease of understanding, some exemplary descriptions of concepts related to embodiments of the present application are given for reference.

[0019] It should be noted that the terms "first", "second", and the like in the description and claims of the present application and the accompanying drawings are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0020] In addition, it should be noted that the methods disclosed in the embodiments of the present application or the methods shown in the flowcharts include one or more steps for implementing the methods, and the execution order of the steps can be interchanged with each other without departing from the scope of the claims, and some steps can also be deleted.

[0021] Some embodiments will be described below with reference to the accompanying drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.

[0022] Internet of Things (IOT) is an Internet covering a wider area based on computer Internet, constructed by using radio frequency identification (RFID), wireless data communication and other technologies. The IOT management platform can be a server or a server cluster, which is used to provide various services for access devices (such as energy storage devices, smart home devices, smart lawn mowers, etc.), such as device management, security authentication, etc. Among them, the device management can include online debugging, remote maintenance, real-time monitoring, etc.

[0023] Taking real-time monitoring as an example, the status information of all connected devices can be obtained by viewing the map displayed on the IoT management platform. For instance, data points on the map represent each connected device, and the risk level of the connected device corresponding to that data point can be determined by observing its color. This allows for maintenance of connected devices with higher risk levels. This type of method provides a relatively intuitive view of the connected device status. However, in related technologies, after each user operation on the map, the IoT management platform needs to re-render all data points on the map. However, when the number of connected devices surges, map operations or data rendering can easily become sluggish and unresponsive, or even fail to render data points due to the large data volume, resulting in the inability to view the status information of connected devices in a timely or accurate manner.

[0024] To improve the efficiency of map data processing and the performance of map data aggregation, embodiments of this application provide a data processing method and an electronic device. The data processing method provided in this application is applied to an electronic device, and the structure of the electronic device is described below.

[0025] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 10 can be a mobile phone, tablet computer, smart wearable device, augmented reality (AR) / virtual reality (VR) device, laptop computer, netbook, energy storage device, power distribution equipment, vehicle-mounted equipment, self-moving device, or other electronic device with a display screen. This embodiment of the application does not impose any restrictions on the specific type of electronic device.

[0026] like Figure 1 As shown, the electronic device 10 may include a display screen 100, a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104, and a bus 105. The processor 103 is coupled to the display screen 100, the communication interface 101, the memory 102, and the I / O interface 104 via the bus 105.

[0027] The display screen 100 can be a touch screen, specifically a touch-sensitive liquid crystal display device. Alternatively, the display screen 100 can be a non-touch screen. The display screen 100 is used to display a map area within a map fence. The map fence can be a bounding box formed by the map boundary of the area that the display screen can show, and the map area is the visible area in the map.

[0028] The communication module 101 can include a wired communication module and / or a wireless communication module. The wired communication module can provide one or more of the following wired communication solutions: Universal Serial Bus (USB), Controller Area Network (CAN) bus, etc. The wireless communication module can provide one or more of the following wireless communication solutions: Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication network, Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR) technology, etc.

[0029] The memory 102 can include one or more Random Access Memories (RAMs) and one or more Non-Volatile Memories (NVMs). The Random Access Memory can be directly read and written by the processor 103, and can be used to store executable programs (e.g., machine instructions) of operating systems or other programs running, and can also be used to store data of users and applications, etc.

[0030] The Random Access Memory can include 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), etc.

[0031] The Non-Volatile Memory can also store executable programs and store data of users and applications, etc., and can be loaded in advance into the Random Access Memory for direct reading and writing by the processor 110. The Non-Volatile Memory can include a magnetic disk storage device, a Flash Memory.

[0032] The memory 102 is configured to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include a plurality of instructions which, when executed by the processor 103, can implement a data processing method performed on the electronic device 10.

[0033] In other embodiments, the electronic device 10 further comprises an external memory interface for connecting an external memory to extend the storage capability of the electronic device 10.

[0034] The processor 103 can include one or more processing units, for example: the processor 103 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated into one or more processors.

[0035] The processor 103 provides computing and control capabilities, for example, the processor 103 is used to execute a computer program stored in the memory 102 to implement the data processing method described above.

[0036] The I / O interface 104 is used to provide a channel for user input or output, for example, the I / O interface 104 can be used to connect various input and output devices, such as a mouse, a keyboard, a touch device, a display screen, etc., so that the user can enter information or make the information visualized.

[0037] The bus 105 is used to provide a communication channel between the communication module 101, the memory 102, the processor 103, and the I / O interface 104 in the electronic device 10.

[0038] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0039] Figure 2 is a flowchart of the data processing method provided by an embodiment of the present application, as shown in Figure 2 The data processing method provided by the embodiment of the present application is applied in an electronic device (such as the electronic device 10 of Figure 1 According to different needs, the order of steps in the flowchart can be changed, and some steps can be omitted. For example, Figure 2As shown, the method comprises the following steps S201-S204.

[0040] In step S201, a map region in a preset map located in a map fence is displayed.

[0041] In some embodiments of the present application, the electronic device has a display screen, and an Internet of Things management platform can be built in the electronic device, and data managed by the Internet of Things management platform can be displayed on the display screen. The Internet of Things management platform can be used to manage access devices in different continents, different countries, and different regions. The number of access devices, the device state, and the location of the access devices on the map can be displayed on the display screen of the electronic device. The access devices can be mobile energy storage power supplies, household energy storage power supplies, smart power distribution devices, automatic cleaning devices, smart lawn mowers, sweeping robots, automatic irrigation devices, automatic snow removal devices, and smart robots, etc. that support Internet of Things connection, and the embodiments of the present application are not limited thereto. The user can select to view the type of access device on the display screen.

[0042] In an example, the electronic device can display the device state of the access device in real time on the display screen. The device state can include a healthy state and an unhealthy state. The display screen can distinguish different device states by displaying different colors, and the user can intuitively understand the device state of the access device according to the color. The display method of the device state and the color setting are not limited in the present application.

[0043] In an example, the electronic device can intuitively display the number of access devices in different continents, different countries, and different regions on the display screen. For example, the display screen can display a map of 7 continents, and the access devices covered in each continent can be gathered into a cluster point on the map. A numerical value is displayed on the cluster point to represent the number of all access devices covered in the continent. In other examples, the cluster point can also represent a single access device, and the numerical value displayed on the cluster point is 1. The cluster point can also represent multiple access devices at the same location. The embodiments of the present application are not limited thereto.

[0044] In some embodiments of the present application, the preset map can be a world map, or it can also be a regional map. The electronic device can display access devices at different locations in the world using the preset map.

[0045] In some embodiments, the electronic device can also modify the scale of the preset map in response to a user operation. For example, when the scale is a scale corresponding to continents, the preset map can be displayed in a form of clustering continents, each continent being a cluster. When the scale is a scale corresponding to countries, the preset map can also be displayed in a form of clustering countries, each country being a cluster. When the scale is a scale corresponding to cities, the preset map can also be displayed in a form of clustering cities, each city being a cluster. In other embodiments, the preset map can also display more specific locations, such as regional locations, according to the size of the scale.

[0046] In some embodiments of the present application, the display screen of the electronic device is limited by the size of the display screen, and the map area displayed by the display screen to the user is limited. For example, when the preset map is displayed in a form of clustering countries on the display screen, if the size of the display screen is not large enough, all the countries cannot be displayed, and the user can only see part of the map area. Therefore, the area displayed by the display screen to the user can be regarded as the map area within the map fence, and the map fence can be a boundary box of the map area displayed by the display screen.

[0047] In step S202, the map fence is updated in response to a first operation on the map area displayed on the electronic device, and a target data set is determined from the reference data set.

[0048] In some embodiments of the present application, the electronic device can include a touch screen for display and operation, and the user can perform a touch operation at any position on the touch screen. Since the content displayed by the display screen is limited by the size of the display screen, the user can perform a touch operation on the display screen to meet the display requirement. The touch operation on the map area displayed on the display screen can be referred to as a first operation, which is used to distinguish from a touch operation on a non-map area of the display screen, which can be a task bar, a device type selection bar, etc. displayed on the display screen, and the actual application is not limited thereto.

[0049] In some embodiments of the present application, the electronic device can include a mouse, a keyboard, etc. The input operation on the map area displayed on the display screen can be referred to as a first operation. For example, the user can zoom in or zoom out the scale of the preset map by rolling the scroll wheel of the mouse.

[0050] In some embodiments of the present application, the first operation can include at least one of a zoom-in operation, a zoom-out operation, and a drag operation. The electronic device updates the map fence in response to the first operation of the user.

[0051] In some embodiments, updating the map fence includes updating a fence position of the map fence. In some embodiments, updating the map fence further includes updating a scale of the preset map.

[0052] In an example, a scale of the preset map is updated in response to a zoom-in operation. In response to the zoom-in operation, the scale of the preset map is increased from a country corresponding scale to a city corresponding scale. The country cluster displayed in the map fence is updated to display the city cluster. A zoom-out operation is similar to the zoom-in operation. In response to the zoom-out operation, the scale of the preset map is decreased from the city corresponding scale to the country corresponding scale. The city cluster displayed in the map fence is updated to display the country cluster.

[0053] In an example, when the electronic device detects the drag operation of the user, the fence position of the map fence can be changed, but the scale of the preset map is not changed.

[0054] Since the map fence is changed, the map area in the map fence is also changed. Therefore, the data points to be displayed also need to be updated to display the updated data points on the map area in the updated map fence.

[0055] In some embodiments of the present application, the electronic device determines a target data set from the reference data sets in response to the first operation on the map area. The reference data sets can be a proper subset of the set of all data points. Any one of the reference data sets does not contain all the data points in the preset map. The union of the reference data sets contains all the data points in the preset map.

[0056] Therefore, after detecting the first operation, in order to reduce the amount of data to be processed, the target data set can be determined according to the first operation. The target data set can include data points that need to be traversed and calculated after being updated.

[0057] In step S203, target data points located in the map fence are determined according to the target data set.

[0058] In some embodiments of the present application, after obtaining the target data set, all the data points in the preset map do not need to be traversed. The target data points in the map fence can be determined according to the target data set.

[0059] In an example, in response to the zoom-in operation on the map area, since the target data points in the map fence after the zoom-in operation belong to the data points in the map fence before the zoom-in operation, only the data points in the map fence before the zoom-in operation need to be traversed to obtain the target data points located in the map fence.

[0060] Similarly, for the zoom-out operation and the drag operation, all the data points in the preset map do not need to be traversed, and the target data points in the map fence can be determined according to the target data set.

[0061] In step S204, the target data points are rendered, and the rendering results of the target data points are displayed in the map area corresponding to the updated map fence.

[0062] In some embodiments of the present application, rendering can be a process of generating an image from a model. The model is a description of a two-dimensional object, a three-dimensional object or a virtual scene defined by a language or a data structure, and includes information such as geometry, viewpoint, texture, lighting and shadow. The electronic device can use any one of tile rendering, static page pre-rendering, client rendering and pre-rendering to render the target data points, which is not limited in the present application.

[0063] In some embodiments of the present application, after the map fence of the display screen is updated, the target data points in the map fence need to be re-rendered, and the rendering results after rendering are displayed in the map area corresponding to the updated map fence. The rendering results can include numbers, colors, pictures and the like of the data points in the updated map area, which are not limited in practical applications.

[0064] In embodiments of the present application, first, the map area displayed on the electronic device is referred to as the map area in the map fence, the concept of the map fence is introduced, and the data in the preset map is displayed on demand. Second, in response to the first operation on the map area displayed on the electronic device, the map fence is updated, and the target data set is determined from the reference data set. Since the reference data set does not include all the data points in the preset map, the target data set can be determined according to part of the data after the user performs the first operation, thereby reducing the amount of data for subsequent data processing. Finally, the target data points that need to be rendered are determined according to the target data set, thereby reducing the amount of data for rendering and reducing the occurrence of lag and unsmoothness of the electronic device during rendering to a certain extent.

[0065] Figure 3 is a flowchart of a data processing method provided by another embodiment of the present application. The first operation includes any one of the zoom-in operation, the zoom-out operation and the drag operation. The electronic device determines the target data points located in the map fence in response to the first operation on the map area, as shown in Figure 3 includes the following steps:

[0066] In step S301, the first operation on the map area displayed on the electronic device is responded.

[0067] In some embodiments of the present application, the specific description of step S301 can be referred to Figure 2Step S202 in the illustrated embodiment, which will not be described again here.

[0068] Step S302, determining whether the first operation is a zoom-in operation.

[0069] Figure 4 FIG. 1 is a schematic diagram of a zoom-in operation provided by an embodiment of the present application.

[0070] In some embodiments of the present application, the zoom-in operation refers to an operation of increasing the scale of a preset map, such as Figure 4 As shown, the number of access devices of the country cluster M is 10, M1, M2, and M3 represent city clusters M1, M2, and M3 covered in the country cluster M, the number of access devices of the city cluster M1 is 1, the number of access devices of the city cluster M2 is 4, and the number of access devices of the city cluster M3 is 5. The number of access devices of the country cluster M is equal to the sum of the number of access devices of all city clusters (such as M1, M2, and M3) in the country cluster M. Figure 4 This is just an example, and the actual application is not limited thereto.

[0071] In an example, the city clusters displayed after performing the zoom-in operation can be all city clusters (such as M1, M2, and M3) or part of city clusters (such as M2 and M3), depending on the degree of increase of the scale.

[0072] In another example, after performing the zoom-in operation, the level corresponding to the scale can not change. For example, assuming that the city clusters M1, M2, and M3 are displayed after performing the zoom-in operation, the city clusters are still displayed after performing the zoom-in operation again, but the displayed map area is reduced, for example, only the city clusters M2 and M3 are displayed.

[0073] In some embodiments of the present application, if the first operation is the zoom-in operation, step S303 is continued to be performed, and if the first operation is not the zoom-in operation, the flow jumps to step S305.

[0074] Step S303, determining the in-fence dataset as the target dataset.

[0075] In some embodiments of the present application, the reference dataset can include the in-fence dataset, and the in-fence dataset is a collection of data points in the map fence before the update. After performing the zoom-in operation on the map area, the display interface after zooming in displays a smaller map area. For example, as shown in FIG. 2, the map of each country is displayed before performing the zoom-in operation, and the map of each city is displayed after performing the zoom-in operation. Figure 4

[0076] ​Therefore, if the data points after the zoom-in operation are within the map fence before the zoom-in operation, the data within the fence can be identified as the target dataset, thereby reducing the amount of data computation.

[0077] Step S304: Determine the target data points located within the map fence from the target dataset.

[0078] In some embodiments of this application, after the target dataset is determined, the coordinates of each data point in the target dataset can be compared with the fence position of the updated map fence to filter out data outside the map fence and determine the target data points located within the map fence.

[0079] Step S305: Determine whether the first operation is a shrinking operation.

[0080] Figure 5 This is a schematic diagram of the scaling operation provided in the embodiments of this application.

[0081] In some embodiments of this application, the zoom-out operation refers to the operation of reducing the scale of a preset map. For example... Figure 5 As shown, N1, N2, and N3 represent city clusters N1, N2, and N3, respectively. City cluster N1 has 1 access device, city cluster N2 has 4 access devices, and city cluster N3 has 5 access devices. N represents the country cluster, and N has 10 access devices. After performing a zoom-out operation on the map area, the scale of the preset map is reduced from the scale corresponding to the city to the scale corresponding to the country. Therefore, when N1, N2, and N3 are aggregated into N, the number of access devices in N1, N2, and N3 is equal to the number of access devices in N. Figure 5 This is just an example; actual applications are not limited to this.

[0082] In some embodiments of this application, if the first operation is a shrinking operation, step S306 is executed; if the first operation is not a shrinking operation, the process jumps to step S309.

[0083] Step S306: Determine the dataset outside the fence as the target dataset.

[0084] In some embodiments of this application, the reference dataset may include an in-fence dataset and an out-of-fence dataset. The in-fence dataset is a set of data points within the map fence before the update, and the out-of-fence dataset is a set of data points outside the map fence before the update.

[0085] After zooming out on the electronic device, the default map scale decreases, allowing a larger map area to be displayed within the same display area. Figure 5As shown, a map of each city is displayed before the zoom-out operation, and a map of each country is displayed after the zoom-out operation (a multi-country cluster is not shown in the figure), so that after the zoom-out operation, some data points are in the out-of-fence data set, the out-of-fence data set can be determined as the target data set, so as to reduce the data calculation amount.

[0086] In step S307, the interpolation data points located in the map fence are determined from the target data set.

[0087] In some embodiments of the present application, after the target data set is determined, the coordinates of each data point in the target data set are compared with the fence position of the updated map fence, and the interpolation data points located in the updated map fence are calculated.

[0088] In step S308, the interpolation data points and the data points in the in-fence data set are determined as the target data points.

[0089] In some embodiments of the present application, after the zoom-out operation is performed, the data points in the pre-update map fence are necessarily located in the post-update map fence, so that after the interpolation data points are obtained, the target data points in the post-update map fence are obtained in combination with the interpolation data points and the in-fence data set.

[0090] In step S309, it is determined that the first operation is a drag operation, the target data set is determined from the reference data set according to the drag direction corresponding to the drag operation, and the target data points are determined from the target data set.

[0091] In some embodiments of the present application, the drag operation can be an operation of not changing the scale of the preset map, but only changing the fence position of the map fence.

[0092] In some embodiments of the present application, the reference data set can include a top-left data set, a top-right data set, a bottom-left data set, and a bottom-right data set. The drag direction can include a top-left direction, a top-right direction, a bottom-left direction, and a bottom-right direction. The electronic device can determine the target data set from the reference data set according to the drag direction corresponding to the drag operation, and determine the target data points from the data points contained in the target data set.

[0093] Figure 6 FIG. 1 is a schematic diagram of a drag operation provided by an embodiment of the present application. C1, C2, C3, and C4 are four corner points of the map fence.

[0094] In some embodiments of the present application, as shown in FIG. 1, the drag operation can be an operation of not changing the scale of the preset map, but only changing the fence position of the map fence. Figure 6As shown, F1 represents the top-left corner of the preset map. When the drag direction is upward and left, the top-left dataset is determined as the target dataset. The top-left dataset is the set of data points within the top-left area, which is a rectangular area with the top-left corner F1 of the preset map and the bottom-right corner C1 of the map fence as its diagonal points. (i.e.) Figure 6 (diagonal fill area)

[0095] In some embodiments of this application, such as Figure 6 As shown, F2 represents the lower left corner of the preset map. When the drag direction is lower left, the lower left dataset is determined as the target dataset. The lower left dataset is a set of data points in the lower left area. The lower left area is a rectangular area with the lower left corner of the preset map F2 and the upper right corner of the map fence C2 as the diagonal points.

[0096] In some embodiments of this application, such as Figure 6 As shown, F3 represents the upper right corner of the preset map. When the drag direction is to the upper right, the upper right dataset is determined as the target dataset. The upper right dataset is a set of data points in the upper right area. The upper right area is a rectangular area with the upper right corner F3 of the preset map and the lower left corner C3 of the map fence as its diagonal points.

[0097] In some embodiments of this application, such as Figure 6 As shown, F4 represents the bottom right corner of the preset map. When the drag direction is to the bottom right, the bottom right dataset is determined as the target dataset. The bottom right dataset is a set of data points in the bottom right area. The bottom right area is a rectangular area with the bottom right corner of the preset map F4 and the top left corner of the map fence C4 as its diagonal points.

[0098] In the embodiments of this application, the first operation may include zooming in, zooming out, and dragging operations. Based on the different operations performed by the user, different target datasets can be determined accordingly, so as to use the target datasets to determine the target data points within the map fence, thereby reducing the amount of data computation to a certain extent.

[0099] In some embodiments, after the target data point located within the map fence is determined, the data points in the reference dataset can also be updated to serve as the basis for data processing after the first operation is triggered again.

[0100] Figure 7 This is a flowchart illustrating the update and rendering process of a data processing method provided in another embodiment of this application. After obtaining the target data point, two parallel threads can be used to simultaneously execute the update and rendering operations, such as... Figure 7 The illustrated embodiment includes the following steps:

[0101] Step S701, transmit the target data point into the second thread by the first thread.

[0102] In some embodiments of the present application, one thread refers to one single sequential control flow, and the electronic device can concurrently execute multiple threads, each of which executes different tasks in parallel. For example, the first thread and the second thread are executed concurrently, and the first thread executes a data calculation task, and the second thread executes a data rendering task.

[0103] In some embodiments of the present application, the target data point is calculated by the first thread in response to the first operation on the map region. The first thread can be a non-shared thread technology (Webworker), and the second thread can be a main thread. After the first thread calculates the target data point, the target data point can be transmitted into the second thread to continue step S702.

[0104] Step S702, render the target data point by the second thread.

[0105] In some embodiments of the present application, after the map fence of the display screen is updated in response to the first operation on the map region, the target data point in the map fence needs to be re-rendered, and the second thread can be used to render the target data point. The rendering method can be set according to the actual scene requirements, which is not limited in the present application.

[0106] Step S703, update the data points in the reference data set by the first thread.

[0107] In some embodiments of the present application, after the first thread obtains the target data point and transmits the target data point into the second thread, the operation of updating the data points in the reference data set can be executed in parallel, so as to serve as the basis for subsequent data processing after the first operation is triggered again.

[0108] In some embodiments of the present application, the above-mentioned updating of the data points in the reference data set includes: updating the in-fence data set according to the target data point, and updating the out-of-fence data set according to the data points other than the target data point.

[0109] Since the target data point is located in the updated map fence, the in-fence data set can be updated according to the target data point. Correspondingly, the data points other than the target data point are located outside the updated map fence, so the out-of-fence data set can be updated according to the data points other than the target data point.

[0110] In some embodiments of the present application, after obtaining the target data point and passing the target data point into the second thread, the first thread updates the data set within the fence using the calculated target data point, so that the updated data set within the fence can be used as the reference data set for subsequent data processing after the first operation is triggered again.

[0111] In some embodiments of the present application, the target data point is obtained by traversing the data set within the fence, and the target data point is only part of the data points of the preset map. Therefore, after meeting the display requirements of the user, the data set outside the fence can be updated using the data points other than the target data point. The data points other than the target data point are traversed and calculated to obtain the data set outside the fence. The data set outside the fence can be used as the reference data set for subsequent data processing after the first operation is triggered again.

[0112] In some embodiments of the present application, the updating of the data points in the reference data set includes updating the upper-left data set, the lower-left data set, the upper-right data set, and the lower-right data set.

[0113] Specifically, the upper-left region, the lower-left region, the upper-right region, and the lower-right region can be updated according to the corner points of the updated map fence.

[0114] When updating the upper-left data set, the coordinates of each data point can be compared with the position of the updated upper-left region, and the upper-left data set can be updated according to the data points located in the updated upper-left region.

[0115] Similarly, when updating the lower-left data set, the coordinates of each data point can be compared with the position of the updated lower-left region, and the lower-left data set can be updated according to the data points located in the updated lower-left region.

[0116] When updating the upper-right data set, the coordinates of each data point can be compared with the position of the updated upper-right region, and the upper-right data set can be updated according to the data points located in the updated upper-right region.

[0117] When updating the lower-right data set, the coordinates of each data point can be compared with the position of the updated lower-right region, and the lower-right data set can be updated according to the data points located in the updated lower-right region.

[0118] In the embodiments of the present application, the non-shared thread technology and the rendering technology are used for parallel processing, which reduces the amount of data processing and improves the performance of data aggregation.

[0119] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. Moreover, in the actual application process, only part of the steps in the above embodiments can be applied, or part of the steps can be added, or part of the steps can be replaced, and the embodiments of the present application do not limit this.

[0120] Figure 8 FIG. 8 is a structural schematic diagram of a data processing apparatus 80 provided by an embodiment of the present application. As shown in the figure, in the embodiment of the present application, the data processing apparatus 80 can be divided into a plurality of functional modules according to the functions performed by the data processing apparatus 80, and can include a display module 801, an update module 802, a determination module 803, and a rendering module 804. Figure 8

[0121] The display module 801 is configured to display a map region in a preset map located within a map fence.

[0122] The update module 802 is configured to update the map fence in response to a first operation on a map region displayed on an electronic device, and determine a target data set from a reference data set; wherein any reference data set does not contain all data points in the preset map, and the union set of each reference data set contains all data points in the preset map.

[0123] The determination module 803 is configured to determine a target data point located within the map fence according to the target data set.

[0124] The rendering module 804 is configured to render the target data point, and display the rendering result of the target data point in a map region corresponding to the updated map fence.

[0125] In some embodiments of the present application, the first operation includes at least one of an enlargement operation, a reduction operation, and a drag operation.

[0126] In some embodiments of the present application, the reference data set includes an in-fence data set, the in-fence data set is a collection of data points within the map fence before updating; the target data set is determined from the reference data set, and the target data point located within the map fence is determined according to the target data set, including: if the first operation is the enlargement operation, the in-fence data set is determined as the target data set; the target data point located within the map fence is determined from the target data set.

[0127] ​In some embodiments of the present application, the reference data set comprises an in-fence data set and an out-fence data set, the in-fence data set being a set of data points within the map fence before the update, and the out-fence data set being a set of data points outside the map fence before the update; the target data set is determined from the reference data set, and the target data points located within the map fence are determined according to the target data set, comprising: if the first operation is a zoom-out operation, the out-fence data set is determined as the target data set; the interpolation data points located within the map fence are determined from the target data set; and the interpolation data points and the data points in the in-fence data set are determined as the target data points.

[0128] In some embodiments of the present application, the target data set is determined from the reference data set, comprising: if the first operation is a drag operation, the target data set is determined from the reference data set according to the drag direction corresponding to the drag operation.

[0129] In some embodiments of the present application, the reference data set further comprises an upper-left data set, a lower-left data set, an upper-right data set and a lower-right data set; the target data set is determined from the reference data set according to the drag direction corresponding to the drag operation, comprising: when the drag direction is upper-left, the upper-left data set is determined as the target data set; the upper-left data set is a set of data points in an upper-left region, and the upper-left region is a rectangular region with a left upper corner of a preset map and a right lower corner of the map fence as opposite corners; when the drag direction is lower-left, the lower-left data set is determined as the target data set; the lower-left data set is a set of data points in a lower-left region, and the lower-left region is a rectangular region with a left lower corner of the preset map and a right upper corner of the map fence as opposite corners; when the drag direction is upper-right, the upper-right data set is determined as the target data set; the upper-right data set is a set of data points in an upper-right region, and the upper-right region is a rectangular region with a right upper corner of the preset map and a left lower corner of the map fence as opposite corners; and when the drag direction is lower-right, the lower-right data set is determined as the target data set; the lower-right data set is a set of data points in a lower-right region, and the lower-right region is a rectangular region with a right lower corner of the preset map and a left upper corner of the map fence as opposite corners.

[0130] In some embodiments of the present application, after the target data points located within the map fence are determined according to the target data set, the method further comprises: updating the data points in the reference data set.

[0131] In some embodiments of the present application, the reference data set comprises an in-fence data set and an out-fence data set; the data points in the reference data set are updated, comprising: updating the in-fence data set according to the target data points; and updating the out-fence data set according to the data points other than the target data points.

[0132] In some embodiments of the present application, the determining, according to the target data set, that the target data point is located within the map fence is performed by a first thread; the rendering of the target data point comprises: passing the target data point into a second thread by the first thread; and rendering the target data point by the second thread; and the updating of the data point in the reference data set comprises: updating the data point in the reference data set by the first thread after passing the target data point into the second thread by the first thread; and the first thread and the second thread are parallel threads.

[0133] The data processing apparatus provided in the embodiments can execute the method provided in the above method embodiments, and has similar implementation principles and technical effects, which will not be described here.

[0134] The embodiments of the present application further provide a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program includes program instructions. The method implemented by the program instructions will be described with reference to the method in the above embodiments of the present application.

[0135] The computer readable storage medium can be an internal storage of the electronic device, such as a hard disk or a memory of the electronic device. The computer readable storage medium can also be an external storage of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.

[0136] In some embodiments, the computer readable storage medium can include a program storage area and a data storage area. The program storage area can store an operating system, an application required by at least one function, etc. The data storage area can store data created according to the use of the electronic device, etc.

[0137] In the above embodiments, the description of each embodiment has its own focus. The parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.

[0138] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized 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 realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0139] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / terminal device and method can be implemented in other manners. For example, the embodiments of the apparatus / terminal device described above are merely schematic, and the division of the modules or units is merely logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0140] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.

[0141] The above embodiments are merely used to describe the technical solutions of the present application, but not limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalent; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A data processing method applied to electronic devices, characterized in that, The method includes: Displays the map area within the map fence in the preset map; In response to a first operation on a map area displayed on the electronic device, the map fence is updated, and a target dataset is determined from a reference dataset; wherein, none of the reference datasets contains all data points within the preset map, and the union of the reference datasets contains all data points within the preset map; the first operation includes at least one of zooming in, zooming out, and dragging. Based on the target dataset, determine the target data points located within the map fence; The target data points are rendered, and the rendering results of the target data points are displayed in the map area corresponding to the updated map fence. The reference dataset includes an in-fence dataset and an out-of-fence dataset; updating the data points within the reference dataset includes: updating the in-fence dataset based on the target data point; and updating the out-of-fence dataset based on data points other than the target data point. The determination of target data points within the map fence based on the target dataset is performed by a first thread; the rendering of the target data points includes: passing the target data points to a second thread through the first thread; and rendering the target data points through the second thread; correspondingly, the updating of data points in the reference dataset includes: updating the data points in the reference dataset through the first thread after passing the target data points to the second thread through the first thread; the first thread and the second thread are parallel threads.

2. The method according to claim 1, characterized in that, The reference dataset includes the fenced-in dataset, which is a set of data points within the map fence before the update. The step of determining the target dataset from the reference dataset, and the step of determining the target data points located within the map fence based on the target dataset, include: If the first operation is a zoom-in operation, then the dataset within the fence is determined as the target dataset; From the target dataset, determine the target data points located within the map fence.

3. The method according to claim 1, characterized in that, The reference dataset includes an in-fence dataset and an out-of-fence dataset. The in-fence dataset is a set of data points inside the map fence before the update, and the out-of-fence dataset is a set of data points outside the map fence before the update. The step of determining the target dataset from the reference dataset, and the step of determining the target data points located within the map fence based on the target dataset, include: If the first operation is a shrinking operation, then the dataset outside the fence is determined as the target dataset; From the target dataset, determine the interpolated data points located within the map fence; The interpolated data points and the data points in the dataset within the fence are determined as the target data points.

4. The method according to claim 1, characterized in that, Determining the target dataset from the reference dataset includes: If the first operation is a drag operation, the target dataset is determined from the reference dataset according to the drag direction corresponding to the drag operation.

5. The method according to claim 4, characterized in that, The reference dataset also includes the top left dataset, the bottom left dataset, the top right dataset, and the bottom right dataset; Determining the target dataset from the reference dataset based on the drag direction corresponding to the drag operation includes: When the drag direction is to the upper left, the upper left dataset is determined as the target dataset; the upper left dataset is a set of data points in the upper left region, and the upper left region is a rectangular area with the upper left corner of the preset map and the lower right corner of the map fence as diagonal points; When the drag direction is to the lower left, the lower left dataset is determined as the target dataset; the lower left dataset is a set of data points in the lower left region, and the lower left region is a rectangular area with the lower left corner of the preset map and the upper right corner of the map fence as diagonal points; When the drag direction is to the upper right, the upper right dataset is determined as the target dataset; the upper right dataset is a set of data points in the upper right region, and the upper right region is a rectangular area with the upper right corner of the preset map and the lower left corner of the map fence as diagonal points; When the drag direction is to the lower right, the lower right dataset is determined as the target dataset; the lower right dataset is a set of data points in the lower right region, and the lower right region is a rectangular area with the lower right corner of the preset map and the upper left corner of the map fence as diagonal points.

6. An electronic device, characterized in that, The electronic device includes a display screen, a processor, and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the data processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Electronic fence loading method and device, equipment and storage medium

    CN112333635A

  • Geofence control method and apparatus, storage medium, and electronic device

    WO2023020259A1