Management method for parsing opc ua information model
By monitoring user terminals and confirming that lossless YAML format files are sent to the OPC UA server to build an information model, and optimizing it based on loading status information, the problem of low efficiency and insufficient reliability in the creation of OPC UA information models in existing technologies is solved, achieving efficient detection and optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUIZHIAN INFORMATION TECH CO LTD
- Filing Date
- 2022-10-19
- Publication Date
- 2026-06-09
Smart Images

Figure CN115599753B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of document management, and in particular to a management method for parsing OPC UA information models. Background Technology
[0002] Existing technologies typically use SDK-provided interfaces to create OPC UA information models, or by parsing XML files. These methods involve a large amount of computational work, resulting in low development efficiency. Furthermore, operators must be familiar with the corresponding OPC UA SDK, making the OPC UA information model creation process complex. This hinders the rapid acquisition of suitable file data for accurate OPC UA information model creation. Additionally, once created, the OPC UA information model cannot be effectively and comprehensively tested and optimized, reducing its operational reliability and accuracy. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a management method for parsing OPC UA information models. This method monitors user terminals to obtain the YAML format file corresponding to the tasks executed by the user terminals. The verified and lossless YAML file is sent to an OPC UA server, which then constructs the corresponding OPC UA information model. The OPC UA information model is then fed back to the user terminal for loading. Based on the loading status information of the OPC UA information model, a notification message is sent to the OPC UA server, enabling the OPC UA server to perform different modes of operation on the backed-up OPC UA information model. This method parses the YAML format file to construct the OPC UA information model. When the OPC UA information model is loaded on the user terminal, it uses the model's loading status information as a benchmark to perform effective and comprehensive testing and optimization of the OPC UA information model, thereby improving its operational reliability and accuracy.
[0004] This invention provides a management method for parsing OPC UA information models, which includes the following steps:
[0005] Step S1: Monitor the user terminal to obtain the current task execution status information of the user terminal; based on the task execution status information, find the corresponding YAML format file from the file storage space of the user terminal, and perform verification processing on the YAML format file;
[0006] Step S2: Based on the result of the verification process, determine whether the YAML format file is a lossless YAML format file; when the YAML format file is a lossless YAML file, send the YAML format file to the OPC UA server, and the OPC UA server constructs the corresponding OPC UA information model based on the YAML format file.
[0007] Step S3: After backing up the constructed OPC UA information model, the backup is sent back to the user terminal, and the user terminal is instructed to load the OPC UA information model; the loading status information of the OPC UA information model is obtained.
[0008] Step S4: Based on the loading status information, the user terminal sends a notification message to the OPC UA server so that the OPC UA server can perform different modes of operation on the backed-up OPC UA information model.
[0009] Furthermore, in step S1, monitoring the user terminal to obtain its current task execution status information specifically includes:
[0010] The task manager on the user terminal is monitored, and the task data type and execution progress information corresponding to the currently executing task are extracted from the task manager, which are used as the task execution status information.
[0011] Further, in step S1, based on the task execution status information, the corresponding YAML format file is retrieved from the file storage space of the user terminal, and the YAML format file is verified. Specifically, this includes:
[0012] Based on the task data type, extract the task currently processing YAML format files from the currently executing task;
[0013] Based on the execution progress information, determine whether the extracted task has been completed; if so, find the corresponding YAML file in the file storage space corresponding to the task that has been completed.
[0014] Next, the found YAML format files are subjected to file code verification to determine whether the file code of the found YAML format files is complete.
[0015] Furthermore, in step S2, determining whether the YAML format file is a lossless YAML file based on the result of the verification process specifically includes:
[0016] If it is determined that the code of the found YAML file is complete, then the YAML file is considered a lossless YAML file.
[0017] If it is determined that the file code of the found YAML format file is incomplete, then the YAML format file is determined not to be a lossless YAML file, and the missing file code of the YAML format file is repaired, thereby restoring the YAML format file to a lossless YAML file.
[0018] Furthermore, in step S2, when the YAML format file is a lossless YAML file, the YAML format file is sent to the OPC UA server. The OPC UA server then constructs the corresponding OPC UA information model based on the YAML file, specifically including:
[0019] When the YAML format file is a lossless YAML file, the YAML format file is compressed and encrypted to form a YAML file package, and then the YAML file package is sent to the OPC UA server;
[0020] After decompressing and decrypting the received YAML file package, the OPC UA server reads the complete version of the YAML code from the corresponding YAML format file and constructs the corresponding OPC UA information model based on the complete version of the YAML code.
[0021] Furthermore, in step S3, after backing up the constructed OPC UA information model, it is fed back to the user terminal, and the user terminal is instructed to load the OPC UA information model. This specifically includes:
[0022] After copying and backing up the constructed OPC UA information model, the copied and backed-up OPC UA information model is stored in a specific storage space of the OPC UA server, and the constructed OPC UA information model is fed back to the user terminal.
[0023] The user terminal's OPC UA driver is instructed to load the received OPC UA information model.
[0024] Furthermore, in step S3, obtaining the loading status information of the OPC UA information model specifically includes:
[0025] The loading time of each module of the OPC UA information model by the OPC UA driver and the corresponding data processing results after loading are obtained, and these are used as the loading status information.
[0026] Furthermore, in step S4, based on the data processing status information, the user terminal sends a notification message to the OPC UA server so that the OPC UA server can perform different modes of operation on the backed-up OPC UA information model. Specifically, this includes:
[0027] If the loading time of a certain module is greater than or equal to a preset time threshold, or if the data processing result of a certain module has an error, the corresponding module is marked, and a notification message containing the marking information of the corresponding module is sent back to the OPC UA server through the user terminal, so that the OPC UA server can optimize the corresponding module of the backed-up OPC UA information model, and then send the optimized OPC UA information model back to the user terminal.
[0028] If the loading time of all modules is less than the preset time threshold and there are no errors in the data processing results of all modules, then the user terminal sends a notification message that the model is normal to the OPC UA server, so that the OPC UA server deletes the backed-up OPC UA information model.
[0029] Compared to existing technologies, this management method for parsing the OPC UA information model monitors the user terminal to obtain the YAML format file corresponding to the task executed by the user terminal. The verified and lossless YAML file is then sent to the OPC UA server, which constructs the corresponding OPC UA information model. The OPC UA information model is then fed back to the user terminal for loading. Based on the loading status information of the OPC UA information model, a notification message is sent to the OPC UA server, enabling the OPC UA server to perform different modes of operation on the backed-up OPC UA information model. This method parses the YAML format file to construct the OPC UA information model, and when the OPC UA information model is loaded on the user terminal, it uses the model's loading status information as a benchmark to perform effective and comprehensive testing and optimization of the OPC UA information model, thereby improving the operational reliability and accuracy of the OPC UA information model.
[0030] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0031] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. 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.
[0033] Figure 1 This is a flowchart illustrating the management method for parsing the OPC UA information model provided by the present invention. Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] See Figure 1 This is a flowchart illustrating a management method for parsing an OPC UA information model, provided in an embodiment of the present invention. The management method for parsing an OPC UA information model includes the following steps:
[0036] Step S1: Monitor the user terminal to obtain the current task execution status information of the user terminal; based on the task execution status information, find the corresponding YAML format file from the file storage space of the user terminal, and perform verification processing on the YAML format file;
[0037] Step S2: Based on the result of the verification process, determine whether the YAML format file is a lossless YAML format file; if the YAML format file is a lossless YAML file, send the YAML format file to the OPC UA server, and the OPC UA server constructs the corresponding OPC UA information model based on the YAML format file.
[0038] Step S3: After backing up the constructed OPC UA information model, the backup is sent back to the user terminal, and the user terminal is instructed to load the OPC UA information model; the loading status information of the OPC UA information model is obtained.
[0039] Step S4: Based on the loading status information, the user terminal sends a notification message to the OPC UA server so that the OPC UA server can perform different modes of operation on the backed-up OPC UA information model.
[0040] The beneficial effects of the above technical solution are as follows: The management method for parsing the OPC UA information model monitors the user terminal to obtain the YAML format file corresponding to the task executed by the user terminal. The verified and lossless YAML file is sent to the OPC UA server, which then constructs the corresponding OPC UA information model. The OPC UA information model is fed back to the user terminal for loading. Based on the loading status information of the OPC UA information model, a notification message is sent to the OPC UA server so that the OPC UA server can perform different modes of operation on the backed-up OPC UA information model. After parsing the YAML format file, the above method constructs the OPC UA information model. When the OPC UA information model is loaded on the user terminal, the loading status information of the model is used as a benchmark to effectively and comprehensively detect and optimize the OPC UA information model, thereby improving the operational reliability and accuracy of the OPC UA information model.
[0041] Preferably, in step S1, monitoring the user terminal to obtain its current task execution status information specifically includes:
[0042] The task manager on the user terminal is monitored, and the data type of the currently executing task and its corresponding execution progress information are extracted from the task manager to serve as the execution status information of the task.
[0043] The beneficial effects of the above technical solution are as follows: through the above method, the tasks currently being executed by the user terminal can be comprehensively monitored, and the task execution status information of the user terminal on the foreground side can be effectively determined, thereby providing a reliable basis for subsequent retrieval of YAML format files.
[0044] Preferably, in step S1, based on the task execution status information, the corresponding YAML format file is retrieved from the file storage space of the user terminal, and the YAML format file is verified. This specifically includes:
[0045] Based on the task data type, extract the task currently processing YAML format files from the currently executing task;
[0046] Based on the execution progress information, determine whether the extracted task has been completed; if so, retrieve the corresponding YAML file from the file storage space corresponding to the task that has been completed.
[0047] Next, the found YAML format files are subjected to file code verification to determine whether the file code of the found YAML format files is complete.
[0048] The beneficial effects of the above technical solution are as follows: by using the above method, it is ensured that the corresponding YAML file is found only from the completed tasks, and the integrity of the YAML file code is also checked. This ensures that only YAML files with complete file code can be used for the construction of the OPC UA information model.
[0049] Preferably, in step S2, determining whether the YAML file is a lossless YAML file based on the result of the verification process specifically includes:
[0050] If the code of the found YAML file is complete, then the YAML file is considered a lossless YAML file.
[0051] If it is determined that the file code of the found YAML format file is incomplete, then the YAML format file is determined not to be a lossless YAML file, and the missing file code of the YAML format file is repaired, thereby restoring the YAML format file to a lossless YAML file.
[0052] The beneficial effects of the above technical solution are: by using the above method, YAML format files with missing code can be repaired, ensuring the integrity of the YAML format files.
[0053] Preferably, in step S2, when the YAML file is a lossless YAML file, the YAML file is sent to the OPC UA server, and the OPC UA server constructs the corresponding OPC UA information model based on the YAML file, specifically including:
[0054] When the YAML file is a lossless YAML file, the YAML file is compressed and encrypted to form a YAML file package, and then the YAML file package is sent to the OPC UA server;
[0055] After decompressing and decrypting the received YAML file package, the OPC UA server reads the complete version of the YAML code from the corresponding YAML format file and constructs the corresponding OPC UA information model based on the complete version of the YAML code.
[0056] The beneficial effects of the above technical solution are as follows: By using the above method, YAML code with a complete version can be extracted from YAML format files for use in the construction of OPC UA information models, ensuring the completeness of the OPC UA information model construction.
[0057] Preferably, in step S3, backing up the constructed OPC UA information model and then feeding it back to the user terminal, and instructing the user terminal to load the OPC UA information model, specifically includes:
[0058] After copying and backing up the constructed OPC UA information model, the copied and backed-up OPC UA information model is stored in a specific storage space of the OPC UA server, and the constructed OPC UA information model is fed back to the user terminal.
[0059] Instruct the user terminal's OPC UA driver to load the received OPC UA information model.
[0060] The beneficial effects of the above technical solution are as follows: By replicating and backing up the OPC UA information model in the above manner, it is possible to perform timely and targeted processing of the OPC UA information model directly on the OPC UA server, thereby improving the efficiency of subsequent optimization of the OPC UA information model.
[0061] Preferably, in step S3, obtaining the loading status information of the OPC UA information model specifically includes:
[0062] The loading time of each module of the OPC UA information model by the OPC UA driver and the corresponding data processing results after loading are obtained, and these are used as the loading status information.
[0063] The beneficial effects of the above technical solution are as follows: By using the above method, the loading status of each module of the OPC UA information model on the user terminal is recorded in detail, which facilitates targeted local optimization of modules with problems in the future, avoiding optimization of the entire OPC UA information model and reducing the efficiency of optimization.
[0064] Preferably, in step S4, based on the data processing status information, the user terminal sends a notification message to the OPC UA server so that the OPC UA server can perform different modes of operation on the backed-up OPC UA information model. Specifically, this includes:
[0065] If the loading time of a certain module is greater than or equal to the preset time threshold, or if the data processing result of a certain module has an error, the corresponding module is marked, and a notification message containing the marking information of the corresponding module is sent back to the OPC UA server through the user terminal, so that the OPC UA server can optimize the corresponding module of the backed-up OPC UA information model, and then send the optimized OPC UA information model back to the user terminal.
[0066] If the loading time of all modules is less than the preset time threshold and there are no errors in the data processing results of all modules, then the user terminal will send a notification message that the model is normal to the OPC UA server, so that the OPC UA server will delete the backup OPC UA information model.
[0067] The beneficial effects of the above technical solution are as follows: When a module of the OPC UA information model has a problem, the OPC UA server is promptly instructed to optimize the backup OPC UA information model accordingly, and the optimized OPC UA information model is fed back to the user terminal to replace the original OPC UA information model on the user terminal, ensuring the operational reliability of the user terminal's OPC UA information model. Conversely, when all modules of the OPC UA information model are problem-free, the OPC UA server is promptly instructed to delete the backup OPC UA information model, thereby increasing the available storage space within the OPC UA information model.
[0068] As can be seen from the above embodiments, the management method for parsing the OPC UA information model monitors the user terminal to obtain the YAML format file corresponding to the task executed by the user terminal. The verified lossless YAML file is sent to the OPC UA server, which then constructs the corresponding OPC UA information model. The OPC UA information model is then fed back to the user terminal for loading. Based on the loading status information of the OPC UA information model, a notification message is sent to the OPC UA server so that the OPC UA server can perform different modes of operation on the backed-up OPC UA information model. The above method parses the YAML format file to construct the OPC UA information model. When the OPC UA information model is loaded on the user terminal, it uses the model's loading status information as a benchmark to perform effective and comprehensive detection and optimization of the OPC UA information model, thereby improving the operational reliability and accuracy of the OPC UA information model.
[0069] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A management method for resolving an OPC UA information model, characterized in that, It includes the following steps: Step S1: Monitor the user terminal to obtain the current task execution status information of the user terminal; based on the task execution status information, find the corresponding YAML format file from the file storage space of the user terminal, and perform verification processing on the YAML format file; Step S2: Based on the result of the inspection process, determine whether the YAML format file is a lossless YAML format file; When the YAML format file is a lossless YAML file, the YAML format file is sent to the OPC UA server, and the OPC UA server constructs the corresponding OPC UA information model based on the YAML format file; Step S3: After backing up the constructed OPC UA information model, the backup is sent back to the user terminal, and the user terminal is instructed to load the OPC UA information model. Obtaining the loading status information of the OPC UA information model includes: obtaining the loading time of each module of the OPC UA information model by the OPC UA driver and the corresponding data processing results after loading is completed, and using these as the loading status information; Step S4: Based on the loading status information, a notification message is sent to the OPC UA server via the user terminal, so that the OPC UA server can perform different modes of operation on the backed-up OPC UA information model, specifically including: If the loading time of a certain module is greater than or equal to a preset time threshold, or if the data processing result of a certain module has an error, the corresponding module is marked, and a notification message containing the marking information of the corresponding module is sent back to the OPC UA server through the user terminal, so that the OPC UA server can optimize the corresponding module of the backed-up OPC UA information model, and then send the optimized OPC UA information model back to the user terminal. If the loading time of all modules is less than the preset time threshold and there are no errors in the data processing results of all modules, then the user terminal sends a notification message that the model is normal to the OPC UA server, so that the OPC UA server deletes the backed-up OPC UA information model.
2. The management method for parsing the OPC UA information model as described in claim 1, characterized in that: In step S1, monitoring the user terminal to obtain its current task execution status information specifically includes: The task manager on the user terminal is monitored, and the task data type and execution progress information corresponding to the currently executing task are extracted from the task manager, which are used as the task execution status information.
3. The management method for parsing the OPC UA information model as described in claim 2, characterized in that: In step S1, based on the task execution status information, the corresponding YAML format file is retrieved from the file storage space of the user terminal, and the YAML format file is verified. Specifically, this includes: Based on the task data type, extract the task currently processing YAML format files from the currently executing task; Based on the execution progress information, determine whether the extracted task has been completed; if so, find the corresponding YAML file in the file storage space corresponding to the task that has been completed. Next, the found YAML format files are subjected to file code verification to determine whether the file code of the found YAML format files is complete.
4. The management method for parsing the OPC UA information model as described in claim 3, characterized in that: In step S2, determining whether the YAML file is a lossless YAML file based on the result of the verification process specifically includes: If it is determined that the code of the found YAML file is complete, then the YAML file is considered a lossless YAML file. If it is determined that the file code of the found YAML format file is incomplete, then the YAML format file is determined not to be a lossless YAML file, and the missing file code of the YAML format file is repaired, thereby restoring the YAML format file to a lossless YAML file.
5. The management method for parsing the OPC UA information model as described in claim 4, characterized in that: In step S2, when the YAML file is a lossless YAML file, the YAML file is sent to the OPC UA server. The OPC UA server then constructs the corresponding OPC UA information model based on the YAML file, specifically including: When the YAML format file is a lossless YAML file, the YAML format file is compressed and encrypted to form a YAML file package, and then the YAML file package is sent to the OPC UA server; After decompressing and decrypting the received YAML file package, the OPC UA server reads the complete version of the YAML code from the corresponding YAML format file and constructs the corresponding OPC UA information model based on the complete version of the YAML code.
6. The management method for parsing the OPC UA information model as described in claim 5, characterized in that: In step S3, backing up the constructed OPC UA information model and then feeding it back to the user terminal, and instructing the user terminal to load the OPC UA information model, specifically includes: After copying and backing up the constructed OPC UA information model, the copied and backed-up OPC UA information model is stored in a specific storage space of the OPC UA server, and the constructed OPC UA information model is fed back to the user terminal. The user terminal's OPC UA driver is instructed to load the received OPC UA information model.