Plan view based device point interaction method and system
By establishing an independent coordinate system in the indoor environment and performing device location mapping and dynamic aggregation rendering, the problems of inaccurate device positioning and poor interactivity are solved, achieving efficient and low-cost device monitoring and management, and improving operation and maintenance efficiency.
Patent Information
- Application Number
- CN202511351297.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-09-22
AI Technical Summary
In complex indoor environments, existing technologies struggle to achieve accurate, intuitive, and efficient visual monitoring and interactive management of equipment. Traditional outdoor map engines lack sufficient accuracy in indoor environments, failing to meet equipment positioning requirements. Furthermore, reliance on third-party services leads to complex intranet deployments and high economic costs.
A device location interaction method based on a floor plan is adopted. By acquiring the location information of indoor devices, an independent coordinate system is established. Combined with a dynamic multi-level aggregation algorithm and fine rendering, the device location information is directly mapped on the indoor floor plan, and the device aggregation and rendering are dynamically performed in response to user interaction operations.
It achieves high-precision, low-cost, and highly interactive equipment status monitoring and operation management, improving operation and maintenance efficiency and management level, and solving problems such as inaccurate equipment positioning, poor visualization effects, and deployment complexity of traditional solutions.
Smart Images

Figure CN120848776B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of equipment visualization monitoring and interactive management, and in particular to a method and system for interactive equipment location based on a floor plan. Background Technology
[0002] Equipment and alarm management plays a crucial role in critical scenarios such as industrial power systems and data management centers. Traditional management platforms generally use a paginated list format to linearly display equipment information and alarm data. However, this approach has significant drawbacks: First, alarm device location is difficult, as the list format cannot intuitively display the physical location and spatial distribution of alarm devices, making it difficult for maintenance personnel to quickly locate the fault point; second, alarm correlation is poor, as multiple alarms may be caused by the same area or the same equipment failure, but the list format cannot effectively display their spatial correlation, hindering root cause analysis; third, device interactivity is poor, requiring maintenance personnel to frequently switch views and search within the list for different devices in the same area, resulting in cumbersome and inefficient operations.
[0003] To address these issues, existing technologies have proposed several improvements, attempting to associate listed devices with general map engines and display their latitude and longitude coordinates via buttons or in the map details page. While these solutions are applicable in open outdoor environments, their effectiveness and support are weak in complex indoor operating scenarios such as power plants, factories, and data center server rooms. Their limitations are primarily: First, general map engines lack sufficient accuracy for indoor environments, failing to accurately depict building structures and room layouts, resulting in significant deviations in device location display and failing to meet precise positioning requirements; second, these map engines typically rely on third-party online services, leading to high deployment complexity and expensive licensing fees in intranet environments. Furthermore, their applicability and cost-effectiveness are further limited by network constraints in industrial intranet environments with high confidentiality requirements and strict network isolation.
[0004] Currently, no effective solution has been proposed for the technical problem of how to achieve accurate, intuitive, and efficient visual monitoring and interactive management of equipment in complex indoor environments. Summary of the Invention
[0005] This application provides a device location interaction method and system based on a floor plan, which at least solves the problem in related technologies of how to achieve accurate, intuitive, and efficient visual monitoring and interactive management of devices in complex indoor environments.
[0006] In a first aspect, embodiments of this application provide a device location interaction method based on a floor plan, comprising: acquiring an initial image, wherein the initial image contains location information of indoor devices;
[0007] The location information of the indoor equipment is converted to the image coordinate system of the initial image to obtain the initial pixel coordinates, and the initial pixel coordinates are added to the initial image to generate the target plan view; the target plan view is displayed on the display interface of the terminal device.
[0008] Monitor target operations on the target planar image; in response to the target operation, obtain the current scaling factor for the target planar image; determine an overlap threshold based on a preset initial threshold and the current scaling factor, and update the initial pixel coordinates to the current pixel coordinates based on the current scaling factor;
[0009] Traverse the indoor devices, aggregate the indoor devices based on the current pixel coordinates and the overlap threshold, determine the device aggregation point and the individual devices in the indoor devices, and obtain the aggregation point data of the device aggregation point and the independent data of the individual devices;
[0010] Based on the aggregated point data and the independent data, rendering is performed on the target planar map.
[0011] In some embodiments, the overlap threshold includes a horizontal overlap threshold and a vertical overlap threshold;
[0012] The process of traversing the indoor devices, aggregating the indoor devices based on the current pixel coordinates and the overlap threshold, determining the device aggregation point and individual devices within the indoor devices, and obtaining the aggregation point data of the device aggregation point and the independent data of the individual devices includes:
[0013] Select the current pixel coordinates of any one of the indoor devices as the aggregation point;
[0014] Traverse the indoor devices. If the distance between the current indoor device and any existing aggregation point is less than the horizontal overlap threshold in the horizontal direction and less than the vertical overlap threshold in the vertical direction, then add the current indoor device to the aggregation point; otherwise, use the current pixel coordinates of the current indoor device as a new aggregation point.
[0015] After the traversal is complete, check all aggregation points:
[0016] If the number of devices in the aggregation point is 1, then independent data containing the current pixel coordinates of a single device is generated; if the number of devices in the aggregation point is greater than 1, then aggregation point data containing the current pixel coordinates of the aggregation point and the number of devices is generated.
[0017] In some embodiments, the method further includes:
[0018] Based on the data of each aggregation point, obtain the current pixel coordinates of all devices in the aggregation point, and calculate the average coordinates of the current pixel coordinates of all devices; update the current pixel coordinates of the aggregation point in the aggregation point data to the average coordinates.
[0019] In some embodiments, updating the initial pixel coordinates to the current pixel coordinates according to the current scaling factor includes:
[0020] Establish a planar coordinate system with the upper left corner of the target planar diagram as the origin;
[0021] The current pixel coordinates are obtained by multiplying the initial pixel coordinates of each indoor device by the current scaling factor.
[0022] In some embodiments, rendering on the target planar map based on the aggregation point data and the independent data includes:
[0023] Configure a first slot for the individual device; receive the device icon of the individual device via the first slot;
[0024] Configure a second slot for the aggregation point; receive the device icon of the aggregation point via the second slot;
[0025] The current pixel coordinates of the individual device contained in the independent data and the current pixel coordinates of the aggregation point contained in the aggregation point data are respectively converted into absolute display coordinates in the display interface;
[0026] Based on the absolute display coordinates, the device icons of the individual devices and the device icons of the aggregation points are rendered on the target plan view.
[0027] In some embodiments, rendering the device icons of the individual devices and the aggregation point on the target plan view based on the absolute display coordinates includes:
[0028] Calculate the icon offset from the center of the device icon to its edge; the device icon includes the device icon of the individual device and the device icon of the aggregation point;
[0029] Based on the icon offset, the absolute display coordinates are offset compensated to generate offset compensated calibrated pixel coordinates. Based on the calibrated display coordinates, the device icons of the individual devices and the device icons of the aggregation points are rendered on the target planar map.
[0030] In some embodiments, rendering on the target planar map based on the aggregation point data and the independent data includes:
[0031] In response to the target operation, calculate the translation amount of the target plan view;
[0032] Rendering is performed on the target planar map based on the translation amount, the aggregation point data, and the independent data.
[0033] In some embodiments, the method further includes:
[0034] The system receives alarm information from the indoor devices in real time; in response to the alarm information, it performs a flashing or enlarging prompt animation on the icon of the indoor device that issued the alarm, and performs a zoom and pan operation on the target floor plan to position the indoor device that issued the alarm to the center of the display interface.
[0035] In response to clicking the icon of the indoor device that issued the alarm, an information window pops up, which contains a custom operation entry.
[0036] In some embodiments, the method further includes:
[0037] Monitor new device operations targeting the target plan;
[0038] In response to the device addition operation, determine the click coordinates of the added indoor device on the target floor plan, and obtain the location information of the added indoor device based on the click coordinates; and / or,
[0039] Monitor device update operations for the target plan;
[0040] In response to the device update operation, on the target floor plan, the update device is determined from among the multiple indoor devices, the updated current pixel coordinates of the update device are parsed, and the current pixel coordinates are converted into point information on the initial image and stored.
[0041] Secondly, embodiments of this application provide a device location interaction system based on a floor plan, including: a terminal device and a server device;
[0042] The server device is connected to the terminal device and is used to execute the device location interaction method based on the plan view as described in the first aspect.
[0043] Thirdly, embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the device point interaction method based on a planar map as described in the first aspect above.
[0044] Fourthly, embodiments of this application provide a storage medium storing a computer program that, when executed by a processor, implements the device point interaction method based on a planar diagram as described in the first aspect above.
[0045] Compared to related technologies, the device location interaction method and system based on a floor plan provided in this application abandons traditional outdoor map engines and directly establishes an independent coordinate system on a preset indoor floor plan, mapping device location information with initial pixel coordinates. Combined with a dynamic multi-level aggregation algorithm and refined rendering, it solves the problems of inaccurate device positioning, poor visualization, weak interactivity in complex indoor environments, and the complex and costly intranet deployment caused by traditional solutions relying on third-party services. This achieves high-precision, low-cost, and highly interactive device status monitoring and operation management, significantly improving operational efficiency and management level. Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects, and advantages of this application more readily apparent. Attached Figure Description
[0046] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0047] Figure 1 This is a hardware block diagram of a device point interaction method based on a plan view according to an embodiment of this application;
[0048] Figure 2 This is a flowchart of a device location interaction method based on a plan view according to an embodiment of this application;
[0049] Figure 3 This is a structural block diagram of a device location interaction method based on a plan view according to an embodiment of this application. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the efforts made in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0051] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0052] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0053] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. Taking running on a terminal as an example, Figure 1 This is a hardware structure block diagram of a terminal for a device point interaction method based on a planar diagram, according to an embodiment of this application. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are more... Figure 1The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0054] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the device point interaction method based on a planar map in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0055] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0056] This embodiment provides a device location interaction method based on a floor plan. Figure 2 This is a flowchart of a device location interaction method based on a floor plan according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0057] Step S201: Obtain an initial image, which contains the location information of the indoor equipment;
[0058] The location information of the indoor device is used to characterize its physical position. Optionally, the location information can be determined directly from the physical location to obtain its absolute physical coordinates; alternatively, it can be normalized relative coordinates calculated through mapping based on the correspondence between the physical location of the indoor device and the initial image. Examples of such coordinates include percentage coordinates, relative reference point coordinates (relative to a known fixed reference point in space, such as a corner or a specific device installation point), and polar coordinates (used in special layouts with shapes like rings or sectors). This location information serves as the device's reference position and remains fixed during subsequent coordinate system transformations or dragging and scaling, used to calculate the device's display coordinates under different scaling conditions.
[0059] Specifically, the system can directly obtain an initial image containing indoor device location information, or obtain the URL address of the initial image through an interface, download the initial image through the URL address, and monitor the image loading status. If loading fails, an error message will be displayed.
[0060] Step S202: Convert the location information of the indoor devices to the image coordinate system of the initial image to obtain the initial pixel coordinates, and add the initial pixel coordinates to the initial image to generate the target plan view; the target plan view is displayed on the display interface of the terminal device.
[0061] In this step, coordinate transformation is first achieved through the established transformation relationship between the physical space and the image coordinate system. This transformation relationship precisely defines the mapping relationship between physical points in the physical space and image pixels, ensuring an accurate correspondence between information in the physical space and the image coordinate system.
[0062] The transformation relationship can be determined in advance in a variety of ways, including but not limited to: (1) Determining it based on the surveying accuracy of the floor plan: The floor plan itself contains accurate information about the layout and size of the indoor space during the drawing process. Through reasonable analysis and processing of this information, the transformation relationship between physical space and image space can be derived; (2) Determining it based on camera calibration: Camera calibration can accurately obtain the mapping relationship between physical space and image space through accurate modeling and parameter calculation of the camera imaging process, thereby providing a reliable basis for coordinate transformation.
[0063] Once the conversion relationship is determined, the actual physical location or point information of the device can be accurately converted into image pixel coordinates, providing a unified and accurate coordinate basis for subsequent processing.
[0064] Specifically, taking the percentage coordinates of indoor devices as an example, the above steps are explained in detail as follows: An initial image containing the percentage coordinates of the indoor devices is obtained. An image coordinate system is established with the top left corner of the initial image as the origin. The percentage coordinates of each indoor device are multiplied by the width and height pixels of the initial image to obtain the initial pixel coordinates of each indoor device. The initial pixel coordinates of each device are added to the initial image to obtain the target floor plan. This target floor plan is then displayed on the terminal device's display interface. From the above process, it can also be concluded that during the initialization process, the initial floor plan and the target floor plan have the same attribute information (such as size and resolution). The difference lies in that the initial floor plan contains the point information of the indoor devices, while the target floor plan contains the initial pixel coordinates of the indoor devices.
[0065] Preferably, the implementation of this device point interaction method based on a floor plan using JavaScript in a web browser environment is selected as an example. In this example, the target floor plan can be scaled by an initial scaling factor and placed in an absolutely positioned container. The CSS (Cascading Style Sheets) property `transform:translate(-50%, -50%)` is used to center its display on the terminal device's screen. The initial scaling factor is determined through the following calculation process:
[0066] Calculate the initial width scaling factor = Display interface width / Target floor plan image width;
[0067] Calculate the initial height magnification = Display interface height / Target floor plan image height;
[0068] The initial scaling factor is the maximum of the initial width scaling factor and the initial height scaling factor mentioned above.
[0069] The specific implementation of this preferred embodiment is as follows:
[0070] First, in the web front-end interface, create a container and set it to absolute positioning (position: absolute;) using CSS styles. Then, align the container with the top-left corner of the browser viewport (i.e., the display interface of the terminal device) using (top: 0; left: 0;). The purpose of creating this container is to serve as the basis for subsequent rendering and interaction of the target floor plan. It provides a unified and independent control object for subsequent operations such as panning and scaling of the floor plan. All transformation operations on the target floor plan will be directly applied to this container, and all its child elements (i.e., the target floor plan and the device points to be rendered later) will transform as a whole, thus simplifying the logical complexity of interactive control.
[0071] Then, the target plan view is loaded inside the absolutely positioned container, and the initial scaling factor is applied.
[0072] Then, by setting (top: 50%; left: 50%;), the top left corner of the target planar image is moved to the center point of the container. Then, by using transform: translate(-50%, -50%);, the target planar image is translated by 50% of its width and height along the negative X-axis and Y-axis respectively, so that the center point of the target planar image is accurately moved to the center point of the container, thus achieving the centering display effect.
[0073] By placing the target floor plan in an absolutely positioned container and using the CSS `transform` property for centering and transformation, all subsequent drag-and-drop and scaling interactions can be handled centrally. Meanwhile, modern browsers generally optimize changes to the CSS `transform` property for GPU (Graphics Processing Unit) acceleration. This solution leverages this feature, manipulating the container's `transform` property to implement all interactive animations, ensuring a smooth visual experience. Absolute positioning protects the container from interference from the layout flow of other page elements, guaranteeing the stability of the interactive view. Furthermore, the centering method described above is independent of the specific dimensions of the floor plan, providing a superior user experience.
[0074] On the other hand, in this preferred embodiment, when acquiring the initial image, image loading failure monitoring can be added. For example, if loading the initial image via the URL fails, a preset error placeholder image is displayed. This further enhances the user experience.
[0075] Step S203: Monitor the target operation on the target plane; in response to the target operation, obtain the current scaling factor of the target plane; determine the overlap threshold according to the preset initial threshold and the current scaling factor, and update the initial pixel coordinates to the current pixel coordinates according to the current scaling factor.
[0076] The target operations for the target floor plan include scaling and translating the target floor plan; reflecting the scaling and translation of the target floor plan by monitoring mouse wheel events and mouse drag events; in response to the scaling / translation events of the target floor plan, obtaining the current scaling factor of the target floor plan after scaling / translation; obtaining a preset initial threshold, determining an overlap threshold based on the mapping relationship between the preset initial threshold and the current scaling factor, and updating the initial pixel coordinates of each indoor device to the current pixel coordinates based on the current scaling factor.
[0077] Specifically, the current zoom level is determined by monitoring mouse wheel events; then, the overlap threshold is determined based on the current zoom level and the obtained preset initial threshold, wherein the overlap threshold is adjusted according to the current zoom level; then, the initial pixel coordinates of each indoor device are multiplied by the current zoom level to obtain the current pixel coordinates of each indoor device.
[0078] In the above steps, the target floor plan was scaled once, and the scaling factor was obtained by monitoring the mouse wheel event. Based on the scaling factor, the current pixel coordinates of each indoor device in the scaled target floor plan were determined. At the same time, the overlap threshold was determined based on the current scaling factor and the preset initial threshold, which provides a basis for subsequent aggregation calculations based on the current pixel coordinates and the overlap threshold.
[0079] Furthermore, preferably, different aggregation levels can be set according to the scaling factor: when the scaling factor is less than 1 (when shrinking), a larger overlap threshold is used to achieve broader aggregation; when the scaling factor is greater than 1 (when zooming in), a smaller overlap threshold is used to make the aggregation more precise, or even to prevent aggregation altogether. Regarding the implementation of the overlap threshold, a mapping table between scaling factor and overlap threshold can be pre-set, and the mapping relationship can be retrieved based on the scaling factor to determine the matching overlap threshold; alternatively, it can be implemented using the formula: overlap threshold = preset initial threshold / current scaling factor.
[0080] Through the above preferred embodiments, dynamic aggregation under different scaling levels is realized, which solves the visual confusion caused by overlapping device icons in scenarios such as scaling or excessively dense device points, and effectively improves the user interaction experience.
[0081] Step S204: Traverse the indoor devices, aggregate the indoor devices based on the current pixel coordinates and the overlap threshold, determine the device aggregation point and the individual devices in the indoor devices, and obtain the aggregation point data of the device aggregation point and the independent data of the individual devices;
[0082] Specifically, based on the current pixel coordinates and overlap threshold of each indoor device obtained in step S203, all indoor devices are aggregated and traversed. During the aggregation process, based on the comparison results between the pixel distance and overlap threshold between devices, devices that meet the aggregation conditions are grouped into aggregation points, while devices that do not meet the conditions are treated as individual devices. After aggregation is completed, the aggregation points and the individual devices that did not participate in the aggregation are determined, and the aggregated data of the aggregation points and the independent data of the individual devices are obtained. Among them, the aggregation point data includes at least the current pixel coordinates of the aggregation point and the number of devices it contains, and the independent data includes the current pixel coordinates of the individual device.
[0083] Step S205: Based on the above aggregate point data and independent data, render the above target planar map.
[0084] Specifically, based on the coordinates of the aggregation points and the number of devices contained in the aggregation point data, as well as the coordinates of individual devices in the independent data, graphic elements are used to draw and display the corresponding positions on the target plan view to complete the visualization rendering.
[0085] Through steps S201 to S205, an independent image coordinate system is established by acquiring and utilizing an indoor floor plan (initial image) containing device location information as a foundation. The physical location of the devices is mapped to dynamic pixel coordinates within this coordinate system. This achieves a lightweight and efficient underlying method for indoor device visualization that does not rely on external map services. This solves the problems of insufficient accuracy of traditional outdoor map engines in complex indoor environments, inability to accurately display the physical location of devices, and the complexity, poor applicability, and poor economy of intranet deployment caused by reliance on third-party services. Simultaneously, by monitoring user interaction operations and responding dynamically, the zoom level and adaptive overlap threshold under the current view are calculated in real time, thereby dynamically updating and aggregating device coordinates. This solves the problems of easy overlap and visual confusion of device locations at fixed scales, as well as the lack of intuitive location and poor correlation of alarm devices. Finally, the rendering output is completed based on the aggregated and independent data, achieving adaptive aggregation and clear display of device locations at different zoom levels. This provides core methodological support for building an intuitive and efficient regional device monitoring and alarm management system, thereby improving device management level and personnel work efficiency.
[0086] In some embodiments, the aforementioned overlap threshold includes a horizontal overlap threshold and a vertical overlap threshold;
[0087] Traverse the indoor devices, aggregate the indoor devices based on the current pixel coordinates and overlap threshold, determine the device aggregation point and the individual devices in the indoor devices, and obtain the aggregation point data of the device aggregation point and the independent data of the individual devices, including:
[0088] Select the current pixel coordinates of any indoor device as the aggregation point;
[0089] Traverse the indoor devices. If the distance between the current indoor device and any existing aggregation point is less than the horizontal overlap threshold in the horizontal direction and less than the vertical overlap threshold in the vertical direction, then add the current indoor device to the aggregation point; otherwise, use the current pixel coordinates of the current indoor device as a new aggregation point.
[0090] After the traversal is complete, check all aggregation points:
[0091] If the number of devices in the aggregation point is 1, then independent data containing the current pixel coordinates of a single device is generated; if the number of devices in the aggregation point is greater than 1, then aggregation point data containing the current pixel coordinates of the aggregation point and the number of devices is generated.
[0092] Specifically, the overlap thresholds include a horizontal overlap threshold T_x and a vertical overlap threshold T_y. The indoor device list is traversed to obtain the current pixel coordinates of each indoor device. The current pixel coordinates of any indoor device are selected as the aggregation point. Then, the distances between the current pixel coordinates of the remaining devices and all existing aggregation points are determined one by one. If the horizontal distance is less than T_x and the vertical distance is less than T_y, the current indoor device is added to the corresponding aggregation point; otherwise, the current pixel coordinates of the current indoor device are used as a new aggregation point.
[0093] After the traversal is complete, check all aggregation points:
[0094] If the number of devices in an aggregation point is 1, it means that there is only one device in the aggregation point, which does not meet the above aggregation conditions and is still an independent single device. In this case, independent data containing the current pixel position of the single device is generated. If the number of devices in an aggregation point is greater than 1, it means that the devices in the aggregation point meet the aggregation conditions. In this case, aggregation point data containing the current pixel position of the aggregation point and the number of aggregation devices is generated. At this time, the current pixel coordinate of the aggregation point is the current pixel coordinate of one of the single devices.
[0095] The above traversal steps can also be implemented by initializing a collection or creating an empty index object. For example, the traversal steps using an empty index object are as follows:
[0096] First, create an empty index object; then, during the subsequent traversal of the device list and aggregation, the generated aggregation points will be continuously added to this index object.
[0097] Traverse the device list and obtain the current pixel coordinates of each indoor device. If the distance between the current device and any aggregation point in the index object is less than the horizontal overlap threshold T_x and less than the vertical overlap threshold T_y in the vertical direction, then add the current indoor device to the device array corresponding to the aggregation point. Otherwise, create a new aggregation point with the current device and add the new aggregation point to the index object.
[0098] After the traversal is complete, check all aggregation points:
[0099] If the number of devices in an aggregation point is 1, it means that there is only one device in the aggregation point, which does not meet the above aggregation conditions and is still a single device. In this case, independent data containing the current pixel position of the single device is generated. If the number of devices in an aggregation point is greater than 1, it means that the devices in the aggregation point meet the aggregation conditions. In this case, aggregation point data containing the current pixel position of the aggregation point and the number of aggregation devices is generated.
[0100] Furthermore, the values of T_x and T_y are dynamically adjusted based on the current scaling factor: when the scaling factor is less than 1 (when zooming out), a larger overlap threshold is used to achieve broader aggregation; when the scaling factor is greater than 1 (when zooming in), a smaller overlap threshold is used to make aggregation more precise or even prevent aggregation altogether. This mechanism enables dynamic multi-level aggregation, effectively solving the visual overlap problem in zoomed or device-intensive scenarios and improving the user experience.
[0101] In the above steps, by introducing a multi-dimensional overlap threshold judgment mechanism that is independent of horizontal and vertical directions, and adopting a novel processing method that combines traversal comparison with dynamic aggregation grouping, the problem of insufficient aggregation accuracy and poor adaptability in traditional point aggregation algorithms due to the use of a single circular radiation threshold under different screen ratios or device distributions is effectively solved. Compared with traditional aggregation schemes based on fixed radius or single distance thresholds, this scheme can more accurately and intelligently group the spatial positions of indoor devices according to actual layout characteristics, significantly reducing the probability of mis-aggregation and missed aggregation. Thus, while ensuring the accuracy and visual rationality of the aggregation results, it provides a more reliable and clear data foundation for subsequent differentiated rendering and interaction.
[0102] In some embodiments, the method further includes:
[0103] Based on the data of each aggregation point, obtain the current pixel coordinates of all devices in the aggregation point, and calculate the average coordinates of the current pixel coordinates of all devices in the aggregation point; update the current pixel coordinates of the aggregation point in the aggregation point data to the above average coordinates.
[0104] Specifically, in the above aggregation point, the current pixel coordinates of the aggregation point are the current pixel coordinates of a certain device in the aggregation point; through the above steps, the average coordinates of the current pixel positions of all devices in the aggregation point are calculated, and the average coordinates are used as the current pixel coordinates of the aggregation point.
[0105] In the above steps, by systematically calculating the average coordinates of the current positions of all devices within the aggregation point and dynamically updating the display position of the aggregation point based on this mathematical average, the problem of visual positioning deviation and spatial representation inaccuracy caused by directly using the first device position or random device position as the coordinates of the aggregation point in traditional point aggregation algorithms is effectively solved. Compared with the simple aggregation scheme that directly binds the aggregation point to a specific device position, this method achieves optimized calibration and precise positioning of the spatial position of the aggregation point, enabling it to more scientifically and realistically reflect the overall distribution center and spatial clustering characteristics of the device group. This significantly improves the accuracy of users' spatial position perception of densely populated areas of devices and the overall interactive experience after interactive operations such as zooming and panning.
[0106] In some embodiments, updating the initial pixel coordinates to the current pixel coordinates based on the current scaling factor includes:
[0107] Establish a planar coordinate system with the upper left corner of the target planar map as the origin;
[0108] Multiply the initial pixel coordinates of each indoor device by the current scaling factor to obtain the current pixel coordinates.
[0109] Specifically, an independent coordinate system for the plan view is established with the top left corner of the target plan view as the origin. The initial pixel coordinates of each indoor device are multiplied by the current zoom level to obtain the pixel coordinates of the device in the current zoom state, that is: current pixel coordinates = initial pixel coordinates × current zoom level.
[0110] In the above steps, by establishing an independent planar coordinate system and performing scaling factor multiplication on the device coordinates, the problems of coordinate drift, display misalignment, and inaccurate positioning of device points during scaling, which are caused by relying on absolute screen coordinates or third-party map coordinate systems in traditional solutions, are solved. Compared with existing technologies that rely on fixed pixel coordinates or complex coordinate transformation relationships, this method achieves precise synchronization and adaptive updating of device coordinates and planar scaling operations, ensuring the accuracy and consistency of device position display at different scaling levels, and providing a reliable coordinate foundation for subsequent aggregation calculations and rendering.
[0111] In some embodiments, rendering on the target planar map based on the aforementioned aggregate point data and independent data includes:
[0112] Configure a first slot for a single device; receive the device icon of the single device via the first slot;
[0113] Configure a second slot for the aggregation point; receive the device icon of the aggregation point via the second slot;
[0114] The current pixel coordinates of a single device contained in the independent data, and the current pixel coordinates of the aggregate point contained in the aggregate point data, are respectively converted into absolute display coordinates in the display interface;
[0115] Based on absolute display coordinates, the device icons of individual devices and the device icons of aggregate points are rendered on the target plan view.
[0116] Specifically, for the aggregation results, a first slot is configured for individual devices that do not meet the aggregation conditions to receive custom-styled device icons for display on the individual devices; a second slot is configured for aggregation points to receive device icons for display on the aggregation points; the current pixel coordinates of the individual devices and the current pixel coordinates of the aggregation points are converted into absolute display coordinates in the display interface; based on the absolute display coordinates, the device icons of the individual devices and the device icons of the aggregation points are rendered on the target planar map.
[0117] Continuing with the example of implementing the device location interaction method based on the floor plan using JavaScript in a web browser environment, the implementation process of this step will be described in detail.
[0118] First, two slots are predefined to receive custom icons.
[0119] The first slot is used to receive the device icon of a single device; this first slot is a reserved interface that allows developers to pass in different Vue components, HTML templates or plain icon URLs for different types of devices (such as cameras, sensors, alarms).
[0120] The second slot is used to receive the device icon of the aggregation point; this second slot is specifically designed to define how to display when multiple devices are aggregated together, such as displaying the number of aggregates or the highest priority device type.
[0121] The following is an example implementation under the Vue framework:
[0122] <planarmapview :device-list="deviceList" :map-image="mapImageUrl">;
[0123] <!-- The first slot: for a single device -->;
[0124] <template #device-slot="slotProps"> ;
[0125] <img :src="getDeviceIcon(slotProps.deviceType)" class="device-icon"> ;
[0126] < / template> ;
[0127] <!-- The second slot: for an aggregation point -->;
[0128] <template #aggregation-slot="slotProps"> ;
[0129] ;
[0130] {{ slotProps.deviceCount}} <!-- Show aggregated device count -->;
[0131] ;
[0132] < / template> ;
[0133] < / planarmapview> .
[0134] Internally, the component passes through <slot name="device-slot">and <slot name="aggregation-slot">To receive and render these incoming custom templates.
[0135] After defining the slots, coordinate transformation is performed. Since the planar container undergoes scaling and translation transformations, the device's current pixel coordinates in the planar coordinate system need to be converted to absolute display coordinates in the display interface. The conversion formula is:
[0136] The absolute display coordinates of the display interface = initial pixel coordinates × current zoom level + translation amount;
[0137] Or, based on the original percentage coordinates, it can be expressed as:
[0138] The absolute display coordinates of the display interface = percentage coordinates × initial image width and height in pixels × current zoom level + translation amount.
[0139] After obtaining the absolute display coordinates, the target floor plan is rendered using DOM (Document Object Model) elements through the following steps:
[0140] (1) For each individual device or aggregation point that needs to be rendered, dynamically create a DOM element (such as...). or );
[0141] (2) Assign the above absolute display coordinates to the left and top styles of the DOM element, and set its position to absolute or fixed, as follows:
[0142] const iconElement = document.createElement('div');
[0143] iconElement.className = 'device-icon';
[0144] iconElement.style.position = 'absolute';
[0145] iconElement.style.left = `${absoluteX}px`;
[0146] iconElement.style.top = `${absoluteY}px`;
[0147] iconElement.innerHTML = ...;
[0148] / / Insert custom content defined in the slot;
[0149] mapContainer.appendChild(iconElement);
[0150] (3) Bind interactive events (such as click, hover) to each DOM element:
[0151] iconElement.addEventListener('click', () => {showDeviceDetail(deviceData); / / Click to display device details});
[0152] In the above steps, by configuring a first slot and a second slot for each individual device and aggregation point respectively to receive highly customized device icons (including various forms such as Vue components, HTML templates, or icon URLs), and accurately converting the calculated pixel coordinates into absolute display coordinates in the display interface, a fine-grained point-by-point rendering method based on DOM elements is finally adopted. This effectively solves the problems of rigid device icon styles, complex interactive function development, and difficulty in achieving single-point-level visual and interactive customization that exist under the traditional unified Canvas drawing method. Compared with batch drawing solutions based on Canvas, this method not only achieves highly customizable device icon rendering and precise and convenient binding of interactive events, but also enables the system to flexibly adapt to the differentiated display needs under different business scenarios. At the same time, it significantly reduces the development and maintenance costs of complex interactive functions and improves code readability and scalability.
[0153] In some embodiments, rendering the device icons of individual devices and aggregated points on the target plan view based on absolute display coordinates includes:
[0154] Calculate the icon offset from the center of the device icon to the edge of the icon; the device icon includes device icons for individual devices and device icons for aggregated points;
[0155] Based on the aforementioned icon offset, offset compensation is performed on the aforementioned absolute display coordinates to generate offset-compensated calibrated pixel coordinates. Based on these calibrated display coordinates, the device icons of individual devices and the device icons of aggregate points are rendered on the target planar map.
[0156] Specifically, during the rendering process, the top-left corner of the device icon is aligned with its absolute display coordinates by default before rendering. However, a device icon is not a point; it has its own size, and its center is not located at the absolute display coordinates. This can lead to visual inaccuracies in the rendered result. By calculating the icon offset from its center to its edge and using this offset to compensate for the absolute display coordinates, calibrated display coordinates are generated. Rendering is then performed on these calibrated coordinates to ensure the device icon's center point is aligned with its absolute display coordinates, resulting in a more precise rendering position.
[0157] In the above steps, by calculating the offset from the center to the edge of the device icon and performing reverse compensation calibration on the absolute display coordinates, the visual deviation problem caused by the mismatch between the icon anchor point (usually the upper left corner) and the actual positioning point of the device (the center of the icon) is solved. Compared with the simple method of rendering by directly using the coordinate point aligned with the upper left corner of the icon in the traditional solution, the pixel-level accurate coincidence between the center of the device icon and the actual physical position of the device is achieved, which significantly improves the visual positioning accuracy of the point and the professionalism of the overall interface, and provides a reliable visual foundation for users to accurately identify the device, determine its position and perform interactive operations.
[0158] In some embodiments, rendering on the target planar map based on aggregate point data and independent data includes:
[0159] In response to the target operation, calculate the translation amount of the target plane map;
[0160] Rendering is performed on the target planar map based on translation, aggregation point data, and independent data.
[0161] Specifically, taking the implementation of the device location interaction method based on the planar map in a web browser environment using JavaScript as an example, the specific process of calculating the translation amount of the target planar map in this step is explained by the following scheme.
[0162] First, monitor the mouse wheel events (wheel) that the user interacts with on the target floor plan container. Adjust the current zoom level of the target floor plan based on the event's deltaY property value (i.e., scroll direction): increase the zoom level (zoom in) when deltaY is negative, and decrease the zoom level (zoom out) when deltaY is positive. During this process, the zoom step for each wheel event can be set to 0.02, while a reasonable range threshold for the zoom level can be set (e.g., minimum 0.02, maximum 5.0) to ensure that the zoom operation is limited to an effective range, preventing display anomalies or performance issues caused by infinite view scaling.
[0163] Simultaneously, mouse events are monitored to achieve translation monitoring of the target planar map: when the mouse is pressed down on the planar map container (mousedown), the initial position of the mouse (startX, startY) and the current translation amount of the planar map container (translateX, translateY) are recorded; when the mouse moves (mousemove), the displacement difference of the mouse is calculated in real time and the translation amount is updated accordingly; when the mouse is released (mouseup) or leaves the container area (mouseleave), the drag operation ends.
[0164] To enhance the interactive experience, at the end of the drag, the mouse movement velocity vector at the instant the drag ends is calculated. Based on this velocity vector, the initial distance and direction of the inertial sliding are calculated, and a gradually decaying animation is set (for example, using requestAnimationFrame to update the translation amount frame by frame) to simulate the effect of the plane continuing to slide due to inertia until the velocity decays to zero and the animation stops.
[0165] After each drag or zoom operation, the actual size of the floor plan container and its relative position in the visible area at the current zoom level are recalculated. By comparing these values, the range of translation values is dynamically limited to ensure that the floor plan is not dragged out of the visible area, thus providing a more stable and user-friendly experience.
[0166] Based on the calculated translation amount and the current scaling factor, the coordinates in the aggregate point data and the independent data are transformed to calculate the absolute display coordinates in the display interface, thereby completing the rendering on the target planar map.
[0167] The interaction mechanism described in this embodiment enables smooth, natural, and intuitive operation control of the target planar map, providing a real-time and accurate input data foundation for coordinate calculation and device rendering based on precise translation and dynamic scaling. This solution efficiently responds to mouse wheel and drag operations, calculates the planar map's translation offset and current scaling in real time, utilizes the CSS Transform property for GPU-accelerated rendering, and immediately updates the view state and reconstructs device coordinates after each interaction. This effectively solves the prominent problems of stiff interaction, noticeably delayed visual feedback, and easy separation of device positions from the base map found in traditional solutions. Ultimately, it achieves efficient synchronous linkage and frame-level data consistency between translation, scaling operations, and device rendering, ensuring the continuity, stability, and consistency of the user's visual experience throughout the entire interaction process, significantly improving interaction smoothness, system response speed, and the realism and immersion of the user experience.
[0168] In some embodiments, the method further includes:
[0169] The system receives alarm information from indoor devices in real time; in response to the alarm information, it performs a flashing or enlarging prompt animation on the icon of the indoor device that issued the alarm, and performs a zoom and pan operation on the target floor plan to position the indoor device that issued the alarm to the center of the display interface.
[0170] In response to clicking the icon of the indoor device that issued the alarm, an information window pops up, which contains a custom operation entry.
[0171] The specific implementation of this step will be further illustrated by using the implementation of the device location interaction method based on the plan view in a web browser environment using JavaScript.
[0172] Specifically, alarm information from each indoor device can be received in real time via WebSocket. In response to the alarm information, a visual cue animation is executed on the icon of the device issuing the alarm, and the target floor plan is automatically zoomed in and panned to center the alarm device on the display interface. When a user clicks the alarm device icon, an information window containing a customizable operation entry pops up. This customizable operation entry can connect to corresponding function entries, such as connecting to a monitoring system to display the image from the nearest camera of the alarm device for easy confirmation of the alarm situation; or displaying the specific performance parameters of the alarm device to help staff determine the problem; or connecting to a duty system to display the location of the nearest duty station and navigation routes, etc.
[0173] The above technical solution can be implemented in the following ways:
[0174] First, during application initialization, a WebSocket client is created on the front end and connected to the WebSocket service endpoint specified on the back end (e.g., ws: / / your-backend.com / alarm-feed). When the back end detects an alarm on any device, it pushes a formatted message (JSON format) to the front end through this connection. The message body contains information such as the unique identifier of the alarm device (e.g., deviceId), alarm type, alarm level, and timestamp.
[0175] Upon receiving the alarm message, the front-end searches for the corresponding device icon or the icon of the current aggregation point in the rendered DOM elements based on the deviceId. A blinking effect is achieved by adding keyframe animations (@keyframes blink) to the icon to periodically change its opacity or background color using CSS3 animation; simultaneously, a scaling effect is achieved by dynamically changing the icon's transform: scale() property value using CSS animation or transition.
[0176] Simultaneously, the absolute display coordinates of the alarm device are obtained, and a target scaling factor (e.g., 2.0) is set to magnify details. Based on the target scaling factor and absolute display coordinates, the translation distance is calculated to align the center of the alarm device icon with the center of the display interface, achieving automatic zooming and positioning. A smooth transition animation is added to the movement process using CSS transition or requestAnimationFrame, smoothly transitioning the transformation to the new value within hundreds of milliseconds.
[0177] When a user clicks the alert icon, the bound click event listener is triggered, dynamically creating an absolutely positioned [event]. Elements as information window container, according to the device ID and alarm data to generate HTML content. Information window contains custom operation entry, for example:
[0178] <button> View live video< / button> ;
[0179] <button> Confirm alarm< / button> ;
[0180] <button> Dispatch work orders< / button> ;
[0181] The display position of the information window is calculated (usually near the icon) and added to the DOM tree, and the event handling function is bound for the interactive elements in the information window, and the corresponding business interface is called (such as confirming the alarm through Ajax, jumping to the video playback page, etc.).
[0182] In the above steps, by establishing a real-time alarm push channel and triggering dynamic visual prompts and automatic view navigation, while integrating the information window for in-situ operation, the problems of alarm discovery lag, fault positioning difficulty and low efficiency caused by multi-page jump in the disposal process in traditional monitoring systems are solved. Compared with the traditional alarm processing scheme which relies on static list display, manual search positioning and long operation path, the integrated closed-loop management from alarm perception, positioning, analysis to disposal is realized, which significantly improves the emergency response speed and operation efficiency and reduces the risk caused by response delay or positioning error.
[0183] In some embodiments, the method further includes:
[0184] Monitoring device addition operation for the target floor plan;
[0185] In response to the device addition operation, determining the click coordinates of the added indoor device on the target floor plan, and obtaining the point information of the added indoor device based on the click coordinates and storing the point information; and / or,
[0186] Monitoring device update operation for the target floor plan;
[0187] In response to the device update operation, determining the update device from the plurality of indoor devices on the target floor plan, parsing the current pixel coordinates of the update device after the update, converting the current pixel coordinates to point information on the initial image and storing the point information.
[0188] Specifically, the present scheme supports dynamic management of device points through graphical interaction. For the needs of added indoor devices, users can directly perform click operations at target positions on the target floor plan, and the system monitors the click event and generates click coordinates; the click coordinates are current pixel coordinates, which are converted by the system into standardized point information (such as percentage coordinates) on the initial image and stored.
[0189] For example, when a user needs to add a camera next to a host device, the user can click on the target floor plan at the corresponding position. The system automatically analyzes the current pixel coordinates of the clicked position, converts the coordinates into point information on the initial image and stores the information. Meanwhile, the system can issue an installation task through the connected work order system and attach the point information. The staff can install the device at the specific location according to the point information. The device icon color on the target floor plan can be set to represent the installation status: green for normal operation and red for abnormal operation, so that the user can intuitively understand the task completion status.
[0190] In addition, for the device position update requirement, the user can directly update the position by dragging the device icon. The system monitors the dragging operation, determines the moved device, analyzes the updated current pixel coordinates of the device, and converts the coordinates into point information on the initial image for storage. Meanwhile, the system can issue an update task through the connected work order system and attach the device information and point information. The staff can complete the corresponding position update for the corresponding device according to the device information and point information.
[0191] In the above steps, by monitoring the click and drag events of the user on the target floor plan in real time, and automatically completing the accurate conversion from the interface coordinates to the space coordinates and the persistent storage of the data, the problems of non-intuitive positioning, complicated operation process and human error caused by manual input of numerical coordinates in traditional device position management are effectively solved. Compared with the device configuration method based on forms and text input, the present scheme realizes the truly WYSIWYG graphical device deployment and position update, significantly improves the intuitiveness, operation efficiency and data accuracy of device management, and reduces the operation threshold and training cost of the user.
[0192] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that described here.
[0193] The embodiment also provides a floor plan-based device point position interaction system. The device is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the terms "module", "unit", "sub-unit" and the like can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and contemplated.
[0194] Figure 3 is a structural block diagram of a floor plan-based device point position interaction system according to an embodiment of the present application, like Figure 3 As shown, the system comprises: a terminal device 310 and a server device 320; the server device 320 is connected to the terminal device 310, and is configured to execute any one of the above-mentioned device point interaction methods based on a plan view.
[0195] It should be noted that each of the above modules can be a functional module or a program module, and can be implemented by software or hardware. For the modules implemented by hardware, each of the above modules can be located in the same processor; or each of the above modules can also be located in different processors in any combination. In this embodiment, specific examples can be referred to the examples described in the above embodiments and optional implementation manners, which will not be described herein.
[0196] The embodiment also provides an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any one of the above method embodiments.
[0197] Optionally, the electronic device can further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0198] Optionally, in this embodiment, the processor can be configured to execute the following steps through the computer program:
[0199] S1, obtaining an initial image containing point position information of an indoor device;
[0200] S2, converting the point position information of the indoor device to an image coordinate system in which the initial image is located, obtaining initial pixel coordinates, and adding the initial pixel coordinates to the initial image to generate a target plan view; the target plan view is displayed in a display interface of a terminal device;
[0201] S3, monitoring a target operation on the target plan view; in response to the target operation, obtaining a current zoom ratio of the target plan view; determining an overlap threshold according to a preset initial threshold and the current zoom ratio, and updating the initial pixel coordinates to current pixel coordinates according to the current zoom ratio;
[0202] S4, traversing the indoor device, aggregating the indoor device based on the current pixel coordinates and the overlap threshold, determining a device aggregation point and a single device in the indoor device, and obtaining aggregation point data of the device aggregation point and independent data of the single device;
[0203] S5, rendering on the target plan view based on the aggregation point data and the independent data.
[0204] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and this embodiment will not be described here again.
[0205] In addition, in combination with the device point position interaction method based on the floor plan in the above embodiments, an application embodiment can provide a storage medium for implementation. The storage medium has a computer program stored thereon; the computer program is executed by a processor to implement any one of the device point position interaction methods based on the floor plan in the above embodiments.
[0206] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0207] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0208] Those skilled in the art should understand that any combination of the technical features of the above-mentioned embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above-mentioned embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0209] The above-mentioned embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the scope of protection of the present application. Therefore, the scope of protection of the patent of the present application should be subject to the appended claims. < / slot> < / slot>
Claims
1. A device location interaction method based on a plan view, characterized in that, include: Acquire an initial image, which contains location information of indoor devices; The location information of the indoor equipment is converted to the image coordinate system of the initial image to obtain the initial pixel coordinates, and the initial pixel coordinates are added to the initial image to generate the target plan view; the target plan view is displayed on the display interface of the terminal device. Monitor target operations on the target plan view; in response to the target operation, obtain the current zoom level for the target plan view; The overlap threshold is determined based on the preset initial threshold and the current scaling factor, and the initial pixel coordinates are updated to the current pixel coordinates based on the current scaling factor. Traverse the indoor devices, aggregate the indoor devices based on the current pixel coordinates and the overlap threshold, determine the device aggregation point and the individual devices in the indoor devices, and obtain the aggregation point data of the device aggregation point and the independent data of the individual devices; Based on the aggregation point data and the independent data, rendering is performed on the target plan view, including: configuring a first slot for the individual device; and receiving the device icon of the individual device via the first slot. Configure a second slot for the aggregation point; receive the device icon of the aggregation point via the second slot; The current pixel coordinates of the individual device contained in the independent data and the current pixel coordinates of the aggregation point contained in the aggregation point data are respectively converted into absolute display coordinates in the display interface; Based on the absolute display coordinates, the device icons of the individual devices and the device icons of the aggregation points are rendered on the target plan view.
2. The device location interaction method based on a planar diagram according to claim 1, characterized in that, The overlap threshold includes a horizontal overlap threshold and a vertical overlap threshold; The process of traversing the indoor devices, aggregating the indoor devices based on the current pixel coordinates and the overlap threshold, determining the device aggregation point and individual devices within the indoor devices, and obtaining the aggregation point data of the device aggregation point and the independent data of the individual devices includes: Select the current pixel coordinates of any one of the indoor devices as the aggregation point; Traverse the indoor devices. If the distance between the current indoor device and any existing aggregation point is less than the horizontal overlap threshold in the horizontal direction and less than the vertical overlap threshold in the vertical direction, then add the current indoor device to the aggregation point; otherwise, use the current pixel coordinates of the current indoor device as a new aggregation point. After the traversal is complete, check all aggregation points: If the number of devices in the aggregation point is 1, then independent data containing the current pixel coordinates of a single device is generated; if the number of devices in the aggregation point is greater than 1, then aggregation point data containing the current pixel coordinates of the aggregation point and the number of devices is generated.
3. The device location interaction method based on a plan view according to claim 2, characterized in that, The method further includes: Based on the data of each aggregation point, obtain the current pixel coordinates of all devices in the aggregation point, and calculate the average coordinates of the current pixel coordinates of all devices; update the current pixel coordinates of the aggregation point in the aggregation point data to the average coordinates.
4. The device location interaction method based on a plan view according to claim 1, characterized in that, The step of updating the initial pixel coordinates to the current pixel coordinates according to the current scaling factor includes: Establish a planar coordinate system with the upper left corner of the target planar diagram as the origin; The current pixel coordinates are obtained by multiplying the initial pixel coordinates of each indoor device by the current scaling factor.
5. The device location interaction method based on a plan view according to claim 1, characterized in that, Rendering the device icons of the individual devices and the aggregation point on the target plan view based on the absolute display coordinates includes: Calculate the icon offset from the center of the device icon to its edge; the device icon includes the device icon of the individual device and the device icon of the aggregation point; The absolute display coordinates are offset compensated based on the icon offset to generate offset compensated calibrated pixel coordinates. Based on the calibrated pixel coordinates, the device icons of the individual devices and the device icons of the aggregation points are rendered on the target planar map.
6. The device location interaction method based on a plan view according to claim 1, characterized in that, The rendering of the target planar map based on the aggregation point data and the independent data includes: In response to the target operation, calculate the translation amount of the target plan view; Rendering is performed on the target planar map based on the translation amount, the aggregation point data, and the independent data.
7. The device location interaction method based on a planar map according to any one of claims 1 to 6, characterized in that, The method further includes: The system receives alarm information from the indoor devices in real time; in response to the alarm information, it performs a flashing or enlarging prompt animation on the icon of the indoor device that issued the alarm, and performs a zoom and pan operation on the target floor plan to position the indoor device that issued the alarm to the center of the display interface. In response to clicking the icon of the indoor device that issued the alarm, an information window pops up, which contains a custom operation entry.
8. The device location interaction method based on a plan view according to claim 1, characterized in that, The method further includes: Monitor new device operations targeting the target plan; In response to the device addition operation, the click coordinates of the new indoor device on the target floor plan are determined, and the location information of the new indoor device in the initial image is obtained and stored based on the click coordinates; and / or, Monitor device update operations for the target plan; In response to the device update operation, on the target floor plan, the update device is determined from among the multiple indoor devices, the updated current pixel coordinates of the update device are parsed, and the current pixel coordinates are converted into point information on the initial image and stored.
9. A device location interaction system based on a plan view, characterized in that, include: Terminal equipment and server equipment; The server device is connected to the terminal device and is used to execute the device location interaction method based on a planar map as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Real time map rendering with data clustering and expansion and overlay
CN102612678A
Method and device for managing sensing devices
CN111444295A