A method for quick development and deployment of human-computer interaction interface program suitable for arm-Linux
By combining the designer layout with the Qt graphical interface library, XML files and plugins are generated, solving the problems of low development freedom and difficulty in updating human-computer interaction programs on the Arm-Linux platform, and realizing rapid development and secure updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING GUODIAN NANZI WEIMEIDE AUTOMATION CO LTD
- Filing Date
- 2023-03-30
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies for developing and deploying human-computer interaction programs on the Arm-Linux platform suffer from low flexibility, difficulty in repeated compilation and updates, and especially in power systems where software restarts are not permitted, leading to unstable equipment operation.
The program uses a designer to lay out the program pages, generate XML files and project files, compiles and generates plugins, and combines the Qt graphical interface library to draw the interface, enabling rapid interface development and deployment, and supporting hot updates.
It increases development freedom, reduces compilation time, enables secure and rapid updates without restarting, and improves interface development efficiency and stability.
Smart Images

Figure CN116382688B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rapid development technology for human-computer interaction interface programs, specifically a method for rapid development and deployment of human-computer interaction interface programs applicable to Arm-Linux. Background Technology
[0002] Currently, the rapid development of human-computer interface (HMI) programs faces challenges such as the inability to achieve a high degree of interface flexibility while enabling rapid layout, the inability to perform partial compilation during final software compilation, resulting in the software development process not reaching the expected speed, and the inability to achieve hot updates without restarting after development is completed.
[0003] For example, in patent CN 108664186A, a method for displaying a configurable human-computer interaction interface based on graphical styles, a method is proposed to generate an HMI by reading an XML configuration file. Although this method achieves rapid configuration and display of the HMI to a certain extent, the interface freedom is too low, and it can only display preset styles. This method requires a high degree of program planning, and all situations need to be considered in the initial stage of architecture. Therefore, this method only achieves rapid interface configuration. In contrast, patent CN108920143A, a rapid development method for human-computer interaction software, incorporates modular thinking. After the interface is built, event code is written for it, and finally, it is compiled and run. Unfortunately, the degree of freedom of this patent is still low because it presets a large number of components and corresponding action functions, which undoubtedly increases the learning cost. Moreover, this method mainly serves the Windows platform, and its adaptation to Arm-Linux has not been given much consideration.
[0004] Online upgrades used when updating HMIs require stopping the current HMI process, waiting for the new program to be loaded, and then restarting it. This process obviously adds instability to the operation of the entire device and is not a true form of rapid deployment. Furthermore, when the product is running on a power system, software restarts are usually not allowed. Therefore, it is not difficult to see that the rapid development and deployment of embedded HMIs currently faces the problems of low flexibility, repetitive compilation, and difficulty in updating. Summary of the Invention
[0005] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0006] In view of the above-mentioned problems, the present invention is proposed.
[0007] A first aspect of this invention provides a method for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux, comprising: laying out corresponding program pages on a desktop using a designer, and writing event functions for corresponding controls in the program pages; generating XML files and project files based on the event functions, generating plugins by compiling the project files, and importing the XML files and the plugins into an embedded device running an embedded computing system; the program in the embedded device using drawing event functions in a language graphical interface library in conjunction with the XML files to draw the page, and calling the imported plugins to execute corresponding events in the page, thereby realizing rapid development and deployment of the human-computer interaction interface program.
[0008] As a preferred embodiment of the method for rapid development and deployment of human-computer interaction interface programs applicable to Arm-Linux described in this invention, the step of laying out the corresponding program pages using a designer on the desktop includes:
[0009] Before laying out the program page on the desktop, it is necessary to write the corresponding screen attributes of the program page, such as screen resolution, screen size, color depth, and key or touch operation attributes.
[0010] When using the designer to lay out the corresponding program page, you can directly generate the required XML file by importing templates and making fine adjustments. Alternatively, you can create a new blank page as needed, copy preset controls on the blank page to complete the layout, or redraw the shape of the controls. The redrawn controls will be converted into closed-loop two-dimensional coordinates.
[0011] As a preferred embodiment of the rapid development and deployment method for human-computer interaction interface programs applicable to Arm-Linux described in this invention, the writing of event functions for corresponding controls in the program page includes,
[0012] Define the spatial structure relationship between corresponding controls in the program page, and group and arrange the spatial structure relationship using the control names;
[0013] The plugin paths and screen-on durations called by the page are defined based on the grouping and arrangement results.
[0014] Create control nodes according to requirements, and define the interface commands used by the control nodes when calling functions. The interface commands are characters.
[0015] Create a project file corresponding to the XML file, and edit the event functions in the project file that correspond one-to-one with the commands to be called.
[0016] As a preferred embodiment of the method for rapid development and deployment of human-computer interaction interface programs applicable to Arm-Linux as described in this invention, the calculation of the shape of the custom control includes,
[0017]
[0018] F Title =3*F Text / 2
[0019] Among them, F Text Px indicates the font size of the body text. Width Px represents the pixel value indicating the width of the control. Height F represents the pixel value indicating the height of the control. Title Indicates the font size in points for the title.
[0020] As a preferred embodiment of the method for rapid development and deployment of human-computer interaction interface programs applicable to Arm-Linux as described in this invention, the XML file includes:
[0021] The XML file defines the basic information of the entire page at the outermost root node, including screen size information, pixels, and keying or touch operation mode. The keying corresponds to the keyPressEvent key event of the plugin, and the touch corresponds to the mousePressEvent or mouseReleaseEvent mouse event of the plugin.
[0022] The node elements in the main body of the XML file are divided into three categories: menu pages, function pages, and controls.
[0023] The menu page includes the following attributes: program name, display title, and icon path;
[0024] In addition to the three attributes of the menu page, the functional page also includes the following attributes: page structure definition, plugin path, and screen-on duration.
[0025] The control includes the following attributes: control name, shape, resource path, and calling command.
[0026] As a preferred embodiment of the method for rapid development and deployment of human-computer interaction interface programs applicable to Arm-Linux described in this invention, the generation of the plugin includes:
[0027] An XML file and a project file are generated based on the event function. The project file is then compiled to generate a .so format plugin. The plugin and the XML file are then packaged together and imported into an embedded device that runs the embedded computing system.
[0028] As a preferred embodiment of the method for rapid development and deployment of human-computer interaction interface programs applicable to Arm-Linux described in this invention, wherein: the step of drawing the page includes,
[0029] After the human-computer interaction interface program starts, it first obtains the names of the child elements by traversing the XML file and generates the main menu page. If and only when the user performs an operation, it obtains the menu number selected by the user to query the elements contained under that node.
[0030] If it is still a menu page, continue to generate the menu; if it is a function page, traverse the elements under the function page node, call the Qpainter class to draw the page controls according to the element attributes, and call QLayout to complete the page layout according to the page's GridDef when the traversal is complete.
[0031] Once the page is rendered, when a user triggers an event, the corresponding function in the plugin is queried through the control's call command to complete the event response, ultimately realizing the development and deployment of the human-computer interaction interface program.
[0032] A second aspect of this invention provides a system for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux, comprising:
[0033] The page layout unit is used to lay out the corresponding program page on the desktop using the designer, and to write the event functions of the corresponding controls in the program page;
[0034] The plugin generation unit is used to generate an XML file and a project file according to the event function, compile the project file to generate a plugin, and import the XML file and the plugin into an embedded device running an embedded computing system.
[0035] The development and deployment unit allows the embedded device's program to draw the page using drawing event functions from the language graphical interface library in conjunction with the XML file, and to call imported plugins to execute corresponding events on the page, thereby enabling rapid development and deployment of the human-computer interaction interface program.
[0036] A third aspect of the present invention provides an apparatus, the apparatus comprising,
[0037] processor;
[0038] Memory used to store processor-executable instructions;
[0039] The processor is configured to invoke instructions stored in the memory to execute the method described in any embodiment of the present invention.
[0040] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions, including:
[0041] When the computer program instructions are executed by the processor, they implement the method as described in any embodiment of the present invention.
[0042] The beneficial effects of this invention are as follows: This invention provides a method for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux. On the desktop, the corresponding software interface is laid out using a designer, and data sources and interactive events are bound to the controls as needed, generating corresponding XML and C++ project files. The XML file is imported into the application, and QPaintEvent from the Qt CUI library draws the corresponding program interface, solving the problem of low freedom in rapid development. Secondly, the generated C++ project files are compiled to generate a Qt plugin. After being imported into the device, the Qt plug-in relays messages to complete communication and implement the corresponding events in the interface, solving the problem of repeated compilation and reducing compilation time. Finally, when updating the software, only the XML configuration file needs to be modified and the corresponding Qt imported into the device to complete the update, solving the problem of traditional software updates requiring a restart. Compared with the prior art, the rapid development and deployment method proposed in this invention has higher development freedom, less compilation content, and secure and rapid update capabilities. Attached Figure Description
[0043] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0044] Figure 1 This invention provides an overall flowchart of a method for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux;
[0045] Figure 2 The program structure diagram of an embedded device for a method of rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux provided by the present invention;
[0046] Figure 3 The structure diagram of an XML file for a rapid development and deployment method of human-computer interaction interface programs applicable to Arm-Linux provided by the present invention;
[0047] Figure 4 A flowchart illustrating the page design of a method for rapid development and deployment of human-computer interaction interface programs applicable to Arm-Linux, provided by this invention.
[0048] Figure 5 The main application structure diagram of a method for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux provided by the present invention;
[0049] Figure 6 A diagram illustrating the loading process of the main application for a rapid development and deployment method of a human-computer interaction interface program suitable for Arm-Linux, provided by the present invention.
[0050] Figure 7 A diagram showing the addition of a telemetry viewing function page to the HMI of a keyed relay protection device, which is a method for rapid development and deployment of human-machine interface programs suitable for Arm-Linux, provided by this invention.
[0051] Figure 8 A flowchart comparing the rapid development and deployment method of human-computer interaction interface programs for Arm-Linux provided by this invention with the traditional device program upgrade process;
[0052] Figure 9 The process diagram for the newly added "Telemetry Viewing" function is found in the new menu tree of the method for rapid development and deployment of human-computer interaction interface programs applicable to Arm-Linux provided by the present invention. Detailed Implementation
[0053] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0054] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0055] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0056] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.
[0057] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0058] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0059] Example 1
[0060] Reference Figures 1-6 As one embodiment of the present invention, a method for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux is provided, comprising:
[0061] S1: On the desktop, use the designer to lay out the corresponding program pages and write the event functions for the corresponding controls on the program pages. It should be noted that:
[0062] Before laying out the program page on the desktop, you need to write the corresponding screen attributes such as screen resolution, screen size, color depth, and key or touch operation attributes of the program page.
[0063] When using the designer to lay out the corresponding program page, you can directly generate the required XML file by importing templates and making fine adjustments. Alternatively, you can create a new blank page as needed, copy preset controls on the blank page to complete the layout, or redraw the shape of the controls. The redrawn controls will be converted into closed-loop two-dimensional coordinates.
[0064] Furthermore, such as Figure 4 As shown, writing the event functions for the corresponding controls on the program page includes,
[0065] Define the spatial structure relationship between corresponding controls in the program page, and use xName to group and arrange the spatial structure relationship;
[0066] Define the DLL path and screen-on duration based on the grouping and arrangement results;
[0067] Create control nodes according to requirements, and define the interface commands used by the control nodes when calling functions, where the interface commands are characters;
[0068] Create a C++ project file corresponding to the XML file, and edit and call event functions in the C++ project file that correspond one-to-one with the commands;
[0069] It should be noted that the calculation of the custom control shape includes,
[0070]
[0071] F Title =3*F Text / 2
[0072] Among them, F Text Px indicates the font size of the body text. width Px represents the pixel value indicating the width of the control. Height F represents the pixel value indicating the height of the control. Title Indicates the font size in points for the title.
[0073] S2: Generates XML files and C++ project files based on event functions, and then compiles the C++ project files to generate a Qt plugin. It should be noted that:
[0074] The structure of an XML file is as follows: Figure 3 As shown, the basic information of the entire page is defined at the outermost root node, including screen size information, pixels, and keying or touch operation mode. Keying corresponds to Qt's keyPressEvent key event, and touch corresponds to Qt's mousePressEvent or mouseReleaseEvent mouse event.
[0075] The node elements in the main body of the XML file are divided into three categories: menu pages, function pages, and controls. Each control belongs to at most one function page. Each function page has a corresponding menu navigation. The menu page exists only as the entry point for the function pages. That is, controls are child elements of function pages, and function pages are child elements of menu pages.
[0076] Specifically, the menu page contains the following attributes: Name (within the program), Title (display title), and ICONPath (icon path). The only inherited events are Enter and Return. Name is the index name within the program used to check the validity of this level of menu, Title is the name of the menu displayed on the page, and ICONPath is the icon information corresponding to the menu.
[0077] Specifically, in addition to the three attributes of the menu page, the functional page also includes the following attributes: page structure definition (GridDef), plugin path (DLL), and screen-on time (STAYTIME). GridDef is used to define the position information between each control on the page, determining the overall structure and layout of the page; DLL is the plugin path called by the page and is also the project name of the C++ project; STAYTIME is the duration for which the page will remain on. If this duration is exceeded, the page will exit. The only operation events are start and exit.
[0078] Specifically, the control includes the following properties: control name (xName), shape (ShapeSize), resource path (SourcePath), and command to call (CMD). Among them, xName is the index name in the program used to determine the validity of the control; ShapeSize is used to define the shape and size of the control; SourcePath is the path to the external resources required by the control, used to call resources such as images or translation files in the .rcc file; and CMD is the interface command used by the control when calling functions.
[0079] Furthermore, the generation of Qt plugins includes,
[0080] An XML file and a C++ project file are generated based on the event function. The C++ project file is then compiled to generate a Qt plugin in .so format. The Qt plugin and the XML file are then packaged together and imported into an embedded device running Arm-linux.
[0081] S3: Import the XML file and Qt plugin into the embedded device running Arm-linux. The embedded program uses QPaintEvent from the Qt CUI library in conjunction with the XML file to draw the page and calls the imported plugin to execute the corresponding events in the interface. It should be noted that:
[0082] The program structure diagram of an embedded device running Arm-linux is as follows: Figure 2 As shown in the figure, 1 is the imported XML configuration file, 2 is the main application, and 3 is the called plugin (.so file);
[0083] Furthermore, the structure of the main application is as follows: Figure 5As shown, it includes an XML reading module, a drawing module, and a plugin management module;
[0084] Specifically, the loading process is as follows: Figure 6 As shown, after the human-computer interaction interface program starts, it first obtains the names of child elements by traversing the XML file and generates the main menu page. Only when the user performs an operation, it obtains the menu number selected by the user to query the elements contained under that node.
[0085] If it is still a menu page, continue to generate the menu; if it is a function page, iterate through the elements under the function page node, call the Qpainter class to draw the page controls according to the element attributes, and call QLayout to complete the page layout according to the page's GridDef when the iteration is complete.
[0086] Once the page is rendered, when a user triggers an event, the corresponding function in the plugin is queried through the control's call command to complete the event response, ultimately realizing the development and deployment of the human-computer interaction interface program.
[0087] It should be noted that this invention provides a method for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux. On the desktop, the corresponding software interface is laid out using a designer, and data sources and interactive events are bound to the controls as needed, generating corresponding XML and C++ project files. The XML file is imported into the application, and QPaintEvent from the Qt CUI library draws the corresponding program interface, solving the problem of low freedom in rapid development. Secondly, the generated C++ project files are compiled to generate a Qt plugin. After being imported into the device, the Qt plug-in relays messages to complete communication and implement the corresponding events in the interface, solving the problem of repeated compilation and reducing compilation time. Finally, when updating the software, only the XML configuration file needs to be modified and the corresponding Qt imported into the device to complete the update, solving the problem of traditional software updates requiring a restart. Compared with existing technologies, the rapid development and deployment method proposed in this invention has higher development freedom, less compilation content, and secure and rapid update capabilities.
[0088] The second aspect disclosed in this invention,
[0089] This document provides a system for rapid development and deployment of human-computer interaction interface programs for Arm-Linux, including:
[0090] The page layout unit is used to lay out the corresponding program pages on the desktop using the designer, and to write the event functions of the corresponding controls in the program pages;
[0091] The plugin generation unit is used to generate XML files and project files based on event functions, compile the project files to generate plugins, and import the XML files and plugins into the embedded device running the embedded computing system.
[0092] The development and deployment unit enables the embedded device's program to draw the page using drawing event functions in the language graphical interface library in conjunction with XML files, and to call imported plugins to execute corresponding events on the page, thereby realizing the rapid development and deployment of human-computer interaction interface programs.
[0093] The third aspect disclosed in this invention,
[0094] A device is provided, comprising:
[0095] processor;
[0096] Memory used to store processor-executable instructions;
[0097] The processor is configured to invoke instructions stored in memory to execute any of the aforementioned methods.
[0098] The fourth aspect disclosed in this invention,
[0099] A computer-readable storage medium is provided, having stored thereon computer program instructions, including:
[0100] A method by which computer program instructions are executed by a processor to implement any of the foregoing.
[0101] The present invention may be a method, apparatus, system and / or computer program product, and the computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the present invention.
[0102] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0103] Example 2
[0104] Reference Figures 7-9 This is the second embodiment of the present invention. Unlike the first embodiment, this embodiment provides a verification test of a method for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux, to verify and illustrate the technical effects used in this method.
[0105] In this embodiment, a telemetry viewing function is added to the human-machine interface program of the 320*240 pixel key-controlled relay protection device. This function is required to display N sets of telemetry data on the device screen, each set containing name, value, and unit information, and to allow users to control scrolling up, down, and page skipping via buttons. Figure 7 As shown.
[0106] The first step is to add a new item under the menu node, with the title "Telemetry View". If the plan is to use a 2:3 top-bottom two-layer layout, then the GridDef property is defined as "row = 2, 2*, 3*". If you plan to use a left-right layout, then the GridDef property is defined as "column = 2, 2*, 3*". The corresponding plugin DLL is defined as "Telemetry". All of the above information can be defined according to the actual situation.
[0107] The second step is to define the controls. This typically involves a table layout. Analysis shows the interface consists of three controls: the title bar, the data area, and the scrollbar. First, the title bar is divided into a background and a data source. The background is a rounded rectangle 300 pixels long and 40 pixels high with a radius of 20. Therefore, the title bar control's ShapeSize property is "RectRound, 300, 40, 20, 20". Of course, if the designer wants a custom shape, the ShapeSize property can be defined as "Customize, (x1, y1), (x2, y2), (x3, y3), (x4, y4)...". At this point, the font size on the background is also determined.
[0108] Since this control does not require images, the SourcePath attribute is set to "NULL" and the CMD attribute is set to "Telemetry_Title". This value is customizable by the designer and only needs to be unique to the program. Similarly, the attribute settings for the other two controls are detailed in Table 1 and will not be repeated here. Finally, the above changes are saved to the XML file.
[0109] Table 1: Control property settings.
[0110]
[0111] The third step requires writing response functions for the controls on the page. The project name is determined by the DLL attribute from the first step. The project type is a plugin, which means setting TEMPLATE to lib in Qt's pro. The corresponding receiving function is written according to the plugin interface, and the core of the receiving function is CMD. Therefore, the uniqueness of the CMD attribute was emphasized above. Taking the title bar as an example, we need to write the corresponding response value for Telemetry_Title and return the obtained "name, value, and unit" information to the main application through the plugin interface. The main application then uses the Qpaintevent's drawText function to finally complete the control drawing. Next, response functions are written for the remaining controls according to this rule, and compiled into .so or .dll files. The time taken compared to the complete compilation is shown in Table 2. Finally, the above XML file is packaged and unzipped into the device or equipment. This process is compared with the traditional device program upgrade process. Figure 8 As shown.
[0112] Table 2: Comparison of compilation time with full compilation.
[0113] Existing technology compilation time 11 min 23.7 s Compilation time of this invention 12.3s
[0114] The fourth step involves the HMI running on the device reading the new XML file and generating a new menu tree. The newly added "Telemetry Viewing" function can be found in this new menu tree. Figure 9 As shown in Table 3, after selecting this function, the application reads the corresponding part of the XML and calls Qpaintevent to generate the page. After the drawing is completed, it waits for the page to trigger an event.
[0115] Table 3: Correspondence.
[0116] XML elements QPaintevent calls the function RectRound drawRoundedRect Line drawLine information drawText / drawImage
[0117] As described above, the method provided by this invention can solve the problem of low freedom in rapid development, implement corresponding events in the interface, reduce compilation time by solving the problem of repeated compilation, and complete the update by simply changing the XML configuration file and importing the corresponding Qt device, thus solving the problem of traditional software updates requiring a restart. Compared with the prior art, the rapid development and deployment method proposed in this invention has higher development freedom, less compilation content, and secure and fast update capabilities.
[0118] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for rapid development and deployment of a human-computer interaction interface program suitable for Arm-Linux, characterized in that, include: On the desktop, use the designer to lay out the corresponding program page and write the event functions for the corresponding controls in the program page; An XML file and a project file are generated based on the event function. A plugin is generated by compiling the project file. The XML file and the plugin are then imported into an embedded device that runs the embedded computing system. The program of the embedded device uses the drawing event functions in the language graphical interface library in combination with the XML file to draw the page, and calls the imported plugins to execute the corresponding events in the page, so as to realize the rapid development and deployment of the human-computer interaction interface program. The event functions for the corresponding controls in the program page include: Define the spatial structure relationship between corresponding controls in the program page, and group and arrange the spatial structure relationship using the control names; The plugin paths and screen-on durations called by the page are defined based on the grouping and arrangement results. Create control nodes according to requirements, and define the interface commands used by the control nodes when calling functions. The interface commands are characters. Create a project file corresponding to the XML file, and edit the event functions in the project file that correspond one-to-one with the commands to be called; The generation of the plugin includes, An XML file and a project file are generated based on the event function. The project file is compiled to generate a .so format plugin. The plugin and the XML file are then packaged together and imported into an embedded device that runs the embedded computing system. The process of drawing the page includes, After the human-computer interaction interface program starts, it first obtains the names of the child elements by traversing the XML file and generates the main menu page. If and only when the user performs an operation, it obtains the menu number selected by the user to query the elements contained under that node. If it is still a menu page, continue to generate the menu; if it is a function page, traverse the elements under the function page node, call the Qpainter class to draw the page controls according to the element attributes, and call QLayout to complete the page layout according to the page's GridDef when the traversal is complete. Once the page is rendered, when a user triggers an event, the corresponding function in the plugin is queried through the control's call command to complete the event response, ultimately realizing the development and deployment of the human-computer interaction interface program; The XML file includes, The XML file defines the basic information of the entire page at the outermost root node, including screen size information, pixels, and keying or touch operation mode. The keying corresponds to the keyPressEvent key event of the plugin, and the touch corresponds to the mousePressEvent or mouseReleaseEvent mouse event of the plugin. The node elements in the main body of the XML file are divided into three categories: menu pages, function pages, and controls. The menu page includes the following attributes: program name, display title, and icon path; In addition to the three attributes of the menu page, the functional page also includes the following attributes: page structure definition, plugin path, and screen-on duration. The control includes the following attributes: control name, shape, resource path, and calling command.
2. The method for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux as described in claim 1, characterized in that: The step of using a designer on the desktop to lay out the corresponding program pages includes, Before laying out the program page on the desktop, it is necessary to write the corresponding screen attributes of the program page, such as screen resolution, screen size, color depth, and key or touch operation attributes. The designer is used to lay out the corresponding program pages, including: importing templates for fine-tuning and directly generating the required XML files; Alternatively, a new blank page can be created as needed, and preset controls can be copied on the blank page to complete the layout; or the shape of the controls can be redrawn, and the redrawn controls will be converted into closed-loop two-dimensional coordinates.
3. The method for rapid development and deployment of human-computer interaction interface programs suitable for Arm-Linux as described in claim 1, characterized in that: The calculation of the shape of a custom control includes, in, Indicates the font size in points (points) for the body text. The pixel value representing the width of the control. The pixel value representing the height of the control. Indicates the font size in points for the title.
4. A system for rapid development and deployment of human-computer interface programs for Arm-Linux, comprising the method for rapid development and deployment of human-computer interface programs for Arm-Linux as described in any one of claims 1 to 3, characterized in that, include: The page layout unit is used to lay out the corresponding program page on the desktop using the designer, and to write the event functions of the corresponding controls in the program page; The plugin generation unit is used to generate an XML file and a project file according to the event function, generate a plugin by compiling the project file, and import the XML file and the plugin into an embedded device running an embedded computing system. The development and deployment unit allows the embedded device's program to draw the page using drawing event functions from the language graphical interface library in conjunction with the XML file, and to call imported plugins to execute corresponding events on the page, thereby enabling rapid development and deployment of the human-computer interaction interface program.
5. A device, characterized in that, The device includes, processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method described in any one of claims 1 to 3.
6. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 3.