Model data standardization transmission method and computer readable storage medium

By adopting a standardized model data transmission method in the simulator platform, importing predefined metadata types and models, compressing the data into a cached package before sending, the problem of low transmission efficiency of XML and JSON is solved, and efficient data transmission is achieved.

CN119670695BActive Publication Date: 2026-11-24CHINA NUCLEAR POWER (BEIJING) SIMULATION TECH CORP LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411575237.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2026-11-24
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

Existing XML and JSON data transmission schemes result in low data transmission efficiency in simulators, failing to meet the demand for high-speed data transmission at the millisecond level.

Method used

The model data standardization transmission method is adopted. Before establishing communication with the data recipient, a predefined metadata type and metadata model are imported. After the data is obtained, it is compressed into a data cache package and sent to the data recipient for parsing.

Benefits of technology

It has achieved standardized transmission and efficient transfer of internal and external data within the simulator simulation platform, thereby improving data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119670695B_ABST
    Figure CN119670695B_ABST
Patent Text Reader

Abstract

This invention discloses a standardized model data transmission method and a computer-readable storage medium. The method includes: before establishing communication with the data receiver, importing a predefined metadata type and a predefined metadata model; after establishing communication with the data receiver, receiving the data receiver's request, obtaining data, and compressing the data into a data cache package according to the metadata type and metadata model; and sending the data cache package to the data receiver, whereby the data receiver parses the data cache package according to the predefined metadata type and predefined metadata model to obtain the data. This invention solves the problem of standardized data transmission of internal and external data within a simulator simulation platform and achieves efficient transmission of internal and external data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission technology, and in particular to a standardized transmission method for model data and a computer-readable storage medium. Background Technology

[0002] Simulation platform software is a complex system software (hereinafter referred to as the platform), generally composed of a computing engine, a general-purpose graphical modeling system, a model library, and other simulation function software. The platform can be used for large-scale scientific computing, dynamic characteristic modeling research, simulation system development, optimization design and verification, and other scenarios in various process and industrial systems, providing integrated, end-to-end development, debugging, and operational support functions. Simulation platforms require unified and standardized data transmission methods to support the free transfer of computational and display data between the platform and external systems.

[0003] Currently, the more mainstream no-programming data transmission solutions are XML (eXtensible Markup Language) and JSON (JavaScript Object Notation). However, they have the following problems: XML and JSON files are large in size and have complex formats, resulting in low parsing efficiency during data transmission, which affects transmission efficiency. They are not suitable for large data transmission scenarios in simulators, nor are they suitable for high-speed data transmission scenarios requiring millisecond-level data transmission in simulators. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a standardized transmission method for model data, addressing at least one defect of the related technologies mentioned in the background: that XML and JSON data transmission schemes affect transmission efficiency.

[0005] The technical solution adopted by this invention to solve its technical problem is: to provide a model data standardization transmission method, comprising the following steps:

[0006] Before establishing communication with the data recipient, import the predefined metadata types and predefined metadata models;

[0007] After establishing communication with the data receiver, the system receives the data receiver's request, obtains the data, and compresses the data into a data cache package according to the metadata type and the metadata model.

[0008] The data cache package is sent to the data receiver, and the data cache package is used by the data receiver to parse the data cache package according to the predefined metadata type and the predefined metadata model to obtain data.

[0009] In some embodiments, the metadata type includes: basic metadata type and user-defined metadata type;

[0010] The metadata model includes: the metadata type and the metadata name.

[0011] In some embodiments, the user-defined metadata type includes a combination of at least two of the underlying metadata types.

[0012] In some embodiments, after establishing communication with the data receiver, a request from the data receiver is received, data is obtained, and the data is compressed into a data cache package according to the metadata type and the metadata model, including:

[0013] S1: After establishing communication with the data receiver, receive the data request list from the data receiver, parse the data request list, and obtain the i-th variable in the data request list, where i is the variable and N is the number of all variables in the data request list;

[0014] S2: Query the metadata list corresponding to the i-th variable in the data request list, obtain the data in the metadata list, compress the data into the data cache package according to the metadata type and the metadata model, and let i = i + 1;

[0015] S3: Determine if i is equal to N. If yes, complete the data compression; otherwise, return to step S1.

[0016] In some embodiments, step S1 includes:

[0017] After establishing communication with the data receiver, the system receives the data request list from the data receiver, parses the data request list, obtains the i-th variable in the data request list, determines whether the data cache package exists, and if the data cache package exists, locates the storage position of the i-th variable in the data request list according to the data cache package offset table, and executes step S2.

[0018] In some embodiments, step S1 includes:

[0019] After establishing communication with the data receiver, the system receives the data request list from the data receiver, parses the data request list, obtains the i-th variable in the data request list, determines whether the data cache package exists, and if the data cache package does not exist, the system establishes the data cache package and the data cache package offset table, and executes step S2.

[0020] In some embodiments, before establishing communication with the data recipient, importing predefined metadata types and predefined metadata models further includes: establishing a metadata offset table for all the metadata types based on the metadata model;

[0021] Step S1 is followed by: recording the offset of the variable in the data cache package according to the metadata offset table, and putting the offset into the data cache package offset table.

[0022] In some embodiments, step S2 includes:

[0023] S21: Query the metadata list corresponding to the i-th variable in the data request list, and parse the metadata list;

[0024] S22: Obtain the data of the j-th basic metadata type variable in the metadata list, compress the data of the j-th basic metadata type variable in the metadata list into the data cache package according to the metadata type and the metadata model, and let j = j + 1, where 1 + 1, M is the number of all basic metadata type variables in the metadata list;

[0025] S23: Determine if j is equal to M. If yes, let i = i + 1 and execute step S3; otherwise, return to step S21.

[0026] In some embodiments, the method further includes:

[0027] When the predefined metadata type and / or the predefined metadata model are updated, the updated metadata type and the updated metadata model are re-imported.

[0028] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the model data standardization transmission method as described in any of the preceding claims.

[0029] By implementing this invention, the following beneficial effects are achieved:

[0030] The model data standardization transmission method disclosed in this invention is applied to the data sender. Before establishing communication with the data receiver, a predefined metadata type and a predefined metadata model are imported. After establishing communication with the data receiver, the method receives the data receiver's request, obtains the data, compresses the data into a data cache package according to the metadata type and metadata model, and then sends the data cache package to the data receiver. The data cache package is used by the data receiver to parse the data cache package according to the predefined metadata type and predefined metadata model to obtain the data. This solves the problem of standardized data transmission of internal and external data in the simulator simulation platform and achieves efficient transmission of internal and external data. Attached Figure Description

[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0032] Figure 1 A flowchart of an embodiment of the model data standardization transmission method of the present invention is shown;

[0033] Figure 2 The flowchart illustrates an embodiment of the model data standardization transmission method of the present invention, which, after establishing communication with the data receiver, receives the data receiver's request, obtains the data, and compresses the data into a data cache package according to the metadata type and metadata model.

[0034] Figure 3 A flowchart of step S2 is shown in one embodiment of the model data standardization transmission method of the present invention. Detailed Implementation

[0035] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0036] It should be noted that the flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0037] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0038] like Figure 1As shown, some embodiments of the present invention disclose a method for standardized transmission of model data. The method is applied to the data sender and includes the following steps:

[0039] Before establishing communication with the data recipient, import the predefined metadata types and predefined metadata models;

[0040] After establishing communication with the data recipient, it receives the data recipient's request, obtains the data, and compresses the data into a data cache package according to the metadata type and metadata model.

[0041] A data cache packet is sent to the data receiver. The data cache packet is used by the data receiver to parse the data cache packet according to the predefined metadata type and predefined metadata model in order to obtain the data.

[0042] In some embodiments, metadata types include: basic metadata types and user-defined metadata types. The metadata model includes: metadata types and metadata names.

[0043] In this application, the data sender is, for example, a simulator platform, and the data receiver is, for example, a DCS system (Distributed Control System). The DCS system receives data from the simulator platform and executes corresponding control logic based on this data. The simulator platform and DCS system mentioned here are merely examples and are not intended to limit this application.

[0044] The data within the simulator platform is primarily numerical. Predefined metadata types include basic metadata types and user-defined metadata types, as shown in Table 1. The size and composition of basic metadata types are fixed. User-defined metadata types, which are non-basic metadata types, have their size and composition calculated based on the total size of the basic metadata types they contain.

[0045]

[0046] Table 1 defines the basic metadata types. The definition of the metadata model includes metadata types and metadata names, as shown in Table 2.

[0047]

[0048] Table 2 Example of metadata model definition

[0049] The simulator manages data on the simulation platform by using predefined metadata types and predefined metadata models. At runtime, it constructs corresponding memory models and mechanisms based on the predefined metadata types and predefined metadata models to manage simulation effects, scenarios, etc., thereby achieving effective interaction with the simulation software and providing local support for the simulation software.

[0050] In some embodiments, user-defined metadata types include a combination of at least two basic metadata types.

[0051] The user-defined metadata type can be defined by the user. This embodiment defines a graphical device for user-defined metadata, allowing users to define it by combining and nesting basic metadata types. Ultimately, the user-defined metadata type must be able to be parsed into a list of basic metadata types and its size calculated. An example of defining a user-defined metadata type AModel is shown below.

[0052] As shown in Table 3.

[0053]

[0054]

[0055] Table 3 User-defined metadata type definitions

[0056] Before establishing communication, the data receiver and data sender import the basic metadata types, user-defined metadata types, and metadata models described in text format by the simulation designer.

[0057] like Figure 2 As shown, in some embodiments, after establishing communication with the data receiver, a request from the data receiver is received, data is obtained, and the data is compressed into a data cache package according to the metadata type and metadata model, including:

[0058] S1: After establishing communication with the data receiver, receive the data request list from the data receiver, parse the data request list, and obtain the i-th variable in the data request list, where 1≤i≤N, and N is the number of all variables in the data request list;

[0059] S2: Query the metadata list corresponding to the i-th variable in the data request list, obtain the data in the metadata list, compress the data into the data cache package according to the metadata type and metadata model, and let i = i + 1;

[0060] S3: Determine if i is equal to N. If yes, complete the data compression; otherwise, return to step S1.

[0061] Specifically, after the data sender and data receiver establish communication, the data receiver sends a request to the data sender, which includes a data request list (VARLIST). Upon receiving the request, the data sender begins parsing the request, parsing the data request list (VARLIST, containing N variables), setting variable i as the current variable index (1 ≤ i ≤ N), and retrieving the i-th variable V from the data request list. i ; Query V i Metadata list L i Traverse the metadata list L i , put the metadata list L i The information is packaged into data cache package B. The compressed data cache package B will be sent to the data receiver in binary form. Determine whether i is equal to N. If yes, return the data in data cache package B. If no, return to step S1.

[0062] After receiving data cache packet B, the data receiver parses data cache packet B according to the metadata type and metadata model imported before establishing communication, and places the parsing result into the cache for other purposes.

[0063] In some embodiments, step S1 includes:

[0064] After establishing communication with the data receiver, receive the data request list from the data receiver, parse the data request list, obtain the i-th variable in the data request list, determine whether the data cache package exists, if the data cache package exists, locate the location of the i-th variable in the data request list according to the data cache package offset table, and execute step S2 to update the data cache package B.

[0065] In some embodiments, step S1 includes:

[0066] After establishing communication with the data receiver, receive the data request list from the data receiver, parse the data request list, obtain the i-th variable in the data request list, determine whether the data cache package exists, if the data cache package does not exist, then create the data cache package and the data cache package offset table, and execute step S2.

[0067] In some embodiments, before establishing communication with the data recipient, importing predefined metadata types and predefined metadata models further includes: creating a metadata offset table for all metadata types based on the metadata model.

[0068] Step S1 is followed by: recording the offset of the variable in the data cache package according to the metadata offset table, and putting the offset into the data cache package offset table.

[0069] Specifically, before establishing communication, the data receiver and the data sender establish a metadata type offset table O for all metadata types based on the metadata model. This table contains the offsets of different parameters in the metadata type. The metadata type offset table O only needs to be established once. The offset table definition for user-defined metadata types is shown in Table 4. The offsets of all metadata parameters are calculated in the user-defined metadata type.

[0070]

[0071] Table 4. Offset Table Definitions for User-Defined Metadata Types

[0072] Based on the information in metadata type offset table O, data cache package offset table, and variable information in data request list VARLIST, update the data content in data cache package B in a loop.

[0073] By combining data standardization and encapsulation methods with metadata type offset tables and data cache package offset tables, the efficiency problem of data transmission is solved, especially when data needs to be transmitted multiple times over a long period of time.

[0074] like Figure 3 As shown, in some embodiments, step S2 includes:

[0075] S21: Query the metadata list corresponding to the i-th variable in the data request list, and parse the metadata list;

[0076] S22: Get the data of the j-th basic metadata type variable in the metadata list, compress the data of the j-th basic metadata type variable in the metadata list into the data cache package according to the metadata type and metadata model, and let j = j + 1, where 1 ≤ j ≤ M, and M is the number of all basic metadata type variables in the metadata list;

[0077] S23: Determine if j is equal to M. If yes, let i = i + 1 and execute step S3; otherwise, return to step S21.

[0078] Specifically, parsing the metadata list L i (Including M variables), set variable j as the current variable index (1≤j≤M), and retrieve the metadata list L. i The variable U of the basic metadata type in k , will the variable U of the basic metadata type k Information packaging, since both the data sender and receiver know the structure of the metadata type, only requires the packaged content to include the variable U of the basic metadata type. kThe contents of the data value part are calculated, and j = j + 1 is set. It is determined whether j is equal to M. If so, the packaged data is returned, i = i + 1 is set, and step S3 is executed. If not, step S21 is returned.

[0079] In some embodiments, the method further includes:

[0080] When the predefined metadata type and / or the predefined metadata model is updated, the updated metadata type and the updated metadata model are re-imported.

[0081] After the metadata type and / or metadata model are updated, all data senders and receivers need to be synchronized, and the existing metadata model, metadata type offset table O, and data cache package B need to be updated before restarting the data transmission process.

[0082] Some embodiments of the present invention disclose a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the model data standardization transmission method as described above, which will not be elaborated further here.

[0083] By implementing this invention, the following beneficial effects are achieved:

[0084] The model data standardization transmission method disclosed in this invention is applied to the data sender. Before establishing communication with the data receiver, a predefined metadata type and a predefined metadata model are imported. After establishing communication with the data receiver, the method receives the data receiver's request, obtains the data, compresses the data into a data cache package according to the metadata type and metadata model, and then sends the data cache package to the data receiver. The data cache package is used by the data receiver to parse the data cache package according to the predefined metadata type and predefined metadata model to obtain the data. This solves the problem of standardized data transmission of internal and external data in the simulator simulation platform and achieves efficient transmission of internal and external data.

[0085] It is understood that the above embodiments only illustrate some implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can freely combine the above embodiments or technical features without departing from the concept of the present invention, and can also make several modifications and improvements, all of which fall within the protection scope of the present invention. That is, the embodiments described "in some embodiments" can be freely combined with any of the preceding and following embodiments. Therefore, all equivalent transformations and modifications made within the scope of the claims of the present invention should be covered by the claims of the present invention.

Claims

1. A method for standardized transmission of model data, characterized in that, The method is applied to the data sender and includes the following steps: Before establishing communication with the data recipient, predefined metadata types and predefined metadata models are imported; the predefined metadata types include basic metadata types and user-defined metadata types, and the size and composition of the user-defined metadata types are calculated based on the size of the basic metadata types. After establishing communication with the data receiver, the process receives the data receiver's request, obtains the data, and compresses the data into a data cache package according to the metadata type and the metadata model, including: S1: After establishing communication with the data receiver, receiving the data request list from the data receiver, parsing the data request list, and obtaining the i-th variable in the data request list, where 1≤i≤N, and N is the number of all variables in the data request list; S2: Querying the metadata list corresponding to the i-th variable in the data request list, obtaining the data in the metadata list, compressing the data into the data cache package according to the metadata type and the metadata model, and setting i=i+1; S3: Determining whether i is equal to N. If yes, the data compression is completed; otherwise, returning to step S1. The data cache package is sent to the data receiver, and the data cache package is used by the data receiver to parse the data cache package according to the predefined metadata type and the predefined metadata model to obtain data.

2. The model data standardization and transmission method according to claim 1, characterized in that, The metadata types include: basic metadata types and user-defined metadata types; The metadata model includes: the metadata type and the metadata name.

3. The model data standardization transmission method according to claim 2, characterized in that, The user-defined metadata type includes a combination of at least two of the basic metadata types.

4. The model data standardization and transmission method according to claim 1, characterized in that, Step S1 includes: After establishing communication with the data receiver, the system receives the data request list from the data receiver, parses the data request list, obtains the i-th variable in the data request list, determines whether the data cache package exists, and if the data cache package exists, locates the storage position of the i-th variable in the data request list according to the data cache package offset table, and executes step S2.

5. The model data standardization and transmission method according to claim 1, characterized in that, Step S1 includes: After establishing communication with the data receiver, the system receives the data request list from the data receiver, parses the data request list, obtains the i-th variable in the data request list, determines whether the data cache package exists, and if the data cache package does not exist, the system establishes the data cache package and the data cache package offset table, and executes step S2.

6. The model data standardization transmission method according to claim 4 or 5, characterized in that, Before establishing communication with the data recipient, importing predefined metadata types and predefined metadata models also includes: establishing a metadata offset table for all metadata types based on the metadata model; Step S1 is followed by: recording the offset of the variable in the data cache package according to the metadata offset table, and putting the offset into the data cache package offset table.

7. The model data standardization and transmission method according to claim 1, characterized in that, Step S2 includes: S21: Query the metadata list corresponding to the i-th variable in the data request list, and parse the metadata list; S22: Obtain the data of the j-th basic metadata type variable in the metadata list, compress the data of the j-th basic metadata type variable in the metadata list into the data cache package according to the metadata type and the metadata model, and let j = j + 1, where 1 ≤ j ≤ M, and M is the number of all basic metadata type variables in the metadata list; S23: Determine if j is equal to M. If yes, let i = i + 1 and execute step S3; otherwise, return to step S21.

8. The model data standardization transmission method according to claim 1, characterized in that, The method further includes: When the predefined metadata type and / or the predefined metadata model are updated, the updated metadata type and the updated metadata model are re-imported.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the model data standardization transmission method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Simulation system data transmission method and system based on metadata

    CN116668534A