CN116737695A - Data model association processing method and device, electronic equipment and storage medium - Google Patents

Data model association processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116737695A
CN116737695A CN202310742174.4A CN202310742174A CN116737695A CN 116737695 A CN116737695 A CN 116737695A CN 202310742174 A CN202310742174 A CN 202310742174A CN 116737695 A CN116737695 A CN 116737695A
Authority
CN
China
Prior art keywords
association
model
target
information
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310742174.4A
Other languages
Chinese (zh)
Inventor
吴健
李淑贤
吴雪东
李美平
何永刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuanguang Software Co Ltd
Original Assignee
Yuanguang Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuanguang Software Co Ltd filed Critical Yuanguang Software Co Ltd
Priority to CN202310742174.4A priority Critical patent/CN116737695A/en
Publication of CN116737695A publication Critical patent/CN116737695A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • G06F16/212Schema design and management with details for data modelling support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

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

Abstract

The application discloses a data model association processing method, a data model association processing device, electronic equipment and a storage medium. Wherein the method comprises the following steps: determining at least one target model from the plurality of models; determining an associated model associated with the target model from a plurality of models, wherein the associated attribute of the target model has a mapping relation with an associated main key in the associated model; generating target table data according to the association main key, the association attribute and the association mode between the target model and the association model, wherein the target table data at least comprises the same information to be processed between the first field information corresponding to the association attribute and the second field information corresponding to the association main key, the information related to the information to be processed in the target model and the information related to the information to be processed in the association model. The application solves the technical problem of low data association efficiency in the prior art when data association is carried out on data of different table files.

Description

Data model association processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and apparatus for processing association of a data model, an electronic device, and a storage medium.
Background
In the daily business data query analysis process, obvious association relations exist in different business information tables, but because no rule supporting automatic association of a model is formed, the query for the cross-data table is generally realized by a project development mode.
However, according to the actual association query requirement of the service, the association query attribute and rule are designed and the code development is performed, so that the requirements of flexible association query analysis at any time cannot be met. In addition, as a plurality of associatively expanded attributes exist in one business entity, different attributes may need to be associated in different query scenes, and association of all the attributes is expanded at one time through a code form, so that the problems of larger performance load and loss of a database are caused, and a user cannot enter the query quickly.
Therefore, in the prior art, the problem of low data association efficiency exists when data association is performed on data of different table files.
Disclosure of Invention
The application provides a data model association processing method, a data model association processing device, electronic equipment and a storage medium, which at least solve the technical problem of low data association efficiency in the prior art when data of different table files are associated.
According to one aspect of the present application, there is provided a data model association processing method, including: determining at least one target model from a plurality of models, wherein the model is a data model consisting of at least one table file in a database, and the target model is any model in the plurality of models; determining an associated model associated with the target model from a plurality of models, wherein the associated attribute of the target model has a mapping relation with an associated main key in the associated model, the associated attribute is a field in one table file corresponding to the target model, and the associated main key is a field in one table file corresponding to the associated model; generating target table data according to the association main key, the association attribute and the association mode between the target model and the association model, wherein the target table data at least comprises the same information to be processed between the first field information corresponding to the association attribute and the second field information corresponding to the association main key, the information related to the information to be processed in the target model and the information related to the information to be processed in the association model.
Optionally, the association processing method of the data model further includes: before determining an associated model associated with a target model from a plurality of models, acquiring an associated rule corresponding to each model in the plurality of models, wherein the associated rule corresponding to each model is used for defining the model associated with each model, the associated attribute of each model and the associated main key of the model associated with each model, and a mapping relation exists between the associated attribute and the associated main key; and recording the association rule in an association relation record table, wherein the association relation record table is a table file in a database.
Optionally, the association processing method of the data model further includes: reading an association relation record table from a database; determining an association rule corresponding to the target model according to the association relation record table; and determining an association model associated with the target model, association attributes of the target model and an association main key in the association model according to the association rule corresponding to the target model.
Optionally, the association processing method of the data model further includes: inquiring from the target model to obtain first field information corresponding to the associated attribute, and inquiring from the associated model to obtain second field information corresponding to the associated main key; combining the same information in the second field information and the first field information into information to be processed; and generating target table data according to the information to be processed and the association mode.
Optionally, the association processing method of the data model further includes: before generating target table data according to the association main key, the association attribute and the association mode between the target model and the association model, determining the association mode between the target model and the association model as a first association mode or a second association mode, wherein the first association mode is used for associating and inquiring first target information in the target model and second target information in the association model, the second association mode is used for associating and inquiring second target information in the association model and all field information in the target model, the first target information is information related to the first field information in the target model, and the second target information is information related to the second field information in the association model.
Optionally, the association processing method of the data model further includes: under the condition that the association mode is a first association mode, information which is in the same table file and in the same row with information to be processed in the target model is used as first target information; the information which is in the same table file and in the same row with the information to be processed in the association model is used as second target information; and generating target table data according to the information to be processed, the first target information and the second target information.
Optionally, the association processing method of the data model further includes: under the condition that the association mode is a second association mode, taking information which is in the same table file and in the same row as information to be processed in the association model as second target information, and taking all information except the information to be processed in the target model as third target information; and generating target table data according to the information to be processed, the second target information and the third target information.
According to another aspect of the present application, there is also provided an association processing apparatus of a data model, including: a first determining unit, configured to determine at least one target model from a plurality of models, where the model is a data model composed of at least one table file in a database, and the target model is any one of the plurality of models; a second determining unit, configured to determine, from a plurality of models, an association model associated with the target model, where an association attribute of the target model has a mapping relationship with an association primary key in the association model, the association attribute is a field in one table file corresponding to the target model, and the association primary key is a field in one table file corresponding to the association model; the generation unit is used for generating target table data according to the association main key, the association attribute and the association mode between the target model and the association model, wherein the target table data at least comprises the same information to be processed between the first field information corresponding to the association attribute and the second field information corresponding to the association main key, the information related to the information to be processed in the target model and the information related to the information to be processed in the association model.
According to another aspect of the present application, there is also provided a computer readable storage medium, in which a computer program is stored, wherein the computer readable storage medium is controlled to execute the association processing method of the data model of any one of the above items by a device in which the computer readable storage medium is located when the computer program is executed.
According to another aspect of the present application, there is also provided an electronic device, wherein the electronic device includes one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for associating processing of the data model of any of the above.
In the method, a mode of establishing association relations among a plurality of models is adopted, at least one target model is firstly determined from the plurality of models, then an association model associated with the target model is determined from the plurality of models, wherein the model is a data model consisting of at least one table file in a database, and the target model is any one model of the plurality of models; the association attribute of the target model has a mapping relation with an association main key in the association model, the association attribute is a field in one table file corresponding to the target model, and the association main key is a field in one table file corresponding to the association model. And finally, generating target table data according to the associated main key, the associated attribute and the associated mode between the target model and the associated model, wherein the target table data at least comprises the same information to be processed between the first field information corresponding to the associated attribute and the second field information corresponding to the associated main key, the information related to the information to be processed in the target model and the information related to the information to be processed in the associated model.
According to the method, the system and the device, the aim of automatically associating the object models to obtain the associated model with the associated relation with the object models after determining one object model from a plurality of models and inquiring the object models to obtain the object table data with the correlation of the two models is fulfilled by establishing the association mode of the object models and the associated models and the mapping relation between the associated attribute of the object models and the associated main key in the associated models, so that unnecessary software project development work is avoided, development cost is saved, and meanwhile, the data association efficiency in data association of different table files is improved.
Therefore, the technical scheme of the application realizes the purpose of accurately associating different data models to map associated data in different models under the condition of no need of code development, thereby avoiding the technical defects of high development cost and low model association efficiency caused by code development work, and further solving the technical problem of low data association efficiency in the prior art when data of different table files are associated.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of an alternative method of association processing of a data model in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of the use of a data processing system according to an embodiment of the present application;
FIG. 3 is a flow chart of an alternative generation of target table data according to an embodiment of the application;
FIG. 4 is a schematic diagram of an alternative data processing system in accordance with an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative data model association processing apparatus in accordance with an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the related information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
The application is further illustrated below in conjunction with the examples.
Example 1
In the daily business data query analysis process, obvious association relations exist in different business information tables, but no rule supporting automatic association of the models is formed, so that the association of the models is generally realized by adopting a project type software development mode aiming at a query scene at present, but the software development mode does not meet the increasing flexible query analysis requirement due to time and labor consumption.
In particular, existing software development-based approaches to implementing the association of different data models suffer from at least the following problems.
1. The business relation is clear and definable between different models of the business system, such as the relation between an analysis model main table and a sub-table, the relation between an object type attribute in a business bill and a management object model, and the like, but because no association record is formed in the business system, a user cannot quickly determine the relation model when encountering a scene needing association analysis, and the work of association modeling is difficult to be carried out smoothly.
2. The same analysis field in the analysis model may have multi-scene association relation with a plurality of data models, and it is difficult for an ordinary user who is not proficient in business to accurately learn the multi-scene association relation of the analysis model.
3. The conventional model association mode needs to manually define the association relation of the main key and the external key between the models, the process is complicated and complicated, and the required technical threshold is high, so that the requirements of general users on simple and quick realization of association modeling are difficult to meet.
In order to solve the above-described problems, according to an embodiment of the present application, there is provided an embodiment of an association processing method of a data model, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
FIG. 1 is a flow chart of an alternative method of data model association processing, as shown in FIG. 1, according to an embodiment of the present application, the method comprising the steps of:
step S101 of determining at least one target model from a plurality of models.
In step S101, the model is a data model composed of at least one table file in a database, and the target model is any one of a plurality of models.
Optionally, in an embodiment of the present application, a data processing system is provided as an execution body of the association processing method of the data model in the embodiment of the present application, where the data processing system may be a software system or an embedded system.
Alternatively, the plurality of models may be a plurality of data models deployed in a database corresponding to the business system. The business system is a software system developed based on a database and used in different business fields, such as an accounting software system used in the financial business field, a software system used in the logistics business field and used for correlating logistics data, and a software system used in the production business field and used for managing production data.
In addition, each model is composed of at least one table file (also referred to as a data table) in the database, for example, table 1 shows an alternative data model composed based on one table file according to an embodiment of the present application.
TABLE 1
Time Document numbering Payee(s) Payment person Payment amount Payment item
2023.01.02 0011 AAA BBBB 10000 Salary (payroll)
In step S102, an associated model associated with the target model is determined from among the plurality of models.
In step S102, the association attribute of the target model has a mapping relationship with the association primary key in the association model, where the association attribute is a field in one table file corresponding to the target model, and the association primary key is a field in one table file corresponding to the association model.
Optionally, an association record table is pre-deployed in the data processing system, where the association record table is used to record whether an association exists between any two models in the multiple models, and an association mode between any two models with the association exists, and a field specifically associated in any two models with the association exists.
Further, after determining the target model, the data processing system may determine an association model associated with the target model from a plurality of models according to the association relation record table, where the association model may be one or a plurality of association models. In addition, the data processing system may determine, according to the association record table, which fields are specifically associated with the object model and the association model, where, for illustration, a field in the object model that implements an association relationship with the association model may be referred to as an association attribute of the object model, and a field in the association model that implements an association relationship with the object model may be referred to as an association primary key of the association model.
For example, table 2 shows another alternative data model according to an embodiment of the present application.
TABLE 2
Unit name Payment time Payment account Payment responsible person
BBB 2023.01.01 1023356 FF
Assuming that table 1 is a target model and table 2 is an association model corresponding to table 1, the "payer" field in table 1 may be an association attribute of the target model (table 1), and the "unit name" field in table 2 may be an association primary key of the association model (table 2).
Step S103, generating target table data according to the associated main key, the associated attribute and the association mode between the target model and the associated model.
In step S103, the target table data includes at least the same information to be processed between the first field information corresponding to the association attribute and the second field information corresponding to the association primary key, the information related to the information to be processed in the target model, and the information related to the information to be processed in the association model.
Optionally, to implement data association analysis between the target model and the association model, the data processing system may query the target model and the association model for associated data based on the association primary key, the association attribute, and the association manner between the target model and the association model, and then generate one target table data, so as to assist the usage object of the data processing system in performing association analysis on the data in different table files.
For example, based on tables 1 and 2, the data processing system may generate table 3 as target table data for the user to perform the association analysis of tables 1 and 2.
TABLE 3 Table 3
Based on the content of the steps S101 to S103, in the present application, a manner of establishing an association relationship between a plurality of models is adopted, at least one target model is first determined from the plurality of models, and then an association model associated with the target model is determined from the plurality of models, wherein the model is a data model composed of at least one table file in a database, and the target model is any one of the plurality of models; the association attribute of the target model has a mapping relation with an association main key in the association model, the association attribute is a field in one table file corresponding to the target model, and the association main key is a field in one table file corresponding to the association model. And finally, generating target table data according to the associated main key, the associated attribute and the associated mode between the target model and the associated model, wherein the target table data at least comprises the same information to be processed between the first field information corresponding to the associated attribute and the second field information corresponding to the associated main key, the information related to the information to be processed in the target model and the information related to the information to be processed in the associated model.
According to the method, the system and the device, the aim of automatically associating the object models to obtain the associated model with the associated relation with the object models after determining one object model from a plurality of models and inquiring the object models to obtain the object table data with the correlation of the two models is fulfilled by establishing the association mode of the object models and the associated models and the mapping relation between the associated attribute of the object models and the associated main key in the associated models, so that unnecessary software project development work is avoided, development cost is saved, and meanwhile, the data association efficiency in data association of different table files is improved.
Therefore, the technical scheme of the application realizes the purpose of accurately associating different data models to map associated data in different models under the condition of no need of code development, thereby avoiding the technical defects of high development cost and low model association efficiency caused by code development work, and further solving the technical problem of low data association efficiency in the prior art when data of different table files are associated.
In an alternative embodiment, before determining the association model associated with the target model from the plurality of models, the data processing system may obtain association rules corresponding to each model in the plurality of models, where the association rules corresponding to each model are used to define the model associated with each model, the association attribute of each model, and the association primary key of the model associated with each model, and a mapping relationship exists between the association attribute and the association primary key. The data processing system then records the association rule in an association record table, wherein the association record table is a table file in the database.
Further, in order to determine an associated model associated with the target model from the plurality of models, the data processing system may read the association record table from the database, then determine an association rule corresponding to the target model according to the association record table, and finally determine the associated model associated with the target model, the association attribute of the target model, and the association primary key in the associated model according to the association rule corresponding to the target model.
Optionally, fig. 2 is a flowchart illustrating a usage of a data processing system according to an embodiment of the present application, as shown in fig. 2, first, a developer organizes common, definable, general and abstractable association rules among a plurality of data models according to a model association type of a service system, records a relationship type, a corresponding association attribute and an association primary key among the models through an association record table, and stores the association record table in the data processing system.
Then, the data analyst enters an analysis model management function page of the data processing system, and selects and maintains 2 or more models from a plurality of models corresponding to the service system as models to be analyzed and saves the models (for example, analysis model a, analysis model B, and analysis model C in fig. 2).
Further, the data analyst enters a model association setting function page, after selecting an analysis model as a target model, and enters a relation model selection window, the data processing system searches whether an association model corresponding to the target model exists according to an association relation record table, if so, the data analyst recommends the association model to the page for selection by the data analyst, and simultaneously returns the relation type corresponding to the target model and the association model, the association attribute of the target model and the association main key of the association model. When the association model is selected, the data processing system automatically fills the corresponding association rule according to the association relation record table.
And finally, the data analyst enters an analysis chart generation page, selects a stored association model, and can perform perspective analysis and visualization chart generation on the associated business data.
According to the method, the device and the system, different from the prior art that the data association of different models is realized through a customizing development hard coding mode, the application provides a set of front-end page functions for automatically realizing the association of analysis models, and the association rules among the models are combed and defined to form an association relation record table, so that the purposes of automatically matching and recommending association attributes for users to select are realized by combining the front-end page functions.
In an alternative embodiment, FIG. 3 is an alternative flow chart for generating target table data, as shown in FIG. 3, according to an embodiment of the application, including the steps of:
step S301, inquiring from a target model to obtain first field information corresponding to the association attribute, and inquiring from the association model to obtain second field information corresponding to the association main key;
step S302, merging the same information in the second field information and the first field information into information to be processed;
step S303, generating target table data according to the information to be processed and the association mode.
Optionally, the association attribute of the target model and the association primary key of the association model are also recorded in the association record table, so that the data processing system can determine the association attribute of the target model according to the association record table and determine the field information corresponding to the association attribute as the first field information, and meanwhile, the data processing system can determine the association primary key of the association model according to the association record table and determine the field information corresponding to the association primary key as the second field information.
It should be noted that, because the meaning of the field actually expressed by the association attribute and the association primary key is the same, but in different data forms, the actual field information corresponding to the association attribute and the association primary key may have partially the same content, so the data processing system may combine the same information in the second field information and the first field information into the information to be processed, and then generate the target table data according to the information to be processed and the association mode between the association model and the target model.
In an alternative embodiment, before generating the target table data according to the association key, the association attribute and the association mode between the target model and the association model, the data processing system determines the association mode between the target model and the association model as a first association mode or a second association mode, wherein the first association mode is used for associating first target information in the query target model and second target information in the association model, the second association mode is used for associating second target information in the query target model and all field information in the target model, the first target information is information related to the first field information in the target model, and the second target information is information related to the second field information in the association model.
Optionally, the first association manner is also referred to as an internal association manner, and the internal association manner is mainly used for associating information related to the first field information in the target model and information related to the second field information in the association model.
The second association mode is also called a left association mode, and the left association mode is mainly to associate information related to the second field information in the association model with all field information in the target model on the basis of reserving all field information in the target model.
Specifically, when the association mode is the first association mode, the data processing system takes information which is in the same table file and in the same row as information to be processed in the target model as first target information, takes information which is in the same table file and in the same row as information to be processed in the association model as second target information, and finally, the data processing system generates target table data according to the information to be processed, the first target information and the second target information.
Alternatively, assume that table 4 is a target model, and table 5 is an associated model corresponding to the target model.
TABLE 4 Table 4
Time Document encoding Contract unit Payee(s) Payment amount
1-3 00002 Units A-1 Units A-1 2000
1-6 00005 Units B-1 Units C-1 600
1-8 00006 Units C-1 Units C-1 320
TABLE 5
Unit name The region of the area Person in charge of unit
Units A-1 East China Responsible person 1
Units B-1 South China Responsible person 2
Alternatively, assuming that the association scheme between table 4 and table 5 is an internal association scheme, when association is performed with "payee" of table 4 as the association attribute and "unit name" of table 5 as the association primary key, target table data (table 6) may be generated.
TABLE 6
In table 6, the field information "unit a-1" under the "payee" field is the same information in the second field information and the first field information, i.e., information to be processed. Meanwhile, the information in the same line as the information to be processed in table 4 is the information in the second line in table 4, i.e. the first target information, and the information in the same line as the information to be processed in table 5 is the information in the second line in table 5, i.e. the second target information. As can be seen from table 6, table 6 also contains the first target information and the second target information in addition to the information to be processed.
In an alternative embodiment, in the case that the association mode is the second association mode, the data processing system takes information which is in the same table file and in the same row as the information to be processed in the association model as second target information, and takes all information except the information to be processed in the target model as third target information. And finally, the data processing system generates target table data according to the information to be processed, the second target information and the third target information.
Alternatively, assuming that the association scheme between table 4 and table 5 is a left association scheme, when association is performed with "contract unit" of table 4 as the association attribute and "unit name" of table 5 as the association primary key, target table data (table 7) may be generated.
TABLE 7
In table 7, the field information "unit a-1" and "unit B-1" under the "contract unit" field are the same information in the second field information and the first field information, i.e., information to be processed. Meanwhile, the information in the same line as the information to be processed in table 5 is the information in the second line and the third line in table 5, that is, the second target information, and all the information except the information to be processed in table 4 is the third target information. As can be seen from table 7, table 7 also contains the second target information and the third target information in addition to the information to be processed.
In an alternative embodiment, FIG. 4 illustrates a schematic diagram of an alternative data processing system in accordance with an embodiment of the present application. As shown in fig. 4, the data processing system includes: the system comprises a management rule generation controller, a model recommendation association controller, an association model query controller and a data conversion rule controller.
And the management rule generation controller is used for realizing automatic generation and updating of association rules of various standard business models in service initialization and operation.
Specifically, the management rule generation controller may define association types among a plurality of data models commonly used in the service system, such as a relationship between an analysis model main table and a sub-table, a relationship between an object type attribute in a service bill and a management object model, and the like; the management rule generation controller may also define a default relationship type between the analysis models, i.e. designate the association between two models as either a left association or an internal association. The management rule generation controller also provides a back-end service/association relation record table, wherein the association relation record table is used for recording association rules among common entity models in the business system and respectively recording relation types, association attributes and association main keys.
In addition, the model recommendation association controller is used for automatically pushing and recommending an association model associated with the target model to the user according to the target model selected by the user when multi-table association modeling is carried out.
Specifically, the model recommendation association controller can automatically identify and match a corresponding association model according to fields in the target model, and record association attributes corresponding to the target model and association main keys corresponding to the association model, wherein the model recommendation association controller supports that one association attribute is matched with a plurality of association main keys, and the plurality of association main keys correspond to different association models, such as a business bill payee field, comprising two attributes of staff and business units, and obtains an object attribute model of payee support selection associated with the staff or the business units through automatic matching.
In addition, the association model query controller is used for generating a multi-table association query statement according to the message setting of the multi-table association modeling when the analysis model query is executed. Query and return data queries.
Specifically, the association model query controller determines an association primary key corresponding to the association attribute according to the association attribute of the target model, for example, the association attribute is a business document payee field, and matches to obtain a worker object ID corresponding to the association primary key is a payee object ID or a unit object ID corresponding to the payee object ID.
And finally, a data conversion rule controller is used for realizing automatic conversion control of the data of the multi-table association model field columns.
According to the method, the device and the system, data association of different models is achieved through a customized development hard coding mode in the prior art, a set of association rules among the models are combed and defined to form an association relation record table, and the purpose of automatically matching and recommending association attributes for users to select is achieved by combining the front-end page function.
Example 2
The present embodiment provides an association processing apparatus of a data model, each implementation unit/module in the apparatus corresponding to each implementation step in embodiment 1.
FIG. 5 is a schematic diagram of an alternative data model association processing apparatus according to an embodiment of the present application, and as shown in FIG. 5, the data model association processing apparatus includes the following units: a first determination unit 501, a second determination unit 502, and a generation unit 503.
A first determining unit 501, configured to determine at least one target model from a plurality of models, where the model is a data model composed of at least one table file in a database, and the target model is any one of the plurality of models; a second determining unit 502, configured to determine, from a plurality of models, an association model associated with the target model, where an association attribute of the target model has a mapping relationship with an association primary key in the association model, the association attribute is a field in one table file corresponding to the target model, and the association primary key is a field in one table file corresponding to the association model; the generating unit 503 is configured to generate target table data according to the association primary key, the association attribute, and an association manner between the target model and the association model, where the target table data at least includes the same information to be processed between the first field information corresponding to the association attribute and the second field information corresponding to the association primary key, the information related to the information to be processed in the target model, and the information related to the information to be processed in the association model.
Optionally, the association processing device of the data model further includes: an acquisition unit and a recording unit. The system comprises an acquisition unit, a mapping unit and a mapping unit, wherein the acquisition unit is used for acquiring an association rule corresponding to each model in a plurality of models, wherein the association rule corresponding to each model is used for defining a model associated with each model, an association attribute of each model and an association main key of the model associated with each model, and a mapping relationship exists between the association attribute and the association main key; and the recording unit is used for recording the association rule in an association relation record table, wherein the association relation record table is a table file in the database.
Optionally, the first determining unit includes: the system comprises a reading subunit, a first determining subunit and a second determining subunit. The reading subunit is used for reading the association relation record table from the database; the first determining subunit is used for determining the association rule corresponding to the target model according to the association relation record table; and the second determining subunit is used for determining the association model associated with the target model, the association attribute of the target model and the association main key in the association model according to the association rule corresponding to the target model.
Optionally, the generating unit includes: query subunit, merge subunit, and generate subunit. The query subunit is used for querying and obtaining first field information corresponding to the association attribute from the target model, and querying and obtaining second field information corresponding to the association main key from the association model; the merging subunit is used for merging the same information in the second field information and the first field information into information to be processed; and the generating subunit is used for generating target table data according to the information to be processed and the association mode.
Optionally, the association processing device of the data model further includes: the third determining unit is configured to determine that an association manner between the target model and the association model is a first association manner or a second association manner, where the first association manner is used to associate and query first target information in the target model and second target information in the association model, and the second association manner is used to associate and query second target information in the association model and all field information in the target model, where the first target information is information related to the first field information in the target model, and the second target information is information related to the second field information in the association model.
Optionally, the generating subunit includes: the system comprises a first target information processing module, a second target information processing module and a generating module. The first target information processing module is used for taking information which is in the same table file and in the same row as information to be processed in the target model as first target information under the condition that the association mode is a first association mode; the second target information processing module is used for taking the information which is in the same table file and in the same row as the information to be processed in the association model as second target information; and the generating module is used for generating target table data according to the information to be processed, the first target information and the second target information.
Optionally, the generating subunit includes: and a third target information processing module and a first generation module. The third target information processing module is used for taking information which is in the same table file and in the same row as the information to be processed in the association model as second target information and taking all information except the information to be processed in the target model as third target information under the condition that the association mode is a second association mode; the first generation module is used for generating target table data according to the information to be processed, the second target information and the third target information.
Example 3
According to another aspect of the embodiment of the present application, there is also provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the associated processing method of the data model of any of the above-described embodiments 1 via execution of executable instructions.
Fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 6, an embodiment of the present application provides an electronic device, where the electronic device includes a processor, a memory, and a program stored in the memory and capable of running on the processor, and the processor implements the method for associating the data models in embodiment 1 when executing the program.
Alternatively, the following steps may be implemented when the processor executes the program:
determining at least one target model from a plurality of models, wherein the model is a data model consisting of at least one table file in a database, and the target model is any model in the plurality of models; determining an associated model associated with the target model from a plurality of models, wherein the associated attribute of the target model has a mapping relation with an associated main key in the associated model, the associated attribute is a field in one table file corresponding to the target model, and the associated main key is a field in one table file corresponding to the associated model; generating target table data according to the association main key, the association attribute and the association mode between the target model and the association model, wherein the target table data at least comprises the same information to be processed between the first field information corresponding to the association attribute and the second field information corresponding to the association main key, the information related to the information to be processed in the target model and the information related to the information to be processed in the association model.
Optionally, the following steps may be implemented when the processor executes the program: before determining an associated model associated with a target model from a plurality of models, acquiring an associated rule corresponding to each model in the plurality of models, wherein the associated rule corresponding to each model is used for defining the model associated with each model, the associated attribute of each model and the associated main key of the model associated with each model, and a mapping relation exists between the associated attribute and the associated main key; and recording the association rule in an association relation record table, wherein the association relation record table is a table file in a database.
Optionally, the following steps may be implemented when the processor executes the program: reading an association relation record table from a database; determining an association rule corresponding to the target model according to the association relation record table; and determining an association model associated with the target model, association attributes of the target model and an association main key in the association model according to the association rule corresponding to the target model.
Optionally, the following steps may be implemented when the processor executes the program: inquiring from the target model to obtain first field information corresponding to the associated attribute, and inquiring from the associated model to obtain second field information corresponding to the associated main key; combining the same information in the second field information and the first field information into information to be processed; and generating target table data according to the information to be processed and the association mode.
Optionally, the following steps may be implemented when the processor executes the program: before generating target table data according to the association main key, the association attribute and the association mode between the target model and the association model, determining the association mode between the target model and the association model as a first association mode or a second association mode, wherein the first association mode is used for associating and inquiring first target information in the target model and second target information in the association model, the second association mode is used for associating and inquiring second target information in the association model and all field information in the target model, the first target information is information related to the first field information in the target model, and the second target information is information related to the second field information in the association model.
Optionally, the following steps may be implemented when the processor executes the program: under the condition that the association mode is a first association mode, information which is in the same table file and in the same row with information to be processed in the target model is used as first target information; the information which is in the same table file and in the same row with the information to be processed in the association model is used as second target information; and generating target table data according to the information to be processed, the first target information and the second target information.
Optionally, the following steps may be implemented when the processor executes the program: under the condition that the association mode is a second association mode, taking information which is in the same table file and in the same row as information to be processed in the association model as second target information, and taking all information except the information to be processed in the target model as third target information; and generating target table data according to the information to be processed, the second target information and the third target information.
Example 4
According to another aspect of the embodiment of the present application, there is further provided a computer readable storage medium, where the computer readable storage medium includes a stored computer program, where the computer program when executed controls a device in which the computer readable storage medium is located to execute the method for associating the data model in embodiment 1.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of units may be a logic function division, and there may be another division manner in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method for processing association of a data model, comprising:
determining at least one target model from a plurality of models, wherein the model is a data model consisting of at least one table file in a database, and the target model is any one model in the plurality of models;
determining an associated model associated with the target model from the multiple models, wherein an associated attribute of the target model has a mapping relation with an associated primary key in the associated model, the associated attribute is a field in one table file corresponding to the target model, and the associated primary key is a field in one table file corresponding to the associated model;
generating target table data according to the association main key, the association attribute and the association mode between the target model and the association model, wherein the target table data at least comprises the same information to be processed between the first field information corresponding to the association attribute and the second field information corresponding to the association main key, the information related to the information to be processed in the target model and the information related to the information to be processed in the association model.
2. The association processing method of a data model according to claim 1, wherein before determining an association model associated with the target model from the plurality of models, the association processing method of a data model further comprises:
acquiring an association rule corresponding to each model in the plurality of models, wherein the association rule corresponding to each model is used for defining a model associated with each model, association attributes of each model and an association primary key of the model associated with each model, and a mapping relation exists between the association attributes and the association primary key;
and recording the association rule in an association relation record table, wherein the association relation record table is a table file in the database.
3. The association processing method of a data model according to claim 2, wherein determining an association model associated with the target model from the plurality of models, comprises:
reading the association relation record table from the database;
determining an association rule corresponding to the target model according to the association relation record table;
and determining an association model associated with the target model, association attributes of the target model and an association main key in the association model according to association rules corresponding to the target model.
4. The method according to claim 1, wherein generating target table data according to the association key, the association attribute, and the association manner between the target model and the association model, comprises:
inquiring from the target model to obtain first field information corresponding to the association attribute, and inquiring from the association model to obtain second field information corresponding to the association main key;
combining the same information in the second field information and the first field information into the information to be processed;
and generating the target table data according to the information to be processed and the association mode.
5. The method according to claim 4, wherein before generating target table data according to the association key, the association attribute, and the association pattern between the target model and the association model, the method further comprises:
determining that the association mode between the target model and the association model is a first association mode or a second association mode, wherein the first association mode is used for associatively inquiring first target information in the target model and second target information in the association model, and the second association mode is used for associatively inquiring second target information in the association model and all field information in the target model, wherein the first target information is information related to the first field information in the target model, and the second target information is information related to the second field information in the association model.
6. The method according to claim 5, wherein generating the target table data according to the information to be processed and the association manner, comprises:
when the association mode is the first association mode, information which is in the same table file and in the same row with the information to be processed in the target model is used as the first target information;
the information which is in the same table file and in the same row with the information to be processed in the association model is used as the second target information;
and generating the target table data according to the information to be processed, the first target information and the second target information.
7. The method according to claim 5, wherein generating the target table data based on the target information and the association manner, comprises:
when the association mode is the second association mode, taking information which is in the same table file and in the same row as the information to be processed in the association model as the second target information, and taking all information except the information to be processed in the target model as third target information;
And generating the target table data according to the information to be processed, the second target information and the third target information.
8. An association processing apparatus for a data model, comprising:
a first determining unit, configured to determine at least one target model from a plurality of models, where the model is a data model composed of at least one table file in a database, and the target model is any one of the plurality of models;
a second determining unit, configured to determine, from the multiple models, an association model associated with the target model, where an association attribute of the target model has a mapping relationship with an association primary key in the association model, the association attribute is a field in one table file corresponding to the target model, and the association primary key is a field in one table file corresponding to the association model;
the generation unit is used for generating target table data according to the association main key, the association attribute and the association mode between the target model and the association model, wherein the target table data at least comprises the same information to be processed between the first field information corresponding to the association attribute and the second field information corresponding to the association main key, the information related to the information to be processed in the target model and the information related to the information to be processed in the association model.
9. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and wherein the computer program, when executed, controls a device in which the computer-readable storage medium is located to perform the method for associating the data model according to any one of claims 1 to 7.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of correlation processing of data models of any of claims 1-7.
CN202310742174.4A 2023-06-20 2023-06-20 Data model association processing method and device, electronic equipment and storage medium Pending CN116737695A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310742174.4A CN116737695A (en) 2023-06-20 2023-06-20 Data model association processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310742174.4A CN116737695A (en) 2023-06-20 2023-06-20 Data model association processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116737695A true CN116737695A (en) 2023-09-12

Family

ID=87907820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310742174.4A Pending CN116737695A (en) 2023-06-20 2023-06-20 Data model association processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116737695A (en)

Similar Documents

Publication Publication Date Title
CN107247808B (en) Distributed NewSQL database system and picture data query method
CN111506559B (en) Data storage method, device, electronic equipment and storage medium
US20080312992A1 (en) Automatic business process creation method using past business process resources and existing business process
CN105893526A (en) Multi-source data fusion system and method
KR101475335B1 (en) Enhancing an inquiry for a search of a database
AU2015331030A1 (en) System generator module for electronic document and electronic file
US9239863B2 (en) Method and apparatus for graphic code database updates and search
CN112559524A (en) Index database establishing method and device and storage medium
CN110222046B (en) List data processing method, device, server and storage medium
CN116680270A (en) Data table conversion method, device and storage medium
CN103678591A (en) Device and method for automatically executing multi-service receipt statistical treatment
CN106202440B (en) Data processing method, device and equipment
CN111191153A (en) Information technology consultation service display device
CN110737432A (en) script aided design method and device based on root list
CN112183037A (en) Data classification and summarization method and system in parallel enterprise finance and tax SaaS system
CN114995877B (en) Variable configuration method and device
CN116737695A (en) Data model association processing method and device, electronic equipment and storage medium
CN116186119A (en) User behavior analysis method, device, equipment and storage medium
CN111984657B (en) Data collection method, device, storage medium and computer equipment
CN115953119A (en) Form authority management method and device, storage medium and electronic equipment
CN112948441B (en) Multi-dimensional data collection method and equipment for financial data
CN113901046A (en) Virtual dimension table construction method and device
CN114969109A (en) Progressive interactive data query system, method and medium
CN115203253A (en) Billboard data query method and device, computer terminal and storage medium
CN114895955A (en) Method, device and equipment for controlling metadata version of low-code platform

Legal Events

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