Correlation data model modification method and device, equipment, medium and program product
By obtaining the modified information of the modified object in the data model, determine whether the associated data model meets the modification conditions, and perform modification processing of the associated data model, solve the problem of the consistency of the data model and the associated data model, realize the accuracy and accuracy and the data processing of the data processing consistency.
Patent Information
- Application Number
- CN202411238020.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-01-28
AI Technical Summary
When modifying the data model, the prior art is difficult to ensure the consistency between the data model and the associated data model, resulting in data processing errors.
By obtaining the modified information of the modified object in the data model, determine whether the associated data model meets the modification conditions, and when the conditions are met, determine the modification information of the target object, and modify the associated data model to achieve the data model and associated data model Synchronous modification.
Improve the consistency of the data model and the associated data model, avoid errors of data processing, and ensure the accuracy and consistency of data storage.
Smart Images

Figure CN119377236A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment, medium and program product for modifying an associated data model. Background Art
[0002] With the deepening of the digital age, data has gradually become a new type of production factor. Data is not only a data resource for enterprises, but also a valuable intangible asset.
[0003] The data model is the data in the pre-design stage of the data development process, and the metadata information of the table structure is the data that forms the result afterwards. In actual situations, when the model information in the data model is inconsistent with the metadata information of the table structure, the data model needs to be modified.
[0004] However, in the related art, modification of a data model may lead to inconsistency between the data model and its associated data model (upstream data model or downstream data model). Summary of the invention
[0005] The embodiments of the present application provide a method, apparatus, device, medium and program product for modifying an associated data model, which can modify the associated data model based on the modification of the data model, thereby improving the consistency between the data model and the associated data model.
[0006] In a first aspect, an embodiment of the present application provides a method for modifying an association data model, which is applied to a computing device, and the method includes:
[0007] Obtain modification information of at least one modification object in a data model; the modification object is a table or a field;
[0008] Determining whether the associated data model meets the modification condition according to the modification information of at least one modification object and the associated data model corresponding to the data model;
[0009] In the case where it is determined that the associated data model satisfies the modification condition, at least one target object in the associated data model is determined, and modification information of each target object is determined; the relationship between the target object and the modification object is an equivalent relationship or an associated relationship;
[0010] According to the modification information of each target object, the associated data model is modified to obtain a modified associated data model.
[0011] In one implementation, determining whether the associated data model satisfies the modification condition according to modification information of at least one modification object and an associated data model corresponding to the data model includes:
[0012] Determine whether there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object;
[0013] In the case where it is determined that there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object, it is determined that the associated data model satisfies the modification condition;
[0014] When it is determined that there is no object in the associated data model whose relationship with the modification object is an equivalent relationship or an associated relationship, it is determined that the associated data model does not satisfy the modification condition.
[0015] In one implementation, the modification information of the modified object includes any one or more of the following:
[0016] Modify the attribute change information corresponding to the object, modify the processing logic change information corresponding to the object, and modify the data type change information corresponding to the object.
[0017] In one implementation, determining modification information of each target object includes:
[0018] In a case where the modification information of the modified object includes attribute change information corresponding to the modified object, determining the attribute change information corresponding to the target object according to the attribute change information corresponding to the modified object, the relationship between the target object and the modified object, and the attribute information of the target object;
[0019] Determine that the modification information of the target object includes attribute change information corresponding to the target object; wherein the attribute change information corresponding to the target object includes name change information, default value change information, and / or constraint change information.
[0020] In one implementation, determining modification information of each target object includes:
[0021] In a case where it is determined that the modification information of the modified object includes processing logic change information corresponding to the modified object, determining the processing logic change information corresponding to the target object according to the processing logic change information corresponding to the modified object, the relationship between the target object and the modified object, and the processing logic information of the target object;
[0022] Determine that the modification information of the target object includes processing logic change information corresponding to the target object; wherein the processing logic change information corresponding to the target object includes data conversion logic change information, calculation logic change information, and / or filtering condition change information.
[0023] In one implementation, determining modification information of each target object includes:
[0024] In a case where it is determined that the modification information of the modified object includes data type change information corresponding to the modified object, determining the data type change information corresponding to the target object according to the data type change information corresponding to the modified object, the relationship between the target object and the modified object, and the data type of the target object;
[0025] The modification information of the target object is determined to include data type change information corresponding to the target object.
[0026] In one implementation, the method further includes:
[0027] Obtain the processing logic information corresponding to the target object;
[0028] Determine the processing logic change information corresponding to the target object according to the data type change information corresponding to the target object and the processing logic information corresponding to the target object;
[0029] The modification information of the target object is determined to also include processing logic change information corresponding to the target object.
[0030] In a second aspect, an embodiment of the present application provides a device for modifying an association data model, including:
[0031] An acquisition module, used to acquire modification information of at least one modification object in a data model; the modification object is a table or a field;
[0032] A processing module, configured to determine whether the associated data model satisfies a modification condition according to modification information of at least one modification object and an associated data model corresponding to the data model;
[0033] The processing module is further used to determine at least one target object in the associated data model and determine the modification information of each target object when it is determined that the associated data model meets the modification condition; the relationship between the target object and the modification object is an equivalent relationship or an associated relationship;
[0034] The processing module is further used to modify the associated data model according to the modification information of each target object to obtain a modified associated data model.
[0035] In one implementation, the processing module is specifically configured to:
[0036] Determine whether there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object;
[0037] In the case where it is determined that there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object, it is determined that the associated data model satisfies the modification condition;
[0038] When it is determined that there is no object in the associated data model whose relationship with the modification object is an equivalent relationship or an associated relationship, it is determined that the associated data model does not satisfy the modification condition.
[0039] In one implementation, the modification information of the modified object includes any one or more of the following:
[0040] Modify the attribute change information corresponding to the object, modify the processing logic change information corresponding to the object, and modify the data type change information corresponding to the object.
[0041] In one implementation, the processing module is specifically configured to:
[0042] In a case where the modification information of the modified object includes attribute change information corresponding to the modified object, determining the attribute change information corresponding to the target object according to the attribute change information corresponding to the modified object, the relationship between the target object and the modified object, and the attribute information of the target object;
[0043] Determine that the modification information of the target object includes attribute change information corresponding to the target object; wherein the attribute change information corresponding to the target object includes name change information, default value change information, and / or constraint change information.
[0044] In one implementation, the processing module is specifically configured to:
[0045] In a case where it is determined that the modification information of the modified object includes processing logic change information corresponding to the modified object, determining the processing logic change information corresponding to the target object according to the processing logic change information corresponding to the modified object, the relationship between the target object and the modified object, and the processing logic information of the target object;
[0046] Determine that the modification information of the target object includes processing logic change information corresponding to the target object; wherein the processing logic change information corresponding to the target object includes data conversion logic change information, calculation logic change information, and / or filtering condition change information.
[0047] In one implementation, the processing module is specifically configured to:
[0048] In a case where it is determined that the modification information of the modified object includes data type change information corresponding to the modified object, determining the data type change information corresponding to the target object according to the data type change information corresponding to the modified object, the relationship between the target object and the modified object, and the data type of the target object;
[0049] The modification information of the target object is determined to include data type change information corresponding to the target object.
[0050] In one implementation, the processing module is further configured to:
[0051] Obtain the processing logic information corresponding to the target object;
[0052] Determine the processing logic change information corresponding to the target object according to the data type change information corresponding to the target object and the processing logic information corresponding to the target object;
[0053] The modification information of the target object is determined to also include processing logic change information corresponding to the target object.
[0054] In a third aspect, an embodiment of the present application provides a computing device, including:
[0055] A processor, and a memory communicatively connected to the processor;
[0056] Memory is used to store computer executable instructions;
[0057] The processor is used to execute the computer-executable instructions stored in the memory to implement the method of the first aspect.
[0058] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method of the first aspect.
[0059] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which is used to implement the method of the first aspect when the computer program is executed by a processor.
[0060] The embodiment of the present application provides a modification method, apparatus, device, medium and program product for an associated data model. In the method, a computing device can obtain modification information of at least one modification object (table or field) in a data model. The computing device can determine at least one target object in the associated data model and the modification information of each target object when it is determined that the associated data model meets the modification condition based on the modification information of at least one modification object and the associated data model corresponding to the data model; wherein the relationship between the target object and the modification object is an equivalent relationship or an associated relationship. The computing device can modify the associated data model according to the modification information of each target object to obtain a modified associated data model. In the above manner, when the data model is modified, the synchronous modification of the associated data model is achieved, and the consistency between the data model and the associated data model is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0062] Figure 1 A schematic diagram of an application scenario applicable to an embodiment of the present application;
[0063] Figure 2 A flowchart of a first embodiment of a method for modifying an associated data model provided in an embodiment of the present application;
[0064] Figure 3 A flowchart of a second embodiment of a method for modifying an associated data model provided in an embodiment of the present application;
[0065] Figure 4 A flowchart of a third embodiment of a method for modifying an associated data model provided in an embodiment of the present application;
[0066] Figure 5 A schematic diagram of the structure of a device for modifying an associated data model provided in an embodiment of the present application;
[0067] Figure 6 A structural diagram of a computing device provided for this application. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by ordinary technicians in this field under the enlightenment of the embodiments belong to the scope of protection of the present application.
[0069] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0070] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of the data involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0071] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0072] Glossary:
[0073] Metadata information: It is data that describes data. It is mainly used to describe data attributes, such as data content, quality, status, etc., to support functions such as storage location, historical data, resource search, file records, etc. Metadata information is an electronic directory whose purpose is to help users retrieve and access databases and effectively utilize data resources.
[0074] Data model: It is an abstraction of data features. It describes the static features, dynamic behaviors and constraints of the system from an abstract level, and provides an abstract framework for information representation and operation of the database system. The content described by the data model consists of three parts: data structure, data operation and data constraints.
[0075] As the digital age deepens, data has gradually become a new type of production factor. Data is not only a data resource for enterprises, but also a valuable intangible asset. Driving decision-making, innovation and business growth through data value has become the development trend of today's data economy. Data assetization and data factorization have become key strategies for enterprises to enhance their competitiveness.
[0076] Due to the diversity of data sources, heterogeneity of data formats, and complexity of data processing, higher requirements are placed on enterprise data management capabilities and technology development levels. Metadata information management, as the cornerstone of data management, ensures the discoverability, understandability, and credibility of data, and provides the necessary support and framework for data assetization and data factorization.
[0077] The data model is the data in the pre-design stage of the data development process, and the metadata information of the table structure is the data that forms the result afterwards. In actual situations, the model information in the data model may be inconsistent with the metadata information of the table structure, so the data model needs to be modified based on the metadata information of the table structure.
[0078] However, in the related art, the modification of the data model may cause inconsistency between the data model and the data model associated with the data model (upstream data model or downstream data model), thereby causing data processing errors.
[0079] Therefore, there is an urgent need for a method for modifying a linked data model that can improve the consistency between a data model and a linked data model.
[0080] Based on the above technical problems, the embodiment of the present application provides a method for modifying an associated data model, which can determine whether the associated data model meets the modification conditions based on the modification information of at least one modification object in the data model and the associated data model corresponding to the data model when the data model is modified, and modify the associated data model when it is determined that the associated data model meets the modification conditions. In this way, the consistency between the data model and the associated data model is improved.
[0081] For ease of understanding, the following Figure 1 The examples are used to illustrate the application scenarios to which the embodiments of the present application are applicable.
[0082] For example, Figure 1 Schematic diagram of an application scenario applicable to the embodiment of the present application. Figure 1 As shown, the application scenario includes: a computing device 10, a database server 20, and a plurality of terminal devices. For example, Figure 1 Three terminal devices are shown, namely terminal device 30, terminal device 40 and terminal device 50. The computing device 10 can be communicatively connected with the database server 20 and multiple terminal devices respectively.
[0083] It should be noted that the computing device 10 is used to execute the method for modifying the associated data model.
[0084] The database is run on the database server 20. The modified first table structure in the database is a table structure generated based on the modified associated data model.
[0085] The plurality of terminal devices are used to review the modified associated data model.
[0086] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0087] Figure 2 A flowchart of a first embodiment of a method for modifying an associated data model provided in an embodiment of the present application. Figure 2 , the method specifically comprises the following steps:
[0088] S201: Acquire modification information of at least one modification object in a data model.
[0089] In this embodiment, the computing device may modify the data model.
[0090] Next, the process of modifying the data model by the computing device is described.
[0091] In one implementation, a computing device may obtain a comparison request (including an identifier of a table structure). The computing device may obtain a data model corresponding to the table structure according to the identifier of the table structure. The computing device may extract multiple metadata information of the table structure according to the identifier of the table structure. The computing device may perform a comparison process on multiple metadata information and multiple model information in the data model to obtain a comparison analysis result. If the comparison analysis result indicates that there is a difference between the metadata information and the model information in the data model, the computing device may perform a modification process on at least one modification object in the data model according to the comparison analysis result to obtain modification information of at least one modification object in the data model.
[0092] It should be noted that the modification object may be a table (or entity), and the modification object may also be a field, which is not limited in this embodiment of the present application.
[0093] The modification information of the modified object includes any one or more of the following:
[0094] Modify the attribute change information corresponding to the object; wherein the attribute change information includes name change information, default value change information, and / or constraint change information;
[0095] Modify the processing logic change information corresponding to the object; wherein the processing logic change information includes data conversion logic change information, calculation logic change information, and / or filtering condition change information;
[0096] Modify the data type change information corresponding to the object.
[0097] It should be noted that the computing device that modifies the data model and the computing device that modifies the associated data model may be the same computing device or different computing devices. The embodiments of the present application are not limited to this. In the case where the computing device that modifies the data model and the computing device that modifies the associated data model are different computing devices, one computing device (the computing device that modifies the associated data model) can obtain modification information of at least one modified object in the data model sent by another computing device (the computing device that modifies the data model).
[0098] S202: Determine whether the associated data model meets the modification condition according to the modification information of at least one modification object and the associated data model corresponding to the data model.
[0099] In this embodiment, after obtaining modification information of at least one modification object in the data model, the computing device may determine whether the associated data model meets the modification condition according to the modification information of the at least one modification object and the associated data model corresponding to the data model.
[0100] It should be noted that whether the associated data model meets the modification condition refers to whether the modification of the data model will affect the associated data model. If the modification of the data model will not affect the associated data model, the associated data model does not meet the modification condition; if the modification of the data model will affect the associated data model, the associated data model meets the modification condition.
[0101] If it is determined that the associated data model does not meet the modification condition, the process ends;
[0102] If it is determined that the associated data model meets the modification condition, S203 is executed.
[0103] In one implementation,
[0104] The computing device may determine whether there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object. In one implementation, the computing device may store the blood relationship (same or associated) between objects in different data models, and the computing device may determine whether there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object based on the blood relationship.
[0105] If not, the computing device may determine that the associated data model does not satisfy the modification condition. If the computing device determines that the associated data model does not satisfy the modification condition, the computing device may end, that is, not modify the associated data model.
[0106] If yes, the computing device may determine that the associated data model satisfies the modification condition. If the computing device determines that the associated data model satisfies the modification condition, S203 may be executed.
[0107] For example, for the modification object - field (score), the computing device may determine that the associated data model satisfies the modification condition if it is determined that there is a field (score) in the associated data model and the relationship between the field (score) and the modification object is an equivalent relationship.
[0108] For another example, with respect to the modification object - field (score), the computing device may determine that the associated data model satisfies the modification condition when it is determined that there is an object (ranking) in the associated data model and the relationship between the object and the modification object is an association relationship.
[0109] In addition, the process of the computing device obtaining the associated data model is described below.
[0110] In one implementation:
[0111] The computing device may obtain the initial model information. In one implementation, the computing device may determine the type of the database, determine the type of the data model, and obtain the initial model information according to the type of the data model. In one implementation, the computing device may connect to the database based on the database connection information, obtain metadata information of the table structure in the database, and determine the metadata information of the table structure in the database as the initial model information.
[0112] After acquiring the business subject information, the computing device may query the correspondence between the business subject information and the model building information based on the business subject information to determine the corresponding model building information.
[0113] The computing device may construct an associated data model based on the initial model information and the model construction information.
[0114] Next, the process of a computing device constructing a correspondence between business subject information and model construction information is described.
[0115] In one implementation:
[0116] The computing device may obtain the business subject information input by the user.
[0117] The computing device may obtain model building information input by the user. In one implementation, the display interface of the computing device may display data standard information. The computing device may obtain model building information input by the user. The model building information is input by the user based on the data standard displayed on the display interface of the computing device. The data standard may include metadata information standards, code standards, indicator standards, and terminology dictionaries. It should be noted that the model building information input by the user may include table design information and field design information.
[0118] The computing device may generate a correspondence between the business subject information and the model building information according to the business subject information and the model building information.
[0119] S203: Determine at least one target object in the associated data model, and determine modification information of each target object.
[0120] In this embodiment, the computing device may determine at least one target object in the associated data model when determining that the associated data model satisfies the modification condition.
[0121] The relationship between the target object and the modified object is an equivalent relationship or an associated relationship.
[0122] It should be noted that the relationship between the target object and the modified object is an equivalent relationship, which means that the target object in the associated data model directly copies the modified object in the data model to the associated data model, and the target object and the modified object are identical in structure and content.
[0123] The relationship between the target object and the modified object is an association relationship, which means that the target object in the associated data model has an association relationship with the modified object in the data model. The association relationship can be realized through a foreign key, a reference or other connection methods.
[0124] Additionally, the computing device may also determine modification information for each target object.
[0125] In one implementation:
[0126] When the modification information of the modified object includes property change information corresponding to the modified object, the computing device may determine the property change information corresponding to the target object based on the property change information corresponding to the modified object, the relationship between the target object and the modified object, and the property information of the target object.
[0127] The computing device may determine that the modification information of the target object includes attribute change information corresponding to the target object, wherein the attribute change information corresponding to the target object includes name change information, default value change information, and / or constraint change information.
[0128] For example, when the relationship between the target object and the modified object is an equivalent relationship, the name change information of the modified object is changed from "student name" to "student name", and accordingly, the name change information of the target object is changed from "student name" to "student name".
[0129] For another example, when the relationship between the target object and the modified object is an equivalent relationship, the default value change information of the modified object is changed from "10%" to "20%", and accordingly, the default value change information of the target object is changed from "10%" to "20%".
[0130] For another example, when the relationship between the target object and the modified object is an equivalent relationship, the constraint change information of the modified object is changed from "field length is less than 10" to "field length is less than 5", and accordingly, the constraint change information of the target object is changed from "field length is less than 10" to "field length is less than 5".
[0131] In one implementation:
[0132] When the modification information of the modified object includes processing logic change information corresponding to the modified object, the computing device can determine the processing logic change information corresponding to the target object based on the processing logic change information corresponding to the modified object, the relationship between the target object and the modified object, and the processing logic information of the target object.
[0133] The computing device may determine that the modification information of the target object includes processing logic change information corresponding to the target object, wherein the processing logic change information corresponding to the target object includes data conversion logic change information, calculation logic change information, and / or filtering condition change information.
[0134] For example, the filter condition change information of the modified object is changed from "filter out orders from female customers" to "filter out orders from female customers whose customers are over 60 years old". Correspondingly, the filter condition change information of the target object is changed from "filter out orders from female customers whose order ranking is in the top 10%" to "filter out orders from female customers whose order ranking is in the top 10% and whose customers are over 60 years old".
[0135] For another example, the calculation logic change information of the modified object (sales after discount) is changed from "sales × (1-discount rate)" to "sales - discount amount". Correspondingly, the calculation logic change information of the target object (total sales after discount) is changed from "SUM (sales × (1-discount rate))" to "SUM (sales - discount amount)".
[0136] For another example, the data conversion logic change information of the modified object (sales after discount) is changed from "unit is yuan" to "unit is ten thousand yuan", and accordingly, the data conversion logic change information of the target object (total sales after discount) is changed from "unit is yuan" to "unit is ten thousand yuan".
[0137] In one implementation:
[0138] When the modification information of the modified object includes data type change information corresponding to the modified object, the computing device can determine the data type change information corresponding to the target object based on the data type change information corresponding to the modified object, the relationship between the target object and the modified object, and the data type of the target object.
[0139] The computing device may determine that the modification information of the target object includes data type change information corresponding to the target object.
[0140] For example, the data type change information of the modified object (date) is changed from "character type" to "date type". The computing device may determine that the data type change information corresponding to the target object is changed from "character type" to "integer type" based on the data type change information of the modified object, the relationship between the modified object and the target object (the association relationship is to determine the quarter according to the month in the date and the months included in each quarter), and the data type (character type) corresponding to the target object.
[0141] In one implementation:
[0142] In the case where the modification information of the modified object includes data type change information corresponding to the modified object, the computing device may determine the data type change information corresponding to the target object based on the data type change information corresponding to the modified object.
[0143] The computing device can obtain the processing logic information corresponding to the target object.
[0144] The computing device may determine the processing logic change information corresponding to the target object according to the data type change information corresponding to the target object and the processing logic information corresponding to the target object.
[0145] The computing device may determine that the modification information of the target object includes data type change information corresponding to the target object and processing logic change information corresponding to the target object.
[0146] S204: modifying the associated data model according to the modification information of each target object to obtain a modified associated data model.
[0147] In this embodiment, after determining the modification information of each target object in the associated data model, the computing device may modify the associated data model according to the modification information of each target object to obtain a modified associated data model.
[0148] Beneficial effects of this embodiment: The computing device can obtain the modification information of at least one modification object (table or field) in the data model. The computing device can determine whether the associated data model meets the modification conditions based on the modification information of at least one modification object and the associated data model corresponding to the data model, and when it is determined that the associated data model meets the modification conditions, determine at least one target object in the associated data model (the relationship between the target object and the modification object is an equivalent relationship or an associated relationship), and determine the modification information of each target object. The computing device can modify the associated data model based on the modification information of each target object to obtain a modified associated data model. In the above manner, when the data model is modified, the synchronous modification of the associated data model is achieved, and the consistency between the data model and the associated data model is improved.
[0149] Figure 3 A flowchart of a second embodiment of a method for modifying an associated data model provided in an embodiment of the present application. Figure 3 , the method specifically comprises the following steps:
[0150] S301: Acquire modification information of at least one modification object in a data model.
[0151] In this embodiment, the computing device may obtain modification information of at least one modification object in the data model, wherein the modification object is a table or a field.
[0152] The specific implementation process is the same as S201 and will not be repeated here.
[0153] S302: Determine whether there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object.
[0154] In this embodiment, the computing device may determine whether there is an object in the association data model that has an equivalent relationship or an association relationship with the modification object.
[0155] The computing device may determine that the associated data model meets the modification condition if it is determined that there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object. The computing device may execute S303 if it is determined that the associated data model meets the modification condition.
[0156] The computing device may determine that the associated data model does not meet the modification condition if it is determined that there is no object in the associated data model that has an equivalent relationship or an associated relationship with the modified object. The computing device may not modify the associated data model if it is determined that the associated data model does not meet the modification condition.
[0157] S303: Determine at least one target object in the associated data model, and determine modification information of each target object.
[0158] In this embodiment, the computing device may determine at least one target object in the associated data model and determine modification information of each target object when determining that the associated data model satisfies the modification condition.
[0159] It should be noted that the relationship between the target object and the modified object is an equivalent relationship or an associated relationship.
[0160] The specific implementation process is the same as S203 and will not be repeated here.
[0161] S304: modifying the associated data model according to the modification information of each target object to obtain a modified associated data model.
[0162] In this embodiment, after determining the modification information of at least one target object in the associated data model, the computing device may modify the associated data model according to the modification information of each target object to obtain a modified associated data model.
[0163] The specific implementation process is the same as S204 and will not be repeated here.
[0164] S305: Generate a difference data definition language (DDL) statement according to the modified associated data model and the associated data model.
[0165] In this embodiment, after obtaining the modified associated data model, the computing device may generate a differential DDL statement according to the modified associated data model and the associated data model.
[0166] S306: Connect to the database according to the acquired database connection information, and execute the difference DDL statement to obtain the modified first table structure.
[0167] In this embodiment, after obtaining the difference DDL statement, the computing device can connect to the database according to the obtained database connection information. The database connection information includes the Internet Protocol Address of the database server, the port number, the name of the database, the user name, and / or the password. The database connection information may also include other information, which is not limited in this embodiment of the application.
[0168] In one implementation, the database connection information obtained by the computing device may be encrypted database connection information. After obtaining the database connection information, the computing device may first decrypt the database connection information and connect to the database according to the decrypted database connection information.
[0169] After connecting to the database, the computing device can execute the difference DDL statement to change the first table structure and obtain the modified first table structure in the database. It should be noted that the first table structure corresponds to the associated data model, and the modified first table structure corresponds to the modified associated data model.
[0170] In addition, it should be noted that:
[0171] After obtaining the modified first table structure, the computing device can store the acquired data in the modified first table structure. In one implementation, the computing device can also perform a quality check on the data stored in the modified first table structure according to the quality check rule. For example, the quality check rule is that the length of the field (ID number) is 18. The computing device can determine that the length of the ID number stored in the modified first table structure is not 18 according to the quality check rule, and then determine that the quality check fails. The computing device can generate a quality check problem list when it is determined that the quality check fails. The computing device can display the quality check problem list, and when obtaining the repair request input by the user, it can repair the data stored in the modified first table structure. In the above manner, the accuracy and consistency of data storage can be improved.
[0172] The computing device may respond to the comparison request (including the identifier of the modified first table structure) and obtain the data model corresponding to the modified first table structure, that is, the modified associated data model, according to the identifier of the modified first table structure in the comparison request.
[0173] The computing device may extract multiple metadata information of the modified first table structure according to the identifier of the modified first table structure. In one implementation, the computing device may clean and standardize the metadata information after extracting the multiple metadata information of the modified first table structure. In the above manner, the accuracy and completeness of the metadata information may be improved. In one implementation, the computing device may compare the metadata information obtained this time with the metadata information obtained by the computing device in response to the last comparison request, obtain the change information of the metadata information, and store the change information of the metadata information. In the above manner, the change information of the metadata information may be archived for subsequent inspection and tracking.
[0174] In one implementation, the computing device may further integrate metadata information of multiple table structures (including the modified first table structure) to obtain a data map. The computing device may perform display processing on the data map.
[0175] The computing device may perform comparison processing on the multiple metadata information and the multiple model information in the modified associated data model to obtain a comparison analysis result.
[0176] The computing device may modify the modified associated data model according to the comparison analysis result when it is determined that the comparison analysis result indicates that there is a difference between at least one metadata information and the model information in the modified associated data model. In this way, the consistency between the model information in the modified associated data model and the metadata information of the modified first table structure can be improved.
[0177] Beneficial effects of this embodiment: after obtaining the modification information of at least one modification object (table or field) in the data model, the computing device can determine whether there is an object in the associated data model whose relationship with the modification object is an equivalent relationship or an associated relationship. If so, it is determined that the associated data model meets the modification condition, and the computing device can determine at least one target object in the associated data model, and determine the modification information of each target object, and modify the associated data model according to the modification information of each target object to obtain the modified associated data model. In the above manner, it is achieved to accurately determine whether the associated data model meets the modification condition, and avoids the problem of directly modifying the associated data model in the case of data model modification, resulting in waste of computing resources. The computing device can generate a difference DDL statement based on the modified associated data model and the associated data model. The computing device can connect to the database according to the acquired database connection information, and execute the difference DDL statement to obtain the modified first table structure. In the above manner, the computing device modifies the first table structure, improves the consistency of the data stored in the first table structure and the data stored in the second table structure, and avoids the problems of data mismatch, data loss, and data unrecognition in the process of storing data in the first table structure or the second table structure.
[0178] Figure 4 This is a flow chart of a third embodiment of a method for modifying an associated data model provided in an embodiment of the present application. Figure 4 , the method specifically comprises the following steps:
[0179] S401: Acquire modification information of at least one modification object in a data model.
[0180] In this embodiment, the computing device may obtain modification information of at least one modification object in the data model, wherein the modification object is a table or a field.
[0181] The specific implementation process is the same as S201 and will not be repeated here.
[0182] S402: Determine whether there is an object in the association data model that has an equivalent relationship or an association relationship with the modified object.
[0183] In this embodiment, the computing device may determine whether there is an object in the association data model that has an equivalent relationship or an association relationship with the modification object.
[0184] If yes, the computing device may determine that the associated data model satisfies the modification condition. If the computing device determines that the associated data model satisfies the modification condition, S403 may be executed.
[0185] If not, the computing device may determine that the associated data model does not satisfy the modification condition. The computing device may not modify the associated data model if it determines that the associated data model does not satisfy the modification condition.
[0186] S403: Determine at least one target object in the associated data model, and determine modification information of each target object.
[0187] In this embodiment, the computing device may determine at least one target object in the associated data model and determine modification information of each target object when determining that the associated data model satisfies the modification condition.
[0188] It should be noted that the relationship between the target object and the modified object is an equivalent relationship or an associated relationship.
[0189] The specific implementation process is the same as S203 and will not be repeated here.
[0190] S404: modifying the associated data model according to the modification information of each target object to obtain a modified associated data model.
[0191] In this embodiment, after determining the modification information of at least one target object in the associated data model, the computing device may modify the associated data model according to the modification information of each target object to obtain a modified associated data model.
[0192] The specific implementation process is the same as S204 and will not be repeated here.
[0193] S405: Storing the modified associated data model in the data model library.
[0194] In this embodiment, the computing device may include a data model library. The data model library is used to store data models. In one implementation, the data model library may store multiple branch data models. For example, the data model library may store a data model of a development branch, a data model of a test branch, a data model of an online branch, and a data model of a patch branch. Exemplarily, the modified associated data model may be regarded as an associated data model of a patch branch.
[0195] After obtaining the modified associated data model, the computing device may store the modified associated data model in the data model library.
[0196] S406: Review the modified associated data model in the data model library, and after determining that the modified associated data model passes the review, generate a difference DDL statement based on the modified associated data model and the associated data model.
[0197] In this embodiment, the computing device may review the modified associated data model in the data model library.
[0198] After determining that the modified associated data model has passed the review, the computing device may generate a differential DDL statement according to the modified associated data model and the associated data model.
[0199] In one implementation:
[0200] The computing device may generate a model checking report based on the modified associated data model in the data model library and the pre-acquired review standard information.
[0201] The computing device may send the model checking report to a terminal device corresponding to the identity identifier of at least one review user. The terminal device may display the model checking report for review by the review user.
[0202] The terminal device can obtain the review result input by the review user and send the review result to the computing device.
[0203] After determining that the modified associated data model passes the review according to the review result, the computing device may generate a differential DDL statement according to the modified associated data model and the associated data model.
[0204] It should be noted that the model check report may include mark-fall check information and attribute check information, wherein the attribute check information may include name check information and constraint condition check information.
[0205] The bid-falling check information refers to determining the bid-falling rate of the associated data model according to the associated data model and the data standard. The computing device can adjust the associated data model according to the data standard when determining that the bid-falling rate of the associated data model is less than the preset bid-falling rate. In this way, the accuracy and completeness of the associated data model can be improved.
[0206] For example, for the field - related transaction amount, the data standard records the basic attributes of the field (including standard subject, directory, English name, English abbreviation, standard number, etc.), business attributes (business definition, business rules, naming rules, synonyms, etc.), technical attributes (data category, data format, data type, data length, precision, non-empty, etc.), and management attributes (business department, technical management department, authoritative system, standard source, etc.).
[0207] The name check information refers to checking whether the ratio of the sum of the number of table names that are Chinese names and the number of field names that are Chinese names to the total number of all tables and fields is greater than or equal to the preset number of Chinese names.
[0208] The constraint check information refers to checking whether the number of member fields of the index of the table structure exceeds 3, checking whether there is an empty index in the table structure (the index does not select a member field), checking whether the field length exceeds the preset length, checking whether the number of fields exceeds the preset number of fields, etc.
[0209] S407: Connect to the database according to the acquired database connection information, and execute the difference DDL statement to obtain the modified first table structure.
[0210] In this embodiment, after obtaining the differential DDL statement, the computing device may connect to the database according to the obtained database connection information.
[0211] After connecting to the database, the computing device can execute the difference DDL statement to change the first table structure and obtain the modified first table structure in the database. It should be noted that the first table structure corresponds to the associated data model, and the modified first table structure corresponds to the modified associated data model.
[0212] The specific implementation process is the same as S306 and will not be repeated here.
[0213] Beneficial effects of this embodiment: After the computing device modifies the associated data model according to the modification information of each target object and obtains the modified associated data model, the modified associated data model can be stored in the data model library. The computing device can review the modified associated data model in the data model library. After determining that the modified associated data model has passed the review, the computing device can generate a difference DDL statement based on the modified associated data model and the associated data model, and after connecting to the database, execute the difference DDL statement to obtain the modified first table structure. By the above-mentioned method of reviewing the modified associated data model, the standardization of the modified associated data model is improved.
[0214] Figure 5 A schematic diagram of a structural diagram of a device for modifying an associated data model provided in an embodiment of the present application. Figure 5 As shown, the modification device 50 of the associated data model includes: an acquisition module 51 and a processing module 52. Among them,
[0215] An acquisition module 51 is used to acquire modification information of at least one modification object in a data model; the modification object is a table or a field;
[0216] A processing module 52, configured to determine whether the associated data model satisfies a modification condition according to modification information of at least one modification object and an associated data model corresponding to the data model;
[0217] The processing module 52 is further used to determine at least one target object in the associated data model and determine the modification information of each target object when it is determined that the associated data model meets the modification condition; the relationship between the target object and the modification object is an equivalent relationship or an associated relationship;
[0218] The processing module 52 is further used to modify the associated data model according to the modification information of each target object to obtain a modified associated data model.
[0219] The device for modifying the associated data model provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0220] In one implementation, the processing module 52 is specifically configured to:
[0221] Determine whether there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object;
[0222] In the case where it is determined that there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modified object, it is determined that the associated data model satisfies the modification condition;
[0223] When it is determined that there is no object in the associated data model whose relationship with the modification object is an equivalent relationship or an associated relationship, it is determined that the associated data model does not satisfy the modification condition.
[0224] The device for modifying the associated data model provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0225] In one implementation, the modification information of the modified object includes any one or more of the following:
[0226] Modify the attribute change information corresponding to the object, modify the processing logic change information corresponding to the object, and modify the data type change information corresponding to the object.
[0227] The device for modifying the associated data model provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0228] In one implementation, the processing module 52 is specifically configured to:
[0229] In a case where the modification information of the modified object includes attribute change information corresponding to the modified object, determining the attribute change information corresponding to the target object according to the attribute change information corresponding to the modified object, the relationship between the target object and the modified object, and the attribute information of the target object;
[0230] Determine that the modification information of the target object includes attribute change information corresponding to the target object; wherein the attribute change information corresponding to the target object includes name change information, default value change information, and / or constraint change information.
[0231] The device for modifying the associated data model provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0232] In one implementation, the processing module 52 is specifically configured to:
[0233] In a case where it is determined that the modification information of the modified object includes processing logic change information corresponding to the modified object, determining the processing logic change information corresponding to the target object according to the processing logic change information corresponding to the modified object, the relationship between the target object and the modified object, and the processing logic information of the target object;
[0234] Determine that the modification information of the target object includes processing logic change information corresponding to the target object; wherein the processing logic change information corresponding to the target object includes data conversion logic change information, calculation logic change information, and / or filtering condition change information.
[0235] The device for modifying the associated data model provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0236] In one implementation, the processing module 52 is specifically configured to:
[0237] In a case where it is determined that the modification information of the modified object includes data type change information corresponding to the modified object, determining the data type change information corresponding to the target object according to the data type change information corresponding to the modified object, the relationship between the target object and the modified object, and the data type of the target object;
[0238] The modification information of the target object is determined to include data type change information corresponding to the target object.
[0239] The device for modifying the associated data model provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0240] In one implementation, the processing module 52 is further configured to:
[0241] Obtain the processing logic information corresponding to the target object;
[0242] Determine the processing logic change information corresponding to the target object according to the data type change information corresponding to the target object and the processing logic information corresponding to the target object;
[0243] The modification information of the target object is determined to also include processing logic change information corresponding to the target object.
[0244] The device for modifying the associated data model provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0245] Figure 6 This is a structural diagram of a computing device provided by this application. Figure 6 As shown, the computing device 60 includes a processor 61 and a memory 62. The processor 61 is in communication connection with the memory 62, and the memory 62 is used to store computer-executable instructions; the processor 61 is configured to execute the technical solution in any of the above method embodiments by executing the computer-executable instructions stored in the memory 62.
[0246] Optionally, the memory 62 may be independent or integrated with the processor 61. Optionally, when the memory 62 is a device independent of the processor 61, the computing device 60 may further include: a bus 63 for connecting the above devices.
[0247] The computing device is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principle and technical effects are similar and will not be repeated here.
[0248] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the technical solution provided by any of the aforementioned method embodiments.
[0249] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement the technical solution provided by the aforementioned method embodiment when executed by a processor.
[0250] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0251] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for modifying an associated data model, characterized in that: Applied to a computing device, the method comprises: Acquire modification information of at least one modification object in a data model; the modification object is a table or a field; Determining whether the associated data model satisfies a modification condition according to modification information of the at least one modification object and an associated data model corresponding to the data model; In the case where it is determined that the associated data model satisfies the modification condition, determining at least one target object in the associated data model, and determining modification information of each of the target objects; the relationship between the target object and the modification object is an equivalent relationship or an associated relationship; According to the modification information of each target object, the associated data model is modified to obtain a modified associated data model.
2. The method according to claim 1, characterized in that The determining, according to the modification information of the at least one modification object and the associated data model corresponding to the data model, whether the associated data model satisfies the modification condition comprises: Determine whether there is an object in the association data model that has an equivalent relationship or an association relationship with the modification object; In a case where it is determined that there is an object in the associated data model that has an equivalent relationship or an associated relationship with the modification object, determining that the associated data model satisfies the modification condition; When it is determined that there is no object in the associated data model that has an equivalent relationship or an associated relationship with the modification object, it is determined that the associated data model does not satisfy the modification condition.
3. The method according to claim 1 or 2, characterized in that: The modification information of the modification object includes any one or more of the following: The attribute change information corresponding to the modified object, the processing logic change information corresponding to the modified object, and the data type change information corresponding to the modified object.
4. The method according to claim 3, characterized in that The determining the modification information of each target object includes: In a case where the modification information of the modified object includes the property change information corresponding to the modified object, determining the property change information corresponding to the target object according to the property change information corresponding to the modified object, the relationship between the target object and the modified object, and the property information of the target object; Determine that the modification information of the target object includes attribute change information corresponding to the target object; wherein the attribute change information corresponding to the target object includes name change information, default value change information, and / or constraint change information.
5. The method according to claim 3, characterized in that: The determining the modification information of each target object includes: In a case where it is determined that the modification information of the modification object includes the processing logic change information corresponding to the modification object, determining the processing logic change information corresponding to the target object according to the processing logic change information corresponding to the modification object, the relationship between the target object and the modification object, and the processing logic information of the target object; Determine that the modification information of the target object includes processing logic change information corresponding to the target object; wherein the processing logic change information corresponding to the target object includes data conversion logic change information, calculation logic change information, and / or filtering condition change information.
6. The method according to claim 3, characterized in that The determining the modification information of each target object includes: In a case where it is determined that the modification information of the modified object includes data type change information corresponding to the modified object, determining the data type change information corresponding to the target object according to the data type change information corresponding to the modified object, the relationship between the target object and the modified object, and the data type of the target object; Determining the modification information of the target object includes data type change information corresponding to the target object.
7. The method according to claim 6, characterized in that The method further comprises: Acquire processing logic information corresponding to the target object; Determine the processing logic change information corresponding to the target object according to the data type change information corresponding to the target object and the processing logic information corresponding to the target object; Determine that the modification information of the target object also includes processing logic change information corresponding to the target object.
8. A device for modifying an associated data model, characterized in that: include: An acquisition module, used to acquire modification information of at least one modification object in the data model; The modification object is a table or a field; a processing module, configured to determine whether the associated data model satisfies a modification condition according to modification information of the at least one modification object and an associated data model corresponding to the data model; The processing module is further configured to determine at least one target object in the associated data model and determine modification information of each target object when it is determined that the associated data model satisfies the modification condition; the relationship between the target object and the modification object is an equivalent relationship or an associated relationship; The processing module is further used to modify the associated data model according to the modification information of each target object to obtain a modified associated data model.
9. A computing device, characterized in that include: A processor, and a memory communicatively connected to the processor; The memory is used to store computer-executable instructions; The processor is configured to execute the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method according to any one of claims 1 to 7.
11. A computer program product, characterized in that The invention comprises a computer program, which is used to implement the method according to any one of claims 1 to 7 when being executed by a processor.