CN114780553B - Heterogeneous data storage method, device and equipment based on industrial data model - Google Patents

Heterogeneous data storage method, device and equipment based on industrial data model Download PDF

Info

Publication number
CN114780553B
CN114780553B CN202210700896.9A CN202210700896A CN114780553B CN 114780553 B CN114780553 B CN 114780553B CN 202210700896 A CN202210700896 A CN 202210700896A CN 114780553 B CN114780553 B CN 114780553B
Authority
CN
China
Prior art keywords
key information
business
entity
data
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210700896.9A
Other languages
Chinese (zh)
Other versions
CN114780553A (en
Inventor
孟越
袁文飞
胡坤
张硕
徐地
田春华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunlun Intellectual Exchange Data Technology Beijing Co ltd
Original Assignee
Kunlun Intellectual Exchange Data Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kunlun Intellectual Exchange Data Technology Beijing Co ltd filed Critical Kunlun Intellectual Exchange Data Technology Beijing Co ltd
Priority to CN202210700896.9A priority Critical patent/CN114780553B/en
Publication of CN114780553A publication Critical patent/CN114780553A/en
Application granted granted Critical
Publication of CN114780553B publication Critical patent/CN114780553B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a heterogeneous data storage method, a device and equipment based on an industrial data model, wherein the method comprises the following steps: obtaining an industrial data model, the industrial data model comprising: at least two business entities; the business entity is a data entity obtained by instantiating data corresponding to any business object; according to the type and the incidence relation of the business entity in the industrial data model, data table information corresponding to the business entity is constructed; and storing at least two business entities into a target database according to the data table information. According to the scheme provided by the invention, according to the characteristics of different service entities, the automatic storage of heterogeneous data corresponding to various different types of service entities is realized, and the efficiency of heterogeneous data storage is improved.

Description

Heterogeneous data storage method, device and equipment based on industrial data model
Technical Field
The invention relates to the technical field of industrial data processing, in particular to a heterogeneous data storage method, device and equipment based on an industrial data model.
Background
The industrial data is characterized by wide data source, various forms and uneven quality. Sources of data may include: device data, business system data, paper data, internet of things data and the like; the data form is various, such as: relational data, time series data, file data; the quality unevenness is mainly manifested by: the equipment models are various, and the construction period of the business system is very different.
The existing industrial data respectively stores different types of data and cannot meet the requirement of storing and processing multi-source heterogeneous data; meanwhile, in the prior art, different types of data are manually mapped and stored, so that the efficiency is low.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a heterogeneous data storage method, device and equipment based on an industrial data model, so that automatic storage of heterogeneous data of various different types is realized, and heterogeneous data storage efficiency is improved.
In order to solve the above technical problem, an embodiment of the present invention provides a heterogeneous data storage method based on an industrial data model, where the method includes:
obtaining an industrial data model, the industrial data model comprising: at least two business entities; the business entity is a data entity obtained by instantiating data corresponding to any business object;
according to the type and the incidence relation of the business entity in the industrial data model, data table information corresponding to the business entity is constructed;
and storing at least two business entities into a target database according to the data table information.
Optionally, constructing data table information corresponding to the business entity according to the type and the association relationship of the business entity in the industrial data model, including:
according to the types of at least two business entities, constructing data tables of at least two business entities in a corresponding target database, wherein the data tables comprise attribute information of the business entities and primary key information constructed according to the attribute information; the types of the business entities comprise: a relational service entity and/or a time sequence service entity;
constructing foreign key information pointing to the primary key information according to the incidence relation of at least two business entities;
and obtaining data table information corresponding to the service entity according to the foreign key information and the data table.
Optionally, according to the types of the at least two business entities, constructing data tables of the at least two business entities in a corresponding target database, including:
in a relational database, constructing first primary key information of each relational service entity according to the attribute information of the relational service entities; constructing a first data table of the relational service entity according to the first main key information and the attribute information of the relational service entity; and/or
In a time sequence type database, constructing second primary key information of each time sequence type service entity according to the attribute information of the time sequence type service entity; and constructing a second data table of the time sequence type service entity according to the second main key information and the attribute information of the time sequence type service entity.
Optionally, the association relationship between at least two of the business entities includes: and the relationship between the relational business entities and the relational business entities.
Optionally, constructing foreign key information pointing to the primary key information according to an association relationship between at least two of the service entities, including:
when the relationship between the relational service entities and the relational service entities is a one-to-one relationship or a one-to-many relationship, constructing first foreign key information pointing to the first primary key information in the first data table; or
And when the relationship between the relational service entity and the relational service entity is a many-to-many relationship, constructing a first intermediate data table in which the first main key information is stored in the relational database, and constructing second foreign key information pointing to the first main key information in the first intermediate data table.
Optionally, the association relationship between at least two of the business entities includes: and the incidence relation between the relation type business entity and the time sequence type business entity.
Optionally, constructing foreign key information pointing to the primary key information according to an association relationship between at least two of the service entities, including:
and when the association relationship between the time sequence type business entity and the relation type business entity is a one-to-many association relationship, constructing third foreign key information pointing to the first primary key information in the first data table in the second data table.
An embodiment of the present invention further provides a heterogeneous data storage device based on an industrial data model, where the device includes:
an acquisition module: an acquisition module for acquiring an industrial data model, the industrial data model comprising: at least two business entities; the business entity is a data entity obtained by instantiating data corresponding to any business object;
the processing module is used for constructing data table information corresponding to the business entity according to the type and the incidence relation of the business entity in the industrial data model; and storing at least two business entities into a target database according to the data table information.
Embodiments of the present invention also provide a computing device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the industrial data model-based heterogeneous data storage method as described above.
Embodiments of the present invention also provide a readable storage medium on which a program or instructions are stored, which when executed by a processor, implement the steps of the industrial data model-based heterogeneous data storage method as described above.
The scheme of the invention at least comprises the following beneficial effects:
according to the scheme, the industrial data model is obtained, and comprises the following steps: at least two business entities; the business entity is a data entity obtained by instantiating data corresponding to any business object; according to the type and the incidence relation of the business entity in the industrial data model, data table information corresponding to the business entity is constructed; storing at least two business entities into a target database according to the data table information; according to the different types of business entities, the attribute information of the business entities and the incidence relation among the business entities, the data table information is constructed, automatic mapping storage of the data entities corresponding to the different types of business entities can be achieved according to the data table information, a data isolated island is broken through, and heterogeneous data storage efficiency is improved.
Drawings
FIG. 1 is a flow chart of a method for heterogeneous data storage provided by an embodiment of the present invention;
FIG. 2 is a diagram of a heterogeneous data storage device provided by an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
As shown in fig. 1, an embodiment of the present invention provides a heterogeneous data storage method based on an industrial data model, where the method includes:
step 11, obtaining an industrial data model, wherein the industrial data model comprises: at least two business entities; the business entity is a data entity obtained by instantiating data corresponding to any business object;
step 12, constructing data table information corresponding to the business entity according to the type and the incidence relation of the business entity in the industrial data model;
and step 13, storing at least two business entities into a target database according to the data table information.
In this embodiment, the industrial data model may be a model of an actual industrial production operation site in the digital world, and the industrial data model may include: different types of business entities and incidence relations among the different types of business entities; it should be understood that different types of service entities correspond to different attribute types and related attribute information;
the industrial data model can be a model defined by instantiation of different types of business entities and a model defined by instantiation of incidence relations among different types of business entities; preferably, the industrial data model can be defined and simulated according to different application scenes so as to be applied to different scenes; the business entity may be a data entity obtained by instantiating data corresponding to an object (such as a device, a production line where the device is located, and the like) in any application scenario;
according to the type of the business entity in the industrial data model and the incidence relation among different entities, data table information corresponding to the business entity is constructed; and further storing at least two business entities into respective corresponding target databases according to the data table information, so that the storage efficiency of the data corresponding to the business entities is improved, and the storage cost is reduced.
In an optional embodiment of the present invention, the step 12 may include:
step 121, according to the types of at least two business entities, constructing data tables of at least two business entities in a corresponding target database, wherein the data tables comprise attribute information of the business entities and primary key information constructed according to the attribute information; the types of the business entities comprise: a relational service entity and/or a time sequence service entity;
step 122, according to the association relationship of at least two business entities, constructing foreign key information pointing to the primary key information;
and step 123, obtaining data table information corresponding to the service entity according to the foreign key information and the data table.
In this embodiment, the types of the service entities may include: a relational service entity and/or a time series service entity; each business entity in at least two business entities is a set of business entities of the same type, and a certain incidence relation can exist between each business entity and other business entities in the set; meanwhile, the business entities in the set can also be divided according to the attribute types in the attribute information; for example, a plurality of operators in the industrial production process are relational business entities, and the operators can be divided into male operators and female operators according to the gender types of the operators;
the attribute information of the service entity may include: the name of the business entity, the attribute type information of the business entity and other characteristic information of the business entity; according to the types of the business entities, constructing at least two data tables corresponding to the business entities in a corresponding target database, wherein the names of the business entities are used as the names of the data tables, and the attribute information of the business entities is used as table fields of the data tables; additionally creating a field, namely the primary key information, in the data table according to the attribute information of the service entity, wherein the field is used as an index or an identifier when the service entity is stored; when the service entity is a relational service entity, the primary key information can be arbitrarily set according to the actual attribute information of the relational service entity; when the service entity is a time sequence type service entity, the primary key information should be corresponding time sequence information, namely a timestamp, in the actual attribute information of the time sequence type service entity;
it should be noted that in the set of business entities of the same type, each business entity has a primary key information corresponding to its attribute information; meanwhile, in the set of the service entities of the same type, according to the difference of the attribute types of the service entities, a plurality of data tables of the service entities of different types can be correspondingly created;
further, according to the association relationship between at least two business entities, constructing foreign key information for pointing to the primary key information in a data table corresponding to the business entities, where the foreign key information may also be represented as identification information of business entities in other data tables having association relationship with the business entities in the data table, and obtaining data table information corresponding to the business entities according to the foreign key information and the data table; the foreign key information and the main key information can be in one-to-one correspondence, and can be stored quickly according to the foreign key information during storage;
the data table information is information contained in the data table after the foreign key information is created, that is, the data table information includes: the name of the business entity, the attribute type information of the business entity, other characteristic information of the business entity, the primary key information and the foreign key information which corresponds to the primary key information one by one.
In an optional embodiment of the present invention, the step 121 may include:
step 1211, constructing first primary key information of each relational service entity in a relational database according to the attribute information of the relational service entities; constructing a first data table of the relational service entity according to the first main key information and the attribute information of the relational service entity; and/or
Step 1212, in the time-series database, according to the attribute information of the time-series service entity, constructing second primary key information of each time-series service entity; and constructing a second data table of the time sequence type service entity according to the second main key information and the attribute information of the time sequence type service entity.
In this embodiment, when at least two of the business entities are of the type of the relational business entity, the creating in the relational database includes: the name of the relational service entity, the attribute type information of the relational service entity, other characteristic information of the relational service entity, first main key information of the relational service entity and a first data table of external key information corresponding to the first main key information one by one;
when the types of at least two business entities are time sequence type business entities, creating a time sequence type database comprising: a second data table of the name of the time sequence type service entity, the attribute type information of the time sequence type service entity, other characteristic information of the time sequence type service entity, second main key information of the time sequence type service entity and external key information corresponding to the first main key information; the second primary key information is time sequence information of the time sequence service entity;
the construction of the first data table and/or the second data table provides reference corresponding information for subsequent service entity storage, and the efficiency of service entity storage can be improved.
In an optional embodiment of the present invention, the association relationship between at least two of the service entities includes: and the relationship between the relational business entities and the relational business entities.
In this embodiment, the association relationship between the relational service entities may include: a one-to-one incidence relation, a one-to-many incidence relation and a many-to-many incidence relation;
further, the step 122 may include:
step 122a-1, when the relationship between the relational service entities and the relational service entities is a one-to-one relationship or a one-to-many relationship, constructing first foreign key information pointing to the first primary key information in the first data table; or
Step 122a-2, when the association relationship between the relational service entity and the relational service entity is a many-to-many association relationship, building a first intermediate data table in which the first primary key information is stored in the relational database, and building second foreign key information pointing to the first primary key information in the first data table in the first intermediate data table.
In this embodiment, when there is a one-to-one association relationship or a one-to-many association relationship between the relational service entities, first foreign key information pointing to the first primary key is created in the first data table to indicate the association relationship between the relational service entities, so as to facilitate storage of the service entities;
in a specific embodiment, as shown in the following tables 1 and 2, when there is a one-to-one association relationship between related business entities, such as between individual operators, according to the attribute types, i.e. gender: the method comprises the following steps of (1) classifying male operators and female operators; the female operating worker creates a first data table and first main key information corresponding to the female operating worker according to the attribute information of the female operating worker, and the male operating worker creates a first data table and first main key information corresponding to the male operating worker according to the attribute information of the male operating worker; meanwhile, according to the incidence relation between the female operating workers and the male operating workers, first external key information pointing to first main key information in a first data table corresponding to the female operating workers can be constructed in the first data table corresponding to the male operating workers; or constructing first external key information pointing to first main key information in a first data table corresponding to a male operating worker in the first data table corresponding to the female operating worker; for ease of understanding, first foreign key information is constructed in both table 1 and table 2 below; it should be noted that, in the actual code implementation process, only the foreign key information pointing to the other primary key information needs to be constructed in one of the tables;
when the same-affiliation type business entities are in one-to-many association relationship, in order to avoid information storage confusion, constructing external key information pointing to the main key information in the data table corresponding to the single-affiliation type business entity in the data table corresponding to the multiple-affiliation type business entity; for example: when a middle-aged woman corresponds to a plurality of middle-aged men, only the external key information pointing to the main key information in the data table corresponding to the woman needs to be constructed in the data table corresponding to the men;
the method comprises the steps of constructing business entities with different attribute types respectively to construct corresponding data tables and main key information, constructing external key information pointing to the main key information according to the business entities with incidence relations in different data tables, further storing the business entities into a target database quickly and efficiently according to complete data table information, and providing clear incidence relations between the business entities and the business entities according to the corresponding relations between the main keys and the external keys constructed in the data tables.
Figure 711882DEST_PATH_IMAGE001
TABLE 1 first data sheet for male operators
Figure 610567DEST_PATH_IMAGE002
TABLE 2 first data sheet for female operators
When the relational service entity is in a many-to-many incidence relation with the relational service entity, in order to avoid redundancy of service entity information stored in a first data table, a first intermediate data table storing the first main key information can be constructed in the relational database, and meanwhile, second foreign key information pointing to the first main key information is constructed in the first intermediate data table according to the incidence relation between the service entities; it should be noted that only the second foreign key information pointing to the first primary key information is stored in the first intermediate data table to avoid storing redundant information; the first intermediate data table is constructed, so that interference caused by redundant information can be avoided, and the storage efficiency is improved.
In a specific embodiment, as shown in table 3 and table 4 below, when there is a many-to-many association relationship between the same-genus business entities, such as between an apprentice and a master, according to the attribute type and the attribute information of the apprentice, a first data table of the apprentice and first main key information corresponding to each apprentice (business entity) in the data table are respectively constructed; a first data table of master and first main key information of each master (service entity) in the corresponding data table; further, a first intermediate data table is constructed according to first data tables corresponding to the business entities with different attribute types and first main key information in the first data tables, as shown in the following table 5, second foreign key information pointing to the first main key information in the first data table corresponding to the apprentice and second foreign key information pointing to the first main key information in the first data table corresponding to the master are respectively constructed in the first intermediate data table according to many-to-many incidence relations; by constructing the third intermediate data table, the redundancy of information storage of the service entity can be avoided, the interference of redundant information on the storage of the service entity is avoided, and the efficiency and the accuracy of the storage are improved.
Figure 55455DEST_PATH_IMAGE003
TABLE 3 first data sheet corresponding to student
Figure 861737DEST_PATH_IMAGE004
TABLE 4 first data sheet corresponding to Master
Figure 974050DEST_PATH_IMAGE005
TABLE 5 first intermediate data sheet
In an optional embodiment of the present invention, the association relationship between at least two of the service entities includes: and the incidence relation between the relation type business entity and the time sequence type business entity.
In this embodiment, the association relationship between the relational service entity and the time-series service entity may include: a one-to-many association relationship;
further, the step 122 may include:
step 122b-1, when there is a one-to-many association relationship between the time-series business entity and the relational business entity, constructing third foreign key information pointing to the first primary key information in the second data table.
In this embodiment, when there is a one-to-many relationship between the relational service entity and the time-series service entity, third foreign key information pointing to the first primary key information is constructed in a second data table corresponding to the time-series service entity; when the target time sequence database corresponding to the time sequence type service entity is a time sequence data model based on a tag value tag-value, constructing the third foreign key information, namely, a tag pointing to the first primary key information is newly added in the second data table; when the target time sequence database corresponding to the time sequence type service entity is a time sequence data model based on tree mode schema, the third foreign key information may be sequentially constructed in the second data table according to the sequence of the association relationship between the relational service entity and the time sequence type service entity;
for example, in an industrial production process, a production line corresponds to equipment on the production line, the equipment corresponds to time sequence data measured by a measuring instrument on the equipment, wherein the production line and the equipment are both relational business entities, and the time sequence data measured by the measuring instrument is a time sequence business entity; wherein, the first data table corresponding to the production line is shown in table 6 below, and the first data table corresponding to the device is shown in table 7 below, and then the directions are respectively created in the second data tables corresponding to the time sequence data measured by the measuring instrument: the third foreign key information of the first primary key information in the first data table corresponding to the production line and the third foreign key information of the first primary key information in the first data table corresponding to the device are shown in the following table 8;
Figure 512478DEST_PATH_IMAGE006
TABLE 6 production line corresponding first data sheet
Figure 710242DEST_PATH_IMAGE007
TABLE 7 first data sheet corresponding to the device
Figure 54635DEST_PATH_IMAGE008
TABLE 8 second data table corresponding to time series data measured by the measuring instrument
In the embodiment of the present invention, according to the characteristics of different service entities, a data table corresponding to the service entities is created, and the primary key information for identifying each service entity is created in the data table; further, according to the correlation between the business entities, creating external key information pointing to the main key information in the data table; according to the information in the created complete data table, the heterogeneous data sources can be automatically mapped into the target database, the data storage efficiency is improved, the difficulty of traditional data storage is reduced, and the cost is low.
As shown in fig. 2, an embodiment of the present invention further provides a heterogeneous data storage device 20 based on an industrial data model, where the device 20 includes:
an obtaining module 21, configured to obtain an industrial data model, where the industrial data model includes: at least two business entities; the business entity is a data entity obtained by instantiating data corresponding to any business object;
the processing module 22 is configured to construct data table information corresponding to the business entity according to the type and the association relationship of the business entity in the industrial data model; and storing at least two service entities into a target database according to the data table information.
Optionally, the processing module 22 is configured to construct data table information corresponding to a service entity according to the type and the association relationship of the service entity in the industrial data model, and includes:
according to the types of at least two business entities, constructing data tables of at least two business entities in a corresponding target database, wherein the data tables comprise attribute information of the business entities and primary key information constructed according to the attribute information; the types of the business entities comprise: a relational service entity and/or a time series service entity;
constructing foreign key information pointing to the primary key information according to the incidence relation of at least two business entities;
and obtaining data table information corresponding to the service entity according to the foreign key information and the data table.
Optionally, the processing module 22 is configured to construct, in a corresponding target database, a data table of at least two business entities according to types of the at least two business entities, where the data table includes:
in a relational database, constructing first primary key information of each relational service entity according to the attribute information of the relational service entities; constructing a first data table of the relational service entity according to the first main key information and the attribute information of the relational service entity; and/or
In a time sequence type database, constructing second primary key information of each time sequence type service entity according to the attribute information of the time sequence type service entity; and constructing a second data table of the time sequence type service entity according to the second main key information and the attribute information of the time sequence type service entity.
Optionally, the association relationship between at least two of the business entities includes: and the relationship between the relational business entities and the relational business entities.
Optionally, the processing module 22 is configured to construct, according to an association relationship between at least two service entities, foreign key information pointing to the primary key information, and includes:
when the relationship type business entity and the relationship type business entity are in one-to-one relationship or one-to-many relationship, constructing first external key information pointing to the first main key information in the first data table; or
And when the relationship between the relational service entity and the relational service entity is a many-to-many relationship, constructing a first intermediate data table in which the first main key information is stored in the relational database, and constructing second foreign key information pointing to the first main key information in the first intermediate data table.
The selectable association relationship of at least two business entities comprises: and the incidence relation between the relation type business entity and the time sequence type business entity.
Optionally, the processing module 22 is configured to construct, according to an association relationship between at least two service entities, foreign key information pointing to the primary key information, and includes:
and when the association relationship between the time sequence type service entity and the relation type service entity is a one-to-many association relationship, constructing third external key information pointing to the first main key information in the first data table in the second data table.
The device is a device corresponding to the method, and all implementation manners in the method embodiment are applicable to the device embodiment, so that the same technical effect can be achieved.
Embodiments of the present invention also provide a computing device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the industrial data model-based heterogeneous data storage method as described above; all the implementation manners in the above embodiments are applicable to the embodiment, and the same technical effects can be achieved.
Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the heterogeneous data storage method based on an industrial data model as described above.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
Furthermore, it is to be noted that in the device and method of the invention, it is obvious that the individual components or steps can be decomposed and/or recombined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention. Also, the steps of performing the series of processes described above may naturally be performed chronologically in the order described, but need not necessarily be performed chronologically, and some steps may be performed in parallel or independently of each other. It will be understood by those skilled in the art that all or any of the steps or elements of the method and apparatus of the present invention may be implemented in any computing device (including processor, storage medium, etc.) or network of computing devices, in hardware, firmware, software, or any combination thereof, which can be implemented by those skilled in the art using their basic programming skills after reading the description of the present invention.
The object of the invention is thus also achieved by a program or a set of programs running on any computing device. The computing device may be a general purpose device as is well known. The object of the invention is thus also achieved solely by providing a program product containing program code for implementing the method or device. That is, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. It is to be understood that the storage medium may be any known storage medium or any storage medium developed in the future. It is also noted that in the apparatus and method of the present invention, it is apparent that each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered as equivalents of the present invention. Also, the steps of executing the series of processes described above may naturally be executed chronologically in the order described, but need not necessarily be executed chronologically. Some steps may be performed in parallel or independently of each other.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (9)

1. A heterogeneous data storage method based on an industrial data model is characterized by comprising the following steps:
obtaining an industrial data model, the industrial data model comprising: at least two business entities; the business entity is a data entity obtained by instantiating data corresponding to any business object;
according to the type and the incidence relation of the business entity in the industrial data model, data table information corresponding to the business entity is constructed;
storing at least two business entities into a target database according to the data table information;
the method for establishing the data table information corresponding to the business entity according to the type and the incidence relation of the business entity in the industrial data model comprises the following steps:
according to the types of at least two business entities, constructing data tables of at least two business entities in a corresponding target database, wherein the data tables comprise attribute information of the business entities and primary key information constructed according to the attribute information; the types of the business entities comprise: a relational service entity and/or a time series service entity;
constructing foreign key information pointing to the primary key information according to the incidence relation of at least two business entities;
obtaining data table information corresponding to the service entity according to the foreign key information and the data table, wherein the data table information comprises: the name of the business entity, the attribute type information of the business entity, the primary key information and the foreign key information which is in one-to-one correspondence with the primary key information;
storing at least two of the business entities into a target database according to the data table information, including:
and storing at least two business entities into a target database according to the one-to-one correspondence relationship between the foreign key information and the primary key information in the data table information by taking the primary key information as an index.
2. The industrial data model-based heterogeneous data storage method according to claim 1, wherein constructing data tables of at least two business entities in corresponding target databases according to types of the at least two business entities comprises:
in a relational database, constructing first primary key information of each relational service entity according to the attribute information of the relational service entities; constructing a first data table of the relational service entity according to the first main key information and the attribute information of the relational service entity; and/or
In a time sequence type database, constructing second primary key information of each time sequence type service entity according to the attribute information of the time sequence type service entity; and constructing a second data table of the time sequence type service entity according to the second main key information and the attribute information of the time sequence type service entity.
3. The industrial data model-based heterogeneous data storage method according to claim 2, wherein the association relationship between at least two business entities comprises: and the relationship between the relational business entities and the relational business entities.
4. The industrial data model-based heterogeneous data storage method according to claim 3, wherein constructing foreign key information pointing to the primary key information according to an association relationship between at least two business entities comprises:
when the relationship between the relational service entities and the relational service entities is a one-to-one relationship or a one-to-many relationship, constructing first foreign key information pointing to the first primary key information in the first data table; or alternatively
And when the relationship between the relational service entity and the relational service entity is a many-to-many relationship, constructing a first intermediate data table in which the first main key information is stored in the relational database, and constructing second foreign key information pointing to the first main key information in the first intermediate data table.
5. The industrial data model-based heterogeneous data storage method according to claim 2, wherein the association relationship between at least two business entities comprises: and the incidence relation between the relation type business entity and the time sequence type business entity.
6. The industrial data model-based heterogeneous data storage method according to claim 5, wherein constructing foreign key information pointing to the primary key information according to an association relationship between at least two business entities comprises:
and when the association relationship between the time sequence type business entity and the relation type business entity is a one-to-many association relationship, constructing third foreign key information pointing to the first primary key information in the first data table in the second data table.
7. An industrial data model-based heterogeneous data storage device, the device comprising:
an acquisition module that acquires an industrial data model, the industrial data model comprising: at least two business entities; the business entity is a data entity obtained by instantiating data corresponding to any business object;
the processing module is used for constructing data table information corresponding to the business entity according to the type and the incidence relation of the business entity in the industrial data model;
storing at least two business entities into a target database according to the data table information;
the method for constructing the data table information corresponding to the business entity according to the type and the incidence relation of the business entity in the industrial data model comprises the following steps:
according to the types of at least two business entities, constructing data tables of at least two business entities in a corresponding target database, wherein the data tables comprise attribute information of the business entities and primary key information constructed according to the attribute information; the types of the business entities comprise: a relational service entity and/or a time series service entity;
constructing foreign key information pointing to the primary key information according to the incidence relation of at least two business entities;
obtaining data table information corresponding to the service entity according to the foreign key information and the data table, wherein the data table information comprises: the name of the business entity, the attribute type information of the business entity, the primary key information and the foreign key information which corresponds to the primary key information one by one;
storing at least two of the business entities into a target database according to the data table information, including:
and storing at least two business entities into a target database according to the one-to-one correspondence relationship between the foreign key information and the primary key information in the data table information by taking the primary key information as an index.
8. A computing device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the industrial data model-based heterogeneous data storage method of any of claims 1-6.
9. A readable storage medium, on which a program or instructions are stored, which when executed by a processor, implement the steps of the industrial data model-based heterogeneous data storage method according to any one of claims 1 to 6.
CN202210700896.9A 2022-06-21 2022-06-21 Heterogeneous data storage method, device and equipment based on industrial data model Active CN114780553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210700896.9A CN114780553B (en) 2022-06-21 2022-06-21 Heterogeneous data storage method, device and equipment based on industrial data model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210700896.9A CN114780553B (en) 2022-06-21 2022-06-21 Heterogeneous data storage method, device and equipment based on industrial data model

Publications (2)

Publication Number Publication Date
CN114780553A CN114780553A (en) 2022-07-22
CN114780553B true CN114780553B (en) 2022-09-06

Family

ID=82421840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210700896.9A Active CN114780553B (en) 2022-06-21 2022-06-21 Heterogeneous data storage method, device and equipment based on industrial data model

Country Status (1)

Country Link
CN (1) CN114780553B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733713A (en) * 2017-04-21 2018-11-02 阿里巴巴集团控股有限公司 Data query method and device in data warehouse

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097363A1 (en) * 2000-07-17 2003-05-22 Dorsey Paul R. Method and computer system for storage of data structure business rules using UML class diagrams
US8819075B2 (en) * 2010-07-26 2014-08-26 Sap Ag Facilitation of extension field usage based on reference field usage
CN111209319B (en) * 2018-11-21 2022-03-29 华为云计算技术有限公司 Data service method and device
CN110825718B (en) * 2019-10-22 2024-02-20 天津云景科技股份有限公司 Information system data architecture model and construction method thereof
CN111414352B (en) * 2020-03-27 2023-08-18 北京明略软件系统有限公司 Database information management method and device
CN111897875A (en) * 2020-07-31 2020-11-06 平安科技(深圳)有限公司 Fusion processing method and device for urban multi-source heterogeneous data and computer equipment
CN111858615B (en) * 2020-08-04 2023-12-29 中国工商银行股份有限公司 Database table generation method, system, computer system and readable storage medium
CN113672660B (en) * 2021-08-02 2024-05-14 支付宝(杭州)信息技术有限公司 Data query method, device and equipment
CN113626415B (en) * 2021-08-27 2024-02-23 天元大数据信用管理有限公司 Credit data output method, equipment and medium
CN114330998A (en) * 2021-11-25 2022-04-12 上海欣兆阳信息科技有限公司 General data model applied to field of big data marketing and construction method thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733713A (en) * 2017-04-21 2018-11-02 阿里巴巴集团控股有限公司 Data query method and device in data warehouse

Also Published As

Publication number Publication date
CN114780553A (en) 2022-07-22

Similar Documents

Publication Publication Date Title
CN110728422A (en) Building information model, method, device and settlement system for construction project
CN114201616A (en) Knowledge graph construction method and system based on multi-source database
CN105260300A (en) Service test method based on CAS (General Classification Standards of China Accounting Standards) application platform
CN103198071A (en) Data report generation method and device adopting same
CN114637811A (en) Data table entity relation graph generation method, device, equipment and storage medium
CN105608151A (en) Financial statement analysis device and method
CN110889013A (en) Data association method, device, server and storage medium based on XML
CN113900955A (en) Automatic testing method, device, equipment and storage medium
CN114780553B (en) Heterogeneous data storage method, device and equipment based on industrial data model
CN117596154A (en) Method and system for automatically identifying and accessing equipment based on meta model
CN116894639A (en) Multi-information fusion plan management system and method for Internet of things
CN117036062A (en) Accounting resource calculation method and device
CN115481105A (en) Data management method, device, electronic equipment and storage medium
US10055811B2 (en) System and method for generating interactive 2D projection of 3D model
CN114490137A (en) Service data real-time statistical method and device, electronic equipment and readable storage medium
CN112766245A (en) PDF format file-based visual instrument acquisition method and system
CN111339075A (en) Education-field-oriented data tracing method, system, equipment and storage medium
Wayne Institutionalize metadata before it institutionalizes you
Çağıltay et al. Abstract conceptual database model approach
CN110544075A (en) asset management process configuration method, device and equipment
CN114548062B (en) Report arranging method
CN116484054B (en) Data processing method and related device
CN113297184A (en) Data processing method, device, equipment and computer readable storage medium
RU2351010C1 (en) Information exchange method between databases of information systems and system to this end
CN118051557A (en) Spatial data presentation method and system based on imaging display technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant