CN112395370A - Data processing method, device, equipment and storage medium - Google Patents

Data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112395370A
CN112395370A CN202011349358.7A CN202011349358A CN112395370A CN 112395370 A CN112395370 A CN 112395370A CN 202011349358 A CN202011349358 A CN 202011349358A CN 112395370 A CN112395370 A CN 112395370A
Authority
CN
China
Prior art keywords
entity
service
business
attribute
definition
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.)
Granted
Application number
CN202011349358.7A
Other languages
Chinese (zh)
Other versions
CN112395370B (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.)
Beijing China Power Information Technology Co Ltd
Original Assignee
State Grid Information and Telecommunication Co Ltd
Beijing China Power Information Technology 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 State Grid Information and Telecommunication Co Ltd, Beijing China Power Information Technology Co Ltd filed Critical State Grid Information and Telecommunication Co Ltd
Priority to CN202011349358.7A priority Critical patent/CN112395370B/en
Publication of CN112395370A publication Critical patent/CN112395370A/en
Application granted granted Critical
Publication of CN112395370B publication Critical patent/CN112395370B/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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The application discloses data processing, a device, equipment and a storage medium, which are used for analyzing and obtaining service definition and service attributes of a service object from a service logic model. And analyzing the entity definition and the entity attribute of the entity from the first logic model. And replacing the business object in the business logic model by using the entity in the first logic model, and converting the business logic model to obtain the physical model. Because the first logic model meets the preset specification requirement, the entity in the first logic model is used for replacing the business object in the business logic model, and the physical model can be ensured to conform to the preset specification requirement. And the service attribute which is not covered by the entity attribute is used as the extension attribute of the entity, and another entity is newly built for the service object, so that all the service objects and all the service attributes of the service objects are covered by the entity and the entity attribute, thereby avoiding the lack of service data of the physical model and ensuring that the physical model can be applied to actual work.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of data models, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
According to the requirements of national policy, a transaction class application model needs to be created for the power service. The existing transaction class application model is created by the following steps: the method comprises the steps of obtaining service definitions of all service objects (so-called service objects, namely abstract names of services in the field of Data models) in advance, and creating a Conceptual Model (CDM) according to incidence relations among all the service objects; secondly, defining the service attribute of each service object on the basis of the conceptual Model to obtain a Logic Model (Logic Data Model, LDM); finally, the logical Model is converted into a Physical Model (PDM), so that the business Data of each business object is stored in a database in a normative manner.
At present, in order to ensure that the physical model can comply with the specification requirements formulated by the national power grid, the logical model mostly directly complies with the existing SG-EA data architecture. However, the entity and entity attribute updating period included in the SG-EA data architecture are long, and cannot cover the increasingly added services and cannot meet the variable service requirements, so that the physical model obtained through the logic model conversion lacks corresponding service data, and the physical model cannot be applied to actual work.
Disclosure of Invention
The application provides data processing, a device, equipment and a storage medium, and aims to solve the problem that a physical model obtained through logic model conversion lacks business data and ensure that the physical model can be applied to actual work.
In order to achieve the above object, the present application provides the following technical solutions:
a method of data processing, comprising:
analyzing a service logic model constructed in advance to obtain service definition and service attribute of a service object;
analyzing a first logic model meeting the requirements of preset specifications to obtain entity definitions and entity attributes of entities; the entity indicates a business object sample meeting the preset specification requirement, the entity definition indicates the name of the business object sample, and the entity attribute indicates the data characteristics contained in the business object sample;
under the condition that the business definition and the entity definition are determined to be the same and the entity attribute covers all the business attributes, replacing the business object in the business logic model by the entity;
under the condition that the business definition is determined to be the same as the entity definition and the entity attribute does not cover all the business attributes, taking the business attributes which are not covered by the entity attribute as extended attributes of the entity, and replacing the business objects in the business logic model by using the entity;
under the condition that the service definition is determined to be different from the entity definition, taking a preset standard model as reference, taking the service definition as the entity definition and the service attribute as the entity attribute, building another entity for the service object, and replacing the service object in the service logic model by using the built entity;
and converting the business logic model to obtain a physical model.
Optionally, the converting the service logic model to obtain a physical model includes:
converting the entity into a data table; wherein the entity attribute of the entity is used as a table field of the data table.
Optionally, the entities include a first entity and a second entity, and the first entity and the second entity are in a parent-child relationship; the first entity is a parent class, and the second entity is a child class;
the converting the entity into a data table comprises:
converting the first entity into a parent data table, converting the second entity into a child data table, and establishing an association relation for the parent data table and the child data table;
alternatively, the first and second electrodes may be,
and incorporating the entity attribute of the first entity into the entity attribute of the second entity, and converting the second entity into a data table.
Optionally, the entity attribute includes a plurality of features;
the entity attributes of the entity as a table field of the data table include:
taking each of the features as a respective table field of the data table;
alternatively, the first and second electrodes may be,
and taking the entity attributes as table fields of the data table, taking a plurality of characteristics as a plurality of table fields of a newly-built data table, and establishing an association relation for the data table and the newly-built data table.
Optionally, the business logic model includes an association relationship between the business objects;
the converting the business logic model to obtain a physical model includes:
converting the entity into a data table;
and taking the association relation among the business objects as the association relation among the entities, and converting the association relation among the entities into the association relation among the data tables.
Optionally, the converting the association relationship between the entities into the association relationship between the data tables includes:
and in the case that a single entity is determined to be associated with the single entity and the single entity is respectively associated with a plurality of entities, setting a primary key for the data table of the single entity and using the primary key as a foreign key in the data tables of other entities associated with the single entity.
Optionally, the converting the association relationship between the entities into the association relationship between the data tables includes:
and under the condition that the plurality of entities are respectively associated with the plurality of entities, establishing an intermediate table in advance, taking a table field in a data table of each entity as a primary key, and storing each primary key into the intermediate table.
A data processing apparatus comprising:
the first analysis unit is used for analyzing a service definition and a service attribute of a service object from a service logic model which is constructed in advance;
the second analysis unit is used for analyzing the first logic model meeting the preset standard requirement to obtain entity definition and entity attributes of the entity; the entity indicates a business object sample meeting the preset specification requirement, the entity definition indicates the name of the business object sample, and the entity attribute indicates the data characteristics contained in the business object sample;
a first replacement unit, configured to replace the business object in the business logic model with the entity if it is determined that the business definition and the entity definition are the same and the entity attribute covers all the business attributes;
a second replacement unit, configured to, when it is determined that the service definition and the entity definition are the same and the entity attribute does not cover all the service attributes, use the service attribute not covered by the entity attribute as an extended attribute of the entity, and replace the service object in the service logic model with the entity;
a third replacing unit, configured to, when it is determined that the service definition is different from the entity definition, create another entity for the service object by using a preset standard model as a reference, where the service definition is used as the entity definition and the service attribute is used as the entity attribute, and replace the service object in the service logic model with the created entity;
and the conversion unit is used for converting the service logic model to obtain a physical model.
A computer-readable storage medium including a stored program, wherein the program executes the data processing method.
A data processing apparatus comprising: a processor, a memory, and a bus; the processor and the memory are connected through the bus;
the memory is used for storing programs, and the processor is used for running programs, wherein the programs execute the data processing method during running.
According to the technical scheme, the service definition and the service attribute of the service object are obtained by analyzing from the service logic model which is constructed in advance. And analyzing the entity definition and the entity attribute of the entity from the first logic model meeting the preset specification requirement. The entity indicates a business object sample meeting the preset specification requirement, the entity defines and indicates the name of the business object sample, and the entity attribute indicates the data characteristics contained in the business object sample. And under the condition that the business definition and the entity definition are the same and the entity attribute covers all the business attributes, replacing the business object in the business logic model by using the entity. And under the condition that the service definition is determined to be the same as the entity definition and the entity attribute does not cover all the service attributes, the service attribute which is not covered by the entity attribute is used as the extended attribute of the entity, and the entity is used for replacing the service object in the service logic model. And under the condition that the service definition is different from the entity definition, taking a preset standard model as reference, taking the service definition as the entity definition and the service attribute as the entity attribute, building another entity for the service object, and replacing the service object in the service logic model by using the built entity. And converting the business logic model to obtain a physical model. Because the first logic model meets the preset specification requirement, the entity in the first logic model is used for replacing the business object in the business logic model, and the physical model can be ensured to conform to the preset specification requirement. Moreover, the service attribute which is not covered by the entity attribute is used as the extension attribute of the entity, and another entity is newly built for the service object, so that all the service objects and all the service attributes of the service objects are covered by the entity and the entity attribute, the service logic model can cover the increasingly added services and meet the variable service requirements, the lack of service data of the physical model is avoided, and the physical model can be applied to the actual work.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of another data processing method provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
Detailed Description
The process described in the embodiment of the present application is applied to a data processing system, and specifically, can be executed by a host, and is used for solving the problem that a physical model obtained through conversion of a logical model lacks business data, and ensuring that the physical model can be applied to actual work.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, a schematic diagram of a data processing method provided in an embodiment of the present application includes the following steps:
s101: and analyzing the service definition and the service attribute of each service object and the association relation between each service object from the service logic model which is constructed in advance.
The service definition is used for indicating the name of the service object (for example, collecting and paying the electric charge), and the service attribute is used for indicating the data characteristics contained in the service object (that is, for reflecting each item of data of the service object, for example, the collecting and paying the electric charge includes the electric consumption, the amount of money, the date, and the like).
It should be noted that, the specific construction process of the business logic model is as follows:
combing the service flow and the service scene in the service requirement according to the preset service range; analyzing business activities contained in the business process and business functions related to the business scene to obtain input data and output data of each business operation step; abstracting each input data and output data to obtain each business object; preprocessing (such as duplication removal, merging, integration, splitting and fusion) each service object, and performing service description definition on the preprocessed service object to obtain service definition of the service object; performing characteristic identification on data contained in the business object to obtain each business attribute of the business object; generating an incidence relation between all business objects based on the execution sequence of all businesses and the corresponding relation between the input data and the output data; and establishing a conceptual model according to the incidence relation among the business objects, and setting corresponding business attributes for the business objects on the basis of the conceptual model to obtain a business logic model.
S102: and analyzing the preset SG-CIM logic model to obtain entity definition and entity attributes of the entity.
The SG-CIM is an existing enterprise public information model, is a model which is made by related departments and meets the standard requirements made by a national power grid, and is used for guiding the design of a physical model of a business application system and the design of an interface between applications so as to solve the problems of enterprise business cooperation and data sharing. The SG-CIM comprises an SG-CIM conceptual model, an SG-CIM logical model and an SG-CIM physical model. In the embodiment of the application, an entity indicates a business object sample meeting a preset specification requirement, an entity definition indicates a name of the business object sample, and an entity attribute indicates data characteristics contained in the business object sample. The preset specification requirements include specification requirements set by the national power grid.
Specifically, the SG-CIM conceptual model is used for revealing a company business blueprint and communicating business requirements with business personnel. The SG-CIM logical model is used as an enterprise standard, and various applications are subjected to physical model and application interface design according to the SG-CI logical model. The SG-CIM physical model is mainly applied to a data center station and manages various detailed data in a data center station sharing layer.
It is emphasized that, as an SG-CIM developer, the related departments can collect opinion information (such as usage reports, problem reports, and suggestion reports) uploaded by each user in real time, continuously improve the defects of the SG-CIM logical model, and update the SG-CIM logical model in real time.
S103: and judging whether the service definition of the service object is the same as the entity definition of the entity or not aiming at each service object.
If the business definition of the business object is the same as the entity definition of the entity, executing S104, otherwise executing S107.
S104: and judging whether the entity attribute of the entity covers all the service attributes of the service object.
If the entity attribute of the entity covers all the service attributes of the service object, S105 is executed, otherwise, S106 is executed.
S105: and replacing the business object in the business logic model by the entity.
The entity is used to replace the service object in the service logic model, and the entity definition of the entity is substantially used to replace the service definition of the service object, and the entity attribute of the entity is used to replace the service attribute of the service object. And if the number of the business attributes contained in the business object is less than the number of the entity attributes contained in the entity, all the entity attributes of the entity are substituted for all the business attributes of the business object. That is, after replacing a business object in the business logic model with an entity, the resulting business logic model will not retain the business object, business definition, and business attributes, but only the entity, entity definition, and entity attributes.
S106: and taking the service attribute which is not covered by the entity attribute as the extended attribute of the entity, and replacing the service object in the service logic model by using the entity.
After execution of S106, execution continues with S108.
The entity is used to replace the service object in the service logic model, which is essentially to replace the service definition of the service object with the entity definition of the entity, and replace the service attribute of the service object with the original entity attribute and the extended attribute of the entity. That is, after replacing a business object in the business logic model with an entity, the resulting business logic model will not retain the business object, business definition, and business attributes, but only the entity, entity definition, and entity attributes and extended attributes.
S107: and taking the preset standard model as reference, taking the service definition as an entity definition and the service attribute as an entity attribute, building another entity for the service object, and replacing the service object in the service logic model by using the built entity.
After execution of S107, execution of S108 is continued.
The new entity is used to replace the service object in the service logic model, which is essentially to replace the service definition of the service object with the entity definition of the new entity and replace the service attribute of the service object with the entity attribute of the new entity. That is, after replacing the service object in the service logic model with the entity, the obtained service logic model will not retain the service object, the service definition, and the service attribute, but only retain the newly-created entity, the entity definition, and the entity attribute.
It should be noted that the preset standard models include, but are not limited to, IEC CIM and SG-ERP (IEC CIM and SG-ERP are both models established by the national grid).
S108: and converting the business logic model into a physical model, and sending the business logic model to the SG-CIM developer.
The specific implementation process for converting the business logic model into the physical model comprises the following steps:
s109: the entities are converted into data tables.
Wherein, the entity attribute of the entity is used as the table field of the data table.
Optionally, the entities include a first entity and a second entity, and the first entity and the second entity are in a parent-child relationship, where the first entity is a parent class and the second entity is a child class, and the specific implementation process of converting the entities into the data table includes:
converting the first entity into a parent data table, converting the second entity into a child data table, and establishing an association relation for the parent data table and the child data table;
alternatively, the first and second electrodes may be,
and the entity attribute of the first entity is included in the entity attribute of the second entity, and then the second entity is converted into a data table.
Optionally, the entity attribute includes a plurality of characteristics (i.e., types of data included in the service object, for example, the electric charge collected includes electric power consumption, amount of money, and date), and the specific implementation process of the entity attribute as the table field of the data table includes:
taking each characteristic as each table field of the data table;
alternatively, the first and second electrodes may be,
and taking the entity attributes as table fields of the data table, taking the plurality of characteristics as a plurality of table fields of the newly-built data table, and establishing an association relation for the data table and the newly-built data table.
It should be noted that the specific implementation process for establishing the association relationship between the two data tables is common knowledge familiar to those skilled in the art, and is not described herein again.
S110: and taking the association relation among the business objects as the association relation among the entities, and converting the association relation among the entities into the association relation among the data tables.
Optionally, in a case where it is determined that a single entity is associated with a single entity and that the single entity is associated with a plurality of entities respectively, a primary key is set for the data table of the single entity, and the primary key is used as a foreign key in the data tables of other entities associated with the single entity.
Optionally, in a case that it is determined that the plurality of entities are respectively associated with the plurality of entities, an intermediate table is established in advance, a table field in the data table of each entity is used as a primary key, and each primary key is stored in the intermediate table.
It should be noted that the primary key is a unique identifier (e.g., identification number, name, age, etc., identification number) for identifying one record, and the foreign key is used for associating with another data table (i.e., being able to identify a table field of another data table). Based on the application of the primary key and the foreign key, a primary foreign key relationship (i.e., a concrete expression of the association relationship) can be established for each data table.
S111: and recording the corresponding relation between the data table and the entity, the corresponding relation between the table field and the entity attribute, and the corresponding relation between the first association relation and the second association relation.
The first association relationship is an association relationship among the data tables, and the second association relationship is an association relationship among the entities.
After the business logic model is converted into the physical model, the physical model needs to be checked, and the checking purpose is mainly used for detecting whether the data table and the table field in the physical model meet the preset standard requirement. Because the business object in the business logic model is replaced by the entity in the SG-CIM logic model, and the entity attribute in the SG-CIM logic model all meet the requirement of the preset specification, the mapping relation between the physical model and the SG-CIM logic model is only needed to be provided, and whether the physical model meets the requirement of the preset specification or not can be determined. In the embodiment of the present application, the correspondence between the data table and the entity, the correspondence between the table field and the entity attribute, and the correspondence between the first association and the second association are recorded, which is substantially the mapping relationship between the physical model and the SG-CIM logical model.
In summary, since the preset SG-CIM logic model meets the preset specification requirements (i.e., the specification requirements made by the national power grid), the entity in the SG-CIM logic model is used to replace the service object in the service logic model, so as to ensure that the physical model conforms to the specification requirements made by the national power grid. Moreover, the service attribute which is not covered by the entity attribute is used as the extension attribute of the entity, and another entity is newly built for the service object, so that all the service objects and all the service attributes of the service objects are covered by the entity and the entity attribute, the service logic model can cover the increasingly added services and meet the variable service requirements, the lack of service data of the physical model is avoided, and the physical model can be applied to the actual work.
It should be noted that, S111 mentioned in the foregoing embodiment is an optional specific implementation manner in the data processing method described in this application. In addition, as mentioned in the above S110, sending the service logic model to the SG-CIM developer is also an optional specific implementation manner in the data processing method described in the present application. For this reason, the steps mentioned in the above embodiment may summarize the flow shown in fig. 2.
As shown in fig. 2, a schematic diagram of another data processing method provided in the embodiment of the present application includes the following steps:
s201: and analyzing the service definition and the service attribute of the service object from the service logic model which is constructed in advance.
S202: and analyzing the entity definition and the entity attribute of the entity from the first logic model meeting the preset specification requirement.
The entity indicates a business object sample meeting the preset specification requirement, the entity defines and indicates the name of the business object sample, and the entity attribute indicates the data characteristics contained in the business object sample.
It should be noted that the SG-CIM logic model mentioned in the above embodiments is an optional specific expression of the first logic model, and the first logic model may also be other models complying with the preset specification requirements, such as an SG-EA data architecture, an IEC CIM model, and an SG-ERP model. In addition, the preset regulatory requirements include, but are not limited to, regulatory requirements set by the national grid.
S203: and under the condition that the business definition and the entity definition are the same and the entity attribute covers all the business attributes, replacing the business object in the business logic model by using the entity.
S204: and under the condition that the service definition is determined to be the same as the entity definition and the entity attribute does not cover all the service attributes, the service attribute which is not covered by the entity attribute is used as the extended attribute of the entity, and the entity is used for replacing the service object in the service logic model.
S205: and under the condition that the service definition is different from the entity definition, taking a preset standard model as reference, taking the service definition as the entity definition and the service attribute as the entity attribute, building another entity for the service object, and replacing the service object in the service logic model by using the built entity.
S206: and converting the business logic model to obtain a physical model.
In summary, since the first logic model meets the preset specification requirement, the entity in the first logic model is used to replace the business object in the business logic model, so as to ensure that the physical model meets the preset specification requirement. Moreover, the service attribute which is not covered by the entity attribute is used as the extension attribute of the entity, and another entity is newly built for the service object, so that all the service objects and all the service attributes of the service objects are covered by the entity and the entity attribute, the service logic model can cover the increasingly added services and meet the variable service requirements, the lack of service data of the physical model is avoided, and the physical model can be applied to the actual work.
Corresponding to the data processing method provided by the embodiment, the embodiment of the application also provides a data processing device.
As shown in fig. 3, a schematic structural diagram of a data processing apparatus provided in an embodiment of the present application includes:
the first parsing unit 100 is configured to parse a service definition and a service attribute of a service object from a service logic model that is constructed in advance.
A second parsing unit 200, configured to parse the first logic model meeting the preset specification requirement to obtain an entity definition and an entity attribute of the entity, where the entity indicates a service object sample meeting the preset specification requirement, the entity definition indicates a name of the service object sample, and the entity attribute indicates a data feature included in the service object sample.
A first replacing unit 300, configured to replace the business object in the business logic model with the entity if it is determined that the business definition and the entity definition are the same and the entity attribute covers all the business attributes.
And a second replacing unit 400, configured to, when it is determined that the service definition and the entity definition are the same and the entity attribute does not cover all service attributes, use the service attribute not covered by the entity attribute as an extended attribute of the entity, and replace the service object in the service logic model with the entity.
A third replacing unit 500, configured to, when it is determined that the service definition is different from the entity definition, take the preset standard model as a reference, take the service definition as the entity definition and the service attribute as the entity attribute, create another entity for the service object, and replace the service object in the service logic model with the created entity.
The conversion unit 600 is configured to convert the service logic model to obtain a physical model.
The conversion unit 600 is specifically configured to: and converting the entity into a data table, wherein the entity attribute of the entity is used as a table field of the data table.
In this embodiment, the entities include a first entity and a second entity, where the first entity and the second entity are in a parent-child relationship, the first entity is a parent class, and the second entity is a child class.
The specific implementation process of the converting unit 600 for converting the entity into the data table includes: converting the first entity into a parent data table, converting the second entity into a child data table, and establishing an association relation for the parent data table and the child data table; or, the entity attribute of the first entity is included in the entity attribute of the second entity, and then the second entity is converted into the data table.
In an embodiment of the present application, an entity attribute includes a plurality of features.
The specific implementation process of the conversion unit 600 for using the entity attribute of the entity as the table field of the data table includes:
taking each characteristic as each table field of the data table; or, the entity attribute is used as a table field of the data table, the plurality of characteristics are used as a plurality of table fields of the newly-built data table, and an association relation is established for the data table and the newly-built data table.
In the embodiment of the application, the business logic model includes an association relationship between business objects.
The conversion unit 600 is further specifically configured to: and taking the association relation among the business objects as the association relation among the entities, and converting the association relation among the entities into the association relation among the data tables.
The specific implementation process of the conversion unit 600 converting the association relationship between the entities into the association relationship between the data tables includes: in the case that the single entity is determined to be associated with the single entity and the single entity is respectively associated with a plurality of entities, setting a primary key for the data table of the single entity and taking the primary key as a foreign key in the data tables of other entities associated with the single entity; and under the condition that the plurality of entities are respectively associated with the plurality of entities, establishing an intermediate table in advance, taking the table fields in the data table of each entity as main keys, and storing each main key into the intermediate table.
In summary, since the first logic model meets the preset specification requirement, the entity in the first logic model is used to replace the business object in the business logic model, so as to ensure that the physical model meets the preset specification requirement. Moreover, the service attribute which is not covered by the entity attribute is used as the extension attribute of the entity, and another entity is newly built for the service object, so that all the service objects and all the service attributes of the service objects are covered by the entity and the entity attribute, the service logic model can cover the increasingly added services and meet the variable service requirements, the lack of service data of the physical model is avoided, and the physical model can be applied to the actual work.
The present application also provides a computer-readable storage medium including a stored program, wherein the program executes the data processing method provided in the present application.
The present application also provides a data processing apparatus, including: a processor, a memory, and a bus. The processor is connected with the memory through a bus, the memory is used for storing programs, and the processor is used for running the programs, wherein when the programs are run, the data processing method provided by the application is executed, and the method comprises the following steps:
analyzing a service logic model constructed in advance to obtain service definition and service attribute of a service object;
analyzing a first logic model meeting the requirements of preset specifications to obtain entity definitions and entity attributes of entities; the entity indicates a business object sample meeting the preset specification requirement, the entity definition indicates the name of the business object sample, and the entity attribute indicates the data characteristics contained in the business object sample;
under the condition that the business definition and the entity definition are determined to be the same and the entity attribute covers all the business attributes, replacing the business object in the business logic model by the entity;
under the condition that the business definition is determined to be the same as the entity definition and the entity attribute does not cover all the business attributes, taking the business attributes which are not covered by the entity attribute as extended attributes of the entity, and replacing the business objects in the business logic model by using the entity;
under the condition that the service definition is determined to be different from the entity definition, taking a preset standard model as reference, taking the service definition as the entity definition and the service attribute as the entity attribute, building another entity for the service object, and replacing the service object in the service logic model by using the built entity;
and converting the business logic model to obtain a physical model.
Optionally, the converting the service logic model to obtain a physical model includes:
converting the entity into a data table; wherein the entity attribute of the entity is used as a table field of the data table.
Optionally, the entities include a first entity and a second entity, and the first entity and the second entity are in a parent-child relationship; the first entity is a parent class, and the second entity is a child class;
the converting the entity into a data table comprises:
converting the first entity into a parent data table, converting the second entity into a child data table, and establishing an association relation for the parent data table and the child data table;
alternatively, the first and second electrodes may be,
and incorporating the entity attribute of the first entity into the entity attribute of the second entity, and converting the second entity into a data table.
Optionally, the entity attribute includes a plurality of features;
the entity attributes of the entity as a table field of the data table include:
taking each of the features as a respective table field of the data table;
alternatively, the first and second electrodes may be,
and taking the entity attributes as table fields of the data table, taking a plurality of characteristics as a plurality of table fields of a newly-built data table, and establishing an association relation for the data table and the newly-built data table.
Optionally, the business logic model includes an association relationship between the business objects;
the converting the business logic model to obtain a physical model includes:
converting the entity into a data table;
and taking the association relation among the business objects as the association relation among the entities, and converting the association relation among the entities into the association relation among the data tables.
Optionally, the converting the association relationship between the entities into the association relationship between the data tables includes:
and in the case that a single entity is determined to be associated with the single entity and the single entity is respectively associated with a plurality of entities, setting a primary key for the data table of the single entity and using the primary key as a foreign key in the data tables of other entities associated with the single entity.
Optionally, the converting the association relationship between the entities into the association relationship between the data tables includes:
and under the condition that the plurality of entities are respectively associated with the plurality of entities, establishing an intermediate table in advance, taking a table field in a data table of each entity as a primary key, and storing each primary key into the intermediate table.
The functions described in the method of the embodiment of the present application, if implemented in the form of software functional units and sold or used as independent products, may be stored in a storage medium readable by a computing device. Based on such understanding, part of the contribution to the prior art of the embodiments of the present application or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including several instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data processing method, comprising:
analyzing a service logic model constructed in advance to obtain service definition and service attribute of a service object;
analyzing a first logic model meeting the requirements of preset specifications to obtain entity definitions and entity attributes of entities; the entity indicates a business object sample meeting the preset specification requirement, the entity definition indicates the name of the business object sample, and the entity attribute indicates the data characteristics contained in the business object sample;
under the condition that the business definition and the entity definition are determined to be the same and the entity attribute covers all the business attributes, replacing the business object in the business logic model by the entity;
under the condition that the business definition is determined to be the same as the entity definition and the entity attribute does not cover all the business attributes, taking the business attributes which are not covered by the entity attribute as extended attributes of the entity, and replacing the business objects in the business logic model by using the entity;
under the condition that the service definition is determined to be different from the entity definition, taking a preset standard model as reference, taking the service definition as the entity definition and the service attribute as the entity attribute, building another entity for the service object, and replacing the service object in the service logic model by using the built entity;
and converting the business logic model to obtain a physical model.
2. The method of claim 1, wherein transforming the business logic model to obtain a physical model comprises:
converting the entity into a data table; wherein the entity attribute of the entity is used as a table field of the data table.
3. The method of claim 2, wherein the entities comprise a first entity and a second entity, and wherein the first entity and the second entity are in a parent-child relationship; the first entity is a parent class, and the second entity is a child class;
the converting the entity into a data table comprises:
converting the first entity into a parent data table, converting the second entity into a child data table, and establishing an association relation for the parent data table and the child data table;
alternatively, the first and second electrodes may be,
and incorporating the entity attribute of the first entity into the entity attribute of the second entity, and converting the second entity into a data table.
4. The method of claim 2, wherein the entity attributes comprise a plurality of features;
the entity attributes of the entity as a table field of the data table include:
taking each of the features as a respective table field of the data table;
alternatively, the first and second electrodes may be,
and taking the entity attributes as table fields of the data table, taking a plurality of characteristics as a plurality of table fields of a newly-built data table, and establishing an association relation for the data table and the newly-built data table.
5. The method of claim 1, wherein the business logic model comprises associations between the business objects;
the converting the business logic model to obtain a physical model includes:
converting the entity into a data table;
and taking the association relation among the business objects as the association relation among the entities, and converting the association relation among the entities into the association relation among the data tables.
6. The method of claim 5, wherein converting the association between the entities into the association between the data tables comprises:
and in the case that a single entity is determined to be associated with the single entity and the single entity is respectively associated with a plurality of entities, setting a primary key for the data table of the single entity and using the primary key as a foreign key in the data tables of other entities associated with the single entity.
7. The method of claim 5, wherein converting the association between the entities into the association between the data tables comprises:
and under the condition that the plurality of entities are respectively associated with the plurality of entities, establishing an intermediate table in advance, taking a table field in a data table of each entity as a primary key, and storing each primary key into the intermediate table.
8. A data processing apparatus, comprising:
the first analysis unit is used for analyzing a service definition and a service attribute of a service object from a service logic model which is constructed in advance;
the second analysis unit is used for analyzing the first logic model meeting the preset standard requirement to obtain entity definition and entity attributes of the entity; the entity indicates a business object sample meeting the preset specification requirement, the entity definition indicates the name of the business object sample, and the entity attribute indicates the data characteristics contained in the business object sample;
a first replacement unit, configured to replace the business object in the business logic model with the entity if it is determined that the business definition and the entity definition are the same and the entity attribute covers all the business attributes;
a second replacement unit, configured to, when it is determined that the service definition and the entity definition are the same and the entity attribute does not cover all the service attributes, use the service attribute not covered by the entity attribute as an extended attribute of the entity, and replace the service object in the service logic model with the entity;
a third replacing unit, configured to, when it is determined that the service definition is different from the entity definition, create another entity for the service object by using a preset standard model as a reference, where the service definition is used as the entity definition and the service attribute is used as the entity attribute, and replace the service object in the service logic model with the created entity;
and the conversion unit is used for converting the service logic model to obtain a physical model.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein the program executes the data processing method of any one of claims 1 to 7.
10. A data processing apparatus, characterized by comprising: a processor, a memory, and a bus; the processor and the memory are connected through the bus;
the memory is used for storing a program and the processor is used for executing the program, wherein the program executes the data processing method of any one of claims 1 to 7 when running.
CN202011349358.7A 2020-11-26 2020-11-26 Data processing method, device, equipment and storage medium Active CN112395370B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011349358.7A CN112395370B (en) 2020-11-26 2020-11-26 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011349358.7A CN112395370B (en) 2020-11-26 2020-11-26 Data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112395370A true CN112395370A (en) 2021-02-23
CN112395370B CN112395370B (en) 2024-03-15

Family

ID=74604528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011349358.7A Active CN112395370B (en) 2020-11-26 2020-11-26 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112395370B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204329A (en) * 2021-03-19 2021-08-03 浙江华云信息科技有限公司 Control method for driving business application by unified data model and application system thereof
US11516307B1 (en) 2021-08-09 2022-11-29 Servicenow, Inc. Support for multi-type users in a single-type computing system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2318302A1 (en) * 1999-09-03 2001-03-03 Cognos Incorporated Methods and transformations for transforming metadata model
US20030154191A1 (en) * 2002-02-14 2003-08-14 Fish John D. Logical data modeling and integrated application framework
CN103106188A (en) * 2013-02-21 2013-05-15 用友软件股份有限公司 Imaging analysis system and imaging analysis method of data model
CN105589886A (en) * 2014-10-24 2016-05-18 国家电网公司 Power network public information model construction method and power network public information model construction device
CN108733713A (en) * 2017-04-21 2018-11-02 阿里巴巴集团控股有限公司 Data query method and device in data warehouse
CN111858615A (en) * 2020-08-04 2020-10-30 中国工商银行股份有限公司 Database table generation method, system, computer system and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2318302A1 (en) * 1999-09-03 2001-03-03 Cognos Incorporated Methods and transformations for transforming metadata model
US20030154191A1 (en) * 2002-02-14 2003-08-14 Fish John D. Logical data modeling and integrated application framework
CN103106188A (en) * 2013-02-21 2013-05-15 用友软件股份有限公司 Imaging analysis system and imaging analysis method of data model
CN105589886A (en) * 2014-10-24 2016-05-18 国家电网公司 Power network public information model construction method and power network public information model construction device
CN108733713A (en) * 2017-04-21 2018-11-02 阿里巴巴集团控股有限公司 Data query method and device in data warehouse
CN111858615A (en) * 2020-08-04 2020-10-30 中国工商银行股份有限公司 Database table generation method, system, computer system and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NIKOLAOS等: "attribute-based security verification of business process models", 2017 IEEE 19TH CONFERENCE ON BUSINESS INFORMATICS, 27 July 2017 (2017-07-27), pages 43 - 52, XP033144136, DOI: 10.1109/CBI.2017.37 *
孙力群;黄天庆;: "面向分层模型的树形计分标准通用组件设计", 电脑知识与技术(学术交流), no. 36, 28 December 2006 (2006-12-28), pages 140 - 141 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204329A (en) * 2021-03-19 2021-08-03 浙江华云信息科技有限公司 Control method for driving business application by unified data model and application system thereof
US11516307B1 (en) 2021-08-09 2022-11-29 Servicenow, Inc. Support for multi-type users in a single-type computing system
WO2023018463A1 (en) * 2021-08-09 2023-02-16 Servicenow, Inc. Support for multi-type users in a single-type computing system

Also Published As

Publication number Publication date
CN112395370B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
WO2019096191A1 (en) Design method for xbrl standard-based master data management system
US8533235B2 (en) Infrastructure and architecture for development and execution of predictive models
US9684869B2 (en) Infrastructure and architecture for development and execution of predictive models
CN112328706A (en) Dimension modeling calculation method under digital bin system, computer equipment and storage medium
WO2023108967A1 (en) Joint credit scoring method and apparatus based on privacy protection calculation and cross-organization
CN112395370A (en) Data processing method, device, equipment and storage medium
CN111694555A (en) Business system construction method and device, electronic equipment and storage medium
CN114880405A (en) Data lake-based data processing method and system
CN114881508A (en) Data processing method, device and equipment for power grid index report
CN110992207A (en) Business object determination method and device
CN113901046A (en) Virtual dimension table construction method and device
CN114862282A (en) Business and financial cooperative management method and system based on data analysis
CN111427936B (en) Report generation method and device, computer equipment and storage medium
CN114792145A (en) Standard digital management maintenance system and method based on knowledge graph
CN114265576A (en) Model design and verification method based on micro-service architecture
CN111177126A (en) Information processing method, device and equipment
CN114548631A (en) Dynamic evaluation method and device
CN113190795A (en) Method, device, medium and equipment for counting actual management population data
CN111507587A (en) Workload determination method and device
KR102503717B1 (en) Managing system for recycling engine of vehicle and methd for operating the same
Luo et al. Research on Power Market Data Asset Management Framework
CN115130878A (en) Task data processing method and device, terminal equipment and storage medium
Li et al. An Experiment to Design an Operation and Maintenance System Integrating Apriori Association Rules for a Telecom Platform
CN111695709A (en) Sales information service platform for house property field
Wenjuan et al. Construction Method and Typical Application of Data Analysis Service for Power Grid Enterprises Based on Data Middle Platform

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
TA01 Transfer of patent application right

Effective date of registration: 20211108

Address after: 100192 room 710, research building 15, Xiaoying East Road, Qinghe, Haidian District, Beijing

Applicant after: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 102208 8th floor, East Tower, Jiaming Aosen Industrial Park, Qinghe Road, Dongxiaokou Town, Changping District, Beijing

Applicant before: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: STATE GRID INFORMATION & TELECOMMUNICATION GROUP Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant