Device Modeling Method, Storage Medium and Electronic Device for Smart Rail Transit System

Through the combination of Key-Value in-memory database and metadata template group, the problem of unified and efficient data processing in smart rail transit system is solved, flexible storage and efficient query of equipment models are realized, and data preparation and concurrent processing capabilities are improved.

CN115168356BActive Publication Date: 2025-07-29CASCO SIGNAL LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210833230.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-14
Publication Date
2025-07-29
Estimated Expiration
2042-07-14

AI Technical Summary

Technical Problem

The real-time data platform of the existing smart rail transit system is difficult to effectively unify a variety of professional data, and cannot efficiently process equipment object status updates and complex associations, resulting in complex database structure, high query difficulty, and low concurrent processing efficiency.

Method used

The Key-Value in-memory database is used to generate device model data by setting multiple metadata templates, and the device model is used to model the device using the Key-Value data structure, which supports flexible changes in the device model and high concurrent reading.

Benefits of technology

It realizes flexible storage and high concurrent reading of device models, simplifies data structure, improves data preparation efficiency and consistency checks, reduces the difficulty of composite query, and supports flexible addition and relationship adjustment of new device types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115168356B_ABST
    Figure CN115168356B_ABST
Patent Text Reader

Abstract

The present invention discloses a device modeling method, a storage medium and an electronic device for an intelligent rail transit system. The method includes: setting a plurality of metadata templates, where the metadata templates include a general metadata template, a reference metadata template, a measurement point metadata template and a device metadata template; generating a metadata template group according to each metadata template; constructing a device list, and generating device data, sub-device data, measurement point data, corresponding relationship data and subordinate relationship data between the data according to the metadata template group and the device list to generate device model data; storing the device model data in an in-memory database, so that during the operation of the device model, the device model data is obtained from the in-memory database and loaded into the device list. The present invention can improve the design flexibility of the real-time data platform, improve the efficiency of the data preparation stage during device modeling, and enrich the application scenarios of the real-time data platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of rail transit, and particularly to a method for device modeling, a storage medium, and an electronic device of an intelligent rail transit system. Background Art

[0002] The intelligent urban rail transit system uses a unified software and hardware platform to collect real-time data of multiple specialties such as the signal system, power supply system, environment and equipment monitoring system, access control system, fire alarm system, ticketing system, broadcast system, passenger guidance system, and closed-circuit television system, realizing highly integrated information and achieving comprehensive system coordination and linkage.

[0003] The real-time data platform is the basis of the intelligent urban rail transit system. Traditional real-time data platforms are often built on the basis of relational data models and are constructed based on real-time databases. However, there are many problems with this model when applied to the intelligent rail transit system: the data types of various specialties are complex and diverse, and all information cannot be unified into several predefined data table structures. Especially when introducing new device type data, it may bring significant changes to the existing relational database structure, thereby affecting the implementation and application of the platform software; traditional real-time data platforms focus on processing the changes of measurement points such as digital quantities, analog quantities, and cumulative quantities, while ignoring the update of device object states. In this way, a large amount of repetitive work is required in the data preparation stage, and in the system operation stage, the measurement points under the same device cannot be analyzed and predicted as a whole, and the impact of measurement points on device attributes and the changes in relationships with other devices cannot be analyzed; the association relationships between devices within and between specialties are complex, diverse, and frequently changing. If designed to meet the first normal form, it will lead to a complex database structure, increase the difficulty of composite queries, and thus reduce the efficiency of data concurrent processing. Summary of the Invention

[0004] The present invention aims to at least solve one of the technical problems in the related art to some extent. For this reason, the first object of the present invention is to provide a method for device modeling of an intelligent rail transit system, which can be applicable to scenarios with complex data structures, frequently changing attribute fields, and high-concurrency reads.

[0005] The second object of the present invention provides a computer-readable storage medium.

[0006] The third object of the present invention provides an electronic device.

[0007] To achieve the above object, the present invention is realized through the following technical solutions:

[0008] A method for device modeling of an intelligent rail transit system includes:

[0009] Set multiple metadata templates, where the metadata templates include a general metadata template, a reference metadata template, a measurement point metadata template, and a device metadata template;

[0010] Generate a metadata template group according to each of the metadata templates;

[0011] Construct a device list, and generate device data, sub-device data, measurement point data, correspondence data and subordination data between each data according to the metadata template group and the device list, so as to generate device model data;

[0012] Store the device model data in an in-memory database, so that during the operation of the device model, the device model data can be obtained from the in-memory database and loaded into the device list.

[0013] Optionally, each metadata template includes at least one attribute unit, and the attribute unit includes at least one of the primary key of the device, the type of the device, and the classification of the device type. Among them, the primary key of the device is used as an index for data storage and reading of the device object in the in-memory database.

[0014] Optionally, each attribute unit includes at least one attribute, and the attribute includes at least one of the type, source, and default value of the data. Among them, the type of the data includes a basic type and a metadata reference type. The basic type includes at least one of integer type, long integer type, floating point type, and string type. The metadata reference type is a data composite reference type, and the metadata reference type is used to represent nested references to other metadata templates.

[0015] Optionally, the general metadata template further includes at least one attribute unit such as the loading device alarm priority, alarm type, and measurement point type. The reference metadata template further includes at least one attribute unit such as measurement point input information and measurement point conversion method.

[0016] Optionally, the attribute units in the measurement point metadata template are divided into static attribute units and dynamic attribute units. Among them, the static attribute units and the dynamic attribute units are used to describe the static parameters and dynamic parameters of the measurement point respectively.

[0017] Optionally, the step of generating a metadata template group according to each of the metadata templates includes:

[0018] Determine device metadata and measurement point metadata;

[0019] According to the correspondence between the device metadata and the measurement point metadata, and the subordination relationship between the device and the sub-device, form each of the metadata templates into a metadata template group.

[0020] Optionally, the method further includes: adjusting the metadata template group by adding device metadata, measurement point metadata, and modifying the corresponding relationship data and the subordinate relationship data.

[0021] Optionally, a measurement point in the metadata template group belongs to only one device, and when there is a parent device in the devices in the metadata template group, the number of parent devices is one.

[0022] Optionally, the measurement points include measurement input points and measurement output points. Before storing the device model data into the in-memory database, the method further includes:

[0023] Determining the input parameters, conversion methods of the measurement input points, processing methods of the measurement output points, and external interface definitions to determine the reference metadata template.

[0024] Optionally, the step of obtaining the device model data from the in-memory database and loading it into the device list includes:

[0025] According to the device list, obtaining the metadata templates of the root device and the measurement points in the device list from the in-memory database;

[0026] Loading the metadata templates of the root device and the measurement points into the device list.

[0027] Optionally, before loading the metadata templates of the root device and the measurement points into the device list, the method further includes: loading the general metadata template.

[0028] Optionally, when performing data loading, the method further includes: verifying the legality and integrity of the loaded data according to the type of data in the metadata template.

[0029] Optionally, the method further includes: performing consistency and integrity verification on the device model data loaded into the device list.

[0030] To achieve the above object, a second aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the device modeling method of the intelligent rail transit system described above is implemented.

[0031] To achieve the above object, a third aspect of the present invention provides an electronic device, including a processor and a memory. A computer program is stored on the memory. When the computer program is executed by the processor, the device modeling method of the intelligent rail transit system described above is implemented.

[0032] The present invention has at least the following technical effects:

[0033] (1) The present invention sets multiple metadata templates, generates a metadata template group according to the corresponding relationship and subordination relationship between devices, measurement points, and sub-devices, and then stores the device model data generated according to the metadata template group in the in-memory database in the form of a Key-Value data structure. During the operation of the device model, the device model data is retrieved from the in-memory database and loaded into the device list. Thus, the present invention analyzes and predicts the measurement points as a whole, analyzes the influence of the measurement points on device attributes and the changes in relationships with other devices, and the metadata template group can be arbitrarily changed when there are new device additions, changes, or relationship adjustments. Therefore, the present invention can realize the modeling of devices in the intelligent rail transit system without affecting the data structure and without affecting the normal operation of the platform software. In addition, by using other metadata templates such as general metadata templates and reference metadata templates, and performing Key-Value serialization processing and storage on each metadata template, the data structure of the present invention can be made simple and the difficulty of complex queries can be reduced.

[0034] (2) The present invention also makes full use of the flexibility, large capacity, high concurrency, and fast query speed of the Key-Value in-memory database to achieve flexible storage and high-concurrency reading of millions of device data. In the process of setting the metadata template of the device model in the present invention, new device types and device attributes can be added without changing the previous design as needed, and data that does not conform to the definition can be detected according to the metadata template, improving the reliability and consistency check of the data on the basis of ensuring the flexibility of the data structure. In addition, the present invention classifies the metadata templates, clarifies the differences and inheritance of the metadata template types, and ensures the consistency of data check and query for different device types. The present invention also refines the process of metadata template design and data preparation according to the characteristics of the intelligent rail transit system, clarifies the tasks and purposes of each process step, and standardizes the management and division of labor in the data preparation process. The present invention also takes the device as the basic modeling object and describes the relationships between the device, sub-devices, and measurement points, thereby improving the efficiency of the data preparation process and reducing the possibility of errors.

[0035] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a flowchart of a method for device modeling in an intelligent rail transit system provided by an embodiment of the present invention;

[0037] Figure 2 It is a flowchart of a method for device modeling in an intelligent rail transit system provided by a specific example of the present invention;

[0038] Figure 3 The flowchart of the device model data loading method provided by an embodiment of the present invention. Detailed implementation manners

[0039] The following details this embodiment. The examples of the embodiment are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions from beginning to end. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the present invention, and should not be construed as a limitation to the present invention.

[0040] To solve the technical problems described in the background art, the present invention provides a device modeling method for a smart rail transit system based on a Key-Value in-memory database. The present invention utilizes the characteristics of the Key-Value key-value pairs of the Key-Value in-memory database and combines the json (a data exchange format) formatted string method to establish a structural design method and a dynamic management method for various device objects in a smart rail transit system. The metadata template and device object data of the present invention are both stored in the Key-Value in-memory database. By formatting and defining the Key and Value, the relationships between data and template, and between data and data are established, making full use of the advantages of the Key-Value in-memory database, such as high concurrency, high capacity, high performance, strong scalability, and convenient storage and reading, greatly improving the design flexibility of the real-time data platform, the efficiency in the data preparation stage, and enriching the application scenarios of the real-time data platform.

[0041] The following describes the device modeling method, storage medium, and electronic device of the smart rail transit system of this embodiment with reference to the accompanying drawings.

[0042] Figure 1 The flowchart of the device modeling method for the smart rail transit system provided by an embodiment of the present invention. As Figure 1 shown, the method includes:

[0043] Step S1: Set multiple metadata templates, including a general metadata template, a reference metadata template, a measurement point metadata template, and a device metadata template.

[0044] Among them, each metadata template includes at least one attribute unit, and the attribute unit includes at least one of the primary key of the device, the type of the device, and the classification of the device type. Among them, the primary key of the device is used as the index for data storage and reading of the device object in the in-memory database.

[0045] Specifically, each type of metadata template contains one or more attribute units, but at least includes the following attribute units: Key: The primary key of the device, which also serves as the index for storing and retrieving the device object in the Key-Value in-memory database; Type: The type of the device, which is the basis for verifying the device object; Classify: The classification of the device type, which is the classification of the metadata template and belongs to the design-phase data and does not need to be configured during the data preparation phase.

[0046] For example, the DType1 device metadata template in Table 1 includes attribute units such as the primary key Key of the device, the type Type of the device, the classification Classify of the device type, and other attribute units such as Description (description), etc.

[0047] Table 1 Device Metadata Template and Measurement Point Metadata Template

[0048]

[0049] In an embodiment of the present invention, each attribute unit includes at least one attribute, and the attributes include at least one of the type, source, and default value of the data. Among them, the type of the data includes a basic type and a metadata reference type. The basic type includes at least one of integer type, long integer type, floating-point type, and string type. The metadata reference type is a data composite reference type, and the metadata reference type is used to represent nested references to other metadata templates.

[0050] Specifically, the json formatted string specification can be used to define the data attribute unit. Each attribute unit includes, but is not limited to, attributes such as type, origin, and default value, to facilitate annotation during the data preparation phase. Among them, type includes a basic type and a metadata reference type. The basic types mainly include integer (int), long integer (long), floating-point (double), string, etc. The metadata reference type has a composite reference type (combo), which is used to nestedly reference other metadata templates; origin is divided into defined during model design phase (design), defined during data production phase (input), and defined during runtime (dynamic). If necessary, the value range, description information, etc. can be added. For example, the attribute unit Key: {"type": "string", "origin": "input", "default": ""}.

[0051] In an embodiment of the present invention, the general metadata template further includes at least one attribute unit such as the loading device alarm priority, alarm type, and measurement point type. The reference metadata template further includes at least one attribute unit such as the measurement point input information and the measurement point conversion method.

[0052] Based on the given metadata template and property unit definition, the Common Data Meta-Schema and Combo Data Meta-Schema can be defined. Among them, the Common Data Meta-Schema mainly includes the alarm priority (AlarmPriority), alarm type (AlarmClass), measurement point type (MeasurementType), etc. when loading the device, and the Combo Data Meta-Schema includes the definition of measurement point input information (Input), measurement point conversion method (Transform), etc.

[0053] For example, the Combo Data Meta-Schema in Table 2 includes the measurement point input information Input1 and Input2 metadata templates, and the measurement point conversion methods Transform1 and Transform2 metadata templates. Among them, Input1 includes the primary key Key, name Name, type Type, etc. of the property unit, and the data attribute such as string is marked under each property unit.

[0054] Table 2 Combo Data Meta-Schema

[0055]

[0056] It should be noted that this type of metadata template is stored in the hash type of Key-Value data. To distinguish it from the metadata, a prefix "schema:" can be added to the name as the Key, and the metadata definition is stored as the Value of the hash table in the Key-Value memory database.

[0057] For example, the serialized data of the measurement point input information Input1 in Table 3, which is Key-Value data, has a prefix "schema: " added before the name of the measurement point input information Input1 as the Key, and the metadata defines Key, Classify, etc. as the Value values of the hash table and stores them in the Key-Value in-memory database. The serialized data of the measurement point conversion method Transform1 in Table 4, which is Key-Value data, has a prefix "schema: " added before the name of the measurement point conversion method Transform1 as the Key, and the metadata defines Key, Type, Classify, etc. as the Value values of the hash table and stores them in the Key-Value in-memory database. The serialized data of the alarm Alert in Table 5, which is Key-Value data, has a prefix "schema: " added before the name of the alarm Alert as the Key, and the metadata defines Key, Classify, etc. as the Value values of the hash table and stores them in the Key-Value in-memory database.

[0058] Serialized data of the measurement point input information Input1 in Table 3

[0059] Schema: lnput1

[0060]

[0061] Serialized data of the measurement point conversion method Transform1 in Table 4

[0062] Schema: Transform1

[0063]

[0064] Serialized data of the alarm Alert in Table 5

[0065] Schema: Alert1

[0066] Key: {"type": "string", "origin": "input", "default": "Alert1"} Type: {"type": "string", "origin": "input", "default": "Alert1"} Classify: {"type": "string", "origin": "design", "default": "Alert"} Priority: {"type": "int", "input": "input", "default": ""} MeasureType: {"type": "string", "input": "input", "default": ""}

[0067] In an embodiment of the present invention, the attribute units in the measurement point metadata template are divided into static attribute units and dynamic attribute units, where the static attribute units and dynamic attribute units are respectively used to describe the static parameters and dynamic parameters of the measurement point.

[0068] Specifically, based on the given metadata template and property unit definitions, a measurement meta-schema for measurement points can be defined. Among them, according to the characteristics of the intelligent rail transit system, measurement points usually include input measurement points and output measurement points. Input measurement points include digital, analog, cumulative, and extended types such as string, long integer, etc. Output measurement points include digital control, analog control, and other control quantities. Among them, each type of measurement point includes static property units and dynamic property units. Static property units are static parameters describing measurement points and need to be defined in the data preparation stage. Dynamic property units describe the properties of measurement points that change with the input changes from external collection points, and they change dynamically during the model operation period. For example, for the value (Value), it can be added with a change time (TimeStamp), a value sequence (Sequence), etc. as needed.

[0069] As described above, the measurement meta-schema in this embodiment can also be stored in the hash type of the Key-Value in-memory database. To distinguish it from the measurement point metadata, a prefix "schema:" can be added to the name as the Key, and the metadata definition is stored as the Value of the hash table in the Key-Value in-memory database.

[0070] For example, the serialized data of the measurement point type data MType1 in Table 6 is Key-Value data. A prefix "schema:" is added before the name of the measurement point data MType1 as the Key, and the metadata definitions Key, Type, Classify, etc. are stored as the Value of the hash table in the Key-Value in-memory database. Generally, the measurement point types defined above can meet the needs of most projects, but they can also be added and adjusted according to project requirements.

[0071] Table 6 Serialized data of measurement point type data MType1

[0072] Schema: MType1

[0073] Key: {"type": "string", "origin": "input", "default": ""} Type: {"type": "string", "origin": "lnput", "default": "DType1"} Classify: {"type": "string", "origin": "design", "default": "Digtal"} Name: {"type": "string", "origin": "input", "default": ""} Description: {"type": "string", "origin": "input", "default": ""} Input: {"type": "combo", "origin": "input", "default": "lnput"} Transform: {"type": "combo", "origin": "input", "default": "Transform"} Alert: {"type": "string", "origin": "input", "default": "Alert"} Value: {"type": "int", "origin": "dyna", "default": ""} UpdateTime: {"type": "long", "origin": "dyna", "default": ""}

[0074] In this embodiment, based on the given metadata template and the definition of attribute units, a device metadata template (Device Meta-Schema) can also be defined. Among them, various devices and device attribute units of various specialties and systems can be defined according to the product function requirements. All kinds of attribute units in this embodiment are abstracted and extracted from actual devices according to the product function requirements. Similar to the measurement points, the device definition includes static attribute units and dynamic attribute units. The difference is that the number and name definition of device attribute units have a higher degree of freedom. Similarly, in order to distinguish from the device metadata, a prefix "schema:" can also be added before the device type data name as the Key, and the metadata definition is stored as the Value of the hash table in the Key-Value memory database.

[0075] For example, the serialized data of the device type data DType1 in Table 7, namely Key-Value data, adds a prefix "schema:" before its name DType1 as the Key, and the metadata definitions Key, Type, Classify, etc. are stored as the Values of the hash table in the Key-Value memory database.

[0076] Table 7 Serialized data of device type data DType1

[0077] Schema:DType1

[0078] Key: {"type": "string", "origin": "input", "default": ""} Type: {"type": "string", "origin": "input", "default": "DType1"} Classify: {"type": "string", "origin": "design", "default": "AppSys"} Name: {"type": "string", "origin": "input", "default": ""} Description: {"type": "string", "origin": "input", "default": ""} StaticStatus1: {"type": "long", "origin": "input", "default": ""} StaticStatus2: {"type": "string", "origin": "input", "default": ""} DynamicStatus1: {"type": "long", "origin": "dyna", "default": ""} DynamicStatus2: {"type": "double", "origin": "dyna", "default": ""}

[0079] Step S2: Generate a metadata template group according to each metadata template.

[0080] Among them, the steps of generating a metadata template group according to each metadata template include: determining device metadata and measurement point metadata; forming each metadata template into a metadata template group according to the correspondence between the device metadata and the measurement point metadata, and the subordination relationship between the device and the sub-device.

[0081] Specifically, the correspondence between the device metadata and the measurement point metadata, the subordination relationship between the device and the device, the relationship between the measurement point metadata and the device metadata attribute unit, etc. can be defined according to the product function, and each metadata template is formed into a device metadata template group (Meta-Schema Groups).

[0082] For example, it can be determined that there are 3 sub-devices, namely Subdevice1, Subdevice2, and Subdevice 3, and 2 measurement points, namely Measurement3 and Measurement4, under the device Device1. Among them, Subdevice 3 further includes a sub-device Subdevice4, and Subdevice4 includes 2 measurement points, namely Measurement1 and Measurement2. Thus, after determining the device metadata and measurement point metadata, the metadata template group as shown in Table 8 can be further obtained according to the relationship between the data.

[0083] Table 8 Metadata Template Group

[0084]

[0085] Step S3: Construct a device list, and generate device data, sub-device data, measurement point data, corresponding relationship data and subordinate relationship data between each data according to the metadata template group and the device list, so as to generate device model data.

[0086] Specifically, a device table can be defined according to project requirements. The device table needs to configure all devices and their types and other static attributes. Among them, the device table can include both actual devices and virtual devices. As shown in Table 9, a device list for Device1 can be formed. Further, device data, its sub-device data, measurement point data, and relationship data between each data can be generated in batches according to the device list and the device metadata template group to form device model data. It should be noted in this step that if the subordinate relationship between devices is clear, the sub-devices do not need to be explicitly listed in the device table, and only the parent device needs to be listed to automatically generate all relevant device data.

[0087] Table 9 Device List

[0088] Device1@composition

[0089] Subdevice1 Subdevice2 Subdevice3 Measurement3 Measurement4

[0090] In an embodiment of the present invention, the method further includes: adjusting the metadata template group by adding device metadata, measurement point metadata, and modifying the corresponding relationship data and subordinate relationship data. Among them, the measurement points in the metadata template group belong to only one device, and when there is a parent device in the metadata template group, the number of parent devices is one.

[0091] Specifically, the metadata template group in this embodiment has strong editability. For example, measurement points and their subordinate relationships included in the device can be manually added, modified, and deleted, and device data can also be added, but the following principles should be followed: all measurement points belong to and only belong to a certain device; all devices can define or not define a parent device, but when there is a parent device, there can be at most one parent device; all devices can define zero or more child devices; all devices can define zero or more measurement points.

[0092] In an embodiment of the present invention, the measurement points include measurement input points and measurement output points. Before storing the device model data into the in-memory database, the method further includes: determining the input parameters, conversion methods, processing methods of the measurement output points, and external interface definitions of the measurement input points to determine the reference metadata template.

[0093] As shown in Table 10, if the input parameter of the measurement point Measurement1 is Input1 and the conversion method is Transform1, then it can be determined that its reference metadata template is the metadata templates corresponding to the serialized data Schema: Input1 and Schema: Transform1 in Tables 3 and 4, and the metadata template parameters are determined, and then the relevant data is input.

[0094] Table 10 Serialized Data of Measurement Point Measurement1

[0095] Measurement1

[0096] Key: Measurement1 Name: Measurement1 Type: MType1 Description: "" Input: "Input1" Input1#SourceType1: 1 Input1#Record1: "" Input1#Point1: "" Transform: "Transform1" Transform1#Param1: 0 Alert: "Alert1" Alert1#priority: 1 Alert1#MeasureType: ""

[0097] Step S4: Store the device model data into the in-memory database so that during the operation of the device model, the device model data can be obtained from the in-memory database and loaded into the device list.

[0098] Specifically, the device metadata, measurement point metadata, and relationship data between the data can be stored in the hash type of the Key-Value in-memory database. The names of various data are used as Keys, and the data is stored as the Value value in the Key-Value in-memory database, as shown in Tables 3 - 7 and Table 11 specifically. Among them, Table 11 is the serialized data of device Device1, that is, the Key-Value data; the child devices and measurement point lists of the device are stored in the list (form) type of the Key-Value in-memory database. To distinguish from the device data, the device suffix ″@composition″ is used as the Key, and the list is stored as the Value value in the Key-Value in-memory database, as shown in Table 9 specifically. Among them, if the processing of the same type of devices is consistent during the process of determining the reference metadata template for the measurement points, it can also be directly completed during the definition process of the device metadata template.

[0099] Table 11 Serialized Data of Device Device1

[0100] Device1

[0101] Key: Device1 Name: Device1 Type: DType1 Description: "" StaticStatus1: "" StaticStatus2: ""

[0102] In an embodiment of the present invention, the steps of obtaining device model data from an in-memory database and loading it into a device list include: obtaining metadata templates of root devices and measurement points in the device list from the in-memory database according to the device list; and loading the metadata templates of root devices and measurement points into the device list.

[0103] Wherein, before loading the metadata templates of the root device and the measurement points into the device list, the method further includes: loading the general metadata template.

[0104] When performing data loading, the method further includes: verifying the legality and integrity of the loaded data according to the type of data in the metadata template. For example, the legality and integrity of the loaded data can be verified according to the type (i.e., data type) in the metadata template.

[0105] After loading the root device metadata template and the measurement point metadata template into the device list, consistency and integrity checks are also performed on the device model data loaded into the device list.

[0106] As an example, metadata templates stored in a Key-Value in-memory database, such as schema:DType1, schema:MType1, etc., can be loaded, then the general metadata template is loaded, and verification is performed according to the metadata template, such as data types like alarm priority, alarm type, measurement point type, measurement point input information, conversion method, etc. Further, the root device is loaded and verified according to the type of the metadata template, and then the sub-devices and measurement points of the device are recursively loaded until all data is loaded, and the consistency and integrity of the device model data are checked to ensure the normal operation of the device model.

[0107] As a specific example, hereinafter, through Figure 2 and Figure 3 the device modeling method of the intelligent rail transit system in this embodiment is elaborated in detail.

[0108] Step 101, define a general data metadata template and general data according to product requirements (for example, define alarm priority, alarm type), as well as metadata templates that can be referenced and data required during device modeling.

[0109] Step 102: Define the metadata template for measurement points. As shown in Table 1, the static attribute units and dynamic attribute units of two types of measurement points, MType1 and MType2, are defined, and Key, Name, Type, Classify, Description, Input, Transform, Alert, Value, and UpdateTime are defined respectively. Among them, Key, Name, Type, Classify, Description, Input, Transform, and Alert are static attribute units, and Value and UpdateTime are dynamic attribute units. They are all defined in JSON format. For example, the Name attribute unit of MType1 is defined as {"type": "string", "origin": "input", "default": ""}, indicating that Name is of string type, defined during the data production period, and has no default value. Among them, the Key attribute unit serves as the unique identifier of the metadata template; the Classify attribute unit describes the category of the metadata template, which needs to be clarified during the design period; the three attribute units of Input, Transform, and Alert are of combo type and need to reference other metadata templates according to the combo type parameters during data production.

[0110] Step 103: Define the metadata template for devices. As shown in Table 1, the static attribute units and dynamic attribute units of four types of devices, DType1, DType2, DType3, and DTyp4, are defined, and the type, data source, and initial value of each attribute unit are described.

[0111] Step 104: Describe the subordinate relationship between devices and measurement points through a tree structure, and clarify which sub-devices and measurement points each type of device includes. As shown in Table 8, Device1 is of DType1 type, includes two sub-devices of DType2 and one sub-device of DType3, and also contains two measurement points of MType2. This step forms a set of metadata template groups, which describe the subordinate topological structure between devices, devices and measurement points, laying a solid foundation for batch data production.

[0112] Secondly, the data preparation process of the present invention can be introduced.

[0113] Step 201: List the device list of each type of device and the static attribute values of the devices according to the project, and generate device model data through a tool based on the device metadata template. As shown in Table 9, only the device Device1 needs to be specified, and other sub-devices can be automatically generated according to the product device metadata template group. The tool will automatically generate devices such as Device1, Subdevice1, Subdevice2, Subdevice3, Subdevice4, etc., and measurement points such as Measurement1, Measurement2, Measurement3, Measurement4.

[0114] Step 202: Since there are often situations that do not conform to the model template definition during the project implementation process, the metadata template group or the model corresponding to the device model data generated in Step 201 can be modified and updated. For example, adding specific devices, adding or deleting measurement points on a certain device, and adjusting the association relationship between different devices, etc., to meet the actual needs.

[0115] Step 203: Define the parameter attributes of the measurement points. Specifically, the composite input data of the measurement points can be clearly defined, and then the input parameters of the metadata template are configured and referenced. The parameter unit of the metadata template is prefixed with Name to distinguish and represent the attributes of the referenced metadata template. As shown in Table 3 and Table 10, SourceType1, Record1, and Point1 defined in the Input1 metadata template are represented as Input1#SourceType1, Input1#Record1, and Input1#Point respectively in the measurement point data; Param1 defined in the Transform1 metadata template is represented as Transform1#Param1 in the measurement point data.

[0116] Step 204: For the convenience of storage and retrieval in the Key-Value in-memory database, the metadata template data and device data are serialized and formatted, and an operation instruction set for the Key-Value in-memory database is generated. As shown in Table 3-7 and Table 9, both the metadata template and the device are stored in the form of a hash table. The attribute definition of the metadata template is formatted in JSON format. For example, the Key is defined as {"type": "string", "origin": "input", "default": ""}, and the device attribute parameters are converted to strings. The device and its subordinate relationship are stored in the form of a list, with the suffix "@composition" added. The device alarms are stored in the form of a list, with the suffix "@alert" added. To distinguish the metadata template (schema) from the device data, the prefix "schema:" is added, and then the operation instruction set is executed to store the metadata template and model data completely in the Key-Value in-memory database.

[0117] Furthermore, the model loading process during the device operation period can be described;

[0118] Step 301: Load the metadata template (schema) from the Key-Value in-memory database and instantiate the object.

[0119] Step 302: Load the general metadata template from the Key-Value in-memory database, and perform legality and integrity verification based on the metadata template defined by the Type attribute.

[0120] Step 303: Add the root device to the device list. Specifically, load data from the Key-Value in-memory database according to the device list, and perform verification based on the metadata template defined by the type (Type) attribute. Discard the illegal data and record the log. If the category (Classify) is Device, add the sub-devices and measurement points of this device to the device list, and repeat this step until the device list is empty, thus completing the loading of all devices and establishing the subordinate relationship between devices.

[0121] Step 304: Register the collection point information of the measurement points, classify and subscribe to all collection points to ensure that the model status can be updated in real time upon changes.

[0122] Step 305: Monitor the consistency and integrity of the relationship between the model data and the data in real time to ensure the normal operation of the device model.

[0123] Furthermore, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the device modeling method of the intelligent rail transit system described above is implemented.

[0124] Furthermore, the present invention also provides an electronic device, including a processor and a memory, where a computer program is stored on the memory, and when the computer program is executed by the processor, the device modeling method of the above-mentioned intelligent rail transit system is implemented.

[0125] In summary, the present invention sets multiple metadata templates, generates a metadata template group according to the corresponding and subordinate relationships between devices, measurement points, and sub-devices, and then stores the device model data generated according to the metadata template group in the in-memory database in the form of a Key-Value data structure. During the operation of the device model, the device model data is retrieved from the in-memory database and loaded into the device list. Therefore, the present invention analyzes and predicts the measurement points as a whole, analyzes the influence of the measurement points on the device attributes and the changes in the relationships with other devices, and the metadata template group can be arbitrarily changed when there are new device additions, changes, or relationship adjustments. Therefore, the present invention can implement the modeling of the intelligent rail transit system devices without affecting the data structure and without affecting the normal operation of the platform software; the present invention also uses other metadata templates such as general metadata templates and reference metadata templates, and performs Key-Value serialization processing and storage on each metadata template, which can simplify the data structure of the present invention and reduce the difficulty of complex queries.

[0126] In addition, the present invention also makes full use of the flexibility, large capacity, high concurrency, and fast query speed of the Key-Value in-memory database to achieve flexible storage and high-concurrency reading of millions of device data; in the process of setting the metadata templates of the device model in the present invention, new device types and device attributes can be added without changing the previous design according to needs, and data that does not conform to the definition can be detected according to the metadata templates, improving the reliability and consistency check of the data on the basis of ensuring the flexibility of the data structure; in addition, the present invention classifies the metadata templates, clarifies the differences and inheritance of the metadata template types, and ensures the consistency of data inspection and query for different device types; the present invention also refines the processes of metadata template design and data preparation according to the characteristics of the intelligent rail transit system, clarifies the tasks and purposes of each process step, and standardizes the management and division of labor in the data preparation process; the present invention also takes the device as the basic modeling object and describes the relationships between the device, sub-devices, and measurement points, thereby improving the efficiency of the data preparation process and reducing the possibility of errors.

[0127] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.

[0128] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be recognized that the above description should not be considered as a limitation of the present invention. After those skilled in the art have read the above content, various modifications and alternatives to the present invention will be obvious. Therefore, the protection scope of the present invention should be defined by the appended claims.

Claims

1. A method for equipment modeling of an intelligent rail transit system, characterized in that Including: Setting multiple metadata templates, where the metadata templates include a general metadata template, a reference metadata template, a measurement point metadata template, and a device metadata template; Generating a metadata template group according to each of the metadata templates. The step of generating a metadata template group according to each of the metadata templates includes: determining device metadata and measurement point metadata; forming each of the metadata templates into a metadata template group according to the corresponding relationship between the device metadata and the measurement point metadata and the subordinate relationship between the device and the sub-device; Constructing a device list, and generating device data, sub-device data, measurement point data, corresponding relationship data and subordinate relationship data between the data according to the metadata template group and the device list, so as to generate device model data; Storing the device model data in the form of a Key-Value data structure in an in-memory database, so that during the operation of the device model, the device model data can be obtained from the in-memory database and loaded into the device list; The step of obtaining the device model data from the in-memory database and loading it into the device list includes: according to the device list, obtaining the metadata templates of the root device and the measurement points in the device list from the in-memory database; loading the metadata templates of the root device and the measurement points into the device list.

2. The method for device modeling of the intelligent rail transit system according to claim 1, wherein Each metadata template includes at least one attribute unit, and the attribute unit includes at least one of the primary key of the device, the type of the device, and the classification of the device type. Among them, the primary key of the device is used as an index for data storage and reading of the device object in the in-memory database.

3. The device modeling method of the intelligent rail transit system according to claim 2, characterized in that, Each attribute unit includes at least one attribute, and the attribute includes at least one of the type of data, the source, and the default value. Among them, the type of data includes a basic type and a metadata reference type. The basic type includes at least one of integer type, long integer type, floating point type, and string type. The metadata reference type is a data composite reference type, and the metadata reference type is used to represent nested reference to other metadata templates.

4. The device modeling method of the intelligent rail transit system according to claim 3, characterized in that, The general metadata template further includes at least one attribute unit such as loading device alarm priority, alarm type, and measurement point type. The reference metadata template further includes at least one attribute unit such as measurement point input information and measurement point conversion method.

5. The device modeling method of the intelligent rail transit system according to claim 4, characterized in that, The attribute units in the measurement point metadata template are divided into static attribute units and dynamic attribute units. Among them, the static attribute units and the dynamic attribute units are respectively used to describe the static parameters and dynamic parameters of the measurement points.

6. The method for device modeling of the intelligent rail transit system according to claim 5, wherein Also including: Adjusting the metadata template group by adding device metadata, measurement point metadata, and modifying the corresponding relationship data and the subordinate relationship data.

7. The device modeling method of the intelligent rail transit system according to claim 6, wherein The measurement points in the metadata template group belong to only one device. When there is a parent device in the device in the metadata template group, the number of the parent devices is one.

8. The method for device modeling of the intelligent rail transit system according to claim 7, characterized in that, The measurement points include measurement input points and measurement output points. Before storing the device model data in the form of a Key-Value data structure in the in-memory database, the method further includes: Determine the input parameters of the measurement input points, the conversion method, the processing method of the measurement output points, and the external interface definition to determine the reference metadata template.

9. The method for device modeling of the intelligent rail transit system according to claim 8, characterized in that Before loading the metadata templates of the root device and the measurement points into the device list, the method further includes: loading the general metadata template.

10. The device modeling method of the intelligent rail transit system according to claim 9, characterized in that, When performing data loading, the method further includes: verifying the legality and integrity of the loaded data according to the type of data in the metadata template.

11. The method for device modeling of the intelligent rail transit system according to claim 10, wherein The method further includes: performing consistency and integrity checks on the device model data loaded into the device list.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the device modeling method of the intelligent rail transit system according to any one of claims 1-11.

13. An electronic device, characterized in that, It includes a processor and a memory, and a computer program is stored on the memory. When the computer program is executed by the processor, it implements the device modeling method of the intelligent rail transit system according to any one of claims 1-11.

Citation Information

Patent Citations

  • Smart city general data format construction processing method and system

    CN112035431A

  • Model document generation method and device, equipment and storage medium

    CN113886389A