Graph-based attribute dynamic display method, terminal equipment and storage medium
Through the dynamic display method of attributes based on charts, the time wasted and unintuitive problems of hardware device attribute viewing are solved, and the intuitive display and convenient viewing of hardware device attributes are realized. The attributes of hardware devices are displayed through unified rules and unified rules and real-time update of charts are displayed. change.
Patent Information
- Application Number
- CN202410562452.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-11-08
AI Technical Summary
When viewing attributes, existing hardware devices have problems such as wasting time, inability to obtain the time nodes and values of attribute reporting in time, and the property change process is not intuitive.
The dynamic display method of attributes based on charts is adopted, and the attribute cards are generated to display them in the form of a timeline chart through unified rules, and the attribute information is collected and updated in real time, and the specific information is viewed through the mouse by selecting time points.
It realizes the intuitive visual display of hardware device attributes, which facilitates users to view the property changes process and historical data, saves time and improves the convenience of use.
Smart Images

Figure CN118917274A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hardware attribute display, and in particular to a graph-based attribute dynamic display method, terminal equipment and storage medium. Background Art
[0002] After hardware manufacturers sell their hardware devices (such as sensors) to customers, customers sometimes need to view the attribute data of the sensors. Since each hardware device has its own unique physical model structure, the hardware device will parse the attributes that the hardware device can collect according to its own physical model structure. During operation, the hardware device can display the attributes included in each hardware device and the change process of each attribute in the form of a chart in the browser's visual interface in real time, as well as the latest reported data. However, its display method still has the following defects:
[0003] (1) To view the properties of a hardware device, you need to go to the hardware device to view the properties of the current hardware device. When there are many types of devices, it takes a lot of time to view the properties in this way.
[0004] (2) Users cannot know in real time when a hardware device reports a certain attribute and what the value is.
[0005] (3) The changing process of each attribute value of the hardware device cannot be viewed intuitively by the user, which is inconvenient to use. Summary of the invention
[0006] In order to solve the above problems, the present invention proposes a graph-based attribute dynamic display method, terminal device and storage medium.
[0007] The specific plan is as follows:
[0008] A method for dynamically displaying attributes based on a chart includes the following steps:
[0009] S1: Structuring the attributes corresponding to all hardware devices according to a unified rule to obtain the physical model structure of each attribute;
[0010] S2: For each hardware device, traverse the physical model structure of each attribute corresponding to it, and generate an attribute card corresponding to the attribute based on the data type of each attribute; set the attribute card to display the attribute information of each attribute at different time points in the form of a timeline-based chart;
[0011] When the data type of an attribute is a single attribute data structure, its attribute card only contains the data information of the attribute;
[0012] When the attribute type of an attribute is a structure, its attribute card includes data information of all sub-attributes under the attribute;
[0013] When the attribute type of an attribute is an array, its attribute card consists of sub-attribute cards with the same number of array elements, and each sub-attribute card contains data information of all attributes in the corresponding array element;
[0014] S3: collect the current attribute information of each hardware device in real time, and update the attribute card of each attribute corresponding to each hardware device in combination with the historical attribute information of each hardware device.
[0015] Furthermore, the object model structure of the attribute includes: the data type of the attribute, the unique code of the parent attribute of the attribute, the name of the attribute and the unique code of the attribute.
[0016] Furthermore, the data types corresponding to the data structure of a single attribute include: integer type, string type, single-precision floating point type, double-precision floating point type, enumeration type and Boolean type.
[0017] Furthermore, when the attribute type is a structure, each sub-attribute contained in the corresponding attribute is represented by a curve of a different color in the attribute card.
[0018] Furthermore, the property card also includes displaying the current time and current property information.
[0019] Furthermore, after receiving the selection information of the time point in the attribute card, the attribute information corresponding to the time point is searched and displayed in a pop-up window.
[0020] Furthermore, when the attribute card includes multiple attributes, the multiple attributes are displayed in the form of a list in the pop-up window.
[0021] Furthermore, the selection information of the time point can be obtained by moving the mouse cursor over the corresponding horizontal coordinate in the chart.
[0022] A terminal device for dynamically displaying attributes based on a chart comprises a processor, a memory and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described above in the embodiment of the present invention are implemented.
[0023] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above in an embodiment of the present invention are implemented.
[0024] The present invention adopts the above technical solution to realize the visual display of hardware device attributes, and displays the change process of each attribute of the hardware device in the form of a timeline line graph, so that users can intuitively see the reported attributes of the hardware device. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 Shown is a flow chart of a method according to a first embodiment of the present invention.
[0026] Figure 2 Shown is a schematic diagram of the first type of data type attribute card in this embodiment.
[0027] Figure 3 Shown is a schematic diagram of the second type of data type attribute card in this embodiment.
[0028] Figure 4 Shown is a schematic diagram of each sub-attribute card included in the third type of data in this embodiment.
[0029] Figure 5 Shown is a schematic diagram of the third type of data type attribute card in this embodiment. DETAILED DESCRIPTION
[0030] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.
[0031] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0032] Embodiment 1:
[0033] The embodiment of the present invention provides a method for dynamically displaying attributes based on a chart, such as Figure 1 As shown, the method comprises the following steps:
[0034] S1: Structuring the attributes corresponding to all hardware devices according to unified rules to obtain the physical model structure of each attribute.
[0035] Since the physical models of different hardware devices are different, that is, the attributes and structures are different, in view of this, a unified structuring standard is designed in this embodiment to structure the physical models of various attributes corresponding to all hardware devices according to a unified rule. The specific structured format of each attribute is as follows:
[0036]
[0037]
[0038] Before the structured processing is performed in this embodiment, the data structure of each attribute needs to be abstracted into the data type set in this embodiment. The data types set in this embodiment mainly include three categories. The first category is the data structure corresponding to a single attribute, such as integer int, string string, single-precision floating point float, double-precision floating point double, enumeration enum, Boolean bool, etc.; the second category is the structure type struct; the third category is the array type array. Among them, the first category of attributes is a single attribute without sub-attributes; the second category of attributes includes multiple sub-attributes; the third category of attributes consists of multiple elements, each element can be a single attribute of the first category, or a structure of the second category consisting of multiple sub-attributes.
[0039] S2: For each hardware device, traverse the physical model structure of each attribute corresponding to it, and generate an attribute card corresponding to the attribute based on the data type of each attribute. Set the attribute card to display the attribute information of each attribute at different time points in the form of a timeline-based chart.
[0040] The process of converting attribute information at different times into charts can be achieved through the echart component.
[0041] The following is an introduction to the attribute cards of the above three types of data types.
[0042] (1) When the data type of an attribute is a single attribute data structure, its attribute card only contains the data information of this attribute.
[0043] like Figure 2 As shown, the attributes Temperature (temperature), Humidity (humidity) and CO2 (carbon dioxide concentration) are all data structures of a single attribute.
[0044] (2) When the attribute type of an attribute is a structure, its attribute card includes data information of all sub-attributes under the attribute.
[0045] like Figure 3 As shown, the first attribute includes sub-attributes such as LN, PII, PIO, and PSI.
[0046] In order to better display and distinguish each sub-attribute, in this embodiment, different sub-attributes are set to be represented by curves of different colors.
[0047] (3) When the attribute type of an attribute is an array, its attribute card is composed of sub-attribute cards with the same number of array elements, and each sub-attribute card contains data information of all attributes in the corresponding array element.
[0048] like Figure 4As shown in the figure, the attribute Periodic Data of Line Counting is an attribute of an array structure, which contains 4 elements, so its attribute card is divided into 4 sub-attribute cards, namely, Periodic Data of Line Counting 1, Periodic Data of Line Counting 2, Periodic Data of Line Counting 3, and Periodic Data of Line Counting 4. Since the data type of the element corresponding to each sub-attribute card is Figure 3 Therefore, the corresponding sub-attribute card is displayed as follows: Figure 5 shown.
[0049] In order to facilitate users to better obtain the current attribute information of each attribute, this embodiment also includes displaying the current time and current attribute information in the attribute card, such as Figure 3 Line A under LN, 30 under PII, 25 under PIO, and 2 under PSI are the current attribute information of the four attributes LN, PII, PIO, and PSI.
[0050] In order to facilitate users to better obtain the attribute information of various attributes at different historical moments, this embodiment also includes searching for the attribute information corresponding to the time point after receiving the selection information of the time point in the attribute card, and displaying it in a pop-up window. The selection information of the time point can be obtained by the corresponding horizontal coordinate of the mouse cursor in the chart, and the selection method can be to stop the mouse cursor, click the left or right button by single-clicking or double-clicking, etc., which is not limited here. Figure 3 The pop-up window shows the attribute information at 01:00:01 on March 16, 2024. When the attribute card includes multiple attributes, the multiple attributes are displayed in the pop-up window in the form of a list.
[0051] S3: collect the current attribute information of each hardware device in real time, and update the attribute card of each attribute corresponding to each hardware device in combination with the historical attribute information of each hardware device.
[0052] Updating the property card adds the current property information to the chart in the property card.
[0053] This embodiment visualizes the properties of all hardware devices and can display the change process of each property of the hardware device in the form of a timeline line graph, so that users can intuitively see the reported properties of the hardware devices.
[0054] Embodiment 2:
[0055] The present invention also provides a terminal device for dynamically displaying attributes based on a chart, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned method embodiment of the first embodiment of the present invention when executing the computer program.
[0056] Further, as an executable solution, the terminal device for dynamically displaying attributes based on a graph may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The terminal device for dynamically displaying attributes based on a graph may include, but is not limited to, a processor and a memory. Those skilled in the art may understand that the composition structure of the terminal device for dynamically displaying attributes based on a graph is merely an example of a terminal device for dynamically displaying attributes based on a graph, and does not constitute a limitation on the terminal device for dynamically displaying attributes based on a graph. It may include more or less components than the above, or a combination of certain components, or different components. For example, the terminal device for dynamically displaying attributes based on a graph may also include input and output devices, network access devices, buses, etc., and the embodiments of the present invention do not limit this.
[0057] Further, as an executable solution, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device for dynamically displaying attributes based on a chart, and uses various interfaces and lines to connect the various parts of the terminal device for dynamically displaying attributes based on a chart.
[0058] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device based on the dynamic display of attributes of the chart by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0059] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.
[0060] If the module / unit integrated in the terminal device for dynamically displaying the attributes of the chart is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc.
[0061] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A method for dynamically displaying attributes based on a chart, characterized in that: The following steps are involved: S1: Structuring the attributes corresponding to all hardware devices according to unified rules to obtain the physical model structure of each attribute; S2: For each hardware device, traverse the physical model structure of each attribute corresponding to it, and generate an attribute card corresponding to the attribute based on the data type of each attribute; set the attribute card to display the attribute information of each attribute at different time points in the form of a timeline-based chart; When the data type of an attribute is a data structure of a single attribute, its attribute card only contains the data information of the attribute; When the attribute type of an attribute is a structure, its attribute card includes data information of all sub-attributes under the attribute; When the attribute type of an attribute is an array, its attribute card consists of sub-attribute cards with the same number of array elements, and each sub-attribute card contains data information of all attributes in the corresponding array element; S3: collect the current attribute information of each hardware device in real time, and update the attribute card of each attribute corresponding to each hardware device in combination with the historical attribute information of each hardware device.
2. The method for dynamically displaying attributes based on a chart according to claim 1, characterized in that: The physical model structure of an attribute includes: the data type of the attribute, the unique code of the parent attribute of the attribute, the name of the attribute, and the unique code of the attribute.
3. The method for dynamic display of attributes based on a chart according to claim 1, characterized in that: The data types corresponding to the data structure of a single attribute include: integer, string, single-precision floating point, double-precision floating point, enumeration, and Boolean.
4. The method for dynamic display of attributes based on a chart according to claim 1, characterized in that: When the attribute type is a structure, the sub-attributes contained in the corresponding attribute are represented by curves of different colors on the attribute card.
5. The method for dynamic display of attributes based on a chart according to claim 1, characterized in that: The property card also includes the display of the current time and current property information.
6. The method for dynamic display of attributes based on a chart according to claim 1, characterized in that: When the selection information of the time point is received in the attribute card, the attribute information corresponding to the time point is searched and displayed in a pop-up window.
7. The method for dynamically displaying attributes based on a chart according to claim 6, characterized in that: When the attribute card includes multiple attributes, the multiple attributes are displayed in the form of a list in the pop-up window.
8. The method for dynamically displaying attributes based on a chart according to claim 6, characterized in that: The selected information of a time point can be obtained by moving the mouse cursor over the corresponding horizontal axis in the chart.
9. A terminal device for dynamically displaying attributes based on a chart, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
