Centralized control station service model design method
By building abstract model EData and using macro definition to adjust table fields, the problem of repeated development and testing in the business model design of centralized control stations is solved, efficient design and flexible business model design are realized, and the creation of centralized control stations is improved. efficiency.
Patent Information
- Application Number
- CN202310698193.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-13
- Publication Date
- 2024-12-13
AI Technical Summary
The existing centralized control station business model design method leads to increased repeated development and testing when business needs are diversified, reducing creation efficiency.
By building an abstract model EData, the business model data is abstracted into separate table objects, and the table fields are adjusted using macro definitions to achieve decoupling between the business model and the table, reducing duplicate development and testing.
It greatly improves design efficiency, avoids frequent modification of business processing programs, and realizes flexibility and convenient development of business models.
Smart Images

Figure BDA0004282651360000011 
Figure BDA0004282651360000041 
Figure BDA0004282651360000042
Abstract
Description
Technical Field
[0001] The invention relates to a centralized control station business model design method, belonging to the technical field of intelligent substation digitization. Background Art
[0002] The current business model of the centralized control station is composed of various tables in the database. The business differences of each centralized control station are first reflected in the differences in the business models, which are specifically manifested in the inconsistency of the table name, field name, and number of fields in the model table. When the business processing application loads the model data, the corresponding data structure is designed according to the table in the model. This means that there are as many different data structures as there are tables. This targeted design can meet the business characteristics of the centralized control station when it is small (the number of model tables is small), the business processing is relatively simple, and the demand changes slowly. However, with the diversification of the current business needs of the centralized control station, repeated development and design are required to meet different demand differences. Its structural relationship can be shown in Table 1:
[0003] Table 1
[0004]
[0005] It can be seen from the business model that a business model requires several tables, each of which contains different field types. For this business model, any change in any field of a table requires modification of the program. For the centralized control station, business changes, in abstract terms, correspond to changes in the tables in the model, that is, the increase or decrease of table fields. Before adopting this design method, any business changes require modification of the entire model structure. The business model is composed of various tables, and any change in a table requires modification of the entire business model. Under the condition of changing business, the repetitiveness of business program development is increased, and the burden of testing is also increased.
[0006] Therefore, the current design method requires redesigning the model structure of the program when designing different centralized control stations even for slight differences, resulting in a lot of repetitive work in development, design and testing, and reducing the efficiency of creating the business model of the centralized control station. Summary of the invention
[0007] The purpose of the present invention is to provide a centralized control station business model design method to solve the problem of low efficiency caused by excessive repetitive work in the current design process.
[0008] In order to solve the above technical problems, the present invention provides a method for designing a centralized control station business model, characterized in that the method comprises the following steps:
[0009] 1) Construct an abstract model EData according to the business model of the centralized control station, and the abstract model EData contains the basic types of database fields;
[0010] 2) When designing a specific business model, the model data is abstracted according to the abstract model EData, and the data table required by the specific business model is constructed using the abstract model data.
[0011] The present invention abstracts the model data tables corresponding to all business models of the centralized control station into one model data, uses the abstract model data to construct the data tables required by the specific business model, decouples the business model from each table, designs it into a separate table object, and uses the table object to determine the data table required by the specific business model. The method obtains an internal general data model through abstract design of the business model data, maps the actual business models of the centralized control station to the internal general model, and when the business model data table changes, there is no need to modify the business processing program, solves the problem of repeated development and retesting, and greatly improves the design efficiency.
[0012] Furthermore, in the step 2), when a field in a data table corresponding to a business model changes, only the field in the data table is increased or decreased.
[0013] The present invention decouples the business model from each table and designs them into separate table objects, so that changes to the table only require modifying the corresponding table object, reducing repeated development and testing.
[0014] Furthermore, in the step 2), when constructing the data table, corresponding macros are defined according to the field names of the table, and the increase or decrease of the table fields is achieved by adding / reducing the corresponding macro definitions.
[0015] Furthermore, the method also includes making the designed data table object a plug-in.
[0016] The present invention designs each table into a table object and then performs plug-in processing. According to which tables are required by the business model, the corresponding table plug-in is selected, making the development process more convenient and efficient.
[0017] Furthermore, the basic types include string, integer, floating point, date and time, and Boolean. DETAILED DESCRIPTION
[0018] The present invention abstracts the model data tables corresponding to all business models of the centralized control station into one model data, uses the abstract model data to construct the data tables required by the specific business models, decouples the business models from each table, designs them into separate table objects, and uses the table objects to determine the data tables required by the specific business models, so that when the table changes, only the corresponding table objects need to be modified, thereby reducing repeated development and testing and greatly improving design efficiency.
[0019] 1. Abstract the model data table.
[0020] Model data comes from database definition. A table represents a type of object, a record represents an object, and the fields of the table represent the attributes of the object. Database field types can basically be covered by string, integer, floating point, date and time, and Boolean types. You only need to design a structure that includes the basic database field types, and you can abstract all model data into an internal general model.
[0021] Therefore, the present invention uniformly abstracts and marks the model data table as EData, which contains the basic types of database fields, such as string, integer, floating point, date and time, and Boolean types; the abstract model data is shown in Table 2. Any data in the table can be represented by EData (i.e., how many int types, how many string types, how many float types, etc.), and a specific type in a data is represented by a specific type of field name. For example, in a device table, there are fields such as device ID of int type, device name of string type, setting sampling value of double type or float type, device sampling time of datetime type, etc. In accordance with the present invention, it is only necessary to abstract this data into EData (i.e., a data in the corresponding table).
[0022] Table 2
[0023]
[0024] Data model developers construct EData objects and store them in EDataModel objects. EData represents a piece of data, and EDataModel represents a table. EDataModel objects represent a class of objects, that is, they contain several identical EData objects, just like a table (EDataModel) contains several pieces of data (EData).
[0025] Business developers obtain EData objects through EDataModel queries and perform read and write operations on EData objects. In this way, each table is a type of object, which separates the table from the overall business model. In this way, for the business model, you can select the corresponding table object when you need to use the table.
[0026] 2. Design a specific centralized control station model by adjusting the macro definition of the model table.
[0027] When designing the model table corresponding to the specific centralized control station model, you only need to define the corresponding macro according to the field name of the table. To increase or decrease the table fields, you only need to increase / reduce the corresponding macro definition; the macro definition consists of field value_table name, similar to ID_TABLENAME.
[0028] If the fields of a table change (for example, the fields are increased or decreased), you only need to modify the objects of this table without modifying the entire business model, thus decoupling the business model from the table.
[0029] Assume that there is a device table, which contains several data items, each of which contains fields such as device ID of int type, device name of string type, device description of string type, set sampling value of float type, device sampling time of datetime type, etc. The device table is shown in Table 3.
[0030] Table 3
[0031]
[0032]
[0033] First, the data objects in Table 3 are abstracted according to EData. The results are shown in Table 4.
[0034] Table 4
[0035]
[0036] In this way, the fields of a table are abstracted according to the EData. The number of corresponding fields is the number of corresponding field attributes abstracted (as shown in Table 3, two string type fields are abstracted to the two corresponding string types. If the field name corresponding to the unnecessary type is set to null, it corresponds to double in the table above). For different business objects, the above EData can be used for abstraction. Moreover, if the business object changes, you only need to increase / decrease the corresponding field type.
[0037] Any table can be represented by a piece of data after being abstracted by EData. EDataModel is composed of several data abstracted by EData, so that EDataModel can be represented as a table (such as the device table mentioned above). After being designed as a table object, the advantage of such an abstract business model is that the abstract model EData is unified. For a specific table, it only needs to be represented as data of the corresponding type according to the table field. This changes the original mode that each table is a data object. The advantage of adopting a new data abstraction mode is that the table structure only needs to increase / decrease the field type when it changes. For the business, plug-in can be realized, that is, different business implementations are decoupled, and modules can be developed for EDataModel (for example, design a device table business processing plug-in, and the business processing flow of the plug-in is based on the EDataModel abstracted by the device table). All business processing is based on the EDataModel, so that even if other tables change, only the EDataModel corresponding to this business processing module does not change, and the code of this part of the module does not need to be modified. That is, which tables are needed by the business model, that is, which table plug-ins are selected and the business processing model corresponding to each table plug-in is realized to achieve convenient and rapid development and adaptation.
[0038] The present invention abstracts the model data tables corresponding to all business models of the centralized control station into one model data, uses the abstract model data to construct the data tables required by the specific business models, decouples the business models from each table, designs them into separate table objects, and uses the table objects to determine the data tables required by the specific business models. When the table changes, the present invention only needs to modify the corresponding business processing flow without modifying the entire business application, thereby greatly improving the design efficiency.
Claims
1. A method for designing a centralized control station business model, characterized in that: The method comprises the following steps: 1) Construct an abstract model EData according to the business model of the centralized control station, and the abstract model EData contains the basic types of database fields; 2) When designing a specific business model, the model data is abstracted according to the abstract model EData, and the data table required by the specific business model is constructed using the abstract model data.
2. The method for designing a centralized control station business model according to claim 1, characterized in that: In the step 2), when a field in the data table corresponding to the business model changes, only the field in the data table is added or reduced.
3. The method for designing a centralized control station business model according to claim 1 or 2, characterized in that: In the step 2), when constructing the data table, corresponding macros are defined according to the field names of the table, and the increase or decrease of the table fields is achieved by adding / reducing the corresponding macro definitions.
4. The method for designing a centralized control station business model according to claim 1, characterized in that: The method also includes making the designed data table into a plug-in.
5. The method for designing a centralized control station business model according to claim 1 or 2, characterized in that: The basic types include string, integer, floating point, date and time, and Boolean.
Citation Information
Patent Citations
Method and device for configuring field attribute
CN102819547A
Data access method and system
CN106919615A
Database table model and creation method
CN106933837A
Data storage method and device based on big data, storage medium and processor
CN111159192A
