A method, apparatus, and storage medium for facilitating smart meter maintenance GUIs
By encapsulating a unified GUI library interface and a cross-platform graphics library, the problem of high development and maintenance costs for smart meters on different platforms is solved, enabling meter access and maintenance without repeated development, thus improving the convenience and efficiency of the meters.
Patent Information
- Application Number
- CN202410971647.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-07-19
AI Technical Summary
Existing smart meters lack a unified approach to human-machine interface and maintenance, resulting in high development and maintenance costs. Furthermore, existing methods are unsuitable for small-scale applications, requiring users to learn additional techniques and engage in repetitive development.
By encapsulating a unified GUI library interface, a device GUI package is developed, and a cross-platform graphics library is used to run the platform GUI package, supporting data synchronization and virtual display, enabling instrument access and maintenance on different platforms.
This eliminates the need for repeated development on different platforms, reducing learning and maintenance costs, shortening development cycles, and improving the convenience and maintenance efficiency of the instruments.
Smart Images

Figure CN118916107B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of instrument maintenance, and in particular to a method, device and storage medium for facilitating GUI maintenance of intelligent instruments. BACKGROUND
[0002] Industrial field instrument intelligence has become very popular, and instruments have certain computing power and can run some auxiliary functions in addition to the measurement function of the instrument itself, such as human-computer interaction, network communication, information storage, etc.
[0003] At present, general intelligent instruments have human-computer interaction, mainly field operation feedback and communication, and specific development is needed for different instruments. When using a PC computer or a hand controller to access the instrument, separate development is needed on the PC computer or the hand controller, the user needs to learn the use method additionally, and the instrument function is changed, so the corresponding access device needs to be developed and upgraded. Some intelligent instruments can use the certified communication package to realize instrument access after being certified by a standardized protocol (such as HART). The communication package can be upgraded along with the instrument, but there are certain limitations in terms of function, and only fixed values can be viewed and edited, and some device backup or function detection functions cannot be performed. At present, intelligent instruments do not have a unified method for human-computer display and maintenance. Although the use of integrated networks can monitor and manage intelligent instruments used in large-scale systems, special research and development and system construction are needed, and the economic and human costs are high. In small-scale applications or single instrument management, this method is not suitable, and although the maintenance and management software provided by the manufacturer can be used, additional development or purchase is needed, and the user needs to increase the learning cost. SUMMARY
[0004] The purpose of the present application is to solve the problems in the prior art and provide a method for facilitating GUI maintenance of intelligent instruments, comprising the following steps:
[0005] S1: encapsulating a unified interface in a GUI library, realizing the connection between different GUI libraries through the interface, and developing a display page library through a fixed graphic drawing library and display control in the GUI library, wherein the GUI library further comprises library data synchronization, operation messages and library virtual data;
[0006] S2: developing a device GUI package for the instrument through the GUI library, developing a display page of the device GUI package through a display control of the device GUI library and the display page library, and developing a virtual display and message implementation platform GUI package to run in the platform according to a cross-platform graphic library;
[0007] S3: accessing the device GUI package through the platform GUI package, achieving the same effect as the platform and the instrument, and further achieving maintenance of the instrument through the communication medium.
[0008] Preferably, in step S1, the interface further comprises:
[0009] The interface comprises an operation information, a display interface, a data synchronization interface, and a virtual interface, which strip the page display library of the GUI library from the hardware, wherein the operation information is used to receive external messages, i.e., to realize the interaction between the page display library and external operations, the display interface is used to realize the interaction of the GUI library on different platforms, the library virtual data and the library data synchronization realize the synchronization between the page display library and the display interface, and the page definition library is the actual page of the instrument.
[0010] Preferably, in step S2, the device GUI package further comprises:
[0011] The development of the device GUI package is performed in advance before the completion of the instrument, and is run in the cross-platform graphic library for function demonstration and verification, the running environment of the cross-platform graphic library is developed for the GUI library, the device GUI package is developed according to the running environment, and the device GUI package is run into the instrument.
[0012] Preferably, the display page further comprises:
[0013] The data content of the display page is obtained through the interface, the data content is imported into the device data synchronization module of the device GUI package through the interface, and data synchronization between different device GUI packages is realized.
[0014] Preferably, the device data synchronization module further comprises:
[0015] The device data synchronization module specifies data addresses and data types, including real-time update data, read-only data, and read-write data, after the design data of the display page is designed according to the synchronization mode, the display page directly uses the design data for display and editing, the device data synchronization module synchronizes the design data to the part actually used and saved, and access of the display page to the data content is realized.
[0016] Preferably, in step S2, the platform GUI package runs in the platform, and further comprises:
[0017] The platform GUI package runs in the platform in a closed package mode, after the platform GUI package is connected to a display unit of the platform, the platform GUI package outputs the display page to the display unit, and updates the corresponding display unit according to operation commands and data, the internal support data synchronization of the platform GUI package is used, the platform GUI packages running in different platforms can realize synchronous running, and the display units of different platforms are updated in real time.
[0018] Preferably, in step S2, the cross-platform graphics library further comprises:
[0019] The cross-platform graphics library is used for developing a virtual display interface to present the platform GUI package, and converting keyboard input commands into message processing interfaces conforming to the platform GUI package by using keyboard input in a manner, after a thread running the platform GUI package is added in the cross-platform graphics library, the platform GUI package is presented and operated on a terminal running the cross-platform graphics library.
[0020] Preferably, in step S3, the platform GUI package accesses the device GUI package to realize the same running effect of the platform and the instrument, and further comprises:
[0021] The display page and the instrument are connected, that is, internal data or package virtual data of the instrument connected by the device GUI package are used as data support of the display page, the virtual display interface and the instrument are connected, and data synchronization of the platform and the instrument is realized through a platform data synchronization module and a device data synchronization module of the platform GUI package.
[0022] A computer device comprises a memory and a processor, the memory stores computer readable instructions, and the computer readable instructions are executed by the processor to make the processor execute the steps of the method for facilitating the smart instrument maintenance GUI in an embodiment.
[0023] A storage medium stores computer readable instructions, and the computer readable instructions are executed by one or more processors to make the one or more processors execute the steps of the method for facilitating the smart instrument maintenance GUI as described in an embodiment.
[0024] Compared with the prior art, the present application has the following beneficial effects:
[0025] 1) The present application can separate the development of human-machine interface and instrument function by improved GUI component, namely GUI library, and the GUI component has data virtualization and data synchronization module functions. The human-machine interface development can be carried out without actual hardware of the instrument, and the GUI component can be used in the instrument after the actual hardware platform is provided, without additional development, so as to realize one-time development and achieve the purpose of instrument operation and maintenance.
[0026] 2) The present application can maintain the instrument by running the GUI component under cross-platform architecture, and the operation logic and the instrument itself are synchronized, which has good convenience for small-scale or single-table maintenance. BRIEF DESCRIPTION OF DRAWINGS
[0027] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not intended to limit the scope of the present application.
[0028] Figure 1 A flow chart of the method for facilitating the maintenance of GUI of intelligent instrument of the present application;
[0029] Figure 2 A component structure diagram of the GUI component of the method for facilitating the maintenance of GUI of intelligent instrument of the present application;
[0030] Figure 3 A component structure diagram of the GUI package of the method for facilitating the maintenance of GUI of intelligent instrument of the present application;
[0031] Figure 4 A synchronization schematic diagram of the GUI package of the method for facilitating the maintenance of GUI of intelligent instrument of the present application running on different platforms;
[0032] Figure 5 A data synchronization module schematic diagram of the method for facilitating the maintenance of GUI of intelligent instrument of the present application;
[0033] Figure 6 A GUI package running effect schematic diagram of the method for facilitating the maintenance of GUI of intelligent instrument of the present application on PC;
[0034] Figure 7 A GUI package running effect schematic diagram of the method for facilitating the maintenance of GUI of intelligent instrument of the present application on target instrument. DETAILED DESCRIPTION
[0035] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0036] Those skilled in the art can understand that the singular form "a", "an", "the" used herein can include the plural form, unless specifically stated otherwise. It should be further understood that the phrase "comprising" used in the specification of the present application means that the features, integers, steps, operations, elements and / or components exist, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0037] The technical terms designed in the embodiments of the present application are defined as follows:
[0038] GUI: Graphical User Interface (abbreviation: GUI, also known as graphical user interface) refers to a computer operation user interface displayed in a graphical manner, which here means a user operation display interface used in an instrument.
[0039] Smart meter: a smart meter is a new generation of "intelligent meter" which combines computer technology and detection technology with a microcomputer (single-chip microcomputer) as the main body. Here, the smart meter refers to a meter with a display screen and keys, which can run a GUI interface and has certain interactive capability.
[0040] PC computer: refers to a personal computer, which is a multipurpose computer with general-purpose computing function. Desktop computers, notebook computers, small notebook computers, tablet computers and ultrabooks all belong to personal computers. Here, the personal computer mainly refers to a convenient personal computer.
[0041] HART: HART is an open communication protocol for addressable remote sensor high-speed channel, which was introduced by ROSEMOUNT company in the United States in 1985 for communication between field intelligent instruments and control room devices.
[0042] wxWidgets: wxWidgets is an open source cross-platform C++ framework library that can provide GUI (Graphical User Interface) and other tools.
[0043] Embodiment 1
[0044] Please refer toFigure 1 As shown, the method for facilitating the GUI of the intelligent instrument maintenance provided in the embodiment includes the following steps.
[0045] S1: encapsulating a unified interface in the GUI library, realizing the connection between different GUI libraries through the interface, and developing a display page library through the fixed graphic drawing library and display control in the GUI library, wherein the GUI library further includes library data synchronization, operation messages, and library virtual data. Specifically, in the embodiment, the interface is an access interface of the GUI library, and the standardized encapsulation can connect the GUI library with units that meet the interface design. The GUI library design in the embodiment is designed using C language and can run in an embedded system and a runtime environment supporting C language running. In addition to the fixed content, the page definition library, data synchronization, operation messages, and virtual data are connected with the GUI library through the interface. Different devices can customize the above parts.
[0046] S2: developing a device GUI package for the instrument through the GUI library, developing a display page of the device GUI package through the display control and display page library of the device GUI library, and realizing the running of the platform GUI package in the platform according to the virtual display and message developed through the cross-platform graphic library. Specifically, in the embodiment, the GUI package developed based on C can run in the instrument, and the wxWidgets cross-platform graphic library is used. Only once development of the virtual display and message through the cross-platform graphic library is needed, and no additional development work is needed to make the GUI package run in different platforms. In the development process of the instrument, the GUI library is used to develop the GUI package. The existing instrument access and maintenance is usually through a communication protocol, and additional access software development work is needed at the access end. The embodiment only needs to develop the GUI package once, without additional development. Moreover, if the existing instrument is upgraded, the corresponding maintenance tool also needs to be developed again to achieve the purpose of maintaining the upgraded product. In the embodiment, the GUI package is upgraded during the product upgrade process. As long as the GUI package in the maintenance platform is replaced, the purpose of no repeated development can be achieved.
[0047] S3: accessing the device GUI package through the platform GUI package to realize the same running effect of the platform and the instrument, and further realizing the maintenance of the instrument through the communication medium.
[0048] Further, in the development process of the existing product, it is often necessary to wait for the corresponding current hardware to be completed before corresponding development is carried out, and in the early review, it is often designed for the design draft, and there will be problems of long development cycle and gap between the design effect and the late implementation. Under the support of the cross-platform display library, the design and development can be carried out according to the design draft under the premise that the target hardware does not have, and the running demonstration review can be carried out on different platforms. After the target hardware is completed, it can be directly used on the target hardware without modification, which shortens the development cycle, and can demonstrate the final effect in the review and demonstration stage to prevent deviation.
[0049] Further, in the maintenance of the existing product, the corresponding function software is often redeveloped by using the communication protocol, and the user needs to learn repeatedly when using it. For the relearning of the instrument and the maintenance instrument, the same GUI package runs in different platforms in the embodiment, and the running effect is completely the same, so the user does not need to learn repeatedly, which reduces the difficulty of use and the probability of error
[0050] Preferably, in step S1, the interface further comprises:
[0051] The interface includes operation information, display interface, data synchronization interface, virtual interface, and the interface separates the page display library of the GUI library from the hardware. The operation information is used to receive external messages, that is, to realize the interaction between the page display library and the external operation. The display interface is used to realize the interaction of the GUI library on different platforms. The library virtual data and the library data synchronization realize the synchronization between the page display library and the display interface. The page definition library is the actual page of the instrument. Specifically, in the embodiment, the instrument interface development and the GUI component development are separated by encapsulating the interface. Different devices can customize the above interface part. The operation information accepts external messages, which is used for the interaction between the page display library and the external operation. The display interface can be customized according to the GUI library running platform to achieve the interaction with the GUI library on different platforms. The virtual data and the data synchronization module are used for the synchronization between the display interface and the different interface library. The page definition library is the actual page required by the specific instrument.
[0052] Preferably, in step S2, the device GUI package further comprises:
[0053] The development work of the device GUI package is carried out in advance before the instrument is completed, and is run in the cross-platform graphics library to demonstrate and verify the function. The running environment of the cross-platform graphics library is developed for the GUI library, and the device GUI package is developed according to the running environment to realize the running of the device GUI package into the instrument. Specifically, in the embodiment, the GUI package can run in the instrument in the form of a closed package.
[0054] Preferably, the display page further comprises:
[0055] The data content of the display page is acquired through the interface, the device data synchronization module of the device GUI package is imported with the data content through the interface, data synchronization between different device GUI packages is realized, and specifically, in the embodiment, the display page needs data support, all data is transmitted through the standardized encapsulated interface, the GUI package used for the instrument can be connected to the data in the instrument or virtual data, as the requirement of the instrument to the display page, the designed data content can be imported into the device data synchronization module in the interface mode, and data synchronization between different GUI packages can be realized.
[0056] Preferably, the device data synchronization module further comprises:
[0057] The device data synchronization module specifies the data address and the data type, including the data type of the real-time update data, the read-only data and the read-write data, after the design data of the display page is designed according to the synchronization mode, the display page directly displays and edits the design data, the device data synchronization module synchronizes the design data to the part actually used and saved, and the access of the display page to the data content is realized.
[0058] Preferably, in step S2, the platform GUI package runs in the platform, and further comprises:
[0059] The platform GUI package runs in the platform in the form of a closed package, after the platform GUI package is connected to the display unit of the platform, the platform GUI package outputs the display page to the display unit, and updates the corresponding display unit according to the operation command and the data, the internal support data synchronization of the platform GUI package is utilized, the platform GUI packages running in different platforms can realize synchronous running, and the display units of different platforms are updated in real time, and specifically, in the embodiment, the platform GUI package supports the platform running in the C language, the GUI packages running in different platforms can realize synchronous running, the display units of different platforms are updated in real time, and through the communication medium (such as a serial port), the instrument can be accessed without difference, and the purpose of maintaining the instrument is realized.
[0060] Preferably, in step S2, the cross-platform graphics library further comprises:
[0061] The cross-platform graphics library wxWidgets is used for developing a virtual display interface to present the platform GUI package, and the keyboard input command is converted into a message processing interface conforming to the platform GUI package by using the keyboard input in the form, after the thread running the platform GUI package is added in the cross-platform graphics library, the platform GUI package is presented and operated in the terminal running the cross-platform graphics library.
[0062] Preferably, in step S3, the device GUI package is accessed through the platform GUI package, the platform and the instrument have the same running effect, and further comprises:
[0063] The display page and the instrument are docked, that is, the internal data or the package virtual data of the device GUI package is docked with the instrument as the data support of the display page, the virtual display interface and the instrument are docked, and the data synchronization of the platform and the instrument is realized through the platform data synchronization module and the device data synchronization module of the platform GUI package.
[0064] The GUI package effect in different platforms is the same as the effect of the instrument itself, and there is no additional learning and development cost, and the development of the GUI package can be performed in advance before the completion of the hardware platform of the instrument, and the GUI package can be run in the cross-platform to perform function demonstration and verification, and the cross-platform running environment is developed for the GUI library, for example, the wxWidgets graphics library is used as the display unit in the windows environment, and the C language running environment is used to run the GUI package, so that the GUI package developed for the instrument can be run in the windows environment. After the GUI package is demonstrated and verified by function, since the display page and data development required by the GUI package have been realized in the GUI package, no additional development is required, and after the hardware platform of the instrument is completed, the GUI package is run to the instrument, the page data is docked with the instrument, and the same effect is directly run on the instrument. In addition to improving the efficiency of the pre-function demonstration and verification, the development cycle of the instrument is also greatly shortened.
[0065] The GUI package is used to realize the access of different platforms to the instrument, the GUI package of the instrument can be developed according to actual needs, and the same function as the instrument itself can be realized at the access end by means of the data synchronization function of the GUI package. This mode has higher flexibility than the communication protocol.
[0066] The embodiment develops a GUI component (GUI library) suitable for intelligent instruments, occupies less resources, has low performance requirements, is suitable for most single-chip platforms at present, and can be widely used in intelligent instruments. The specific GUI component can improve the man-machine interface level of the intelligent instrument, reduce the development difficulty of the intelligent instrument in the interactive aspect, reduce the development time, and only needs to develop the interface and synchronous data required by the intelligent instrument on the GUI component.
[0067] The embodiment is written by a GUI component of a high-level language C, uses a cross-platform graphics library such as wxWidgets, and can run on different platforms. Without increasing the development cost and learning cost, the GUI component can access the instrument on different platforms through a certain communication medium, and has no difference in function from the instrument itself, thereby greatly reducing the maintenance cost of the instrument and improving the convenience of the instrument. In some cases, during the development of the intelligent instrument, the development time is tight, and in order to shorten the time, the scheme is determined at the initial stage of instrument development. The embodiment uses the characteristics of the GUI component, and when the instrument hardware development is not completed, the instrument human-computer interface can be developed alone. Virtual data and a screen are established by using the wxWidgets cross-platform graphics library, the developed GUI graphical interface can be run, and the running content can be used for scheme exchange and review. Since the running effect is consistent with that on the instrument, the effect is intuitive, and after the related hardware is completed, the developed graphical package can be embedded into the functional software of the instrument development, without the need for further development work, thereby reducing the development workload and shortening the overall development time of the instrument.
[0068] Embodiment 2
[0069] In the embodiment, a computer device is provided, including a memory and a processor, the memory stores computer readable instructions, and the computer readable instructions are executed by the processor to make the processor execute the steps of the method for facilitating maintenance of the GUI of the intelligent instrument in the embodiment 1.
[0070] In the embodiment, a storage medium storing computer readable instructions is provided, and the computer readable instructions are executed by one or more processors to make the one or more processors execute the steps of the method for facilitating maintenance of the GUI of the intelligent instrument in the first embodiment.
[0071] Those skilled in the art can understand that all or part of the steps in the above embodiments can be completed by programs instructing related hardware, and the programs can be stored in a computer readable storage medium, and the storage medium can include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0072] The technical features of the above embodiments can be combined arbitrarily, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the description.
[0073] The above merely describes the preferred embodiments of the present application, and the protection scope of the present application is not limited to the above-described embodiments. Any technical solution falling within the concept of the present application shall fall within the protection scope of the present application. It should be noted that, for ordinary skilled persons in the art, some improvements and refinements without departing from the principles of the present application shall also be considered as falling within the protection scope of the present application.
Claims
1. A method of facilitating a smart meter maintenance GUI, characterized by, The method comprises the following steps: S1: encapsulating a unified interface in a GUI library, realizing the connection between different GUI libraries through the interface, developing a display page library through a fixed graphic drawing library and display control in the GUI library, wherein the GUI library further comprises library data synchronization, operation message and library virtual data; S2: developing a device GUI package for an instrument through the GUI library, developing a display page of the device GUI package through the display control of the GUI library and the display page library, and realizing the running of the platform GUI package in the platform according to a cross-platform graphic library and a virtual display and message; S3: accessing the device GUI package through the platform GUI package, realizing the same running effect of the platform and the instrument. The accessing of the device GUI package through the platform GUI package, realizing the same running effect of the platform and the instrument, further comprises: The display page and the instrument are connected, that is, the internal data or package virtual data of the device GUI package connected with the instrument are used as the data support of the display page, the virtual display interface and the instrument are connected, and the data synchronization of the platform and the instrument is realized through a platform data synchronization module and a device data synchronization module of the platform GUI package.
2. The method of facilitating a smart meter maintenance GUI of claim 1, wherein, In step S1, the interface further comprises: The interface comprises an operation information, a display interface, a data synchronization interface and a virtual interface, the interface separates the page display library of the GUI library from hardware, wherein the operation information is used for receiving external messages, that is, realizing the interaction between the page display library and external operation, the display interface is used for realizing the interaction of the GUI library on different platforms, the library virtual data and the library data synchronization realize the synchronization between the page display library and the virtual display interface, and the page definition library is the actual page of the instrument.
3. The method of facilitating a smart meter maintenance GUI of claim 2, wherein, In step S2, the device GUI package further comprises: Before the instrument is completed, the development of the device GUI package is carried out in advance, and the device GUI package is run in the cross-platform graphic library to demonstrate and verify the function, the running environment of the cross-platform graphic library is developed according to the GUI library, and the device GUI package is developed according to the running environment, so as to realize the running of the device GUI package into the instrument.
4. The method of facilitating a smart meter maintenance GUI of claim 3, wherein, The display page further comprises: The data content of the display page is obtained through the interface, the data content is imported into a device data synchronization module of the device GUI package through the interface, and the data synchronization between different device GUI packages is realized.
5. The method of facilitating a smart meter maintenance GUI of claim 4, wherein, The device data synchronization module further comprises: The device data synchronization module specifies data addresses and data types, including real-time updating data, read-only data and read-write data, after the design data of the display page is designed according to the synchronization mode, the design data is directly used for display and editing by the display page, the device data synchronization module synchronizes the design data to the part actually used and saved, and realizes the access of the display page to the data content.
6. The method of facilitating a smart meter maintenance GUI of claim 5, wherein, In step S2, the platform GUI package runs in the platform, further comprising: The platform GUI package runs in a closed package in the platform, after the platform GUI package is connected to the display unit of the platform, the platform GUI package outputs the display page to the display unit, and updates the corresponding display unit according to operation commands and data, supports data synchronization in the platform GUI package, and realizes synchronous operation of the platform GUI packages running in different platforms, and real-time updates the display units of different platforms.
7. The method of facilitating a smart meter maintenance GUI of claim 6, wherein, In step S2, the cross-platform graphics library further comprises: The cross-platform graphics library is used for developing a virtual display interface to present the platform GUI package, and converting keyboard input commands into message processing interfaces conforming to the platform GUI package by means of keyboard input and the like, after a thread running the platform GUI package is added in the cross-platform graphics library, the terminal running the cross-platform graphics library presents and operates the platform GUI package.
8. A computer device, comprising: The computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the method for facilitating a smart meter maintenance GUI of any one of claims 1 to 7.
9. A storage medium storing computer readable instructions, wherein, The computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the method for facilitating a smart meter maintenance GUI of any one of claims 1 to 7.
Citation Information
Patent Citations
Development system based on DSP chip
CN101373494A
Method For Creating A User Interface
CN104063212A