Method for detecting data display based on XML document
By receiving detection data and GUI display templates, configuring block theme information, automatically generating XML documents and displaying them in the GUI interface, the problem of low visualization efficiency of detection data in smart factories is solved, and efficient automatic graphical display is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AIR FORCE COMM SERGEANT SCHOOL OF PLA
- Filing Date
- 2023-02-28
- Publication Date
- 2026-04-24
AI Technical Summary
In existing smart factories, the visualization of inspection data relies on manual execution, which is inefficient.
By receiving detection data and GUI display templates, configuring block theme information, automatically identifying and processing data to generate XML documents, and displaying them in the GUI interface through DOM parsing and FrameBuffer mechanisms.
It enables automatic graphical display of detection data, which is highly efficient and provides excellent visualization.
Smart Images

Figure CN116226486B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a method for detecting and displaying data based on XML documents. Background Technology
[0002] With the continuous development of manufacturing and IoT technology, more and more smart factories are emerging. Smart factories utilize various modern technologies to automate factory operations, management, and production, aiming to strengthen and standardize enterprise management, reduce errors, plug loopholes, improve efficiency, ensure safe production, provide decision-making references, enhance external connections, and expand international markets. Smart factories achieve coordinated cooperation between humans and machines; their essence is human-machine interaction. In smart factories, IoT-based inspection equipment automatically collects inspection data, which is then processed to simplify and visualize the data for easy viewing by relevant personnel. However, currently, the visualization of inspection data relies on manual execution, which is inefficient. Therefore, a method for displaying inspection data based on XML documents is needed to address the aforementioned problems. Summary of the Invention
[0003] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a method for detecting and displaying data based on XML documents, so as to solve the problems existing in the above-mentioned background technology.
[0004] This invention is implemented as follows: a method for detecting and displaying data based on XML documents, the method comprising the following steps:
[0005] Receive detection data and a GUI display template, wherein the GUI display template contains several block topic information, and configure the block topic information;
[0006] Determine the XML document template based on the template displayed in the GUI;
[0007] The detection data is automatically identified and processed according to the configured block topic information to obtain display data. The display data is then input into an XML document template to obtain an XML document.
[0008] The XML document is parsed using DOM to generate a GUI interface, and the data content in the XML document is displayed in the GUI interface using the FrameBuffer mechanism.
[0009] As a further aspect of the present invention: the step of configuring the block topic information specifically includes:
[0010] Click to display the block topic information in the GUI template;
[0011] A pop-up window will generate a block topic name;
[0012] Receive block topic naming information input by the user and configure the block topic information.
[0013] As a further aspect of the present invention: the step of determining the XML document template based on the GUI display template specifically includes:
[0014] Enter the GUI number of the GUI display template into the document template library. Each GUI display template corresponds to a GUI number.
[0015] The XML document template corresponding to the GUI number is automatically output. The document template library contains all GUI numbers, and each GUI number corresponds to an XML document template.
[0016] As a further aspect of the present invention: the step of automatically identifying and processing the detection data according to the configured block topic information to obtain display data, and inputting the display data into an XML document template, specifically includes:
[0017] The names of detection items in the detection data are matched with the names configured in the block topic information, and a corresponding name is determined for each detection item name.
[0018] Determine the block topic information corresponding to the detection item data with the detection item name, and determine that the detection item data is the display data of the block topic information;
[0019] Retrieve the data location corresponding to the block theme information in the XML document template, and input the display data into the data location of the XML document template.
[0020] As a further aspect of the present invention: the step of determining a corresponding name for each detection item name specifically includes:
[0021] Displays the name that matches each detection item name;
[0022] Receive naming change information, which includes the detected project name and the changed name;
[0023] Receive naming confirmation information to confirm that the naming of all test items is correct.
[0024] As a further aspect of the present invention: the method further includes encrypting the GUI interface, specifically as follows:
[0025] Receive a user-input encrypted block insertion instruction, wherein the encrypted block insertion instruction includes a password or permission level;
[0026] Add a password input area or a user login area to the GUI interface.
[0027] As a further aspect of the present invention: the method further includes preliminary processing of the display data in the block topic information to obtain preliminary processed data, specifically:
[0028] Determine whether a data processing function exists in the block topic information;
[0029] When no data processing function exists, the displayed data can be used directly;
[0030] When a data processing function exists, the displayed data is initially processed according to the data processing function to obtain preliminary processed data.
[0031] Another objective of this invention is to provide an XML document detection and data display system, the system comprising: a block theme configuration module, used to receive detection data and a GUI display template, wherein the GUI display template contains several block theme information, and the block theme information is configured;
[0032] The document template determination module is used to determine the XML document template based on the template displayed in the GUI.
[0033] The display data input module is used to automatically identify and process the detection data according to the configured block theme information to obtain display data, and input the display data into the XML document template to obtain an XML document;
[0034] The GUI interface generation module is used to generate a GUI interface by parsing the XML document using the DOM, and to display the data content in the XML document in the GUI interface using the FrameBuffer mechanism.
[0035] As a further aspect of the present invention: the block topic configuration module includes:
[0036] The block click unit is used to click on the block topic information displayed in the GUI template;
[0037] The naming pop-up generation unit is used to generate block topic naming pop-ups;
[0038] The naming information input unit is used to receive block topic naming information input by the user and to configure the block topic information.
[0039] As a further aspect of the present invention: the document template determination module includes:
[0040] The GUI number input unit is used to input the GUI number of the GUI display template into the document template library. Each GUI display template corresponds to a GUI number.
[0041] The document template output unit is used to automatically output the XML document template corresponding to the GUI number. The document template library contains all the GUI numbers, and each GUI number corresponds to an XML document template.
[0042] As a further aspect of the present invention: the display data input module includes:
[0043] The name matching unit is used to match the names of detection items in the detection data according to the naming name configured in the block topic information, and to determine the corresponding naming name for each detection item name;
[0044] The display data determination unit is used to determine the block topic information corresponding to the detection item data of the detection item name, and to determine that the detection item data is the display data of the block topic information;
[0045] The display data input unit is used to retrieve the data location corresponding to the block topic information in the XML document template and input the display data into the data location of the XML document template.
[0046] Compared with the prior art, the beneficial effects of the present invention are:
[0047] This invention receives detection data and a GUI display template, and configures block theme information; it determines an XML document template based on the GUI display template; it automatically identifies and processes the detection data according to the configured block theme information to obtain display data, and inputs the display data into the XML document template to obtain an XML document; it generates a GUI interface by parsing the XML document using DOM, and displays the data content in the XML document in the GUI interface using the FrameBuffer mechanism. Thus, this invention can automatically graphically represent detection data, achieving high efficiency and good visualization effects. Attached Figure Description
[0048] Figure 1 This is a flowchart of a method for detecting and displaying data based on XML documents.
[0049] Figure 2 This is a flowchart illustrating the configuration of block topic information in an XML document-based detection and data display method.
[0050] Figure 3 This is a flowchart illustrating the process of determining an XML document template based on a GUI-displayed template in an XML document detection and data display method.
[0051] Figure 4 This is a flowchart illustrating the automatic identification and processing of detection data to obtain displayed data in an XML document detection and data display method.
[0052] Figure 5 This is a flowchart illustrating how a method for detecting and displaying data based on XML documents determines the corresponding name for each detection item.
[0053] Figure 6 This is a schematic diagram of the structure of an XML document detection and data display system.
[0054] Figure 7 This is a schematic diagram of the block topic configuration module in an XML document detection and data display system.
[0055] Figure 8 This is a schematic diagram of the structure of a document template determination module in an XML-based document detection and data display system.
[0056] Figure 9 This is a schematic diagram of the structure of a GUI interface generation module in an XML document detection and data display system. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0058] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.
[0059] like Figure 1 As shown in the figure, this embodiment of the invention provides a method for detecting and displaying data based on XML documents, the method comprising the following steps:
[0060] S100, Receive detection data and GUI display template, wherein the GUI display template contains several block topic information, and configure the block topic information;
[0061] S200, determine the XML document template based on the template displayed in the GUI;
[0062] S300: Automatically identify and process the detection data according to the configured block topic information to obtain display data, and input the display data into the XML document template to obtain an XML document;
[0063] S400: The XML document is parsed using DOM to generate a GUI interface, and the data content in the XML document is displayed in the GUI interface using the FrameBuffer mechanism.
[0064] It should be noted that in smart factories, inspection data is automatically collected through IoT inspection equipment, and then this inspection data is processed to simplify and visualize the data, making it easier for relevant personnel to view. However, currently, the visualization of inspection data is done manually, which is inefficient. The embodiments of the present invention aim to solve the above problems.
[0065] In this embodiment of the invention, staff first need to create a large number of GUI display templates based on their experience in data visualization. When detection data is collected, staff need to input the detection data and one of the GUI display templates. Each GUI display template contains several block theme information, which needs to be configured to indicate the meaning of each block theme. Then, an XML document template is automatically determined based on the GUI display template, and the detection data is automatically identified and processed according to the configured block theme information to obtain display data. The display data is then input into the XML document template, thus automatically generating an XML document. Finally, the XML document is parsed using DOM to generate a GUI interface, and the data content in the XML document is displayed in the GUI interface using the FrameBuffer mechanism. Through the FrameBuffer mechanism, applications can directly manipulate the video memory in the kernel. Furthermore, devices using framebuffers can map the physical address of the screen buffer to a virtual address in user space. Users can access the screen buffer by reading and writing this virtual address, enabling drawing and text display on the screen. Thus, this embodiment of the invention can automatically graphically represent detection data, with high efficiency and good visualization effects.
[0066] Furthermore, in DOM-based XML file parsing, the XML describes the display and operation information of the entire system interface. Therefore, after receiving the XML configuration document, the embedded system extracts the corresponding information according to the elements within it; this process is the XML parsing process. DOM parsing is an object-based interface method that loads the XML content into memory, generating a DOM object tree. This allows information to be stored in a node-based manner according to the tree structure.
[0067] like Figure 2 As shown, in a preferred embodiment of the present invention, the step of configuring the block topic information specifically includes:
[0068] S101, Click the GUI to display the block topic information in the template;
[0069] S102, generate a pop-up window for naming the block topic;
[0070] S103, Receive the block topic naming information input by the user and configure the block topic information.
[0071] In this embodiment of the invention, each GUI display template contains several block topic information. Clicking on the block topic information will generate a block topic naming pop-up window. The user needs to enter the block topic naming information in the block topic naming pop-up window to configure the block topic information. For example, a certain block topic can be named "stress detection".
[0072] like Figure 3 As shown in the preferred embodiment of the present invention, the step of determining the XML document template based on the GUI display template specifically includes:
[0073] S201, Input the GUI number of the GUI display template into the document template library. Each GUI display template corresponds to a GUI number.
[0074] S202, automatically output the XML document template corresponding to the GUI number. The document template library contains all GUI numbers, and each GUI number corresponds to an XML document template.
[0075] In this embodiment of the invention, each GUI display template corresponds to a GUI number, and a document template library is established in advance. The document template library contains all GUI numbers, and each GUI number corresponds to an XML document template. In this way, by inputting the GUI number of the GUI display template into the document template library, the corresponding XML document template can be automatically output, which is efficient and convenient to use.
[0076] like Figure 4 As shown, in a preferred embodiment of the present invention, the step of automatically identifying and processing the detection data according to the configured block topic information to obtain display data, and inputting the display data into an XML document template, specifically includes:
[0077] S301, Match the names of the detection items in the detection data according to the naming name configured in the block topic information, and determine the corresponding naming name for each detection item name;
[0078] S302, determine the block topic information corresponding to the detection item data of the detection item name, and determine that the detection item data is the display data of the block topic information;
[0079] S303, retrieve the data location corresponding to the block theme information in the XML document template, and input the display data into the data location of the XML document template.
[0080] In this embodiment of the invention, in order to automatically input the detection data into the correct position in the XML document template, it is necessary to match the detection item names in the detection data according to the naming name configured in the block theme information, and determine the corresponding naming name for each detection item name. In this way, the block theme information corresponding to the detection item data of the detection item name can be determined, and the detection item data can be further determined as the display data of the block theme information. Finally, it is necessary to retrieve the data position corresponding to the block theme information in the XML document template and input the display data into the data position of the XML document template. Each block theme information has a unique data position in the XML document template, and the data position is configured in advance.
[0081] like Figure 5 As shown in a preferred embodiment of the present invention, the step of determining the corresponding naming name for each detection item name specifically includes:
[0082] S3011, displays the name that matches each detection item name;
[0083] S3012, Receive naming change information, the naming change information including the detected project name and the changed naming name;
[0084] S3013, Receive naming confirmation information to confirm that the naming of all test items is correct.
[0085] In this embodiment of the invention, the matching of the name and the detection item name is based on character similarity, and there may be matching errors. Therefore, after the matching is completed, the name matched by each detection item name will also be displayed to facilitate the staff to check. When there is an error in the name, it is necessary to enter the name change information, which includes the detection item name and the changed name, to make the modification. When all the names are correct, it is necessary to enter the name confirmation information to confirm that the names corresponding to all detection item names are correct.
[0086] In this embodiment of the invention, the displayed data may not be displayed directly, but rather after processing. Therefore, the method further includes: performing preliminary processing on the displayed data in the block topic information to obtain preliminary processed data. The specific steps include: determining whether a data processing function exists in the block topic information; when no data processing function exists, directly using the displayed data; when a data processing function exists, performing preliminary processing on the displayed data according to the data processing function to obtain preliminary processed data, which is then displayed subsequently.
[0087] In a preferred embodiment of the present invention, the method further includes encrypting the GUI interface. Specific steps include: receiving a user-inputted encrypted block insertion instruction, the instruction including a password or permission level; and adding a password input block or user login block to the GUI interface. Thus, when a password input block or user login block exists on the GUI interface, all block topic information will only be displayed if the user's entered password is correct or the user's login account's permission level meets the requirements. This also gives the GUI interface confidentiality, making it more secure.
[0088] like Figure 6 As shown, this embodiment of the invention also provides an XML document detection and data display system, the system including: a block theme configuration module 100, used to receive detection data and a GUI display template, the GUI display template containing several block theme information, and to configure the block theme information;
[0089] Document template determination module 200 is used to determine the XML document template based on the template displayed in the GUI;
[0090] The display data input module 300 is used to automatically identify and process the detection data according to the configured block theme information to obtain display data, and input the display data into the XML document template to obtain an XML document;
[0091] The GUI interface generation module 400 is used to generate a GUI interface by parsing the XML document through DOM, and to display the data content in the XML document in the GUI interface through the FrameBuffer mechanism.
[0092] In this embodiment of the invention, staff first need to create a large number of GUI display templates based on their experience in data visualization. When detection data is collected, staff need to input the detection data and one of the GUI display templates. Each GUI display template contains several block theme information, which needs to be configured to indicate the meaning of each block theme. Then, an XML document template is automatically determined based on the GUI display template, and the detection data is automatically identified and processed according to the configured block theme information to obtain display data. The display data is then input into the XML document template, thus automatically generating an XML document. Finally, the XML document is parsed using DOM to generate a GUI interface, and the data content in the XML document is displayed in the GUI interface using the FrameBuffer mechanism. Through the FrameBuffer mechanism, applications can directly manipulate the video memory in the kernel. Furthermore, devices using framebuffers can map the physical address of the screen buffer to a virtual address in user space. Users can access the screen buffer by reading and writing this virtual address, enabling drawing and text display on the screen. Thus, this embodiment of the invention can automatically graphically represent detection data, with high efficiency and good visualization effects.
[0093] like Figure 7 As shown, in a preferred embodiment of the present invention, the block topic configuration module 100 includes:
[0094] Block click unit 101 is used to click on the block topic information in the GUI display template;
[0095] The naming pop-up generation unit 102 is used to generate block topic naming pop-ups;
[0096] The naming information input unit 103 is used to receive block topic naming information input by the user and to configure the block topic information.
[0097] like Figure 8 As shown, in a preferred embodiment of the present invention, the document template determining module 200 includes:
[0098] The GUI number input unit 201 is used to input the GUI number of the GUI display template into the document template library. Each GUI display template corresponds to a GUI number.
[0099] The document template output unit 202 is used to automatically output the XML document template corresponding to the GUI number. The document template library contains all the GUI numbers, and each GUI number corresponds to an XML document template.
[0100] like Figure 9As shown, in a preferred embodiment of the present invention, the display data input module 300 includes:
[0101] The name matching unit 301 is used to match the names of detection items in the detection data according to the naming name configured in the block topic information, and to determine the corresponding naming name for each detection item name.
[0102] The display data determination unit 302 is used to determine the block theme information corresponding to the detection item data of the detection item name, and to determine that the detection item data is the display data of the block theme information;
[0103] The display data input unit 303 is used to retrieve the data location corresponding to the block topic information in the XML document template and input the display data into the data location of the XML document template.
[0104] The above description only details the preferred embodiments of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0105] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0106] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0107] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the disclosure in the specification and embodiments. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A method for detecting and displaying data based on XML documents, characterized in that, The method includes the following steps: Receive detection data and a GUI display template, wherein the GUI display template contains several block topic information, and configure the block topic information; Determine the XML document template based on the template displayed in the GUI; The detection data is automatically identified and processed according to the configured block topic information to obtain display data. The display data is then input into an XML document template to obtain an XML document. The XML document is parsed using DOM to generate a GUI interface, and the data content in the XML document is displayed in the GUI interface using the FrameBuffer mechanism. The steps for configuring the block topic information specifically include: Click to display the block topic information in the GUI template; A pop-up window will appear to generate a block topic name; Receive block topic naming information input by the user and configure the block topic information; The step of automatically identifying and processing the detection data according to the configured block topic information to obtain display data, and inputting the display data into the XML document template, specifically includes: The names of detection items in the detection data are matched with the names configured in the block topic information, and a corresponding name is determined for each detection item name. Determine the block topic information corresponding to the detection item data with the detection item name, and determine that the detection item data is the display data of the block topic information; Retrieve the data location corresponding to the block theme information in the XML document template, and input the display data into the data location of the XML document template; The step of determining the corresponding naming name for each detection item name specifically includes: Displays the name that matches each detection item name; Receive naming change information, which includes the detected project name and the changed name; Receive naming confirmation information to confirm that the naming of all test items is correct.
2. The XML document detection and data display method according to claim 1, characterized in that, The step of determining the XML document template based on the GUI display template specifically includes: Enter the GUI number of the GUI display template into the document template library. Each GUI display template corresponds to a GUI number. The XML document template corresponding to the GUI number is automatically output. The document template library contains all GUI numbers, and each GUI number corresponds to an XML document template.
3. The XML document detection and data display method according to claim 1, characterized in that, The method also includes encrypting the GUI interface.
4. The XML document detection and data display method according to claim 3, characterized in that, The steps for encrypting the GUI interface specifically include: Receive a user-input encrypted block insertion instruction, wherein the encrypted block insertion instruction includes a password or permission level; Add a password input area or a user login area to the GUI interface.
5. The XML document detection and data display method according to claim 4, characterized in that, When a password input block or a user login block exists on the GUI interface, all block topic information will only be displayed if the user enters the correct password or the user's login account meets the permission level requirements.
6. The method for detecting and displaying data based on XML documents according to claim 1, characterized in that, The method further includes: performing preliminary processing on the display data in the block topic information to obtain preliminary processed data.
7. The XML document detection and data display method according to claim 6, characterized in that, The step of performing preliminary processing on the display data in the block topic information to obtain preliminary processed data specifically includes: Determine whether a data processing function exists in the block topic information; When no data processing function exists, the displayed data can be used directly; When a data processing function exists, the displayed data is initially processed according to the data processing function to obtain preliminary processed data.
Citation Information
Patent Citations
A method for defining a human-computer interaction interface for real-time data monitoring based on XML
CN114936305A
Method for dynamically generating a user interface from XML-based documents
US20030184585A1