Device control method and device, electronic device and storage medium
By dividing equipment areas according to levels and displaying information on the electronic map, the problem of intuitive display and control of a large number of equipment in a large space is solved, and intuitive and clear equipment display and efficient management and control are achieved, avoiding the stacking of equipment icons, and supporting Classification feature query.
Patent Information
- Application Number
- CN202210614137.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-05-31
AI Technical Summary
Existing technology cannot intuitively and effectively display and control a large number of devices in a large space. Especially when the device layout is complex, device icons tend to overlap, making it difficult to conveniently view devices at a specified level or location.
On the basis of the electronic map, equipment areas are divided according to levels, and information acquisition, map refresh and information display modules are used to obtain and display block equipment information with hierarchical relationships, avoid icon stacking, and achieve intuitive and clear equipment location and layout display. , and supports classification feature query and control.
It achieves intuitive, clear display and efficient management and control of a large number of devices in a large space, avoids the problem of device icon stacking, facilitates users to view devices at a specified level or location, and supports query and management based on classification characteristics.
Smart Images

Figure CN114968462B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of Internet of Things, and in particular to a device management method and apparatus, an electronic device, and a non-transitory computer-readable storage medium storing computer instructions. Background Art
[0002] Using a list to display and control the devices in a certain area is not intuitive enough, and the actual location and layout of the devices are not visible. In particular, when the space for layout of devices is large and the number of devices is large, the existing technology cannot intuitively and effectively display and control the devices. Summary of the invention
[0003] The present disclosure at least provides a device management method and apparatus, an electronic device, and a non-transitory computer-readable storage medium storing computer instructions to solve at least one of the above-mentioned technical defects.
[0004] According to one aspect of the present disclosure, a device management and control method is provided, which is applied to a client and includes:
[0005] In response to a first display operation on a target block on the electronic map, obtaining device information of at least one sub-block of the target block from a server; wherein the device area to be monitored is pre-divided into a plurality of blocks having a hierarchical relationship;
[0006] Refresh the electronic map according to the target block;
[0007] The device information of at least one sub-block is displayed on the refreshed electronic map using an information display method that matches the block level of the target block.
[0008] According to another aspect of the present disclosure, a device management and control apparatus is provided, which is applied to a client and includes:
[0009] An information acquisition module, configured to, in response to a first display operation on a target block on an electronic map, acquire device information of at least one sub-block of the target block from a server; wherein the device area to be monitored is pre-divided into a plurality of blocks having a hierarchical relationship;
[0010] A map refresh module, used for refreshing the electronic map according to the target block;
[0011] The information display module is used to display the device information of at least one sub-block on the refreshed electronic map by using an information display method matching the block level of the target block.
[0012] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any embodiment of the present disclosure.
[0016] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to enable a computer to execute the method in any embodiment of the present disclosure.
[0017] According to another aspect of the present disclosure, a computer program product is provided, including a computer program / instruction, which implements the method in any embodiment of the present disclosure when the computer program / instruction is executed by a processor.
[0018] The present disclosure provides a device control method and apparatus, an electronic device, and a non-transient computer-readable storage medium storing computer instructions. The present disclosure displays device information of blocks at each level according to the divided levels on the basis of an electronic map, thereby realizing an intuitive and clear display of the location and layout of a large number of devices in a large space. In addition, the present disclosure can query, display, and control certain specific devices according to preset classification features, thereby realizing efficient and intuitive control of specific devices.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0021] Figure 1 is a flow chart of a method according to the apparatus disclosed herein;
[0022] Figure 2 is a schematic diagram showing device statistics for each region according to the present disclosure;
[0023] Figure 3 is a schematic diagram showing equipment statistics of each building according to the present disclosure;
[0024] Figure 4 is a schematic diagram showing various devices according to the present disclosure;
[0025] Figure 5 is a schematic diagram showing the outline of a region according to the present disclosure;
[0026] Figure 6 is a schematic diagram showing the outline of a building according to the present disclosure;
[0027] Figure 7 is a schematic diagram of an interface including a first classification parent component and a second classification parent component according to the present disclosure;
[0028] Figure 8 is a structural schematic diagram of the equipment control device according to the present disclosure;
[0029] Fig. 9 is a schematic structural diagram of an electronic device according to the present disclosure. DETAILED DESCRIPTION
[0030] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0031] In the case where the space for layout of equipment is large and the number of equipment is large, the existing technology cannot intuitively and effectively display and control the equipment. For example, for an area with a huge number of equipment, even if the equipment is managed according to regional divisions, there will still be overlapping equipment icons, which is inconvenient to view. In response to the above problems, the present disclosure provides an equipment management method and device, an electronic device, and a non-transient computer-readable storage medium storing computer instructions. On the basis of an electronic map, the present disclosure displays the equipment information of blocks at each level according to the divided levels, thereby achieving an intuitive and clear display of the location and layout status of a large number of equipment in a large space. In addition, the present disclosure can query, display, and control certain specific equipment according to preset classification characteristics, thereby achieving efficient and intuitive control of specific equipment.
[0032] The device control method disclosed in the present invention is described below through specific embodiments.
[0033] The area where the equipment to be monitored is located, or the area of the equipment to be monitored, is divided in advance according to the size relationship of the area to form multiple blocks with a parent-child relationship. For example, a certain park is hierarchically divided according to areas, buildings, floors, rooms, etc. to form multiple blocks with a hierarchical relationship, or multiple blocks with a parent-child or brother relationship. For example, a block may include a park, an area, a building, a floor, a room, etc. Specifically, after the block division is completed, a park may include multiple areas, an area may include multiple buildings, a building may include multiple floors, a floor may include multiple rooms, etc.
[0034] Figure 1 The flowchart of the device control method of the embodiment of the present disclosure is shown. The execution subject of the embodiment can be a client that needs to display device information. Figure 1 As shown, the device management and control method of the embodiment of the present disclosure may include the following steps:
[0035] S110 . In response to a first display operation on a target block on the electronic map, obtain device information of at least one sub-block of the target block from a server.
[0036] The above-mentioned target block may be a park with the highest level, or a block of other levels, such as a region, a building, etc.
[0037] When the target block is the highest level block, the user can click a preset button on the client, or click a preset control displayed on the client, to implement the above-mentioned first display operation, which is specifically an operation of displaying the equipment information of the park level on the client. At this time, the electronic map may not be displayed on the client.
[0038] When the target block is not a block of the highest level, the user can click the target block in the electronic map displayed on the client, or click the card corresponding to the target block, or click the lower-level display button corresponding to the target block to implement the above-mentioned first display operation, which is specifically an operation of displaying the device information of each sub-block included in the target block on the client. At this time, the electronic map corresponding to the parent block of the target block is displayed on the client.
[0039] Exemplarily, the device information of at least one sub-block of the target block can be obtained from the server according to the identifier of the target block. The server stores the device information of each block, and the device information forms a mapping relationship with the identifier of the block. Based on the mapping relationship and the identifier of the block, the server can query the device information of the block and return it to the client.
[0040] When the target block is not a block of the lowest level, the above-mentioned device information includes device statistical information of the devices in the sub-block. For example, the device statistical information may include at least one of the number of alarm devices, the number of faulty devices, the number of offline devices, the total number of devices, the number of normal devices, and the name of the sub-block.
[0041] When the target block is a block of the lowest level, the device information includes device attribute information of each device in the corresponding sub-block. For example, the device attribute information may include at least one of device location information, device icon, device color information, and device status.
[0042] S120: Refresh the electronic map according to the target block.
[0043] Exemplarily, the map information corresponding to the target block may be acquired according to the identifier of the target block, and the electronic map may be updated using the acquired map information.
[0044] S130: Display device information of at least one sub-block on the refreshed electronic map using an information display method that matches the block level of the target block.
[0045] When the target block is not a block of the lowest level, the device information includes device statistics information of the devices in the sub-blocks. At this time, the device statistics information of each sub-block can be displayed in the form of a card. Figure 2 The device statistics for each region are displayed. Figure 3 The equipment statistics of each building are displayed in the
[0046] When the target block is a block of the lowest level, the above-mentioned device information includes device attribute information of each device in the corresponding sub-block. At this time, each device can be displayed on the electronic map according to the device attribute information. Figure 4 The device icons of each device are displayed according to the device location of each device. The device status may include normal, faulty, offline, alarm, disabled, etc., and the device icons can be displayed in different colors. For example, the device icon of the alarm device is red, and the device icon of the normal device is green.
[0047] The above embodiment divides the area of the equipment to be detected into parks, regions, buildings, floors, etc. in a relatively detailed manner. The hierarchical display method can effectively avoid the problem of equipment icon stacking, making it convenient for users to view equipment at specified levels or locations as needed and to overview statistical data.
[0048] The following is a description of some parameters set on the client.
[0049] A parameter currentLevel is set on the client, which is used to record the level of the electronic map currently displayed by the client, that is, the level of the parent block of the target block. For example, when the electronic map currently displayed on the client is a campus, the value of currentLevel is 0. At this time, the electronic map of the client can display the equipment statistics of each area in the form of cards at the campus level.
[0050] When the electronic map currently displayed on the client is a region, the value of currentLevel is 1. At this time, the electronic map of the client can display the equipment statistics of each building in the form of cards at the regional level.
[0051] When the electronic map currently displayed on the client is a building, the value of currentLevel is 2. At this time, the electronic map of the client can display the device icons of the devices on each floor at the building level by switching between floors according to the device attribute information of each device.
[0052] If the subsequent hierarchical division is more detailed, the blocks corresponding to the rooms are divided out based on the floors. At this time, when the electronic map currently displayed on the client is a building, the value of currentLevel is 2, and the electronic map of the client can display the device statistics of each floor in the form of cards at the building level. When the electronic map currently displayed on the client is a floor, the value of currentLevel is 3. The electronic map of the client can display the device icons of the devices in each room at the floor level by switching rooms according to the device attribute information of each device. As the level is deeply subdivided, the value of currentLevel can increase successively.
[0053] The above embodiment queries and displays device information based on the division of the device area to be monitored into regional dimensions. It can be seen that the parameter currentLevel is greater than or equal to zero at this time. The present disclosure also discloses the query and display of device information in the classification dimension. At this time, the currentLevel can be set to less than zero, for example, to -1. Such a setting can quickly and accurately determine whether the device is in the regional management dimension or the classification management dimension according to the value of the parameter currentLevel.
[0054] currentLevel is used to distinguish whether the current device control is based on the regional dimension or the classification dimension, and to distinguish the level of the current electronic map. The regional dimension control will display device information layer by layer, and the classification dimension will directly mark the device icons of devices with certain classification characteristics on the electronic map.
[0055] In addition, the client also sets the following parameters:
[0056] activeZone is used to record the identifier of the block that the mouse moves into. When the mouse moves into a preset area corresponding to a block, such as a card, activeZone records the identifier of the block, and the client displays the outline of the block, making it easier for users to identify and manage the block. Figure 5 As shown in the figure, the outline of the area is displayed when the mouse moves into the card of the area; Figure 6 Shown is the building outline that appears when the mouse moves into the building's card.
[0057] zoneArr is a zone information array used to record the device information of each zone. Each item in the array corresponds to a zone. Each item contains: the zone identifier id, zone name, total number of devices, number of alarm devices, number of offline devices, device status, icon display color, etc.
[0058] buildingArr is a building information array used to record the equipment information of the building. Each item in the array corresponds to a building. Each item contains: the building identifier id, building name, total number of equipment, number of alarm devices, number of offline devices, device status, icon display color, etc.
[0059] zoneArr, buildingArr, used to display data when returning to the electronic map of the previous level. To facilitate users to view other areas or buildings, this variable is used to record data for floating up, that is, floating up from the floor to the equipment information of the building, or floating up from the building to the equipment information of the zone, without repeatedly calling the interface to re-acquire the equipment statistics corresponding to the level to which it floats up.
[0060] currentArea is used to record the current area, currentBuilding is used to record the current building, and currentFloor is used to record the current floor. All three are used to display device statistics of abnormal devices (faults, alarms, etc.).
[0061] Points, an array used to record multiple sets of device point coordinates, and is used to display the device icons of the devices to be displayed within the visible range of the client page.
[0062] zoneInfoArr, an array of contour point longitude and latitude. The array elements are objects used to store the identifiers and longitude and latitude coordinates of contour points corresponding to blocks such as regions and buildings. It is used to display the outline of the corresponding block when the mouse moves into the preset area of the region or building, such as a card.
[0063] floorArr: Floor array. Different buildings have different floor information. This parameter is used to record the identifiers of each floor and other block information to achieve floor switching on the electronic map.
[0064] Based on the above parameters, if the target area is a park, you can use the following steps to display the equipment information corresponding to the park and each area on the client:
[0065] (I) After the client page is initialized, the value of the currentLevel parameter is 0, and the getMapData function is called to obtain the map data, where the getMapData function is used to perform the following steps:
[0066] The first step is to obtain the park identifier id from the server and record it as mapId;
[0067] The second step is to use the obtained mapId as an input parameter to obtain a list of device statistics results from the server. The list includes device statistics information for each area.
[0068] The third step is to call the open interface API of the electronic map, pass in the mapId, and initialize the electronic map according to the mapId;
[0069] Step 4: Process the result list obtained in step 2 and store it in zoneArr in the form of an array;
[0070] The fifth step is to call the showCards function to display the device statistics corresponding to each zone on the electronic map. The input parameter of the showCards function is zoneArr.
[0071] (ii) showCards function, which is used to display the card corresponding to the block. Specifically, it displays the information in zoneArr on the electronic map. The location of the card is the longitude and latitude coordinates corresponding to the center of the block (i.e., area). The showCards function is used to perform the following steps:
[0072] The first step is to set the zoneInfoArr and points parameters to empty to store new data information;
[0073] The second step is to traverse zoneArr, record each item in the array as item, obtain the contour point coordinates of the area from the server according to the identifier of the area corresponding to the item, and add the identifier and contour point coordinate data of the area corresponding to the item to zoneInfoArr; the area name, total number of devices, number of alarm devices, number of offline devices, device status, device icon, etc. obtained from the item are stored in cardData in the form of objects;
[0074] The third step is to call the method of obtaining the center point of the electronic map and calculate the center point coordinates of each block area according to the zoneInfoArr stored in the second step;
[0075] Step 4: Call the add point marking method of the electronic map, pass in the center point coordinates calculated in step 3, and record the additional data object as ext_data, which contains cardData and the identifier of the area;
[0076] The fifth step is to call the method of modifying the point content of the electronic map, and display the card corresponding to each area on the electronic map according to the cardData and the center point coordinates of each area, wherein the device statistical information of the corresponding area is displayed on the card.
[0077] If the target block is not a park, you can use the following steps to display the device information of each sub-block on the client:
[0078] According to a data acquisition method corresponding to the block level of the target block, device information of at least one sub-block of the target block is acquired from a server; and using an information display method matching the block level of the target block, the device information of at least one sub-block is displayed on a refreshed electronic map.
[0079] Specifically, when the sub-block of the target block is not at the lowest level, that is, when the block level indicates that the device information is device statistical information, the device statistical information of at least one sub-block is obtained from the server according to the identifier of the target block; and the device statistical information of each sub-block is displayed in the form of a card.
[0080] When the sub-block of the target block is at the lowest level, that is, when the block level indicates that the device information is device attribute information, block information of at least one sub-block is obtained from the server according to the identifier of the target block, and device attribute information of the corresponding sub-block is obtained from the server according to the sub-block identifier in the at least one block information; and each device is displayed on the electronic map according to the device attribute information.
[0081] When the sub-block of the target block is at the lowest level, the devices in the first sub-block are displayed on the electronic map by default. After that, the devices in other sub-blocks can be displayed by switching the sub-blocks. Specifically, the following steps can be used to switch the sub-blocks and obtain the device attribute information:
[0082] In response to a selection operation on a target sub-block on the electronic map, a sub-block identifier of the target sub-block is determined; and according to the determined sub-block identifier, device attribute information of the target sub-block is obtained from the server.
[0083] Displaying each device on an electronic map according to the device attribute information can be specifically achieved using the following steps: when the device attribute information includes device color information and device icon, respectively determine the uniform resource location information that matches the device color information of each device, such as the uniform resource locator URL; determine a location link array including the uniform resource location information, such as a URL array; and use the location link array to display the device icon of each device on a refreshed electronic map according to the device color information of each device.
[0084] Exemplarily, the user performs the first display operation on the client, triggering the clickHandler function corresponding to the click event, and the clickHandler function can be used to display the device information of the block corresponding to the non-highest level on the client, so as to realize the drill-down display of the device information level display, that is, display the device information of the sub-block of the target block. Specifically, the following steps may be included:
[0085] The first step is to read the value of currentLevel and add 1 to it, indicating that the next level of device information will be displayed;
[0086] In the second step, the return value of the first display operation includes an additional data object ext_data, an identifier of the target block obtained through ext_data, and device information of each sub-block of the target block is obtained from the server according to the identifier;
[0087] The third step is to confirm the current level according to the value of currentLevel. If currentLevel is 1, the acquired device information is stored in buildingArr, and then the showCards function is called with buildingArr as the input parameter to display the cards corresponding to each building.
[0088] If currentLevel is 2, obtain floor-related data from the server, that is, obtain the block information corresponding to the sub-block from the server, and use the floorArr array to record the name of each floor and the sub-block identifier corresponding to the floor; then take the first item of data in the floorArr array and record it in currentFloor; obtain the device attribute information of the floor from the server according to the sub-block identifier corresponding to currentFloor, and use the obtained device attribute information as an input parameter to display each device on the map through the getAllDevices method;
[0089] When currentLevel is the highest, such as 3 or 4, clicking the device at this moment will pop up the device control drawer to control the device. The drawer content can be customized according to actual needs.
[0090] The above getAllDevices is used to display each device at the corresponding position of the electronic map according to the device attribute information, which can be implemented by the following steps:
[0091] The first step is to determine the device icon and device color of each device based on the device attribute information; the display color of the device icon is related to the device status, such as the device icon of the alarm device is displayed in red, the device icon of the faulty device is displayed in orange, and the device icon of the normal device is displayed in green, etc. Convert the device icon and device color data in the input parameter into a URL array that is easy to identify when adding point marks to the electronic map, and call batchConvertSVGToUrlArr in the following to assist this step;
[0092] The second step is to traverse the parameter group and call the electronic map's add point marking method with the device icon, device location, and other additional custom objects of a single device as parameters to display the device icon in the corresponding color at the corresponding location coordinates on the electronic map.
[0093] The batchConvertSVGToUrlArr above is used to batch-change the colors of the device icons of multiple devices and form a URL array. The specific steps are as follows:
[0094] In the first step, the original color of the device icon is displayed as a fixed color value. The parameter group is traversed and the fixed color value in each device is replaced with the device color corresponding to the device status of the device. A new Blob object is created to convert the string with the replaced color into a Blob type, and then converted into a URL through URL.createObjectUrl.
[0095] The second step is to add each calculated URL to the URL array, and the function returns the final URL array.
[0096] In some embodiments, the device control method can also display the outline of the block entered by the mouse, which can be achieved by the following steps:
[0097] In response to an external input device, such as a symbol corresponding to a mouse moving into a preset area corresponding to a block, such as an area of a card, according to the identifier of the block, the coordinate points of the block are obtained from an array that pre-stores the outline coordinate points and identifiers of each block, such as zoneInfoArr, and the outline of the block is displayed on the electronic map according to the obtained coordinate points.
[0098] For example, the display of the block outline can be realized by using the mouse over event processing function mouseoverHandler, and mouseoverHandler can be used to perform the following steps:
[0099] The first step is that the return value of the mouse move event contains the additional data object ext_data. The block with the same identifier as the identifier stored in ext_data is found from zoneInfoArr and recorded as zoneObj;
[0100] The second step is to call the map's polygon drawing method, pass the position array stored in zoneObj as the node coordinate array into the method, and set the outline and fill color of the polygon;
[0101] The third step is to store the identifier value into activeZone to indicate that the current block is in the selected and activated state;
[0102] The fourth step is to obtain the text object model DOM node of the corresponding card according to the identifier and set a new style to increase the distinguishability of the selected block.
[0103] In addition, only the interface corresponding to the device statistical information of the display block will display the outline of the block. For the interface of the display device, the outline of the corresponding block may not be displayed.
[0104] In some embodiments, the device control method can also stop displaying the outline of a block after the mouse leaves the block, which can be implemented by the following steps:
[0105] In response to an external input device, such as a symbol corresponding to a mouse, moving out of a preset area corresponding to a block, such as a card, the corresponding outline on the electronic map is cleared according to an identifier of the block.
[0106] Exemplarily, the displayed outline may be cancelled by using the mouse out event processing function mouseoutHandler, and mouseoutHandler may be used to perform the following steps:
[0107] The first step is to obtain the DOM node of the corresponding card according to the identifier of the block that the mouse leaves, and reset the style of the DOM node;
[0108] The second step is to call the method of clearing the overlay of the electronic map, cancel the block marked with activeZone, and set the value to -1.
[0109] In some embodiments, the following steps may be used to display device information corresponding to a block at an upper level of the target block on the client:
[0110] In response to a second display operation of entering a block at an upper level of the target block, a parent block of the target block is determined; a currently displayed electronic map is refreshed according to the parent block; stored device information is acquired according to a block level corresponding to the parent block, and the acquired device information is displayed on the refreshed electronic map in the form of a card.
[0111] Exemplarily, the second display operation can be implemented by clicking a “return to previous level” control displayed on the electronic device, or by clicking a “return to previous level” button on the electronic device.
[0112] Exemplarily, the backToPreLevel function can be used to display the device information corresponding to the block at the previous level of the target block. The function can be used to perform the following steps:
[0113] The first step is to reduce the value of currentLevel by 1.
[0114] In the second step, mapId is set to the identifier of the block at the previous level, that is, the identifier of the parent block of the target block, and the electronic map is refreshed according to mapId, and the block at the previous level is automatically located according to mapId;
[0115] The third step is to call the showCards method, pass in a matching array, such as buildingArr or zoneArr, based on the currentLevel, and render the corresponding card based on the matching array.
[0116] In some embodiments, the device information corresponding to the highest-level block can be displayed on the client using the following steps:
[0117] In response to the third display operation of entering the highest-level block, the currently displayed map is refreshed according to the block corresponding to the highest level; the device information of the stored highest-level block is obtained, and the obtained device information is displayed in the form of a card on the refreshed electronic map.
[0118] Exemplarily, the third display operation may be implemented by the user clicking a button on the client, or clicking a button control in the client interface.
[0119] Regardless of the level of the electronic map currently displayed on the client, the user can directly return to the highest level of the electronic map by triggering the third display operation and calling showHighestLevel. showHighestLevel can be used to perform the following steps:
[0120] The first step is to set mapId as the identifier corresponding to the park, refresh the electronic map based on mapId, and automatically locate the corresponding area of the park according to mapId;
[0121] The second step is to call the showCards method, pass in the current zoneArr, and render the cards of all zones.
[0122] In some embodiments, the above device control method can also control a certain device displayed on the electronic map, which can be implemented by the following steps:
[0123] In response to a display control operation on a target device displayed on an electronic map, device attribute information of the target device is obtained from the server according to an identifier of the target device; the device attribute information of the target device is displayed on the electronic map; in response to a revision operation on the device attribute information of the target device, the modified device attribute information is displayed, and the modified device attribute information is sent to the server so that the server stores the modified device attribute information.
[0124] The above embodiment realizes the control of devices in the regional dimension. In addition, in order to conveniently query devices with specific characteristics, the present disclosure also proposes a device control method based on the classification dimension, which may specifically include the following steps:
[0125] In response to a selection operation on a classification selection control on an electronic map, a target classification feature is determined, and the currently displayed electronic map is refreshed according to the block corresponding to the highest level; then, device attribute information of a device having the target classification feature is obtained from a server; then, each device is displayed on the refreshed electronic map according to the obtained device attribute information.
[0126] Exemplarily, the classification feature corresponding to the classification selection control includes at least one of a preset device status, whether to follow, a device name, and a device number.
[0127] In response to the selection operation, the preset parameter, ie, currentLevel, is set to a preset value, such as -1.
[0128] The above implementation manner of displaying each device on the refreshed electronic map according to the acquired device attribute information is the same as the implementation manner of displaying each device on the electronic map according to the device attribute information in the above embodiment, and will not be repeated here.
[0129] Exemplarily, a device state array deviceState and a device data array deviceListRes are pre-set, and the above-mentioned device management and control method based on classification dimension can be implemented by using these two arrays.
[0130] deviceState is used to record the target classification features selected by the user. Figure 7As shown, the first classification parent component contains a multiple-selection box for selecting the device state and whether it is a focused device. In order to more flexibly control the selection of classification features and the style and position of the multiple-selection box, it is passed in by the first classification parent component, and only further displayed and processed in the multiple-selection box. Monitor the changes of deviceState. After the deviceState changes, determine whether the length of the deviceState array is 0. If it is not 0, that is, the filtering conditions are passed in from the first classification parent component, that is, the target classification features are passed in. At this time, the device management of the classification dimension should be entered, and the currentLevel value should be set to -1; at this time, mapId is set to the identifier corresponding to the park, and the electronic map is refreshed according to mapId, and the corresponding area of the park is automatically located according to mapId. According to the value of deviceState, the device information of the device that meets the filtering conditions is obtained from the server, and the returned device information is used as the input parameter. The above getAllDevices method is called to display the device icon of the searched device at the corresponding position of the electronic map.
[0131] deviceListRes, used to store device names or device numbers, such as Figure 7 As shown, the second classification parent component includes components for displaying the names of equipment such as HVAC and transformers. In order to facilitate the second classification parent component to control the style of the search box, or to modify it to search by other conditions, it is passed in by the second classification parent component. Listen to changes in the deviceListRes value. If there is a value, set the value of currentLevel to -1, indicating that the classification dimension has been entered. At this time, set mapId to the identifier corresponding to the park, and refresh the electronic map according to mapId, and automatically locate the corresponding area of the park according to mapId. Use deviceListRes as the input parameter, call the above getAllDevices method, and display the device icons of the searched devices at the corresponding positions on the electronic map.
[0132] In addition, you can search for specific devices by entering the device name or device number, that is, to search for devices with target classification characteristics, such as Figure 7 As shown, an input box or search box is set in the upper left corner of the electronic map interface for inputting the device name or device number of the device to be searched. The above input box or search box can also be displayed on the electronic map corresponding to other levels, such as Figure 2 , Figure 3 , Figure 4 , Figure 5 as well as Figure 6 An input box or a search box is displayed on the electronic map of the corresponding level.
[0133] In addition, when the mouse moves to a component position in the second classification parent component, the client can also display a prompt message to prompt the user to filter other devices of the same type by clicking the component. Exemplarily, the prompt message can be: click to view other devices of the same type.
[0134] The device control method of the above-mentioned embodiment can be implemented based on the front-end framework vue and the electronic map open interface to achieve visual control of a large number of equipment in the park. By referring to the electronic map, the location of the equipment can be clearly and intuitively displayed. Users can control the equipment according to the regional division with blocks of different levels. For example, the device statistics of blocks at each level can be displayed in a step-by-step manner according to the region, building, and floor, which is convenient for overall monitoring. The present disclosure can also view devices with specified classification characteristics according to the status and name of the device, directly supervise devices with certain classification characteristics, or manage devices of your concern. Click on a specific device to further view the details of the device and directly customize the device. The embodiment of the present disclosure focuses on the park level with a large area, and uniformly controls a larger number of devices, while also taking into account the display of small-scale equipment, such as floors or rooms.
[0135] The electronic map is further divided into parks, regions, buildings, floors, etc. to avoid the problem of equipment icon stacking, making it convenient for users to view equipment at specified locations as needed and to overview statistical data; a device management method with classification dimensions is provided to facilitate users to filter and control based on the classification characteristics of the equipment.
[0136] Based on the same inventive concept, an equipment control device corresponding to a token management method is also provided in an embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned equipment control method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0137] like Figure 8 FIG. 1 is a schematic diagram of the structure of the device control apparatus provided in an embodiment of the present disclosure, which is applied to a client and includes:
[0138] The information acquisition module 810 is used to obtain device information of at least one sub-block of the target block from the server in response to a first display operation on the target block on the electronic map; wherein the device area to be monitored is pre-divided into multiple blocks with a hierarchical relationship.
[0139] The map refreshing module 820 is used to refresh the electronic map according to the target block.
[0140] The information display module 830 is used to display the device information of at least one sub-block on the refreshed electronic map by using an information display method that matches the block level of the target block.
[0141] In some embodiments, the device control apparatus further includes a classification control module 840 for:
[0142] In response to a selection operation on a category selection control on the electronic map, a target category feature is determined, and a currently displayed electronic map is refreshed according to a block corresponding to the highest level;
[0143] Acquire device attribute information of a device having the target classification feature from a server;
[0144] Each device is displayed on the refreshed electronic map according to the acquired device attribute information.
[0145] In some embodiments, the device attribute information includes at least one of device location information, device icon, device color information, and device status; and / or,
[0146] The classification feature corresponding to the classification selection control includes at least one of a preset device status, whether to pay attention, a device name, and a device number.
[0147] In some embodiments, when displaying each device on the refreshed electronic map according to the acquired device attribute information, the classification control module 840 is used to:
[0148] In the case where the device attribute information includes device color information and device icons, respectively determining uniform resource location information matching the device color information of each device;
[0149] Determine an array of location links including uniform resource location information;
[0150] By utilizing the positioning link array, the device icon of each device is displayed on the refreshed electronic map according to the device color information of each device.
[0151] In some embodiments, when the information acquisition module 810 acquires the device information of at least one sub-block of the target block from the server, it is used to:
[0152] According to a data acquisition method corresponding to the block level of the target block, device information of at least one sub-block of the target block is acquired from a server.
[0153] In some embodiments, when the information acquisition module 810 acquires the device information of at least one sub-block of the target block from the server according to the data acquisition method corresponding to the block level of the target block, it is used to:
[0154] When the device information is indicated as device statistical information at the block level, obtaining device statistical information of at least one sub-block according to an identifier of the target block; and / or,
[0155] When the block level indicates that the device information is device attribute information, block information of at least one sub-block is obtained from the server according to the identifier of the target block, and device attribute information of the corresponding sub-block is obtained from the server according to the sub-block identifier in the at least one block information.
[0156] In some embodiments, the information acquisition module 810 is further used to:
[0157] In response to a selection operation on a target sub-block on the electronic map, determining a sub-block identifier of the target sub-block;
[0158] According to the determined sub-block identifier, device attribute information of the target sub-block is obtained from the server.
[0159] In some embodiments, when the information display module 830 displays the device information of at least one sub-block on the refreshed electronic map using an information display method matching the block level of the target block, it is used to:
[0160] When the device information is indicated as device statistical information at the block level, the device statistical information of each sub-block is displayed in the form of a card;
[0161] When the device information is indicated as device attribute information at the block level, each device is displayed on the electronic map according to the device attribute information.
[0162] In some embodiments, a profile display module 850 is further included for:
[0163] In response to a symbol corresponding to an external input device moving into a preset area corresponding to a block, according to an identifier of the block, the coordinate points of the block are obtained from an array in which the outline coordinate points and identifiers of each block are pre-stored, and the outline of the block is displayed on an electronic map according to the obtained coordinate points.
[0164] In some embodiments, the outline display module 850 is further used to:
[0165] In response to the symbol corresponding to the external input device moving out of the preset area corresponding to the block, the corresponding outline on the electronic map is cleared according to the identifier of the block.
[0166] In some embodiments, a higher level display module 860 is further included for:
[0167] In response to a second display operation of entering a block at an upper level of the target block, determining a parent block of the target block;
[0168] Refreshing the currently displayed electronic map according to the parent block;
[0169] The stored device information is acquired according to the block level corresponding to the parent block, and the acquired device information is displayed on the refreshed electronic map in the form of a card.
[0170] In some embodiments, a top-level display module 870 is further included for:
[0171] In response to a third display operation of entering a block at the highest level, refreshing a currently displayed map according to the block corresponding to the highest level;
[0172] The device information of the highest-level block is obtained, and the obtained device information is displayed on the refreshed electronic map in the form of a card.
[0173] In some embodiments, an attribute revision module 880 is further included for:
[0174] In response to a display control operation on a target device displayed on the electronic map, acquiring device attribute information of the target device from the server according to an identifier of the target device;
[0175] Displaying device attribute information of the target device on the electronic map;
[0176] In response to a revision operation on the device attribute information of the target device, the modified device attribute information is displayed, and the modified device attribute information is sent to the server.
[0177] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0178] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0179] Fig. 9A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0180] like Fig. 9 As shown, the device 900 includes a computing unit 910, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 920 or a computer program loaded from a storage unit 980 into a random access memory (RAM) 930. In the RAM 930, various programs and data required for the operation of the device 900 can also be stored. The computing unit 910, the ROM 920, and the RAM 930 are connected to each other via a bus 940. An input / output (I / O) interface 950 is also connected to the bus 940.
[0181] A number of components in the device 900 are connected to the I / O interface 950, including: an input unit 960, such as a keyboard, a mouse, etc.; an output unit 970, such as various types of displays, speakers, etc.; a storage unit 980, such as a disk, an optical disk, etc.; and a communication unit 990, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 990 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0182] The computing unit 910 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 910 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 910 performs the various methods and processes described above, such as the device control method. For example, in some embodiments, the device control method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 980. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 920 and / or the communication unit 990. When the computer program is loaded into the RAM 930 and executed by the computing unit 910, one or more steps of the device control method described above may be performed. Alternatively, in other embodiments, the computing unit 910 may be configured to perform the device control method in any other appropriate manner (e.g., by means of firmware).
[0183] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0184] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0185] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0186] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0187] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0188] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0189] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0190] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A device management and control method, applied to a client, characterized in that: include: In response to a first display operation on a target block on the electronic map, obtaining device information of at least one sub-block of the target block from a server; wherein the device area to be monitored is pre-divided into a plurality of blocks having a hierarchical relationship; Refresh the electronic map according to the target block; Using an information display method that matches the block level of the target block, displaying device information of at least one sub-block on the refreshed electronic map; The method further includes: in response to a selection operation of a classification selection control on the electronic map, determining target classification features, and refreshing the currently displayed electronic map according to a block corresponding to the highest level; Acquire device attribute information of a device having the target classification feature from a server; Displaying each device on a refreshed electronic map according to the acquired device attribute information; displaying each device on a refreshed electronic map according to the acquired device attribute information further includes: when the device attribute information includes device color information and device icon, respectively determining uniform resource location information that matches the device color information of each device; determining a location link array including the uniform resource location information; using the location link array, displaying the device icon of each device on a refreshed electronic map according to the device color information of each device.
2. The method according to claim 1, characterized in that The device attribute information includes at least one of device location information, device icon, device color information, and device status; and / or, The classification feature corresponding to the classification selection control includes at least one of a preset device status, whether to pay attention, a device name, and a device number.
3. The method according to claim 1, characterized in that The acquiring device information of at least one sub-block of the target block from the server includes: According to a data acquisition method corresponding to the block level of the target block, device information of at least one sub-block of the target block is acquired from a server.
4. The method according to claim 3, characterized in that The acquiring device information of at least one sub-block of the target block from the server according to the data acquisition method corresponding to the block level of the target block includes: When the device information is indicated as device statistical information at the block level, obtaining device statistical information of at least one sub-block according to an identifier of the target block; and / or, When the block level indicates that the device information is device attribute information, block information of at least one sub-block is obtained from the server according to the identifier of the target block, and device attribute information of the corresponding sub-block is obtained from the server according to the sub-block identifier in the at least one block information.
5. The method according to claim 4, characterized in that Also includes: In response to a selection operation on a target sub-block on the electronic map, determining a sub-block identifier of the target sub-block; According to the determined sub-block identifier, device attribute information of the target sub-block is obtained from the server.
6. The method according to claim 4, characterized in that The displaying of the device information of at least one sub-block on the refreshed electronic map using the information display method matching the block level of the target block includes: When the device information is indicated as device statistical information at the block level, the device statistical information of each sub-block is displayed in the form of a card; When the device information is indicated as device attribute information at the block level, each device is displayed on the electronic map according to the device attribute information.
7. The method according to claim 4, characterized in that Also includes: In response to a symbol corresponding to an external input device moving into a preset area corresponding to a block, according to an identifier of the block, the coordinate points of the block are obtained from an array in which the outline coordinate points and identifiers of each block are pre-stored, and the outline of the block is displayed on an electronic map according to the obtained coordinate points.
8. The method according to claim 4, characterized in that Also includes: In response to the symbol corresponding to the external input device moving out of the preset area corresponding to the block, the corresponding outline on the electronic map is cleared according to the identifier of the block.
9. The method according to claim 1, characterized in that: Also includes: In response to a second display operation of entering a block at an upper level of the target block, determining a parent block of the target block; Refreshing the currently displayed electronic map according to the parent block; The stored device information is acquired according to the block level corresponding to the parent block, and the acquired device information is displayed on the refreshed electronic map in the form of a card.
10. The method according to claim 1, characterized in that Also includes: In response to a third display operation of entering a block at the highest level, refreshing a currently displayed map according to the block corresponding to the highest level; The device information of the highest-level block is obtained, and the obtained device information is displayed on the refreshed electronic map in the form of a card.
11. The method according to claim 1, characterized in that: Also includes: In response to a display control operation on a target device displayed on the electronic map, acquiring device attribute information of the target device from the server according to an identifier of the target device; Displaying device attribute information of the target device on the electronic map; In response to a revision operation on the device attribute information of the target device, the modified device attribute information is displayed, and the modified device attribute information is sent to the server.
12. The method according to claim 1, characterized in that Also includes: The level corresponding to the device information displayed on the current electronic map is stored in the preset parameters; In response to the selected operation, the preset parameter is set to a preset value.
13. A device control device, applied to a client, characterized in that: include: An information acquisition module, configured to, in response to a first display operation on a target block on an electronic map, acquire device information of at least one sub-block of the target block from a server; wherein the device area to be monitored is pre-divided into a plurality of blocks having a hierarchical relationship; A map refresh module, used for refreshing the electronic map according to the target block; An information display module, configured to display device information of at least one sub-block on a refreshed electronic map using an information display method that matches the block level of the target block; A classification control module, for determining target classification features in response to a selection operation on a classification selection control on an electronic map, and refreshing a currently displayed electronic map according to a block corresponding to a highest level; Acquire device attribute information of a device having the target classification feature from a server; Display each device on the refreshed electronic map according to the acquired device attribute information; When displaying each device on a refreshed electronic map according to the acquired device attribute information, the classification control module is used to determine the uniform resource location information that matches the device color information of each device, respectively, when the device attribute information includes device color information and device icon; determine a location link array including the uniform resource location information; and use the location link array to display the device icon of each device on the refreshed electronic map according to the device color information of each device.
14. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 12.
15. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 12.
