Map drawing and device management and control method, map drawing system, electronic device and storage medium
By generating a device permission map, only the areas and devices that users have permission to control are displayed, which solves the complex problem of smart park equipment management and improves the control efficiency and security of equipment in the park.
Patent Information
- Application Number
- CN202410139264.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2025-08-01
AI Technical Summary
With the increase in the area of smart parks and the increase in the number of equipment, it is difficult for the existing technology to effectively manage equipment in the park, resulting in complex and chaotic maps, affecting operational efficiency and safety.
By obtaining user permissions, drawing a device permission map, only displaying areas and devices that users have permissions to control, using geographic electronic maps to add area and device information corresponding to user permissions, and generating device permission maps. The user can only view and control areas and devices within their permissions.
It improves the efficiency of equipment management and control in smart parks, avoids interference from areas and equipment outside user rights, and realizes precise management and security of equipment.
Smart Images

Figure CN120407693A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart parks, and particularly to a method for map drawing and device control, a map drawing system, an electronic device, and a storage medium. Background Art
[0002] In the related art, the visualization management of a smart park is realized by uniformly marking safety devices and fire-fighting devices on the smart park map. As the area of the smart park increases, the types and quantities of devices to be marked on the smart park map gradually increase. Using the method of the related art to mark the devices in the smart park will cause the smart park map to be very complex and chaotic, making it difficult for park managers to effectively manage the devices in the smart park and affecting the operation efficiency and safety of the smart park. Therefore, when the area of the smart park is large and there are many devices in the smart park, it is very important to efficiently control the devices in the smart park. Summary of the Invention
[0003] The purpose of the embodiments of the present invention is to provide a method for map drawing and device control, a map drawing system, an electronic device, and a storage medium to improve the control efficiency of devices in a smart park. The specific technical solutions are as follows:
[0004] In the first aspect of the embodiments of the present invention, a map drawing method is provided, which is applied to a server, and the method includes:
[0005] Obtain a map acquisition request for a first park from a user terminal; the map acquisition request includes the user identity identifier of the user terminal;
[0006] Determine the user permissions of the user terminal according to the user identity identifier;
[0007] Draw a geographical electronic map of the first park, and add an area corresponding to the user permissions and device information of devices of corresponding types in the geographical electronic map to obtain a device permission map of the user terminal;
[0008] Return the device permission map to the user terminal so that the user terminal can control each device in the device permission map.
[0009] Optionally, the user permissions include spatial permissions and business use permissions; the step of adding an area corresponding to the user permissions and device information of devices of corresponding types in the geographical electronic map to obtain a device permission map of the user terminal includes:
[0010] Determine a target area corresponding to the spatial permissions of the user permissions;
[0011] Determine the target device type corresponding to the business use permission of the user permission;
[0012] Determine each target device in the target area whose device type is the target device type;
[0013] Obtain the target device information of each target device, where the target device information includes the operating status of the corresponding device;
[0014] For each target area, select the operating status with the highest priority among the operating statuses of the target devices in this target area as the area device status of this target area;
[0015] Add the area device status in the target area of the geographical electronic map to obtain the device permission map of the user terminal.
[0016] Optionally, the operating status of each target device includes one of failure, alarm, offline, and normal;
[0017] The priorities of the operating statuses from high to low are: failure, alarm, offline, and normal.
[0018] Optionally, the adding the area device status in the target area of the geographical electronic map to obtain the device permission map of the user terminal includes:
[0019] For each target area, obtain the contour points of this target area;
[0020] Based on the contour points of the target area, calculate the center point of the target area; mark the area device status of the target area at the center point of the target area.
[0021] Optionally, after the selecting the operating status with the highest priority among the operating statuses of the target devices in each target area as the area device status of this target area, the method further includes:
[0022] Bind a first event to each target area;
[0023] In response to the user terminal triggering the first event of the first target area, send the number of target devices in the first target area whose operating status is the area device status to the user terminal, so that the user terminal displays the number.
[0024] Optionally, before the binding a first event to each target area, the method further includes:
[0025] According to the area of each of the target regions, determine the trigger priority of the first event for each of the target regions respectively, where, for any first event, the trigger priority of the first event is negatively correlated with the area of the target region bound to the first event;
[0026] In response to the client triggering multiple first events simultaneously, send the number of target devices in the first target region indicated by the first event with the highest priority, where the operating state of the target devices is the area device state of the target region, to the client.
[0027] Optionally, after determining each target device whose device type in the target region is the target device type, the method further includes:
[0028] Bind a second event to each of the target devices;
[0029] In response to the client triggering the second event of the first target device, query the detailed information of the first target device according to the unique identifier of the first target device, and send the detailed information of the first target device to the client, so that the client displays the detailed information of the first target device.
[0030] Optionally, after determining the target region corresponding to the spatial permission of the user permission, the method further includes:
[0031] Determine the level to which each of the target regions belongs;
[0032] For each target region, according to the level to which the target region belongs, construct the mapping relationship of the parent target region and / or the sub-target region of the target region; where, the parent target region of the target region is the region at the upper level of the target region; the sub-target region of the target region is the region at the lower level of the target region;
[0033] Bind a third event and / or a fourth event to each of the target regions;
[0034] In response to the client triggering the third event of the second target region, query each sub-target region of the second target region according to the region identifier of the second target region, and use each of the sub-target regions to obtain and send the sub-target region map of the second target region to the client, so that the client displays the sub-target region map;
[0035] In response to the client triggering the fourth event of the third target region, query the parent target region of the third target region according to the region identifier of the third target region, and use each target region included in the level to which the parent target region belongs to obtain and send the parent target region map of the third target region to the client, so that the client displays the parent target region map.
[0036] Optionally, after determining the target area corresponding to the spatial permission of the user permission, the method further includes:
[0037] Binding a fifth event to each target area; wherein, when the scale of the fourth target area displayed on the client belongs to a preset magnification interval, the client triggers the fifth event of the fourth target area;
[0038] In response to the client triggering the fifth event of the fourth target area, clustering the target devices in the fourth target area based on the distances between the target devices in the fourth target area to obtain a plurality of clustering clusters;
[0039] Sending the clustering clusters in the fourth target area and the number of target devices in each clustering cluster to the client, so that the client displays the clustering clusters and the number of target devices in the clustering clusters in the fourth target area.
[0040] In a second aspect of the embodiments of the present invention, a device management and control method is provided, which is applied to a client, and the method includes:
[0041] Sending a map acquisition request for a first park to the server; wherein, the map acquisition request includes the user identity identifier of the client;
[0042] Obtaining the device permission map returned by the server; wherein, the device permission map is generated based on the area corresponding to the user permission and the device information of the corresponding type of device, and the user permission is determined based on the user identity identifier;
[0043] Displaying the device permission map, so that the user can manage and control the devices in the device permission map by using the device permission map displayed on the client.
[0044] Optionally, after displaying the device permission map, the method further includes:
[0045] In response to triggering a first event of a first target area, sending the area identifier of the first target area to the server, so that the server obtains according to the area identifier of the first target area and sends the number of target devices with the area device status as the running status in the first target area to the client;
[0046] Displaying the quantity.
[0047] Optionally, the sending the area identifier of the first target area to the server in response to triggering the first event of the first target area includes:
[0048] In response to multiple first events being triggered simultaneously, send the area identifiers of the target areas indicated by the multiple first events to the server, so that the server can obtain, according to the triggering priorities of the first events of each target area, and send to the client the number of target devices whose operating status is the area device status of the target area indicated by the first event with the highest priority; wherein, the triggering priority of the first event is negatively correlated with the area of the target area bound to the first event.
[0049] Optionally, after presenting the device permission map, the method further includes:
[0050] In response to a second event being triggered for a first target device, send the unique identifier of the first target device to the server, so that the server can obtain according to the unique identifier of the first target device and send to the client the detailed information of the first target device;
[0051] Present the detailed information of the first target device.
[0052] Optionally, after presenting the device permission map, the method further includes:
[0053] In response to a third event being triggered for a second target area, send the area identifier of the second target area to the server, so that the server can query each sub-target area of the second target area according to the area identifier of the second target area, and use each sub-target area to obtain and send to the client a sub-target area map of the second target area; wherein, the sub-target area of the second target area is an area at the next lower level of the second target area;
[0054] Present the sub-target area map of the second target area;
[0055] and / or,
[0056] In response to a fourth event being triggered for a third target area, send the area identifier of the third target area to the server, so that the server can query the parent target area of the third target area according to the area identifier of the third target area, and use each target area included in the level to which the parent target area belongs to obtain and send to the client a parent target area map of the third target area; wherein, the parent target area of the third target area is an area at the next higher level of the third target area;
[0057] Present the parent target area map of the third target area.
[0058] Optionally, after presenting the device permission map, the method further includes:
[0059] In response to triggering a fifth event in a fourth target area, a clustering cluster and the number of target devices in the clustering cluster are displayed in the fourth target area; wherein, the clustering cluster and the number of target devices in the clustering cluster are obtained by the server based on the distances between the target devices in the fourth target area, clustering the target devices in the fourth target area, and sending them to the client.
[0060] In a third aspect of the embodiments of the present invention, a map drawing system is provided. The system includes:
[0061] A client, configured to send a map acquisition request for a first park to the server; the map acquisition request includes the user identity identifier of the client; obtain and display the device permission map returned by the server, so that the user can use the device permission map to manage each device in the device permission map;
[0062] The server is configured to obtain the map acquisition request, determine the user permission of the client according to the user identity identifier; draw the geographical electronic map of the first park, and add the area corresponding to the user permission and the device information of the corresponding type of device in the geographical electronic map to obtain the device permission map of the client; return the device permission map to the client.
[0063] In a fourth aspect of the embodiments of the present invention, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus;
[0064] The memory is used to store a computer program;
[0065] The processor is configured to, when executing the program stored on the memory, implement the steps of any of the methods described in the first aspect or the second aspect above.
[0066] In a fifth aspect of the embodiments of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any of the methods described in the first aspect or the second aspect above.
[0067] The embodiments of the present invention also provide a computer program product containing instructions. When it runs on a computer, it causes the computer to execute any of the methods described in the first aspect or the second aspect above.
[0068] Advantages of the embodiments of the present invention:
[0069] The map drawing method provided by the embodiments of the present invention can generate a device permission map that only includes regions and devices corresponding to the user permissions of the client that initiates the map acquisition request. Furthermore, the client can focus on managing the regions and devices within its user permissions through the device permission map, avoiding interference from regions and devices outside the user permissions, thereby improving the management efficiency of devices in the smart park.
[0070] The device management method provided by the embodiments of the present invention enables the client to obtain and display a device permission map corresponding to the user permissions, allowing the user to focus on managing the regions and devices within its user permissions through the device permission map, avoiding interference from regions and devices outside the user permissions, thereby improving the management efficiency of devices in the smart park.
[0071] Of course, it is not necessary for any product or method implementing the present invention to achieve all the above-mentioned advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other embodiments based on these drawings.
[0073] Figure 1 It is a flowchart of a map drawing method provided by an embodiment of the present invention;
[0074] Figure 2a It is an example diagram of a permission configuration page provided by an embodiment of the present invention;
[0075] Figure 2b It is another example diagram of a permission configuration page provided by an embodiment of the present invention;
[0076] Figure 3 It is another flowchart of a map drawing method provided by an embodiment of the present invention;
[0077] Figure 4a It is an example diagram of the client displaying the device status in the dot-marked area provided by an embodiment of the present invention;
[0078] Figure 4b It is an example diagram of the client triggering the first event provided by an embodiment of the present invention;
[0079] Figure 4c It is an example diagram of the client displaying the device search bar provided by an embodiment of the present invention;
[0080] Figure 5a It is an example diagram of the client triggering the second event provided by an embodiment of the present invention;
[0081] Figure 5b It is an example diagram for the client to trigger the fifth event provided by the embodiment of the present invention;
[0082] Figure 6 It is a flowchart of the device control method provided by the embodiment of the present invention;
[0083] Figure 7 It is a schematic structural diagram of the map drawing system provided by the embodiment of the present invention;
[0084] Figure 8 It is a schematic structural diagram of the electronic device provided by the embodiment of the present invention. Detailed implementation manners
[0085] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art based on this application belong to the scope of protection of the present invention.
[0086] A smart park generally refers to a standard building or building group with complete and reasonable layout of water supply, power supply, gas supply, communication, roads, storage and other supporting facilities, and can meet the needs of engaging in the production and scientific experiments of a certain specific industry. For example, it can include industrial parks, industrial estates, logistics parks, etc. At present, a smart park can obtain device data based on the Internet of Things. However, for a large number of devices in the park, how to perform efficient visual management is still a problem to be solved.
[0087] In the related art, the visual management of the park is realized by uniformly marking the safety and fire-fighting equipment on the park map. However, as the area of the park increases, the types and quantities of devices to be marked on the park map gradually increase. When using the method of the related art to mark the devices in the park, the park map will be very complex and chaotic. For example, device identifiers overlap and pile up, etc., which will make it difficult for park managers to effectively manage the devices in the park and affect the operation efficiency and safety of the park.
[0088] To solve at least one of the above problems and perform efficient control of park devices, as Figure 1 shown, the embodiment of the present invention provides a map drawing method applied to a server, and the method may include:
[0089] S101, obtaining a map acquisition request of the client for the first park;
[0090] Wherein, the map acquisition request includes the user identity identifier of the client.
[0091] S102: Determine the user rights of the user terminal according to the user identity identifier.
[0092] S103: Draw a geographical electronic map of the first park, and add areas corresponding to the user's authority and device information of corresponding types of devices to the geographical electronic map to obtain a device authority map of the user terminal.
[0093] S104, returning the device permission map to the user terminal;
[0094] This allows the user to control each device in the device permission map.
[0095] The map drawing method provided by the embodiment of the present invention can generate a device permission map that only includes areas and devices corresponding to the user permissions based on the user permissions of the user terminal that initiates the map acquisition request. Then, the user terminal can focus on managing and controlling the areas and devices within its user permissions through the device permission map, avoiding interference from areas and devices outside the user permissions, thereby improving the efficiency of managing and controlling equipment in the smart park.
[0096] Reference Figure 1 , the embodiment of the present invention describes in detail the map drawing method applied to the server.
[0097] In S101, the first campus can be any smart campus. When a user terminal, or a user using the user terminal, desires to control the first campus, the user terminal can send a map acquisition request for the first campus to the server terminal to obtain a map of the first campus from the server terminal. At the same time, to determine the user rights of the user terminal and enable different users to control only the areas and devices within their rights, the map acquisition request can carry a user identity identifier that uniquely identifies the user terminal, allowing the server terminal to obtain the user rights of the user terminal through S102.
[0098] In the embodiment of the present invention, the user identity identifier of the user terminal may include but is not limited to the unique number of the user terminal device, the user account and user name of the user terminal login, etc. The specific form of the user identity identifier is not limited in the embodiment of the present invention.
[0099] User rights can be pre-configured by a rights administrator based on actual circumstances. The server can store a correspondence between user identity identifiers and user rights. The embodiment of the present invention describes the process of pre-configuring user rights.
[0100] The server can display a permission configuration page to the permission administrator. The permission configuration page may include a user identity selection bar, a permission selection bar, etc. Among them, the user identity selection bar may include multiple user identities, and the users indicated by the user identities can be one or more. The permission selection bar may include multiple permission options and may also include a permission option selection control.
[0101] The permission option selection control is used to control the selection mode of the permission options. For example, referring to Figure 2a and Figure 2b the example diagram of the permission configuration page provided, the permission option selection control may include multiple controls such as a select all mode control, a deselect all mode control, and a custom mode control. Among them, when the select all mode control is triggered, all the permission options in the current permission selection bar are selected, that is, the user permissions corresponding to all the permission options are configured for the current user identity. When the deselect all mode control is triggered, all the permission options in the current permission selection bar are not selected, that is, the current user identity does not have any user permissions. When the custom mode control is triggered, the permission administrator can arbitrarily select the permission options in the current permission selection bar, that is, the user permissions corresponding to the selected permission options are configured for the current user identity. The embodiments of the present invention do not limit the style, position, and type of the permission option selection control.
[0102] The permission administrator can add or remove the user permissions indicated by a certain permission option for the current user identity by selecting or deselecting the permission option. The permission selection bar may also include a save control. After the permission administrator completes the permission configuration, the save control can be triggered. In response to the trigger of the save control, the server obtains the correspondence between the user identity of the user identity in the current permission configuration page and the user permissions indicated by the selected permission options. And stores this correspondence, for example, stores it in a database, thereby establishing the connection between the user identity and the user permissions.
[0103] Referring to Figure 2a and Figure 2b, after the permission administrator selects the user identity "Delivery Team" in the user identity selection bar, that is, the organization list, the server displays the permission selection bar for "Delivery Team", where the permission selection bar may include a space permission selection bar for configuring space permissions and a business use permission selection bar for configuring device types. The permission administrator configures user permissions for "Delivery Team" by selecting permission options in the permission selection bar. For example, select all space permission options in the "First Quadrant" and "Third Quadrant" under the space permissions of "Delivery Team"; select all business use permission options of "Root Node" under the business use permissions of "Delivery Team". After the permission administrator completes the configuration of the user permissions for "Delivery Team", the "Save" button located in the lower right corner of the permission selection bar can be triggered to enable the server to save the corresponding relationship between "Delivery Team" and the user permissions configured by the permission administrator.
[0104] Large-scale parks often need to divide the overall park according to the actual situation according to the spatial structure to construct a spatial structure tree. In the embodiments of the present invention, "quadrants" can be customized, where one quadrant can include one or more target areas, so that multiple target areas under user permissions can be divided into different quadrants to achieve segmented management. For example, the root node of the spatial structure tree can be the entire park, and the child nodes can be areas, such as the First Quadrant Area, the Second Quadrant Area, etc.
[0105] In the embodiments of the present invention, each permission option in the permission selection bar can be displayed according to a hierarchical relationship, and by default, when a permission option at one level is selected, all permission options at the next level of that level are selected, and so on until there are no more available permission options at the next level.
[0106] Refer to Figure 2a , when the "First Quadrant" is selected, all permission options at the next level of the "First Quadrant", namely "Grand Theatre", "Small Theatre", "Underground", and "Outdoor", are selected. After the "Grand Theatre" is selected, all permission options at the next level of the "Grand Theatre", namely "Floor 1"..."Floor 7", and "Roof Floor", are selected. The same applies to the "Small Theatre", "Underground", and "Outdoor", which will not be elaborated here.
[0107] In an implementable manner, the permission configuration page may further include a search bar for searching user identities, a details bar for displaying details of user identity identifiers, etc. Refer to Figure 2a and Figure 2b, the user identity selection bar is the organization list, the user identity search bar is the search organization name bar, and the details bar is the organization details. In this way, when there are many user identities, the user identity to be configured with user permissions can be quickly located through the search bar, improving the configuration efficiency; displaying the details of the user identity helps the permission administrator confirm whether the selected user identity is accurate. The embodiments of the present invention do not limit the composition of the permission configuration page.
[0108] In S102, the corresponding relationship between the pre-stored user identity and user permissions can be utilized, and according to the user identity included in the map acquisition request, the corresponding user permissions can be determined.
[0109] In S103, the geographic electronic map can be obtained by the server through the open interfaces (APIs) provided by various existing electronic map software. Moreover, the electronic map software can also provide map drawing services to the outside world through the open interfaces, such as drawing polygons in the map interface. The server can utilize this map drawing service to draw the device permission map.
[0110] The geographic electronic map is an electronic map that only includes simple road information. It can be understood as an editable canvas, and an electronic map indicating the actual scene can be constructed by adding various buildings, devices, etc. to the geographic electronic map.
[0111] In the embodiments of the present invention, based on the user permissions obtained in S102, the areas and device types that the user terminal initiating the map acquisition request has permission to control can be determined. Therefore, the various buildings and devices to be added to the geographic electronic map can include the areas corresponding to the user permissions, as well as the device information of the corresponding type of devices.
[0112] By adding the areas corresponding to the user permissions and the device information of the corresponding type of devices to the geographic electronic map of the first park, the drawing of the device permission map of the user terminal is realized. In this way, different device permission maps are drawn by different user permissions, enabling the user terminal to only view the areas and devices within its permissions, and then only control the areas and devices within its permissions, thereby improving the control efficiency of the devices in the smart park.
[0113] In the embodiments of the present invention, the position information of each area and each device, such as longitude and latitude information, can be utilized to add areas and devices to the geographic electronic map of the first park. For example, using the longitude and latitude information of the area contour points, the contour of the area is depicted in the geographic electronic map to realize adding the area to the geographic electronic map. Using the longitude and latitude information of the device, the device information of the device is marked at the corresponding position in the geographic electronic map to realize adding the device to the geographic electronic map.
[0114] Device information may include icons corresponding to device types. Different device types may correspond to different icons, enabling users to more intuitively distinguish devices of different types based on the icons.
[0115] When drawing a device permission map, for the areas corresponding to user permissions added to the electronic map of the first park and devices of corresponding types, different events can be bound to them, enabling the client to obtain different feedback information from the server by triggering different events, and then using the feedback information to control each area and device. The types of events bound to each area and device will be described in subsequent embodiments and will not be elaborated here.
[0116] In an implementable manner, a preset logic for drawing a device permission map can be constructed. For example, a drawMapOutlines (draw map outline) method can be constructed. A zoneArr (zone array) can also be constructed. The zone array can record area id (identifier), corresponding geographic electronic map id, area name, total number of devices, and statistical data of each abnormal device, etc. Passing the zoneArr as an input parameter into the drawMapOutlines method can achieve the drawing of a device permission map including the areas in the zoneArr. The specific drawing process will be described in subsequent embodiments and will not be elaborated here.
[0117] In S104, the client may include a client with visualization capabilities. In the device permission map returned by the server to the client, only the areas and devices that the user has permission to control are included, enabling the user using the client to only view specific types of devices within their permission areas after the device permission map is displayed.
[0118] In an implementable manner, when the client requests to access the device permission map, the server can generate a device permission map based on the user's login information on the client and the configuration of data permissions. The specific steps may include: the server validates the user's login information to determine their identity and permissions; according to the user's permissions, queries the database to obtain the area corresponding to the user's permissions and the device information of the corresponding type of device; only returns the area corresponding to the user's permissions and the device information of the corresponding type of device to the client.
[0119] The map drawing method provided by the embodiment of the present invention can generate a device permission map that only includes the areas and devices corresponding to the user permissions of the client that initiates the map acquisition request. Furthermore, the client can focus on controlling the areas and devices within its user permissions through the device permission map, avoiding interference from areas and devices outside the user permissions, thereby improving the control efficiency of the devices in the smart park. And this permission control mechanism can achieve precise management of the clients, areas, and device types indicated by different user identity identifiers, while improving the security of the system and the confidentiality of data.
[0120] Compared with the traditional list mode that cannot visually associate areas with devices, by drawing the device permission area, the relationship between devices and areas can be clearly shown. Using longitude and latitude for area drawing and device position positioning has higher accuracy.
[0121] When drawing the device permission map in the embodiment of the present invention, in the geographical electronic map of the first park, the areas corresponding to the user permissions and the device information of the corresponding types will be added. The user permissions can include spatial permissions and business use permissions, such as Figure 3 As shown, S103 can specifically include:
[0122] S301, determining the target area corresponding to the spatial permission of the user permission.
[0123] The target area can be determined according to the spatial permission of the client. The target area is the area that the client has the permission to control.
[0124] S302, determining the target device type corresponding to the business use permission of the user permission.
[0125] The target device type can be determined according to the business use permission of the client. The target device type is the device type that the user has the permission to control.
[0126] S303, determining each target device in the target area whose device type is the target device type.
[0127] Since there can be multiple target devices whose device type is the target device type and they can be distributed in different target areas. Therefore, in order to accurately count the running status of the target devices in any target area in the subsequent steps, the target areas where each target device is located can be determined first, that is, determining each target device in the target area whose device type is the target device type.
[0128] S304, obtaining the target device information of each target device,
[0129] Among them, the target device information includes the running status of the corresponding device.
[0130] For any target device, the operating state of the device refers to the current operating state of the device, which can also be understood as the operating state of the target device when the user terminal's map acquisition request for the first park is obtained. Among them, the operating state of the device can be one of fault, alarm, offline, and normal.
[0131] The target device information may also include device codes, device locations, etc., which are not limited in the embodiments of the present invention.
[0132] S305. For each target area, among the operating states of the target devices in the target area, select the operating state with the highest priority as the area device state of the target area.
[0133] For any target area, since what is obtained in S304 is the operating states of the target devices in the target area, therefore, the operating states of the target devices can include one or more of fault, alarm, offline, and normal.
[0134] In an implementable manner, the priorities of the operating states of the device from high to low are: fault, alarm, offline, and normal. When the operating states of the target devices include multiple types, the operating state with the highest priority can be selected as the area device state of the target area. For example, when the operating states of the target devices include fault, offline, and normal, among which the priority of fault is the highest, at this time, the fault is used as the area device state of the target area.
[0135] In another implementable manner, in zoneArr (area array), device statistical information and space-related information of each area are stored, such as area id, corresponding map id, area name, total number of devices, statistical data of each abnormal device, coordinate information of area contour points, etc. Each area, that is, a single item in zoneArr, can be denoted as zoneItem (area item), and then the id of each area item, that is, the area id.
[0136] For each target area, the area id of the zoneItem of the target area can be used as an input parameter to query the statistical data of each abnormal device in the target area, such as the number of alarm devices, the number of fault devices, and the number of offline devices. Then, based on the statistical data of each abnormal device in each target area, the area device state of the target area is determined.
[0137] In another implementable manner, it is also possible to count the number of target devices in each operating state in the target area, and use the operating state with the largest number as the area device state of the target area.
[0138] S306. Add the area device state in the target area of the geographic electronic map to obtain the device permission map of the user terminal.
[0139] For any target area, the area device status can be added at the center point of the area. S306 may include: for each target area, obtaining the contour points of the target area; calculating the center point of the target area based on the contour points of the target area; marking the area device status of the target area at the center point of the target area.
[0140] In the embodiments of the present invention, the contour point information of each target area is bound to the area id of the target area and can be stored in the database through the area array zoneArr. The server can use the area id of each zoneItem as the input parameter to query the positions of the contour points of each target area and calculate the positions of the corresponding center points of the target areas according to the positions of each group of contour points.
[0141] When adding the area device status, the number of target devices in the area device status can also be added at the same time. That is, after determining the area device status in S305, the number of target devices in the area device status can be counted at the same time and added to the corresponding target area together with the area device status to obtain the device permission map of the client.
[0142] When querying the statistical data of each abnormal device for each target area in S305, the area name and the total number of devices of the target area can also be queried, and the area name, the total number of devices and the statistical data of each abnormal device are used to form the cardData (data card) of the target area. And add the cardData to the corresponding target area.
[0143] In an implementable manner, the server can use the open interfaces provided by various electronic map software to add a center point mark for the target, and the position of the center point mark can be the position of the center point of the target area calculated above. And the area id and cardData of the corresponding zoneItem can be added as ext_data (extra data) to the center point mark.
[0144] In the embodiments of the present invention, different device operating states can be distinguished by different colors and then added to the area device status of the target area, which may include identifiers of different colors, such as dot identifiers of different colors. The color of the identifier to be added to the target area can be calculated by using the area id of the zoneItem of the target area and the statistical data of each abnormal device, and it can be denoted as color (color). The operating state with higher priority can have a more prominent color. For example, a fault corresponds to red, an alarm corresponds to orange, an offline state corresponds to gray, and a normal state corresponds to green, etc. The display interface of the device permission map of the client can be as Figure 4aAs shown, mark the area device status of the target area at the center point of the target area. Different area device statuses can have different colors.
[0145] After presenting the device permission map to the client in this way, the user can more intuitively view the operating status of devices in different areas, facilitating the user to efficiently handle problems in order of priority from high to low.
[0146] By using the longitude and latitude of the contour points to draw the contours of each target area, the positional relationship of each target area can be clearly and accurately presented. Moreover, the target areas can be customized using the longitude and latitude of the contour points, which has high flexibility.
[0147] In the embodiment of the present invention, after determining the target area, a first event can also be bound to each target area. In response to the client triggering the first event of the first target area, the number of target devices in the first target area whose operating status is the area device status is sent to the client for the client to display the number.
[0148] The first event can also be called the onAreaMouseOver event. The client can trigger the first event of the first target area when the mouse moves into the range where the first target area is located, or when clicking on the display data control.
[0149] At this time, the client can send a first request to the server. The first request carries the area identifier of the first target area. After receiving the first request, the server can, according to the area identifier carried in the first request, query the area device status in the target area indicated by the area identifier, as well as the number of target devices whose operating status is the area device status in this area, and return this number to the client, so that when the mouse moves to the range where the first target area is located, the number of target devices in the first target area whose operating status is the area device status is displayed.
[0150] The device permission map display interface of the client can be as Figure 4b shown. When the mouse moves into the range where "B8" is located, the first event for "B8" is triggered, and the number of target devices in "B8" whose operating status is the area device status is displayed, such as "Fault 1".
[0151] In an implementable manner, the area identifier can be the area id. According to the area identifier carried in the first request, the area name and the total number of devices of the first target area can also be queried simultaneously, and they are returned to the client together with the number of target devices whose operating status is the area device status in this area, so that when the mouse moves to the range where the first target area is located, the area name, the total number of devices, and the number of target devices whose operating status is the area device status of the first target area are displayed. For example, referring to Figure 4b, that is, when the mouse moves into the range where "B8" is located, "Number of B8 devices: Fault 1 of 702" is displayed.
[0152] In another implementable manner, in response to the user terminal triggering a first event of a first target area, the area identifier of the first target area can be used to query and generate a data card for the first target area. And return the data card to the user terminal, so that when the mouse moves to the range where the first target area is located on the user terminal, the data card of the first target area is displayed.
[0153] In an actual scenario, in response to the user terminal triggering a first event for the first target area, information to be returned to the user terminal can be processed. For example, the number of target devices with the operating state of the area device state displayed on the user terminal, or data cards, etc. And by modifying the display data card (cardDataCon-visible) class, it can be displayed on the user terminal. Among them, cardData can be used as the input parameter of the display data card (cardDataCon-visible) class to provide the total number of devices to be displayed and the statistical data of each abnormal device.
[0154] Correspondingly, for the number of target devices with the operating state of the area device state to be displayed on the user terminal, or the data card, the highest display priority can be set for it, so that when the number of target devices with the operating state of the area device state, or the data card is displayed on the user terminal, the displayed content is always at the top and will not be blocked by other areas or texts, improving the display effect.
[0155] In an implementable manner, in response to the user terminal triggering a first event for the first target area, the server can update the filling color of the first target area according to the area id of the first target area, and return the updated first target area to the user terminal, so that when the user terminal displays the device permission map, a highlighted effect of the area of the poem can be achieved for the first target area.
[0156] The embodiment of the present invention can also bind a mouse out (onAreaMouseOut) event to each target area. When the user terminal responds to triggering a mouse out event for the first target area, the number of target devices with the operating state of the area device state of the first target area can be cancelled from display. Among them, the triggering condition of the mouse out event can include that after the mouse moves into the range where the first target area is located, the mouse moves out of the range where the first target area is located. It can also include that after the mouse moves into the range where the first target area is located, within a preset waiting duration, such as 5 seconds, the mouse does not move again. The embodiment of the present invention does not make specific restrictions on the triggering conditions of the mouse out event.
[0157] Correspondingly, in response to the user's mouse moving out of the first target area, the server can, according to the area ID of the first target area, restore the filling color of the first target area to its initial state and modify the class name of the displayed information, such as modifying it to the hidden data card (cardDataCon-hide) class to achieve the hiding effect. In the embodiments of the present invention, for the information with display, the display or hiding of the corresponding information can be controlled by modifying the switching of its class name.
[0158] In a feasible manner, the device permission map display interface of the client can be as Figure 4c shown. The device permission map display interface may include a device search bar to quickly locate the area where the device to be controlled is located when there are many target devices in the device permission map. Under "All Devices", the device can be searched by device name, device code, or device SN (serial number). The search results can be displayed through a device list, and for each search result, one or more of the device name, device code, and device SN may be included. For example, "Negative first floor employee cafeteria button SN: 10.5.32.22_3_5 Location: Third quadrant / B8 / -1 floor". The device search bar may also include options such as "Historical Filtering" and "Followed Devices" to provide convenient device search services and quickly locate the target device. The embodiments of the present invention do not limit the form of the device search bar.
[0159] In the device permission map display interface of the client, there may also be a location search bar, a device operation status statistics bar, etc. Among them, the location search bar is used to find the target area. The device operation status statistics bar is used to display the statistical results of the operation status of each target device in the device permission map and, according to the user's selection, filter the target areas in the device permission map that include the target devices with the corresponding operation status. The embodiments of the present invention do not limit the composition of the display interface. Specifically, reference can be made to the composition of the map display interface in the prior art, which will not be elaborated here.
[0160] In the embodiments of the present invention, a variable, for example, isDisabled (status variable), can be used to record whether the number of target devices in a certain operating state among the operating states of each target device corresponding to a target area, that is, a zoneItem, is 0. If it is 0, it means that there are no target devices in this operating state in the target area, and at this time, isDisabled can be recorded as true (true). Moreover, the values of isDisabled in each operating state can affect the problems and color marking styles of the entire target area. In this way, when the user terminal filters the target areas including the target devices corresponding to the operating state, the target areas that do not include the target devices in this operating state can be grayscaled, and the text and dot marking styles of each target area can be changed correspondingly, such as changing the transparency, to facilitate the user to visually distinguish the target areas including the target devices in this operating state from the target areas that do not include the target devices in this operating state.
[0161] Referring to Figure 4a , when the user terminal selects the "fault" filtering condition, the centers of the two target areas containing faulty devices can be marked with small orange dots corresponding to the fault color, and the color of the target area can be darker. The remaining target areas do not contain faulty devices and have a lighter color. Referring to Figure 4b , when the mouse hovers over the target area "B8", the target area can be highlighted and the fault device statistics data card can be displayed at the same time.
[0162] In the embodiments of the present invention, for the drawing of some outdoor target areas, it is difficult to remove the target areas that do not belong to the outdoors. Referring to Figure 4a , the actual outdoor target area is the remaining part after removing other buildings. However, when drawing, it is much more convenient to draw the complete large area. In this way, when the mouse hovers over a certain target area, it is very likely to hover over the overlapping area of multiple target areas, which in turn makes the interaction events with other areas invalid. To make the configuration and use simple and efficient, the embodiments of the present invention set priorities for the first events bound to each target area. In this way, it is ensured that the first events of each target area can be normally triggered.
[0163] For example, three target areas are drawn: outdoor public area, art exhibition area, and art museum. The ranges of the three target areas are such that the former contains the latter. If the priorities of the first events are not configured, it is very likely that the first event cannot act on the latter. The embodiments of the present invention can configure increasing priorities for them, such as outdoor public area 1, art exhibition area 2, art museum 3, so that each area can be viewed.
[0164] Before binding the first event to each target area in the embodiments of the present invention, the trigger priority of the first event for each target area can be determined respectively according to the area of each target area. Among them, for any first event, the trigger priority of the first event is negatively correlated with the area of the target area bound to the first event; in response to the user side triggering multiple first events simultaneously, the number of target devices with the area device state of the target area in the target area indicated by the first event with the highest priority is sent to the user side.
[0165] That is, a lower priority is set for a target area with a larger area, or a larger range, so as to ensure that the first event of each target area can be triggered normally. And the priority of special target areas can be configured separately according to the actual situation. For example, if they are all independent areas, there is no need to configure.
[0166] In order to enable the user to understand the detailed information of any target device when viewing the device permission map, during the process of the server drawing the device permission map, after determining each target device with the device type of the target device type in the target area, a second event can be bound to each target device; in response to the user side triggering the second event of the first target device, according to the unique identifier of the first target device, the detailed information of the first target device is queried, and the detailed information of the first target device is sent to the user side so that the user side can display the detailed information of the first target device.
[0167] In the embodiments of the present invention, the second event can also be called a device click event. When the user side can detect a click operation on the first target device, the second event for the first target device is triggered.
[0168] The user side can send a second request to the server, where the second request carries the unique identifier (deviceId) of the first target device. The server searches for the detailed information of the first target device based on the unique identifier of the first target device and returns the detailed information to the user side.
[0169] The detailed information of the first target device may include the target device information of the first target device. For example, the longitude and latitude of the target device location, the icon corresponding to the device type of the target device, etc. It may also include the control parameters of the first target device.
[0170] In an implementable manner, the first target device that triggers the second event can also be referred to as the selected target device. When the server returns the first target device information to the client, it can also return a point marker to be added to the device permission map. The addition position of the point marker can be the same as the position of the first target device, such as the same longitude and latitude. In this way, while the client displays the detailed information of the first target device, a point marker is added for the first target device in the device permission map to distinguish the selected target device from the unselected target devices.
[0171] Referring to Figure 5a , in the device permission map display interface of the client, the selected target device is added with a point marker in the form of a tick. The detailed information of the selected target device, such as the target device name "S3 second floor north manual alarm", device code, device location, control parameters, etc., can be displayed on the right side of the display interface through the detailed information display bar. In this detailed information display bar, a cancel control can also be included to close the detailed information display bar after the user triggers the cancel control.
[0172] In an implementable manner, based on the detailed information of the target device displayed in the display interface, the user can perform custom operations on the target device. Different devices can correspond to different operations, enabling the user to achieve fast and efficient control of the target device.
[0173] In the embodiments of the present invention, different target areas can have different levels. When the device permission map display interface of the client displays the target areas, the displayed target areas belong to the same level of target areas. To enable the client to display the device permission maps corresponding to each level step by step, during the process of the server drawing the device permission map, after determining the target area corresponding to the spatial permission of the user permission, the level to which each target area belongs can be determined; for each target area, according to the level to which the target area belongs, a mapping relationship of the parent target area and / or child target area of the target area can be constructed; wherein, the parent target area of the target area is the area at the upper level of the target area; the child target area of the target area is the area at the lower level of the target area; a third event and / or a fourth event are bound to each target area.
[0174] Except for the target areas at the lowest level and the highest level, the remaining target areas can all have a parent target area and a child target area. The target areas at the lowest level only have a parent target area, and the target areas at the highest level only have a child target area. For any target area, the parent target area of the target area is at most one, and the child target area of the target area can be zero, one, or more.
[0175] In response to the user terminal triggering a third event in the second target area, query the sub-target areas of the second target area according to the area identifier of the second target area, and use the sub-target areas to obtain and send the sub-target area map of the second target area to the user terminal for the user terminal to display the sub-target area map.
[0176] The third event can also be referred to as a sub-target area display event, or a sub-area click (onAreaClick) event.
[0177] In an implementable manner, when the user terminal detects a click operation on the second target area, a third event for the second target area can be triggered. The user terminal can send a third request to the server, where the third request can carry the area identifier of the second target area. The server queries the sub-target areas of the second target area according to the area identifier of the second target area, and then generates a sub-target area map using the sub-target areas.
[0178] In an implementable manner, the server can use the area id of the second target area as a parameter to query the device statistics data and spatial data related to the sub-target areas of the second target area, and use the queried data to draw all the sub-target areas of the second target area.
[0179] Since the target areas at the lowest level no longer have a lower level, target device display events can be bound to each target area at the lowest level. In response to the user terminal triggering a target device display event for any target area at the lowest level, the target devices in the target area can be directly displayed.
[0180] In this way, when triggering the third event for the second target area, that is, clicking on the second target area, it will drill down to the next level of the second target area. For example, when all the highest-level target areas, such as the first quadrant, the second quadrant... are displayed in the initial state of the display interface, clicking on a target area, such as the first quadrant, the display interface will show all the buildings under the first quadrant, that is, the sub-target areas, such as the grand theater, the small theater, the art museum, etc. Clicking on a building will show the floors under the building, that is, the sub-target areas of the building. Among them, the first floor can be default displayed. At the same time, since each floor is a target area at the lowest level, when displaying each floor, the specific locations of the target devices on each floor can be shown. And it is also possible to switch floors to view the specific device distribution on each floor. In this way, the user can control individual target devices.
[0181] In response to the user terminal triggering a fourth event in a third target area, query the parent target area of the third target area according to the area identifier of the third target area, and use each target area included in the hierarchy to which the parent target area belongs to obtain and send the map of the parent target area of the third target area to the user terminal, so that the user terminal displays the map of the parent target area.
[0182] The fourth event can also be called the parent target area display event. The process of obtaining the map of the parent target area is similar to the process of obtaining the map of the sub-target area, which will not be elaborated in the embodiments of the present invention.
[0183] In the embodiments of the present invention, when drawing the map of the parent target area and / or the sub-target area of a certain target area, the area id of the target area can be used as an input parameter to query the relevant device statistical data and spatial data of the corresponding parent target area and / or sub-target area, and the queried data can be assembled to obtain an area array zoneArr. Furthermore, the zoneArr can be used as the input parameter of the aforementioned drawMapOutlines method to implement the drawing of the corresponding map of the parent target area and / or the sub-target area.
[0184] When displaying target devices in a target area, since the number of target devices in the target area may be large, if each target device is displayed at the corresponding position in the target area at this time, it will affect the display speed and display effect of the device permission map, and even may cause operation jamming. Therefore, a clustering display function can be added to each target device, so that when multiple target devices are close and the device permission map is reduced to a certain level, the target devices are clustered and displayed, and the clustering quantity is displayed. After the device permission map is enlarged to a certain proportion, different device icons can be displayed according to different device types.
[0185] In the process of drawing the device permission map, after determining the target area corresponding to the spatial permission of the user permission, a fifth event can be bound to each target area; wherein, when the scale of the fourth target area displayed on the user terminal belongs to a preset magnification interval, the client triggers the fifth event of the fourth target area; in response to the user terminal triggering the fifth event of the fourth target area, clustering is performed on the target devices in the fourth target area based on the distances between the target devices in the fourth target area to obtain a plurality of clustering clusters; the clustering clusters in the fourth target area and the number of target devices in each clustering cluster are sent to the user terminal, so that the user terminal displays the clustering clusters and the number of target devices in the clustering clusters in the fourth target area.
[0186] The fifth event can also be called a clustering display event. On the user side, a device permission map can be displayed based on a certain scale. When the scale of the fourth target area displayed on the user side belongs to a preset magnification range, it can be considered that the fourth target area displayed on the current display interface is relatively small. If all the target devices in the fourth target area are displayed, it will affect the display effect. Therefore, at this time, the server can cluster the target devices in the fourth target area based on the distances between the target devices to obtain multiple clustering clusters.
[0187] In the embodiment of the present invention, the server can use the area ID of the fourth target area to query the device information of each target device in the fourth target area. Furthermore, the open interface provided by the electronic map software can be used to cluster the target devices in the fourth area according to grid pixels. That is, multiple target devices within the set grid pixel range that are close to each other can be merged into a single marker point for display when the device permission map on the user side reaches a certain zoom level.
[0188] And send each clustering cluster in the fourth target area and the number of target devices in each clustering cluster to the user side. Initially, multiple target devices are combined into one clustering cluster for display, which can significantly improve the display performance of the page.
[0189] Such as Figure 5b shown, in the device permission map, dots containing numbers can be used to represent the clustering clusters and the number of target devices in the clustering clusters.
[0190] In a realizable manner, there can be multiple preset magnification ranges. Different preset magnification ranges can correspond to different clustering methods, so as to more flexibly display the distribution of devices in the target area. The clustering methods involved in the embodiments of the present invention can refer to related technologies, and the specific methods are not limited in the embodiments of the present invention.
[0191] When the scale of the fourth target area displayed on the user side is greater than the maximum value of the preset magnification range, it can be considered that in the current display interface, each target device can be clearly displayed. At this time, the user side can directly display the device information of each target device, that is, the device information of the target devices in the non-clustered state, such as the icons of the devices.
[0192] The embodiments of the present invention bind events to each target area and each target device, enabling the user to more conveniently view the information of each target area and target device within their permissions according to the device permission map displayed on the user side, thereby improving the control efficiency of the user over each target area and target device within their permissions. [[ID=Z2]]
[0193] In actual application scenarios, the events bound to each target area and each target device are not limited to the events involved in the embodiments of the present invention, and relevant technical personnel can configure them according to actual needs.
[0194] In the embodiments of the present invention, the point markings and the information added to the corresponding point markings can be rendered by using a preset rendering (renderCard) method. In an implementable manner, the four items of cardData, the id, color, and isDisabled of zoneItem can be used as the input parameters of the preset rendering method to display information such as data cards, target area names, and color-marked points at the corresponding positions. The embodiments of the present invention do not limit the styles of the point markings, and those skilled in the art can customize them according to actual needs.
[0195] The map drawing method provided by the embodiments of the present invention can implement the visualization of regional devices based on the front-end vue (a JavaScript framework for building user interfaces) and the electronic map open interface. Different user terminals can only view the areas and devices within their user permissions, so as to avoid the interference of the display of other areas and devices and the misoperation of devices not within the jurisdiction; the color identification at the center of the area can help the user terminal quickly identify the area containing abnormal devices; click on the target area to draw the sub-target area map of the target area that the user has the permission to view, and view the abnormal devices in a more refined range; when drilling down to the lowest-level target area, draw each target device in the lowest-level target area or the specified type of target device selected in the form of point aggregation. The aggregation form has a faster loading speed. Further zooming in on the map can display the individual device icons. Clicking on the icon will show the detailed information, and the target device can be controlled according to the detailed information.
[0196] As Figure 6 shown, the embodiments of the present invention provide a device control method applied to a user terminal. The method may include:
[0197] S601, sending a map acquisition request for the first park to the server;
[0198] Wherein, the map acquisition request includes the user identity identifier of the user terminal.
[0199] S602, acquiring the device permission map returned by the server;
[0200] Wherein, the device permission map is generated based on the device information of the corresponding type of devices in the area corresponding to the user permission, and the user permission is determined based on the user identity identifier.
[0201] S603, displaying the device permission map so that the user can control each device in the device permission map by using the device permission map displayed on the user terminal.
[0202] The device control method provided by the embodiment of the present invention enables the user terminal to obtain and display a device permission map corresponding to the user's permissions, allowing the user to focus on controlling the areas and devices within their user permissions through the device permission map, avoiding interference from areas and devices outside the user's permissions, thereby improving the control efficiency of the devices in the smart park.
[0203] Refer to Figure 6 In the embodiment of the present invention, the device control method applied to the user terminal is described in detail.
[0204] In S601, when the user expects to control the devices in the first park, a map acquisition request for the first park can be sent to the server through the user terminal.
[0205] The user identity identifier of the user terminal is used to uniquely determine the user identity of the user terminal. The user identity identifier of the user terminal can be the unique number of the device where the user terminal is located, the user account logged in to the user terminal, the user name, etc. The specific form of the user identity identifier is not limited in the embodiment of the present invention.
[0206] Regarding S602, based on the received map acquisition request for the first park, the server uses the user identity identifier carried in the map acquisition request to query the corresponding user permissions, and in the geographical electronic map of the first park, adds the area corresponding to the user permissions and the device information of the corresponding type of devices based on the user permissions to obtain the device permission map of the user terminal. And the device permission map is returned to the user terminal.
[0207] In S603, the user terminal can display the device permission map returned by the server. Since the device permission map only includes the areas and devices that the user has permission to control, when the user uses the device permission map to control the devices in the first park, the user can only control each device in the area within their permissions, thereby avoiding the display interference of other areas and devices and improving the control efficiency of the devices in the park.
[0208] In the embodiment of the present invention, the user permissions include spatial permissions and business use permissions. The service terminal can use the spatial permissions to determine each target area that the user terminal has permission to control, and use the business use permissions to determine each target device type that the user terminal has permission to control, and then obtain each target device with the device type being the target device type.
[0209] In the device permission map displayed on the client side, for each target area, the area device status of the target area can be added. The area device status refers to the highest-priority operating status among the operating statuses of each target device in the target area. Among them, the operating statuses of each target device include one of failure, alarm, offline, and normal; the priority of the operating statuses from high to low is: failure, alarm, offline, normal. Thus, when there are devices with abnormal operating statuses (failure, alarm, offline) in the target areas controlled by the client side, the user can, based on the displayed area device status, promptly discover the target areas of the target devices with abnormal operating statuses, and then promptly handle the abnormalities, thereby improving the control efficiency of the devices in the smart park and at the same time enhancing the safety of the park operation.
[0210] During the process of drawing the device permission map on the server side, various events can also be bound to each target area and target device. So that when the corresponding event is triggered on the client side, the corresponding feedback information can be obtained from the server side, and the target devices in the area within its permission can be controlled by using this feedback information. The following embodiments illustrate the client side triggering different events.
[0211] The user can trigger a first event for the first target area in the device permission map. In response to triggering the first event for the first target area, the client side sends the area identifier of the first target area to the server side, so that the server side obtains it according to the area identifier of the first target area and sends the number of target devices with the operating status being the area device status in the first target area to the client side; display the number.
[0212] The client side can trigger the first event for the first target area when detecting that the mouse moves into the range where the first target area is located, or when clicking on the display data control. Send the area identifier of the first target area to the server side. So that the server side uses this area identifier to query the area device status in the target area indicated by this area identifier and the number of target devices with the operating status being this area device status, and returns this number to the client side. Then the client side displays the number of target devices with the operating status being this area device status in the first target area.
[0213] In the device permission map displayed on the client side, it is possible that the ranges of multiple target areas overlap. When triggering the first event for the overlapping area, since it is difficult for the server side to accurately judge the target area that the user expects to view, it may cause the server side to provide incorrect feedback information to the client side.
[0214] In an embodiment of the present invention, in response to multiple first events being triggered simultaneously, the area identifiers of the target areas indicated by the multiple first events are sent to the server, so that the server obtains, according to the trigger priorities of the first events of each target area, and sends to the user terminal the area identifiers of the target areas indicated by the first event with the highest priority, and obtains the operating states of each target device; wherein, the trigger priority of the first event is negatively correlated with the area of the target area bound to the first event; thereby displaying the operating states of each target device in the target area indicated by the first event with the highest trigger priority.
[0215] Based on the area identifiers of the target areas indicated by the multiple first events, the server queries the trigger priorities of the first events bound to the target areas indicated by each area identifier. Furthermore, the server returns to the user terminal the number of target devices whose operating states queried by the first event with the highest trigger priority are the area device states of the target area. A lower priority is set for a target area with a larger area, that is, a larger range, so as to ensure that the first event of each target area can be triggered normally.
[0216] When the user expects to view the detailed information of a certain target device in the device permission map, a second event can be triggered for the first target device that the user expects to view.
[0217] In response to the second event of the first target device being triggered, the user terminal sends the unique identifier of the first target device to the server, so that the server obtains according to the unique identifier of the first target device, and sends to the user terminal the detailed information of the first target device; display the detailed information of the first target device.
[0218] When the user terminal detects a click operation on a target device, it can trigger a second event for the target device. The detailed information of the first target device may include the target device information of the first target device, for example, the longitude and latitude of the target device location, the icon corresponding to the device type of the target device, etc. It may also include the control parameters of the first target device.
[0219] The detailed information of the device can be displayed on the user terminal in the form of a small window or the like. The embodiment of the present invention does not limit the way of displaying the detailed information of the device.
[0220] In the embodiment of the present invention, for the detailed information of the user target device, custom operations can be performed on the target device. Different devices can correspond to different operations, so as to enable the user to quickly and efficiently control the target device.
[0221] The target areas with permission control on the client side do not necessarily belong to the same level. The target areas shown in the device permission map of the client side belong to the same level of target areas. Therefore, in order to control target areas at different levels, the client side in the embodiment of the present invention can, in response to triggering a third event for a second target area, send the area identifier of the second target area to the server, so that the server can query each sub-target area of the second target area according to the area identifier of the second target area, and use each sub-target area to obtain and send the sub-target area map of the second target area to the client side; wherein, the sub-target area of the second target area is the area at the next level of the second target area; display the sub-target area map of the second target area;
[0222] And / or, in response to triggering a fourth event for a third target area, send the area identifier of the third target area to the server, so that the server can query the parent target area of the third target area according to the area identifier of the third target area, and use each target area included in the level to which the parent target area belongs to obtain and send the parent target area map of the third target area to the client side; wherein, the parent target area of the third target area is the area at the upper level of the third target area; display the parent target area map of the third target area.
[0223] The client side can trigger a third event for a certain target area when detecting a click operation on the target area, and display the sub-target area map of the target area.
[0224] In the device permission map display interface of the client side, a level return control can also be included. The client side can trigger a fourth event for the current target area when detecting a trigger operation on the level return control, and display the corresponding parent target area map.
[0225] In the embodiment of the present invention, by triggering the third event and / or the fourth event, the user can view the device permission map step by step on the client side.
[0226] When the client side detects a click operation on the target area at the lowest level, each target device included in the target area can be displayed, so that the user can clearly know the distribution of the target devices in the target area, which is convenient for the user to control each target device individually.
[0227] However, when all target devices in the target area are separately displayed in the target area, since the number of target devices may be large, problems such as device stacking may occur, and the display effect is poor.
[0228] Therefore, the client can, in response to triggering a fifth event in a fourth target area, display a clustering cluster and the number of target devices in the clustering cluster in the fourth target area; wherein, the clustering cluster and the number of target devices in the clustering cluster are obtained by the server based on the distances between the target devices in the fourth target area, clustering the target devices in the fourth target area, and sending them to the client.
[0229] When the scale of the device permission map currently implemented by the client is small, that is, when the current scale is within a preset magnification range, the client can display a device permission map including the clustering cluster and the number of target devices in the clustering cluster.
[0230] And in response to the increase in the scale, gradually display each target device in the current target area respectively. In this way, the distribution of devices in the target area can be displayed more flexibly, improving the display performance of the page.
[0231] In a feasible manner, the device permission map displayed by the client can be obtained from the server in real time or an offline map stored locally. For the detailed description of various events involved in the embodiments of the present invention, reference can be made to the foregoing map drawing method, which will not be elaborated here.
[0232] For the device control method provided by the embodiments of the present invention, the client obtains and displays a device permission map corresponding to the user's permission, enabling the user to focus on controlling the areas and devices within the user's permission through the device permission map, avoiding interference from areas and devices outside the user's permission, thereby improving the control efficiency of the devices in the smart park.
[0233] As Figure 7 shown, the embodiments of the present invention provide a map drawing system. The map drawing system may include a client 701 and a server 702. Among them, the client 701 is used to send a map acquisition request for a first park to the server 702; the map acquisition request includes the user identity identifier of the client 701; obtain and display the device permission map returned by the server 702, so that the user can use the device permission map to control each device in the device permission map.
[0234] The server 702 is used to obtain the map acquisition request, determine the user permission of the client 701 according to the user identity identifier; draw the geographical electronic map of the first park, and add the area corresponding to the user permission and the device information of the corresponding type of device in the geographical electronic map to obtain the device permission map of the client 701; return the device permission map to the client 701.
[0235] For the detailed description of the map drawing system in the embodiments of the present invention, reference can be made to the foregoing map drawing method, which will not be elaborated here.
[0236] The map drawing system provided by the embodiments of the present invention enables the server to generate a device permission map that only includes the areas and devices corresponding to the user permissions of the client that initiates the map acquisition request. Subsequently, the client can focus on managing the areas and devices within its user permissions through the device permission map, avoiding interference from areas and devices outside its user permissions, thereby improving the management efficiency of the devices in the smart park.
[0237] The embodiments of the present invention also provide an electronic device, as Figure 8 shown, which includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804. Among them, the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.
[0238] The memory 803 is used to store computer programs.
[0239] When the processor 801 executes the programs stored on the memory 803, it implements the above-mentioned map drawing method or device management method.
[0240] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0241] The communication interface is used for communication between the above electronic device and other devices.
[0242] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0243] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0244] In another embodiment provided by the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned any map drawing method or device control method is implemented.
[0245] In another embodiment provided by the present invention, there is also provided a computer program product containing instructions, which when running on a computer, causes the computer to execute any map drawing method or device control method in the above-mentioned embodiments.
[0246] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server, data center, etc. that includes one or more integrated available media. The available media may be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media (such as Solid State Disk (SSD)).
[0247] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0248] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the system, electronic device, computer-readable storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.
[0249] The above are only the preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are all included in the protection scope of the present invention.
Claims
1. A method for map drawing, characterized in that, Applied to the server side, the method includes: Obtaining a map acquisition request of the client for the first park; the map acquisition request includes the user identity identifier of the client; Determining the user permissions of the client according to the user identity identifier; Drawing a geographic electronic map of the first park, and adding an area corresponding to the user permissions and device information of corresponding types of devices in the geographic electronic map to obtain the device permission map of the client; Returning the device permission map to the client so that the client can manage each device in the device permission map.
2. The method according to claim 1, characterized in that, The user permissions include spatial permissions and business use permissions; the adding an area corresponding to the user permissions and device information of corresponding types of devices in the geographic electronic map to obtain the device permission map of the client includes: Determining a target area corresponding to the spatial permission of the user permissions; Determining a target device type corresponding to the business use permission of the user permissions; Determining each target device whose device type is the target device type in the target area; Obtaining the target device information of each target device, where the target device information includes the operating status of the corresponding device; For each target area, selecting the operating status with the highest priority from the operating statuses of each target device in the target area as the area device status of the target area; Adding the area device status in the target area of the geographic electronic map to obtain the device permission map of the client.
3. The method according to claim 2, wherein The operating statuses of each target device include one of failure, alarm, offline, and normal; The priorities of the operating statuses from high to low are: failure, alarm, offline, normal.
4. The method according to claim 2, wherein The adding the area device status in the target area of the geographic electronic map to obtain the device permission map of the client includes: For each target area, obtaining the contour points of the target area; Based on the contour points of the target area, calculating the center point of the target area; marking the area device status of the target area at the center point of the target area.
5. The method according to claim 2, wherein After, for each target area, selecting the operating status with the highest priority from the operating statuses of each target device in the target area as the area device status of the target area, the method further includes: Binding a first event to each target area; In response to the client triggering the first event of the first target area, sending the number of target devices in the first target area whose operating status is the area device status to the client so that the client can display the number.
6. The method according to claim 5, wherein Before binding the first event to each target area, the method further includes: Respectively determining the trigger priorities of the first events of each target area according to the areas of each target area, where for any first event, the trigger priority of the first event is negatively correlated with the area of the target area bound to the first event; In response to the client triggering multiple first events simultaneously, sending the number of target devices in the first target area indicated by the first event with the highest priority whose operating status is the area device status of the target area to the client.
7. The method according to claim 2, characterized in that, After determining the target devices with the device type being the target device type in the target area, the method further includes: Binding a second event to each of the target devices; In response to the user side triggering the second event of the first target device, querying the detailed information of the first target device according to the unique identifier of the first target device, and sending the detailed information of the first target device to the user side, so that the user side displays the detailed information of the first target device.
8. The method according to claim 2, wherein After determining the target area corresponding to the spatial permission of the user permission, the method further includes: Determining the level to which each of the target areas belongs; For each target area, constructing a mapping relationship of the parent target area and / or the sub-target area of the target area according to the level to which the target area belongs; wherein, the parent target area of the target area is the area at the upper level of the target area; the sub-target area of the target area is the area at the lower level of the target area; Binding a third event and / or a fourth event to each of the target areas; In response to the user side triggering the third event of the second target area, querying the sub-target areas of the second target area according to the area identifier of the second target area, and using the sub-target areas to obtain and send the sub-target area map of the second target area to the user side, so that the user side displays the sub-target area map; In response to the user side triggering the fourth event of the third target area, querying the parent target area of the third target area according to the area identifier of the third target area, and using the target areas included in the level to which the parent target area belongs to obtain and send the parent target area map of the third target area to the user side, so that the user side displays the parent target area map.
9. The method according to claim 2, characterized in that After determining the target area corresponding to the spatial permission of the user permission, the method further includes: Binding a fifth event to each target area; wherein, when the scale of the fourth target area displayed on the user side belongs to a preset magnification interval, the client side triggers the fifth event of the fourth target area; In response to the user side triggering the fifth event of the fourth target area, clustering the target devices in the fourth target area based on the distances between the target devices in the fourth target area to obtain a plurality of clustering clusters; Sending each of the clustering clusters in the fourth target area and the number of target devices in each clustering cluster to the user side, so that the user side displays the clustering clusters and the number of target devices in the clustering clusters in the fourth target area.
10. A device control method, characterized in that, Applied to a user side, the method includes: Sending a map acquisition request for the first park to the server side; wherein, the map acquisition request includes the user identity identifier of the user side; Obtaining the device permission map returned by the server side; wherein, the device permission map is generated based on the area corresponding to the user permission and the device information of the corresponding type of device, and the user permission is determined based on the user identity identifier; Display the device permission map so that the user can use the device permission map displayed by the client to manage each device in the device permission map.
11. The method according to claim 10, characterized in that, After displaying the device permission map, the method further includes: In response to triggering a first event in a first target area, sending the area identifier of the first target area to the server, so that the server obtains according to the area identifier of the first target area and sends to the client the number of target devices in the first target area whose running state is the area device state; Display the number.
12. The method according to claim 11, wherein The step of, in response to triggering a first event in a first target area, sending the area identifier of the first target area to the server includes: In response to triggering multiple first events simultaneously, sending the area identifiers of the target areas indicated by the multiple first events to the server, so that the server obtains according to the trigger priority of the first event in each target area and sends to the client the number of target devices in the target area indicated by the first event with the highest priority whose running state is the area device state of the target area; wherein, the trigger priority of the first event is negatively correlated with the area of the target area bound to the first event.
13. The method according to claim 10, characterized in that, After displaying the device permission map, the method further includes: In response to triggering a second event for a first target device, sending the unique identifier of the first target device to the server, so that the server obtains according to the unique identifier of the first target device and sends to the client the detailed information of the first target device; Display the detailed information of the first target device.
14. The method according to claim 10, wherein After displaying the device permission map, the method further includes: In response to triggering a third event in a second target area, sending the area identifier of the second target area to the server, so that the server queries each sub-target area of the second target area according to the area identifier of the second target area and uses each sub-target area to obtain and send to the client the sub-target area map of the second target area; wherein, the sub-target area of the second target area is the area at the next level under the second target area; Display the sub-target area map of the second target area; and / or In response to triggering a fourth event in a third target area, sending the area identifier of the third target area to the server, so that the server queries the parent target area of the third target area according to the area identifier of the third target area and uses each target area included in the level to which the parent target area belongs to obtain and send to the client the parent target area map of the third target area; wherein, the parent target area of the third target area is the area at the upper level of the third target area; Display the parent target area map of the third target area.
15. The method according to claim 10, wherein After displaying the device permission map, the method further includes: In response to triggering a fifth event in a fourth target area, a clustering cluster and the number of target devices in the clustering cluster are displayed in the fourth target area; wherein, the clustering cluster and the number of target devices in the clustering cluster are obtained by the server based on the distances between the target devices in the fourth target area, clustering the target devices in the fourth target area, and sending them to the client.
16. A map drawing system, characterized in that, The system includes: A client, configured to send a map acquisition request for a first park to the server; the map acquisition request includes the user identity identifier of the client; obtain and display the device permission map returned by the server, so that the user can use the device permission map to manage each device in the device permission map; The server is configured to obtain the map acquisition request, determine the user permission of the client according to the user identity identifier; draw a geographic electronic map of the first park, and add an area corresponding to the user permission and device information of corresponding types of devices in the geographic electronic map to obtain the device permission map of the client; return the device permission map to the client.
17. An electronic device, characterized in that, It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used for storing computer programs; The processor is configured to implement the method according to any one of claims 1-9 or 10-15 when executing the program stored on the memory.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1-9 or 10-15 is implemented.
Citation Information
Patent Citations
Monitoring management system and method based on intelligent display terminal
CN112163708A
Equipment management and control method and device, electronic equipment and storage medium
CN114968462A
Data processing method and device, electronic equipment and storage medium
CN116467398A
System and method for providing nearby search service using POI clustering scheme
US20160267149A1
Pop-up retial franchising and complex econmic system
US20220292543A1