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

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

Info

Publication number
CN112395370B
CN112395370B CN202011349358.7A CN202011349358A CN112395370B CN 112395370 B CN112395370 B CN 112395370B CN 202011349358 A CN202011349358 A CN 202011349358A CN 112395370 B CN112395370 B CN 112395370B
Authority
CN
China
Prior art keywords
entity
attribute
business
service
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.)
Active
Application number
CN202011349358.7A
Other languages
Chinese (zh)
Other versions
CN112395370A (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
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 Beijing China Power Information Technology Co Ltd filed Critical Beijing China Power Information Technology 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

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/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Public Health (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a data processing device, apparatus, device and storage medium, and analyzing the service logic model to obtain the service definition and service attribute of the service object. And resolving 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 a physical model. Because the first logic model meets the preset specification requirements, the entity in the first logic model is utilized to replace the business object in the business logic model, so that the physical model can be ensured to meet the preset specification requirements. And the business 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 business object, so that all business objects and all business attributes of the business objects can be ensured to be covered by the entity and the entity attribute, the situation that the physical model lacks business data is avoided, and the physical model can be applied to actual work is ensured.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of data models, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
According to national policy requirements, it is necessary to create a transaction-like application model for power traffic. The existing transaction class application model creation process is: a service definition of each service object (called service object, namely abstract name of service in the field of data model) is obtained in advance, and a conceptual model (Conceptual Data Model, CDM) is created according to the association relation between each service object; secondly, defining service attributes of each service object on the basis of the conceptual Model to obtain a Logic Model (LDM); finally, the logical model is transformed into a physical model (Physical Data Model, PDM), thereby storing the business data of the individual business objects in a database in a canonical manner.
At present, in order to ensure that a physical model can conform to the standard requirements formulated by a national power grid, a logic model mostly directly conforms to the existing SG-EA data architecture. However, the entity and entity attribute update period included in the SG-EA data architecture is long, so that the increasingly-increased service cannot be covered, and the changeable service requirements cannot be met, so that the physical model obtained through the conversion of the logic model lacks corresponding service data, and the physical model cannot be applied to actual work.
Disclosure of Invention
The application provides a data processing device, equipment and a storage medium, and aims to solve the problem that a physical model obtained through conversion of a logic model lacks service 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 data processing method, comprising:
analyzing from a pre-constructed business logic model to obtain business definition and business attribute of a business object;
resolving from a first logic model meeting the requirement of a preset specification to obtain entity definition and entity attribute of an entity; the entity indicates a business object sample meeting the requirement of the preset specification, 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;
replacing the business object in the business logic model with the entity under the condition that the business definition is the same as the entity definition and the entity attribute covers all the business attributes;
in the case that the service definition is the same as the entity definition and the entity attribute does not cover all the service attributes, taking the service attribute which is not covered by the entity attribute as an extension attribute of the entity and replacing the service object in the service logic model by using the entity;
under the condition that the service definition and the entity definition are different, taking a preset standard model as a reference, taking the service definition as the entity definition and the service attribute as the entity attribute, creating another entity for the service object, and replacing the service object in the service logic model by utilizing the created 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 entity includes a first entity and a second entity, where the first entity and the second entity are parent-child relationships; wherein 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 class data table, converting the second entity into a child class data table, and establishing an association relationship for the parent class data table and the child class data table;
or,
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 attribute of the entity as a table field of the data table includes:
taking each feature as each table field of the data table;
or,
and taking the entity attribute as a table field 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 each business object;
the converting the business logic model to obtain a physical model comprises the following steps:
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:
in the case that it is determined that a single entity is associated with a single entity and that a single entity is respectively associated with a plurality of entities, a primary key is set for a data table of a single entity and is used as a foreign key in data tables of other entities associated with a 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 table fields in the data tables of the entities as main keys, and storing the main keys into the intermediate table.
A data processing apparatus comprising:
the first analysis unit is used for analyzing and obtaining service definition and service attribute of the service object from a pre-constructed service logic model;
the second analysis unit is used for analyzing the entity definition and the entity attribute of the entity from the first logic model meeting the requirement of the preset specification; the entity indicates a business object sample meeting the requirement of the preset specification, 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 replacing unit, configured to replace the business object in the business logic model with the entity if it is determined that the business definition is the same as the entity definition and the entity attribute covers all the business attributes;
a second replacing unit, configured to, when it is determined that the service definition is the same as the entity definition and the entity attribute does not cover all the service attributes, take the service attribute that is 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 and the entity definition are different, use a preset standard model as a reference, use the service definition as an entity definition and the service attribute as an entity attribute, create another entity for the service object, and replace the service object in the service logic model with the created entity;
and the conversion unit is used for converting the business logic model to obtain a physical model.
A computer-readable storage medium including a stored program, wherein the program performs the data processing method.
A data processing apparatus comprising: a processor, a memory, and a bus; the processor is connected with the memory through the bus;
the memory is used for storing a program, and the processor is used for running the program, wherein the data processing method is executed when the program runs.
According to the technical scheme, the service definition and the service attribute of the service object are obtained through analysis from the pre-constructed service logic model. And resolving from the first logic model meeting the requirement of the preset specification to obtain entity definition and entity attribute of the entity. The entity indicates a business object sample meeting the requirement of a preset specification, 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. In the case that the business definition is determined to be the same as the entity definition and the entity attribute covers all the business attributes, the entity is utilized to replace the business object in the business logic model. And under the condition that the service definition is the same as the entity definition and the entity attribute does not cover all the service attributes, taking the service attribute which is not covered by the entity attribute as an extension attribute of the entity and replacing the service object in the service logic model by the entity. Under the condition that the service definition and the entity definition are different, taking the preset standard model as a reference, taking the service definition as the entity definition and the service attribute as the entity attribute, creating another entity for the service object, and replacing the service object in the service logic model by utilizing the created entity. And converting the business logic model to obtain a physical model. Because the first logic model meets the preset specification requirements, the entity in the first logic model is utilized to replace the business object in the business logic model, so that the physical model can be ensured to meet the preset specification requirements. And the business attribute which is not covered by the entity attribute is used as the extended attribute of the entity and another entity is newly built for the business object, so that all the business objects and all the business attributes of the business objects can be ensured to be covered by the entity and the entity attribute, the business logic model can cover increasingly and newly increased business and cope with changeable business requirements, the shortage of business data of the physical model is avoided, and the physical model can be ensured to be applied to 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 that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
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 according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
Detailed Description
The flow of the embodiment of the application is applied to a data processing system, and specifically can be executed by a host computer, and is used for solving the problem that a physical model obtained through conversion of a logic model lacks service data, so that the physical model can be applied to actual work.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
As shown in fig. 1, a schematic diagram of a data processing method according to 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 a pre-constructed service logic model.
The service definition is used for indicating the name of the service object (e.g. collecting electricity charge), and the service attribute is used for indicating the data characteristics contained in the service object (i.e. reflecting various data of the service object, e.g. collecting electricity charge including power consumption, amount, date, etc.).
It should be noted that, the specific construction process of the business logic model is as follows:
according to a preset service range, service flows and service scenes in service demands are combed; analyzing the business activities contained in the business process and the business functions related to the business scene to obtain input data and output data of each business operation step; abstracting each input data and each output data to obtain each business object; preprocessing (such as de-duplication, merging, integration, splitting and fusion) each business object, and performing business description definition on the business object obtained after preprocessing to obtain business definition of the business object; performing feature recognition on data contained in the service object to obtain each service attribute of the service object; generating an association relation between each business object based on the execution sequence of each business and the corresponding relation between the input data and the output data; and creating a conceptual model according to the association 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 from a preset SG-CIM logic model to obtain entity definition and entity attribute of the entity.
The SG-CIM is an existing enterprise public information model, and is formulated by related departments to meet the requirements of the specifications formulated by the national power grid, and is used for guiding the physical model design of a business application system and the interface design between applications so as to solve the problem of enterprise business coordination and data sharing. The SG-CIM comprises a SG-CIM conceptual model, a SG-CIM logical model and a SG-CIM physical model. In the embodiment of the application, the entity indicates the business object sample meeting the requirement of the preset specification, 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. The preset specification requirements comprise specification requirements formulated by a national power grid.
Specifically, the SG-CIM conceptual model is used for revealing a company business blueprint and communicating business demands with business personnel. The SG-CIM logic model is used as an enterprise standard, and various applications should follow the SG-CI logic model to carry out physical model and inter-application interface design. The SG-CIM physical model is mainly applied to the data center, and manages each item of detail data in the sharing layer of the data center.
It should be emphasized that, as a developer of the SG-CIM, the relevant departments may collect opinion information (such as usage report, problem report, and advice report) uploaded by each user in real time, continuously perfect defects of the SG-CIM logic model, and update the SG-CIM logic model in real time.
S103: for each business object, it is determined whether the business definition of the business object and the entity definition of the entity are the same.
If the service definition of the service object is the same as the entity definition of the entity, S104 is executed, otherwise S107 is executed.
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: the entity is utilized to replace the business object in the business logic model.
The entity is utilized to replace the business object in the business logic model, namely, the entity definition of the entity is used for replacing the business definition of the business object, and the entity attribute of the entity is used for replacing the business attribute of the business 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, replacing all the business attributes of the business object with all the entity attributes 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, leaving only the entity, entity definition, and entity attributes.
S106: and taking the business attributes which are not covered by the entity attributes as the extended attributes of the entities, and replacing the business objects in the business logic model by the entities.
After S106 is performed, S108 is continued.
The entity is utilized to replace the business object in the business logic model, namely, the entity definition of the entity is used for replacing the business definition of the business object, and the original entity attribute and the extension attribute of the entity are used for replacing the business attribute 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, leaving only the entity, entity definition, and entity attributes and extension attributes.
S107: taking a preset standard model as a reference, taking the service definition as an entity definition and the service attribute as an entity attribute, creating another entity for the service object, and replacing the service object in the service logic model by utilizing the created entity.
After S107 is performed, S108 is continued.
The new entity is utilized to replace the service object in the service logic model, namely, the entity definition of the new entity is used for replacing the service definition of the service object, and the entity attribute of the new entity is used for replacing the service attribute of the service 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, leaving only the newly created entity, entity definition, and entity attributes.
It should be noted that the preset standard model includes, but is not limited to, IEC CIM and SG-ERP (IEC CIM and SG-ERP are both models formulated by the national power grid).
S108: and converting the business logic model into a physical model and sending the business logic model to a developer of the SG-CIM.
The specific implementation process for converting the business logic model into the physical model comprises the following steps:
s109: the entity is converted into a data table.
Wherein the entity attributes of the entities serve as table fields of the data table.
Optionally, the entity includes a first entity and a second entity, where the first entity and the second entity are parent-child relationships, and the specific implementation process of converting the entity into the data table includes:
converting the first entity into a parent class data table, converting the second entity into a child class data table, and establishing an association relationship for the parent class data table and the child class data table;
or,
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 (i.e. the type of data included in the service object, for example, the electric charge collection includes power consumption, amount, date, etc.), and the specific implementation process of using the entity attribute as the table field of the data table includes:
taking each characteristic as each table field of the data table;
or,
and taking the entity attribute as a table field of the data table, taking a plurality of features as a plurality of table fields of the newly-built data table, and establishing an association relationship between the data table and the newly-built data table.
It should be noted that, the specific implementation process of establishing the association relationship for the two data tables is common knowledge familiar to those skilled in the art, and will not be described herein.
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 a single entity is respectively associated with a plurality of entities, a primary key is set for the data table of the single entity, and the primary key is used as an external key in the data tables of other entities associated with the single entity.
Optionally, under the condition that it is determined that the entities are respectively associated with the entities, an intermediate table is pre-established, table fields in the data tables of the entities are used as primary keys, and the primary keys are stored in the intermediate table.
It should be noted that, the primary key is a unique identifier (such as an identification card number, a name, an age, etc., an identification card number) for determining one record, and the external key is used for associating with another data table (i.e., being able to determine a table field of the other data table). Based on the application of the primary key and the foreign key, a primary foreign key relationship (i.e., a specific expression of an 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 between each data table, and the second association relationship is an association relationship between each entity.
After the business logic model is converted into the physical model, the physical model is checked, and the purpose of checking is mainly used for detecting whether a data table and a table field in the physical model meet the preset specification requirements. Because the business objects in the business logic model are replaced by the entities in the SG-CIM logic model, and the entities in the SG-CIM logic model and the entity attributes meet the preset specification requirements, whether the physical model meets the preset specification requirements can be determined by only providing the mapping relation between the physical model and the SG-CIM logic model. In the embodiment of the application, 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 are recorded, and the essence is to record the mapping relation between the physical model and the SG-CIM logic model.
In summary, since the preset SG-CIM logic model meets the preset specification requirement (i.e., the specification requirement formulated by the national power grid), the entity in the SG-CIM logic model is utilized to replace the service object in the service logic model, so that the physical model can be ensured to conform to the specification requirement formulated by the national power grid. And the business attribute which is not covered by the entity attribute is used as the extended attribute of the entity and another entity is newly built for the business object, so that all the business objects and all the business attributes of the business objects can be ensured to be covered by the entity and the entity attribute, the business logic model can cover increasingly and newly increased business and cope with changeable business requirements, the shortage of business data of the physical model is avoided, and the physical model can be ensured to be applied to actual work.
It should be noted that S111 mentioned in the foregoing embodiment is an optional specific implementation manner of the data processing method described in the present application. In addition, the above S110 refers to that sending the service logic model to the developer of the SG-CIM is also an optional specific implementation manner of the data processing method described in the present application. For this reason, the procedure shown in fig. 2 can be summarized for the steps mentioned in the above embodiments.
As shown in fig. 2, a schematic diagram of another data processing method according to an embodiment of the present application includes the following steps:
s201: and analyzing the service logic model constructed in advance to obtain the service definition and the service attribute of the service object.
S202: and resolving from the first logic model meeting the requirement of the preset specification to obtain entity definition and entity attribute of the entity.
The entity indicates a service object sample meeting the requirement of a preset specification, the entity definition indicates the name of the service object sample, and the entity attribute indicates the data characteristics contained in the service object sample.
It should be noted that, the SG-CIM logic model mentioned in the foregoing embodiment is an optional specific implementation manner of the first logic model, and the first logic model may also be other models that conform to the preset specification requirements, for example, an SG-EA data architecture, an IEC CIM model, and an SG-ERP model. In addition, the preset specification requirements include, but are not limited to, specification requirements established by the national grid.
S203: in the case that the business definition is determined to be the same as the entity definition and the entity attribute covers all the business attributes, the entity is utilized to replace the business object in the business logic model.
S204: and under the condition that the service definition is the same as the entity definition and the entity attribute does not cover all the service attributes, taking the service attribute which is not covered by the entity attribute as an extension attribute of the entity and replacing the service object in the service logic model by the entity.
S205: under the condition that the service definition and the entity definition are different, taking the preset standard model as a reference, taking the service definition as the entity definition and the service attribute as the entity attribute, creating another entity for the service object, and replacing the service object in the service logic model by utilizing the created entity.
S206: and converting the business logic model to obtain a physical model.
In summary, since the first logic model meets the preset specification requirements, the entity in the first logic model is utilized to replace the business object in the business logic model, so that the physical model can be ensured to conform to the preset specification requirements. And the business attribute which is not covered by the entity attribute is used as the extended attribute of the entity and another entity is newly built for the business object, so that all the business objects and all the business attributes of the business objects can be ensured to be covered by the entity and the entity attribute, the business logic model can cover increasingly and newly increased business and cope with changeable business requirements, the shortage of business data of the physical model is avoided, and the physical model can be ensured to be applied to actual work.
Corresponding to the data processing method provided in the above embodiment, the embodiment of the present application further provides a data processing device.
Fig. 3 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, where the data processing apparatus includes:
the first parsing unit 100 is configured to parse and obtain a service definition and a service attribute of a service object from a service logic model that is built in advance.
The second parsing unit 200 is configured to parse the first logical model meeting the requirement of the preset specification to obtain an entity definition and an entity attribute of the entity, where the entity indicates a service object sample meeting the requirement of the preset specification, 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.
The first replacing unit 300 is configured to replace the business object in the business logic model with the entity in the case that the business definition is the same as the entity definition and the entity attribute covers all the business attributes.
The second replacing unit 400 is configured to, when it is determined that the service definition is the same as the entity definition and the entity attribute does not cover all the service attributes, use the service attribute that is 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.
And the third replacing unit 500 is configured to, when it is determined that the service definition and the entity definition are different, use the preset standard model as a reference, use 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 specifically is configured to: the entity is converted into a data table, wherein the entity attribute of the entity is used as a table field of the data table.
In the embodiment of the application, the entities comprise a first entity and a second entity, the first entity and the second entity are in a father-son relationship, the first entity is a father class, and the second entity is a child class.
The specific implementation process of the conversion unit 600 for converting an entity into a data table includes: converting the first entity into a parent class data table, converting the second entity into a child class data table, and establishing an association relationship for the parent class data table and the child class data table; or the entity attribute of the first entity is included in the entity attribute of the second entity, and the second entity is converted into the data table.
In an embodiment of the present application, the 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 taking the entity attribute as a table field of the data table, taking a plurality of characteristics as a plurality of table fields of the newly-built data table, and establishing an association relation between the data table and the newly-built data table.
In the embodiment of the application, the business logic model comprises an association relation among various business objects.
The conversion unit 600 is also 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 converting the association relationship between the entities into the association relationship between the data tables by the conversion unit 600 includes: setting a primary key for a data table of a single entity and taking the primary key as an external key in the data tables of other entities associated with the single entity under the condition 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; under the condition that the plurality of entities are respectively associated with the plurality of entities, an intermediate table is established in advance, table fields in the data tables of the entities are used as main keys, and the main keys are stored in the intermediate table.
In summary, since the first logic model meets the preset specification requirements, the entity in the first logic model is utilized to replace the business object in the business logic model, so that the physical model can be ensured to conform to the preset specification requirements. And the business attribute which is not covered by the entity attribute is used as the extended attribute of the entity and another entity is newly built for the business object, so that all the business objects and all the business attributes of the business objects can be ensured to be covered by the entity and the entity attribute, the business logic model can cover increasingly and newly increased business and cope with changeable business requirements, the shortage of business data of the physical model is avoided, and the physical model can be ensured to be applied to 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 by the present application.
The application also provides a data processing device comprising: a processor, a memory, and a bus. The processor is connected with the memory through a bus, the memory is used for storing a program, and the processor is used for running the program, wherein the data processing method provided by the application is executed when the program runs, and the method comprises the following steps:
analyzing from a pre-constructed business logic model to obtain business definition and business attribute of a business object;
resolving from a first logic model meeting the requirement of a preset specification to obtain entity definition and entity attribute of an entity; the entity indicates a business object sample meeting the requirement of the preset specification, 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;
replacing the business object in the business logic model with the entity under the condition that the business definition is the same as the entity definition and the entity attribute covers all the business attributes;
in the case that the service definition is the same as the entity definition and the entity attribute does not cover all the service attributes, taking the service attribute which is not covered by the entity attribute as an extension attribute of the entity and replacing the service object in the service logic model by using the entity;
under the condition that the service definition and the entity definition are different, taking a preset standard model as a reference, taking the service definition as the entity definition and the service attribute as the entity attribute, creating another entity for the service object, and replacing the service object in the service logic model by utilizing the created 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 entity includes a first entity and a second entity, where the first entity and the second entity are parent-child relationships; wherein 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 class data table, converting the second entity into a child class data table, and establishing an association relationship for the parent class data table and the child class data table;
or,
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 attribute of the entity as a table field of the data table includes:
taking each feature as each table field of the data table;
or,
and taking the entity attribute as a table field 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 each business object;
the converting the business logic model to obtain a physical model comprises the following steps:
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:
in the case that it is determined that a single entity is associated with a single entity and that a single entity is respectively associated with a plurality of entities, a primary key is set for a data table of a single entity and is used as a foreign key in data tables of other entities associated with a 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 table fields in the data tables of the entities as main keys, and storing the main keys into the intermediate table.
The functions described in the methods of the present application, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computing device readable storage medium. Based on such understanding, a portion of the embodiments of the present application that contributes to the prior art or a portion of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device or a network device, etc.) to perform all or part of the steps of the methods 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, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between 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 (8)

1. A method of data processing, comprising:
analyzing from a pre-constructed business logic model to obtain business definition and business attribute of a business object;
resolving from a first logic model meeting the requirement of a preset specification to obtain entity definition and entity attribute of an entity; the entity indicates a business object sample meeting the preset specification requirement, the entity definition indicates the name of the business object sample, the entity attribute indicates the data characteristic contained in the business object sample, the entity comprises a first entity and a second entity, the first entity and the second entity are father-son relations, wherein the first entity is a father class, and the second entity is a subclass;
replacing the business object in the business logic model with the entity under the condition that the business definition is the same as the entity definition and the entity attribute covers all the business attributes;
in the case that the service definition is the same as the entity definition and the entity attribute does not cover all the service attributes, taking the service attribute which is not covered by the entity attribute as an extension attribute of the entity and replacing the service object in the service logic model by using the entity;
under the condition that the service definition and the entity definition are different, taking a preset standard model as a reference, taking the service definition as the entity definition and the service attribute as the entity attribute, creating another entity for the service object, and replacing the service object in the service logic model by utilizing the created entity;
converting the first entity into a parent class data table, converting the second entity into a child class data table, and establishing an association relationship for the parent class data table and the child class data table;
or,
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, wherein the entity attribute of the entity is used as a table field of the data table.
2. The method of claim 1, wherein the entity attribute comprises a plurality of features;
the entity attribute of the entity as a table field of the data table includes:
taking each feature as each table field of the data table;
or,
and taking the entity attribute as a table field 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.
3. The method of claim 1, wherein the business logic model includes an association between each of the business objects;
converting the business logic model to obtain a physical model, wherein the method comprises the following steps:
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.
4. A method according to claim 3, wherein said converting the association between the respective entities into the association between the respective data tables comprises:
in the case that it is determined that a single entity is associated with a single entity and that a single entity is respectively associated with a plurality of entities, a primary key is set for a data table of a single entity and is used as a foreign key in data tables of other entities associated with a single entity.
5. A method according to claim 3, wherein said converting the association between the respective entities into the association between the respective 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 table fields in the data tables of the entities as main keys, and storing the main keys into the intermediate table.
6. A data processing apparatus, comprising:
the first analysis unit is used for analyzing and obtaining service definition and service attribute of the service object from a pre-constructed service logic model;
the second analysis unit is used for analyzing the entity definition and the entity attribute of the entity from the first logic model meeting the requirement of the preset specification; the entity indicates a business object sample meeting the preset specification requirement, the entity definition indicates the name of the business object sample, the entity attribute indicates the data characteristic contained in the business object sample, the entity comprises a first entity and a second entity, the first entity and the second entity are father-son relations, wherein the first entity is a father class, and the second entity is a subclass;
a first replacing unit, configured to replace the business object in the business logic model with the entity if it is determined that the business definition is the same as the entity definition and the entity attribute covers all the business attributes;
a second replacing unit, configured to, when it is determined that the service definition is the same as the entity definition and the entity attribute does not cover all the service attributes, take the service attribute that is 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 and the entity definition are different, use a preset standard model as a reference, use the service definition as an entity definition and the service attribute as an 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 is used for converting the first entity into a parent class data table, converting the second entity into a child class data table and establishing an association relationship for the parent class data table and the child class data table; or, 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, wherein the entity attribute of the entity is used as a table field of the data table.
7. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program performs the data processing method of any one of claims 1-5.
8. A data processing apparatus, comprising: a processor, a memory, and a bus; the processor is connected with the memory through the bus;
the memory is used for storing a program, and the processor is used for running the program, wherein the program runs to execute the data processing method according to any one of claims 1 to 5.
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 CN112395370A (en) 2021-02-23
CN112395370B true 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)

Families Citing this family (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 (5)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7185317B2 (en) * 2002-02-14 2007-02-27 Hubbard & Wells Logical data modeling and integrated application framework

Patent Citations (5)

* 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
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
attribute-based security verification of business process models;Nikolaos等;2017 IEEE 19th conference on business informatics;20170727;43-52 *
面向分层模型的树形计分标准通用组件设计;孙力群;黄天庆;;电脑知识与技术(学术交流);20061228(第36期);140-141+180 *

Also Published As

Publication number Publication date
CN112395370A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
CN112395370B (en) Data processing method, device, equipment and storage medium
WO2023108967A1 (en) Joint credit scoring method and apparatus based on privacy protection calculation and cross-organization
CN114880405A (en) Data lake-based data processing method and system
CN110544035A (en) internal control detection method, system and computer readable storage medium
CN109615172A (en) A kind of method and terminal handling examination data
CN117390015A (en) Method and device for storing battery passport and storage medium
CN111127186A (en) Application method of customer credit rating evaluation system based on big data technology
CN115345753A (en) Internet channel-based accurate pushing method for electric power customer messages
CN113450142B (en) Clustering analysis method and device for power consumption behaviors of power customers
CN114265576A (en) Model design and verification method based on micro-service architecture
CN114862282A (en) Business and financial cooperative management method and system based on data analysis
Liu et al. Big data analysis model of customer appeal based on power enterprise service platform
CN113901046A (en) Virtual dimension table construction method and device
CN111427936B (en) Report generation method and device, computer equipment and storage medium
CN113159118A (en) Logistics data index processing method, device, equipment and storage medium
CN112614005A (en) Enterprise rework state processing method and device
CN111709539A (en) Management method and system for power battery used in echelon
CN111177126A (en) Information processing method, device and equipment
CN117764455B (en) Universal index management method and system for data
Luo et al. Research on Power Market Data Asset Management Framework
CN107436928A (en) The through-flow method of amount valency of substation project
CN111752984B (en) Information processing method, device and storage medium
CN117453690A (en) Data processing method, device and computer medium for power grid data warehouse
CN117291519A (en) Budget data processing method and system based on multidimensional index
CN116468459A (en) Cat pool electricity consumption behavior analysis method, system and equipment based on user electricity consumption data

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