CN116431607A - Data model reconstruction method, device, equipment and storage medium thereof - Google Patents

Data model reconstruction method, device, equipment and storage medium thereof Download PDF

Info

Publication number
CN116431607A
CN116431607A CN202310396751.9A CN202310396751A CN116431607A CN 116431607 A CN116431607 A CN 116431607A CN 202310396751 A CN202310396751 A CN 202310396751A CN 116431607 A CN116431607 A CN 116431607A
Authority
CN
China
Prior art keywords
topic
target
tables
theme
data model
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
CN202310396751.9A
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202310396751.9A priority Critical patent/CN116431607A/en
Publication of CN116431607A publication Critical patent/CN116431607A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (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 embodiment of the application belongs to the technical field of data processing, is applied to the field of data model reconstruction, and relates to a data model reconstruction method, a device, equipment and a storage medium thereof, wherein the method comprises the steps of receiving a data model reconstruction instruction; obtaining a theme table which can be selected for reconstruction from a source pasting layer of a preset data warehouse; numbering the selectable theme list according to a preset numbering rule to obtain a numbering result; obtaining an optimal combination mode among the selectable theme tables during reconstruction according to preset constraint conditions and preset configuration files; generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information; and replacing the target theme domains, and circularly executing the steps until all the theme domains generate corresponding combination tables, stopping the circulation, and completing the reconstruction of the data model. And (3) automatically reconstructing the data model by adopting a cyclic generation mode, and directly acquiring the layer data of the source layer to reduce the coupling degree of a reconstruction result.

Description

Data model reconstruction method, device, equipment and storage medium thereof
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for reconstructing a data model.
Background
The data application report is an important tool for a company operation decision maker to statistically analyze, grasp market opportunities and adjust strategies. With the explosive growth of data scale, the dimension combinations of business demands on market analysis are also various, the bottom data model is also complicated, the computing resources are also continuously increased, the dimension and index of business use can be rapidly supported, a reasonable data model is generated, and the difficulty of each data developer is solved.
In the prior art, in the early stage of data application, a data team builds a chimney for developing a data model for rapidly meeting service requirements, and the data model is updated repeatedly continuously, so that the data model is updated in the later stage, and the cost is heavy, and the main expression is as follows: the later reconstruction data model is often dependent on the capability level of a person, and is time-consuming, labor-consuming and long in period; the business analysis is combined in many ways, the data model is processed in a wide form and is coupled with high speed, and the maintenance labor is difficult. Therefore, the prior art also has the problems of high coupling of the reconstruction result and time and labor consumption of the reconstruction process when reconstructing the data model.
Disclosure of Invention
An embodiment of the application aims to provide a data model reconstruction method, a device, equipment and a storage medium thereof, so as to solve the problems of high coupling of a reconstruction result and time and labor consumption of a reconstruction process in the prior art when the data model is reconstructed.
In order to solve the above technical problems, the embodiments of the present application provide a data model reconstruction method, which adopts the following technical schemes:
a data model reconstruction method comprising the steps of:
step 201, receiving a data model reconstruction instruction sent by a reconstruction target with a target subject domain, wherein the data model reconstruction instruction comprises distinguishing identification information of the target subject domain;
step 202, analyzing the data model reconstruction instruction to obtain the distinguishing identification information of the target subject domain;
step 203, obtaining a topic table for reconstructing the target topic domain from a preset source layer of a data warehouse, wherein the topic table is a data base table in the source layer, and the topic domain represents a wide table which is composed of a plurality of topic tables and can at least cover one actual business process;
step 204, numbering the selectable theme table according to a preset numbering rule to obtain a numbering result;
step 205, obtaining an optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to a preset constraint condition and a preset configuration file;
Step 206, generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information;
and step 207, replacing the target theme zone, and circularly executing the steps 201 to 207 until all the theme zones generate corresponding combination tables, stopping the circulation, and completing the reconstruction of the data model.
Further, the step of numbering the selectable theme table according to a preset numbering rule to obtain a numbering result specifically includes:
acquiring unique primary key information corresponding to the selectable topic tables respectively, wherein the primary key information comprises table names;
numbering the selectable topic tables by adopting a positive integer from 1 to n, wherein n represents the number of the selectable topic tables;
and caching the serial numbers and the corresponding unique primary key information in a key value mode, and taking the cached key value pairs as serial number processing results.
Further, the constraint condition is specifically that the number of tables of the target topic tables participating in the combination is the minimum, and the number of excessive topic tables in the target topic tables participating in the combination is also the minimum, and the step of obtaining the optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to the preset constraint condition and the preset configuration file specifically includes:
Determining all data application fields required for reconstructing the target subject domain based on the configuration file, wherein all data application fields required for reconstructing the target subject domain are written in the configuration file in advance;
screening according to the all data application fields, screening a theme table containing at least any data application field in all the data application fields from the selectable theme tables as a target theme table, and constructing a target theme table set;
presetting a topic table with data line numbers exceeding a preset line number threshold as an excessive topic table;
screening out the optimal combination mode of all the obtained data application fields from the target theme table set according to the constraint condition;
and taking the optimal combination mode as the optimal combination mode among the selectable theme tables when reconstructing the target theme domain.
Further, the step of screening the topic table including at least any one of the data application fields from the selectable topic tables as a target topic table, and constructing a target topic table set specifically includes:
obtaining the number of each target topic table according to the key value pair corresponding to each target topic table;
Acquiring data application fields respectively contained in the target topic tables;
constructing a characterization field for each target topic table according to the number of each target topic table and the contained data application field;
and adding the characterization fields corresponding to the target topic tables into a preset set one by one to complete the construction of the target topic table set.
Further, after performing the step of constructing a characterization field for each of the target topic tables according to the number of each of the target topic tables and the included data application fields, the method further includes:
according to the characterization fields corresponding to the target topic tables, comparing and identifying;
dividing all target topic tables into two categories of a necessary topic table and a non-necessary topic table according to a comparison and identification result, wherein the necessary topic table is the target topic table of which any one or any data application field exists in the table only;
setting a distinguishing field for each target topic table after classification according to the different classification types;
and inserting the distinguishing field into the characterization field corresponding to each target theme table, and updating the characterization field.
Further, the step of screening the optimal combination manner of all the data application fields from the target topic table set specifically includes:
Acquiring the number of the necessary topic table and the data application fields not contained in all the necessary topic tables according to the updated characterization fields;
taking the non-contained data application fields as a combination target, and screening an optimal combination mode conforming to the constraint condition from the unnecessary topic table according to the updated characterization fields;
acquiring the number of each unnecessary topic table in the optimal combination mode conforming to the constraint condition;
and taking the numbers of the unnecessary topic tables and the numbers of the necessary topic tables as the numbers of the topic tables which can be selected when the target topic domain is reconstructed.
Further, the step of generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information specifically includes:
acquiring the number of the selectable topic table when reconstructing the target topic domain, and taking the number as the optimal combination mode;
and acquiring the selectable topic tables according to the numbers of the selectable topic tables to jointly construct an integrated wide table, and taking the distinguishing identification information as the table name of the integrated wide table to finish the generation of the combined table.
In order to solve the above technical problems, the embodiments of the present application further provide a data model reconstruction device, which adopts the following technical scheme:
A data model reconstruction apparatus, comprising:
the system comprises a reconstruction instruction receiving module, a reconstruction instruction processing module and a reconstruction instruction processing module, wherein the reconstruction instruction receiving module is used for receiving a data model reconstruction instruction sent by a reconstruction target by a target theme zone, and the data model reconstruction instruction comprises distinguishing identification information of the target theme zone;
the analysis acquisition module is used for analyzing the data model reconstruction instruction and acquiring the distinguishing identification information of the target subject domain;
the topic table acquisition module is used for acquiring topic tables which are selectable for reconstructing the target topic domain from a source pasting layer of a preset data warehouse, wherein the topic tables are data base tables in the source pasting layer, and the topic domain represents a wide table which is formed by a plurality of topic tables and can at least cover one actual business process;
the theme table numbering module is used for numbering the selectable theme tables according to a preset numbering rule to obtain a numbering result;
the optimal combination module is used for acquiring an optimal combination mode among the selectable topic tables when the target topic domain is reconstructed according to preset constraint conditions and preset configuration files;
the combination table generation module is used for generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information;
And the circulation control module is used for replacing the target theme domains, circularly executing the steps until all the theme domains generate corresponding combination tables, stopping circulation and completing the reconstruction of the data model.
In order to solve the above technical problems, the embodiments of the present application further provide a computer device, which adopts the following technical schemes:
a computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the data model reconstruction method described above.
In order to solve the above technical problems, embodiments of the present application further provide a computer readable storage medium, which adopts the following technical solutions:
a computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of a data model reconstruction method as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
according to the data model reconstruction method, a data model reconstruction instruction sent by a reconstruction target through a target subject domain is received; analyzing the data model reconstruction instruction to obtain the distinguishing identification information of the target subject domain; acquiring a theme table which can be used for reconstructing the target theme domain from a source-attaching layer of a preset data warehouse; numbering the selectable theme table according to a preset numbering rule to obtain a numbering result; acquiring an optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to preset constraint conditions and preset configuration files; generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information; and replacing the target theme domains, and circularly executing the steps until all the theme domains generate corresponding combination tables, stopping the circulation, and completing the reconstruction of the data model. And (3) automatically reconstructing the data model by adopting a cyclic generation mode, and directly acquiring the layer data of the source layer to reduce the coupling degree of a reconstruction result.
Drawings
For a clearer description of the solution in the present application, a brief description will be given below of the drawings that are needed in the description of the embodiments of the present application, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a data model reconstruction method according to the present application;
FIG. 3 is a flow chart of one embodiment of step 205 of FIG. 2;
FIG. 4 is a flow chart of one embodiment of step 302 shown in FIG. 3;
FIG. 5 is a flow chart of one embodiment of step 304 of FIG. 3;
FIG. 6 is a schematic diagram of one embodiment of a data model reconstruction apparatus according to the present application;
FIG. 7 is a schematic diagram of an embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to better understand the technical solutions of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture ExpertsGroup Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving PictureExperts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the data model reconstruction method provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the data model reconstruction device is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow chart of one embodiment of a data model reconstruction method according to the present application is shown. The data model reconstruction method comprises the following steps:
In step 201, a data model reconstruction instruction sent by a reconstruction target in a target theme zone is received.
In this embodiment, the data model reconstruction instruction includes distinguishing identification information of the target subject domain.
In an actual data warehouse construction scenario, a theme zone is often set by taking a business system for executing the actual business process as a whole, where the theme zone is formed by a plurality of theme tables, each theme table corresponds to a specific entity class, and each theme table includes a plurality of data application fields, where the data application fields often include attribute fields of the entity class and processing fields set in the actual business process.
Taking insurance industry as an example, when the data warehouse is constructed, the data warehouse is often divided into a production system, a sales system, a core protection system, a claim settlement system and the like, each system is provided with a set of complete actual business flow, each system is taken as a whole to set a theme zone respectively, and different identification information is set for each theme zone according to the difference of the systems.
By receiving the reconstruction instruction, the topic domain which is currently subjected to data model reconstruction is identified, so that the topic domain which needs to be reconstructed is determined according to the instruction, and the blind operation on the original data in the data warehouse is avoided.
Step 202, analyzing the data model reconstruction instruction, and obtaining the distinguishing identification information of the target subject domain.
And 203, acquiring a theme table which can be used for reconstructing the target theme zone from a source-attached layer of a preset data warehouse.
In this embodiment, the topic table is a data base table in the source layer, and the topic field represents a wide table composed of a plurality of topic tables and at least capable of covering one actual business process.
In this embodiment, the source layer, that is, the ODS layer in the data warehouse, where data in the ODS layer is source data after data cleaning and data error correction, and is stored in a data base table with the lowest dimension.
By directly acquiring the data base table from the ODS layer, the situation that the acquired data table is processed is avoided, the data model is reconstructed according to the data base table of the ODS layer, and the influence of dirty data generated by chimney type development of the data warehouse on the model reconstruction is greatly reduced.
And 204, numbering the selectable theme table according to a preset numbering rule to obtain a numbering result.
In this embodiment, the step of numbering the selectable theme table according to a preset numbering rule to obtain a numbering result specifically includes: acquiring unique primary key information corresponding to the selectable topic tables respectively, wherein the primary key information comprises table names; numbering the selectable topic tables by adopting a positive integer from 1 to n, wherein n represents the number of the selectable topic tables; and caching the serial numbers and the corresponding unique primary key information in a key value mode, and taking the cached key value pairs as serial number processing results.
Step 205, obtaining an optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to a preset constraint condition and a preset configuration file.
In this embodiment, the constraint condition is specifically a combination mode corresponding to when the number of tables of the target topic tables participating in the combination is the minimum value and the number of excessive topic tables in the target topic tables participating in the combination is also the minimum.
According to the constraint condition, the optimal combination mode in the ideal state is that the data application field in one target topic table can meet the business flow requirement of the target topic domain, and the target topic table is not an excessive topic table, so that the target topic table can be directly set as a combination table.
However, in most practical business process requirements, multiple, even tens or hundreds of topic tables are often required to be combined together to construct a combination table required by the topic domain. At this time, let us assume that the number of topic tables is n, and the extreme cases include two cases, the first is that there is a single table to meet the requirement of the topic domain of the combination table, and the second is that all topic tables, i.e. the wide tables formed by combining n topic tables together, obviously, the other combination modes are as follows: 2 n -n-1, i.e. the combination in the non-extreme case is 2 n -one of n-1 combinations. The n topic tables are combined together to form a combination table corresponding to the topic domain, and any two of the n topic tables can be combined, and n-1 of the n topic tables can be combined.
Therefore, when the number of the topic tables is smaller, the processing resources of the server are saved, and the situation that useless fields are easily brought into when the topic tables are more and more are combined is reduced as much as possible.
In addition, a combination method of selecting the least number of the excessive topic tables is considered when the combination tables are combined. The more the number of the excessive topic tables to be combined is avoided, the more the data fields in the combination table are, and the influence of the finally reconstructed data model on the data processing efficiency in the actual business flow is effectively prevented.
With continued reference to fig. 3, fig. 3 is a flow chart of one embodiment of step 205 shown in fig. 2, comprising:
step 301, determining all data application fields required for reconstructing the target subject domain based on the configuration file, wherein all data application fields required for reconstructing the target subject domain are written in the configuration file in advance;
step 302, screening according to the all data application fields, and screening a topic table containing at least any data application field in all the data application fields from the selectable topic tables as a target topic table to construct a target topic table set;
With continued reference to FIG. 4, FIG. 4 is a flow chart of one embodiment of step 302 shown in FIG. 3, comprising:
step 401, obtaining the number of each target topic table according to the key value pair corresponding to each target topic table;
step 402, acquiring data application fields respectively contained in the target topic table;
step 403, constructing a characterization field for each target topic table according to the number of each target topic table and the included data application field;
in this embodiment, after performing the step of constructing a characterization field for each of the target topic tables according to the number of each of the target topic tables and the included data application field, the method further includes: according to the characterization fields corresponding to the target topic tables, comparing and identifying; dividing all target topic tables into two categories of a necessary topic table and a non-necessary topic table according to a comparison and identification result, wherein the necessary topic table is the target topic table of which any one or any data application field exists in the table only; setting a distinguishing field for each target topic table after classification according to the different classification types; inserting the distinguishing fields into the characterization fields corresponding to the target topic tables, and updating the characterization fields;
The necessary topic table and the unnecessary topic table are divided, so that the combination table corresponding to the constructed target topic domain is determined, the topic table which is necessary to use and the topic table which can be selectively used are avoided, blind combination of all target topic tables is avoided, and combination adjustment time is saved;
step 404, adding the characterization fields corresponding to the target topic tables into a preset set one by one, and completing the construction of the target topic table set;
step 303, presetting a topic table with data line number exceeding a preset line number threshold as an excessive topic table;
step 304, screening out the optimal combination mode of all the data application fields from the target theme table set according to the constraint condition;
with continued reference to fig. 5, fig. 5 is a flow chart of one embodiment of step 304 of fig. 3, including:
step 501, obtaining the number of the necessary topic table and the data application fields not included in all the necessary topic tables according to the updated characterization fields;
step 502, taking the data application field not included as a combination target, and screening an optimal combination mode conforming to the constraint condition from the unnecessary topic table according to the updated characterization field;
Step 503, obtaining the number of each unnecessary topic table in the optimal combination mode conforming to the constraint condition;
step 504, taking the number of each unnecessary topic table and the number of the necessary topic table as the number of the topic table which can be selected when reconstructing the target topic domain;
and 305, using the optimal combination mode as the optimal combination mode among the selectable theme tables when reconstructing the target theme zone.
Step 206, generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information;
in this embodiment, the step of generating the combination table corresponding to the target theme zone according to the optimal combination manner and the distinguishing identification information specifically includes: acquiring the number of the selectable topic table when reconstructing the target topic domain, and taking the number as the optimal combination mode; and acquiring the selectable topic tables according to the numbers of the selectable topic tables to jointly construct an integrated wide table, and taking the distinguishing identification information as the table name of the integrated wide table to finish the generation of the combined table.
And step 207, replacing the target theme zone, and circularly executing the steps 201 to 207 until all the theme zones generate corresponding combination tables, stopping the circulation, and completing the reconstruction of the data model.
The method comprises the steps of receiving a data model reconstruction instruction sent by a reconstruction target through a target theme zone; analyzing the data model reconstruction instruction to obtain the distinguishing identification information of the target subject domain; acquiring a theme table which can be used for reconstructing the target theme domain from a source-attaching layer of a preset data warehouse; numbering the selectable theme table according to a preset numbering rule to obtain a numbering result; acquiring an optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to preset constraint conditions and preset configuration files; generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information; and replacing the target theme domains, and circularly executing the steps until all the theme domains generate corresponding combination tables, stopping the circulation, and completing the reconstruction of the data model. And (3) automatically reconstructing the data model by adopting a cyclic generation mode, and directly acquiring the layer data of the source layer to reduce the coupling degree of a reconstruction result.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
In the embodiment of the application, a cyclic generation mode is adopted, data in a data warehouse is operated to reconstruct a data model automatically, and the coupling degree of a reconstruction result is reduced by directly acquiring the layer data of the source layer.
With further reference to fig. 6, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a data model reconstruction apparatus, where an embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 6, the data model reconstruction device 600 according to the present embodiment includes: a reconstruction instruction receiving module 601, an analysis acquiring module 602, a topic table acquiring module 603, a topic table numbering module 604, an optimal combination module 605, a combination table generating module 606 and a circulation control module 607. Wherein:
A reconstruction instruction receiving module 601, configured to receive a data model reconstruction instruction sent by a reconstruction target with a target topic domain, where the data model reconstruction instruction includes distinguishing identification information of the target topic domain;
the analysis acquisition module 602 is configured to analyze the data model reconstruction instruction, and acquire the distinguishing identification information of the target subject domain;
the topic table obtaining module 603 is configured to obtain, from a source layer of a preset data warehouse, a topic table that is used for reconstructing the target topic domain, where the topic table is a data base table in the source layer, and the topic domain represents a wide table that is formed by a plurality of topic tables and can at least cover one actual business process;
the topic table numbering module 604 is configured to perform numbering processing on the selectable topic table according to a preset numbering rule, so as to obtain a numbering processing result;
the optimal combination module 605 is configured to obtain an optimal combination manner between the selectable topic tables when reconstructing the target topic domain according to a preset constraint condition and a preset configuration file;
a combination table generating module 606, configured to generate a combination table corresponding to the target subject domain according to the optimal combination manner and the distinguishing identification information;
The circulation control module 607 is configured to replace the target theme zone, perform the above steps in a circulation manner until all the theme zones generate the corresponding combination table, stop the circulation, and complete the reconstruction of the data model.
The method comprises the steps of receiving a data model reconstruction instruction sent by a reconstruction target through a target theme zone; analyzing the data model reconstruction instruction to obtain the distinguishing identification information of the target subject domain; acquiring a theme table which can be used for reconstructing the target theme domain from a source-attaching layer of a preset data warehouse; numbering the selectable theme table according to a preset numbering rule to obtain a numbering result; acquiring an optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to preset constraint conditions and preset configuration files; generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information; and replacing the target theme domains, and circularly executing the steps until all the theme domains generate corresponding combination tables, stopping the circulation, and completing the reconstruction of the data model. And (3) automatically reconstructing the data model by adopting a cyclic generation mode, and directly acquiring the layer data of the source layer to reduce the coupling degree of a reconstruction result.
Those skilled in the art will appreciate that implementing all or part of the above described embodiment methods may be accomplished by computer readable instructions, stored on a computer readable storage medium, that the program when executed may comprise the steps of embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 7, fig. 7 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 7 comprises a memory 7a, a processor 7b, a network interface 7c communicatively connected to each other via a system bus. It should be noted that only a computer device 7 having components 7a-7c is shown in the figures, but it should be understood that not all of the illustrated components need be implemented, and that more or fewer components may alternatively be implemented. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 7a includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 7a may be an internal storage unit of the computer device 7, such as a hard disk or a memory of the computer device 7. In other embodiments, the memory 7a may also be an external storage device of the computer device 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 7. Of course, the memory 7a may also comprise both an internal memory unit of the computer device 7 and an external memory device. In this embodiment, the memory 7a is typically used to store an operating system and various application software installed on the computer device 7, such as computer readable instructions of a data model reconstruction method. Further, the memory 7a may be used to temporarily store various types of data that have been output or are to be output.
The processor 7b may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 7b is typically used to control the overall operation of the computer device 7. In this embodiment, the processor 7b is configured to execute computer readable instructions stored in the memory 7a or process data, such as computer readable instructions for executing the data model reconstruction method.
The network interface 7c may comprise a wireless network interface or a wired network interface, which network interface 7c is typically used for establishing a communication connection between the computer device 7 and other electronic devices.
The embodiment provides computer equipment, which belongs to the technical field of data model reconstruction. The method comprises the steps of receiving a data model reconstruction instruction sent by a reconstruction target through a target theme zone; analyzing the data model reconstruction instruction to obtain the distinguishing identification information of the target subject domain; acquiring a theme table which can be used for reconstructing the target theme domain from a source-attaching layer of a preset data warehouse; numbering the selectable theme table according to a preset numbering rule to obtain a numbering result; acquiring an optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to preset constraint conditions and preset configuration files; generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information; and replacing the target theme domains, and circularly executing the steps until all the theme domains generate corresponding combination tables, stopping the circulation, and completing the reconstruction of the data model. And (3) automatically reconstructing the data model by adopting a cyclic generation mode, and directly acquiring the layer data of the source layer to reduce the coupling degree of a reconstruction result.
The present application also provides another embodiment, namely, a computer readable storage medium, where computer readable instructions are stored, where the computer readable instructions are executable by a processor, to cause the processor to perform the steps of the data model reconstruction method as described above.
The embodiment provides a computer readable storage medium, which belongs to the technical field of data model reconstruction. The method comprises the steps of receiving a data model reconstruction instruction sent by a reconstruction target through a target theme zone; analyzing the data model reconstruction instruction to obtain the distinguishing identification information of the target subject domain; acquiring a theme table which can be used for reconstructing the target theme domain from a source-attaching layer of a preset data warehouse; numbering the selectable theme table according to a preset numbering rule to obtain a numbering result; acquiring an optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to preset constraint conditions and preset configuration files; generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information; and replacing the target theme domains, and circularly executing the steps until all the theme domains generate corresponding combination tables, stopping the circulation, and completing the reconstruction of the data model. And (3) automatically reconstructing the data model by adopting a cyclic generation mode, and directly acquiring the layer data of the source layer to reduce the coupling degree of a reconstruction result.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.

Claims (10)

1. A method of data model reconstruction, comprising the steps of:
step 201, receiving a data model reconstruction instruction sent by a reconstruction target with a target subject domain, wherein the data model reconstruction instruction comprises distinguishing identification information of the target subject domain;
step 202, analyzing the data model reconstruction instruction to obtain the distinguishing identification information of the target subject domain;
step 203, obtaining a topic table for reconstructing the target topic domain from a preset source layer of a data warehouse, wherein the topic table is a data base table in the source layer, and the topic domain represents a wide table which is composed of a plurality of topic tables and can at least cover one actual business process;
step 204, numbering the selectable theme table according to a preset numbering rule to obtain a numbering result;
step 205, obtaining an optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to a preset constraint condition and a preset configuration file;
step 206, generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information;
And step 207, replacing the target theme zone, and circularly executing the steps 201 to 207 until all the theme zones generate corresponding combination tables, stopping the circulation, and completing the reconstruction of the data model.
2. The method for reconstructing a data model according to claim 1, wherein the step of numbering the selectable theme table according to a preset numbering rule to obtain a numbering result specifically comprises:
acquiring unique primary key information corresponding to the selectable topic tables respectively, wherein the primary key information comprises table names;
numbering the selectable topic tables by adopting a positive integer from 1 to n, wherein n represents the number of the selectable topic tables;
and caching the serial numbers and the corresponding unique primary key information in a key value mode, and taking the cached key value pairs as serial number processing results.
3. The method for reconstructing a data model according to claim 2, wherein the constraint condition is that the number of tables of the target topic tables involved in the combination is the minimum and the number of excessive topic tables in the target topic tables involved in the combination is also the minimum, and the step of obtaining the optimal combination mode among the selectable topic tables when reconstructing the target topic domain according to the preset constraint condition and the preset configuration file specifically includes:
Determining all data application fields required for reconstructing the target subject domain based on the configuration file, wherein all data application fields required for reconstructing the target subject domain are written in the configuration file in advance;
screening according to the all data application fields, screening a theme table containing at least any data application field in all the data application fields from the selectable theme tables as a target theme table, and constructing a target theme table set;
presetting a topic table with data line numbers exceeding a preset line number threshold as an excessive topic table;
screening out the optimal combination mode of all the obtained data application fields from the target theme table set according to the constraint condition;
and taking the optimal combination mode as the optimal combination mode among the selectable theme tables when reconstructing the target theme domain.
4. The method for reconstructing a data model according to claim 3, wherein the step of screening a topic table containing at least any one of the data application fields from the selectable topic tables as a target topic table, and constructing a target topic table set specifically comprises:
Obtaining the number of each target topic table according to the key value pair corresponding to each target topic table;
acquiring data application fields respectively contained in the target topic tables;
constructing a characterization field for each target topic table according to the number of each target topic table and the contained data application field;
and adding the characterization fields corresponding to the target topic tables into a preset set one by one to complete the construction of the target topic table set.
5. The data model reconstruction method according to claim 4, wherein after performing the step of constructing a characterization field for each of the target topic tables based on the number of each of the target topic tables and the included data application fields, the method further comprises:
according to the characterization fields corresponding to the target topic tables, comparing and identifying;
dividing all target topic tables into two categories of a necessary topic table and a non-necessary topic table according to a comparison and identification result, wherein the necessary topic table is the target topic table of which any one or any data application field exists in the table only;
setting a distinguishing field for each target topic table after classification according to the different classification types;
And inserting the distinguishing field into the characterization field corresponding to each target theme table, and updating the characterization field.
6. The method for reconstructing a data model according to claim 5, wherein the step of screening the optimal combination manner of all the data application fields from the target topic table set comprises the following specific steps:
acquiring the number of the necessary topic table and the data application fields not contained in all the necessary topic tables according to the updated characterization fields;
taking the non-contained data application fields as a combination target, and screening an optimal combination mode conforming to the constraint condition from the unnecessary topic table according to the updated characterization fields;
acquiring the number of each unnecessary topic table in the optimal combination mode conforming to the constraint condition;
and taking the numbers of the unnecessary topic tables and the numbers of the necessary topic tables as the numbers of the topic tables which can be selected when the target topic domain is reconstructed.
7. The method for reconstructing a data model according to any one of claims 1 to 6, wherein the step of generating a combination table corresponding to the target subject domain according to the optimal combination manner and the distinguishing identification information specifically includes:
Acquiring the number of the selectable topic table when reconstructing the target topic domain, and taking the number as the optimal combination mode;
and acquiring the selectable topic tables according to the numbers of the selectable topic tables to jointly construct an integrated wide table, and taking the distinguishing identification information as the table name of the integrated wide table to finish the generation of the combined table.
8. A data model reconstruction apparatus, comprising:
the system comprises a reconstruction instruction receiving module, a reconstruction instruction processing module and a reconstruction instruction processing module, wherein the reconstruction instruction receiving module is used for receiving a data model reconstruction instruction sent by a reconstruction target by a target theme zone, and the data model reconstruction instruction comprises distinguishing identification information of the target theme zone;
the analysis acquisition module is used for analyzing the data model reconstruction instruction and acquiring the distinguishing identification information of the target subject domain;
the topic table acquisition module is used for acquiring topic tables which are selectable for reconstructing the target topic domain from a source pasting layer of a preset data warehouse, wherein the topic tables are data base tables in the source pasting layer, and the topic domain represents a wide table which is formed by a plurality of topic tables and can at least cover one actual business process;
the theme table numbering module is used for numbering the selectable theme tables according to a preset numbering rule to obtain a numbering result;
The optimal combination module is used for acquiring an optimal combination mode among the selectable topic tables when the target topic domain is reconstructed according to preset constraint conditions and preset configuration files;
the combination table generation module is used for generating a combination table corresponding to the target subject domain according to the optimal combination mode and the distinguishing identification information;
and the circulation control module is used for replacing the target theme domains, circularly executing the steps until all the theme domains generate corresponding combination tables, stopping circulation and completing the reconstruction of the data model.
9. A computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the data model reconstruction method of any one of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the data model reconstruction method according to any one of claims 1 to 7.
CN202310396751.9A 2023-04-07 2023-04-07 Data model reconstruction method, device, equipment and storage medium thereof Pending CN116431607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310396751.9A CN116431607A (en) 2023-04-07 2023-04-07 Data model reconstruction method, device, equipment and storage medium thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310396751.9A CN116431607A (en) 2023-04-07 2023-04-07 Data model reconstruction method, device, equipment and storage medium thereof

Publications (1)

Publication Number Publication Date
CN116431607A true CN116431607A (en) 2023-07-14

Family

ID=87082828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310396751.9A Pending CN116431607A (en) 2023-04-07 2023-04-07 Data model reconstruction method, device, equipment and storage medium thereof

Country Status (1)

Country Link
CN (1) CN116431607A (en)

Similar Documents

Publication Publication Date Title
CN116431878A (en) Vector retrieval service method, device, equipment and storage medium thereof
CN116934283A (en) Employee authority configuration method, device, equipment and storage medium thereof
CN117216114A (en) Data stream association method, device, equipment and storage medium thereof
CN116661936A (en) Page data processing method and device, computer equipment and storage medium
CN116383787A (en) Page creation method, page creation device, computer equipment and storage medium
CN116483425A (en) Micro-service gray level edition issuing method, device, equipment and storage medium thereof
CN114676272A (en) Information processing method, device and equipment of multimedia resource and storage medium
CN116431607A (en) Data model reconstruction method, device, equipment and storage medium thereof
CN116662418A (en) Report realization method, device and equipment based on configuration and storage medium thereof
CN117421207A (en) Intelligent evaluation influence point test method, intelligent evaluation influence point test device, computer equipment and storage medium
CN116701488A (en) Data processing method, device, computer equipment and storage medium
CN117234505A (en) Interactive page generation method, device, equipment and storage medium thereof
CN117370558A (en) Data integration method, device, equipment and storage medium thereof
CN116775671A (en) Automatic data transfer method, device, equipment and storage medium thereof
CN116701512A (en) Inter-server data call acceleration method, inter-server data call acceleration device, inter-server data call acceleration equipment and storage medium of inter-server data call acceleration equipment
CN116737833A (en) CDC data resource synchronization method based on partition mode and related equipment thereof
CN116467166A (en) Defect information processing method, device, equipment and storage medium thereof
CN117034875A (en) Text data generation method, device, equipment and storage medium thereof
CN116611434A (en) Data enhancement method, device, equipment and storage medium thereof
CN116795882A (en) Data acquisition method, device, computer equipment and storage medium
CN117850842A (en) Plug-in updating method, device, equipment and storage medium thereof
CN117785181A (en) Code execution method, device, equipment and storage medium thereof
CN116933733A (en) Text input display method, device, equipment and storage medium thereof
CN115511277A (en) Activity task issuing method and device, computer equipment and storage medium
CN116991729A (en) Test case generation method, device, equipment and storage medium thereof

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